How to display time in datagridview
I have use Genneric datagridview.
I can display calendar using calendar column
But i want 2 display only time in datagridview
Is there is any soln?
Plz help me out!
Time in Datagridview(Window Application)
3 Answers
Know the answer? Post it. Somebody with the same question will find it here.


hari Kishan11 reputationPosted Dec 27, 2010, 3:24 AM EST
gr.Columns["ColumnIndex"].DefaultCellStyle = "HH:mm:ss"
Date column of table should be bound to this column.
Pravin GhadgeRank #1,340 · 1.3K reputationPosted Dec 27, 2010, 3:47 AM EST
I have use ur code
DGVSearch.Columns[0].DefaultCellStyle ="HH:mm:ss";
bt it giving me foll. err:
Cannot implicitly convert type 'string' to 'System.Windows.Forms.DataGridViewCellStyle'
hari Kishan11 reputationPosted Dec 27, 2010, 8:09 PM EST
http://social.msdn.microsoft.com/Forums/en-US/csharpgeneral/thread/c2ea4bd6-1d15-4946-94c2-f423248b24b5/