This question is locked. New answers and comments are not allowed.
Hi
I am setting GridViewDataColumn.DataFormatString = {0:c};
For example a cell will render $2.25. I then change the cell value to 3.55. (It shows as 3.55 in edit mode)
When exiting the row the RadGridView1_RowValidating event fires (see below).
HOW DO I GET THE REAL VALUE 3.55. I know i can parse the string and get rid of the $ but this is a generic process, I don't know anything about the data, it is created dynamically using reflection..
Thanks
Rich
I am setting GridViewDataColumn.DataFormatString = {0:c};
For example a cell will render $2.25. I then change the cell value to 3.55. (It shows as 3.55 in edit mode)
When exiting the row the RadGridView1_RowValidating event fires (see below).
void RadGridView1_RowValidating(object sender, GridViewRowValidatingEventArgs e){ var oldValues = e.OldValues; foreach (KeyValuePair<string, object> kvp in oldValues) { String key = kvp.Key; // The value is UnitPrice Object value = kvp.Value; // The value is 2.25 THIS IS GOOD. } GridViewRow myRow = e.Row as GridViewRow; foreach (GridViewCell cell in myRow.Cells) { Object value = cell.Value; // the value is $3.55 DON"T WANT THE $
} }HOW DO I GET THE REAL VALUE 3.55. I know i can parse the string and get rid of the $ but this is a generic process, I don't know anything about the data, it is created dynamically using reflection..
Thanks
Rich