winforms - gridview cell timespan edit problem
Posted
by
Sharique
on Stack Overflow
See other posts from Stack Overflow
or by Sharique
Published on 2011-01-04T06:02:07Z
Indexed on
2011/01/04
6:54 UTC
Read the original article
Hit count: 416
I'm following this question for formatting timespan value in the gridview.
Format TimeSpan in DataGridView column
I'm diaplying only minutes value in grid as follows
DataGridViewColumn idleTimeColumn = myGridView.Columns["IdleTime"];
idleTimeColumn.DefaultCellStyle.FormatProvider = new TimeSpanFormatter();
idleTimeColumn.DefaultCellStyle.Format = "m";
This cell is editable, so when I enter 5 (that mean 5 min) in the cell, then it should take it minute, but it take it as day value (ie, 5.00:00:00).
I tried different values for format (mm,%m) but all these gives the same output.
© Stack Overflow or respective owner