I'm using bound columns. The DataFormatString doesn't work.
I have this:
int liTimeStampIndex =
m_DataSet.Tables[lsTableName].Columns.IndexOf("time_stamp");
((BoundColumn)m_dgLogData.Columns[liTimeStampIndex]).DataFormatString =
"MM/dd/yy HH:mm:ss:fff";
The columns displays "MM/dd/yy HH:mm:ss:fff" instead of the time values now.
What am I missing?
jim
"Shiva" <sh******@online.excite.com> wrote in message
news:ud**************@TK2MSFTNGP15.phx.gbl...
If you are using DataBinder.Eval(), pass the required formatting for the
3rd
parameter. In case of BoundColumn, use DataFormatString attribute.
HTH
"Jim H" <no****@jimsaccount.com> wrote in message
news:O1**************@tk2msftngp13.phx.gbl...
I have a datagrid on a web form that is bound to a datatable that has a
column with datetime values. The default format is displaying the date
and
time down to the second. I'd like to display the time down to the
millisecond as well as change the default for some other parts of the
datetime.
So instead of this:
MM/dd/yyyy hh:mm:ss
I'd like to display it like this:
MM/dd/yy HH:mm:ss:fff
Any ideas?
jim