M
Mark Gilbert
The only way i could see to insert prices into a datagrid was to use
strings.
Heres a fragment...
oTable.Columns.Add(New DataColumn("Price", GetType(String)))
..
..
..
oRow("Price") = nPrice.ToString("C")
..
..
..
oSpecs = New DataView(oTable)
oSpecs.Sort = "Price"
Now the problem is, the column is obviously being sorted as regards to
a string rather than a currency. For instance i end up with it
ordered like this...
£1,100.50
£400.00
£700.50
£800.70
Is there any way to make the datagrid aware that a column contains
currency values? I couldn't find an appropriate datatype.
strings.
Heres a fragment...
oTable.Columns.Add(New DataColumn("Price", GetType(String)))
..
..
..
oRow("Price") = nPrice.ToString("C")
..
..
..
oSpecs = New DataView(oTable)
oSpecs.Sort = "Price"
Now the problem is, the column is obviously being sorted as regards to
a string rather than a currency. For instance i end up with it
ordered like this...
£1,100.50
£400.00
£700.50
£800.70
Is there any way to make the datagrid aware that a column contains
currency values? I couldn't find an appropriate datatype.