Click here to Skip to main content
13,511,903 members
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 20: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
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web01 | 2.8.180417.1 | Last Updated 3 Feb 2013
Copyright © CodeProject, 1999-2018
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