Click here to Skip to main content
15,891,981 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi Friends,

am working on .Net using (asp.net c#, SqlServer 2005)

iam working on Gridview Task.

In this Gridview, it contains Footer textboxes to enter the data. so its works fine.

my requirement is :

In this Gridview i have a textbox to enter time. Generally we will enter time as 1300.

so in gridview it should display as 13:00.

Please can you give me the solution to add colon after time entered as 1300.

i need it as 13:00

Help.

Thanks
Posted
Comments
[no name] 3-Feb-13 2:39am    
So where do you stuck ?

1 solution

There are two possibilities of addressing this issue.
One would be to use a MaskedTextBox inside the GridView.
Here are some discussions on this topic -
http://www.c-sharpcorner.com/Forums/Thread/195963/masked-textboxes-and-gridview.aspx[^]
http://bytes.com/topic/net/answers/716606-maskededit-control-gridview[^]

The other would be to format text inside textbox using the String.Format[^].
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900