I am using the following technique to extract data from a GridNumericColumn:
This works fine until I add a DataFormatString to format the number to a currency. When the format is applied, the Entry.Value returns a string with the formatting (e.g., "$1,000.00"), which of course won't load into its corresponding numeric field in the new row.
Is there a way using this approach to extract the value without the formatting?
I also have a similar problem when using the GridDateTimeColumn with a DataFormatString.
Thanks,
Al
e.Item.OwnerTableView.ExtractValuesFromItem(NewValues, EditedItem); |
foreach (DictionaryEntry Entry in NewValues) |
{ |
if (Entry.Value == null) |
{ |
NewRow[(string)Entry.Key] = DBNull.Value; |
} |
else |
{ |
NewRow[(string)Entry.Key] = Entry.Value; |
} |
} |
This works fine until I add a DataFormatString to format the number to a currency. When the format is applied, the Entry.Value returns a string with the formatting (e.g., "$1,000.00"), which of course won't load into its corresponding numeric field in the new row.
Is there a way using this approach to extract the value without the formatting?
I also have a similar problem when using the GridDateTimeColumn with a DataFormatString.
Thanks,
Al