Click here to Skip to main content
11,432,168 members (56,629 online)
Rate this: bad
good
Please Sign up or sign in to vote.
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 2-Feb-13 21:36pm
Comments
Krunal Rohit at 3-Feb-13 2:39am
   
So where do you stuck ?

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

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[^].
  Permalink  

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



Advertise | Privacy | Mobile
Web04 | 2.8.150428.2 | Last Updated 3 Feb 2013
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100