Click here to Skip to main content
11,920,211 members (49,335 online)
Rate this:
Please Sign up or sign in to vote.
Hi Friends,

am working on .Net using ( 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


Posted 2-Feb-13 21:36pm
Krunal Rohit 3-Feb-13 2:39am
So where do you stuck ?

1 solution

Rate this: bad
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 -[^][^]

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

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

  Print Answers RSS
0 OriginalGriff 455
1 phil.o 170
2 CPallini 150
4 F-ES Sitecore 130
0 OriginalGriff 6,778
1 KrunalRohit 4,495
2 Sergey Alexandrovich Kryukov 3,153
3 George Jonsson 2,810
4 Suvendu Shekhar Giri 2,181

Advertise | Privacy | Mobile
Web02 | 2.8.151120.1 | 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