T
Tina
I'm in the RowDataBound event for a gridview. my money fields and dates
are in unedited format. The following works fine but is this the easiest
way? Isn't there a way to apply formating to the string without having to
convert the string to its native type and then back to an edited string?
double mydouble = double.Parse(e.Row.Cells[totalcharge].Text);
e.Row.Cells[totalcharge].Text = mydouble.ToString("c");
DateTime myDateTime = DateTime.Parse(e.Row.Cells[designdate].Text);
e.Row.Cells[designdate].Text = myDateTime.ToShortDateString();
Thanks,
T
are in unedited format. The following works fine but is this the easiest
way? Isn't there a way to apply formating to the string without having to
convert the string to its native type and then back to an edited string?
double mydouble = double.Parse(e.Row.Cells[totalcharge].Text);
e.Row.Cells[totalcharge].Text = mydouble.ToString("c");
DateTime myDateTime = DateTime.Parse(e.Row.Cells[designdate].Text);
e.Row.Cells[designdate].Text = myDateTime.ToShortDateString();
Thanks,
T