Hello
I've a listview,
The datasource is a dataset builded like that:
Dim dataSet As DataSet = New DataSet
Dim dtPart As DataTable = New DataTable("Products")
dtPart.Columns.Add("id", Type.GetType("System.String"))
dtPart.Columns.Add("name", Type.GetType("System.String"))
dtPart.Columns.Add("brand", Type.GetType("System.String"))
dtPart.Columns.Add("price", Type.GetType("System.Double"))
then I ve a method to sort it by price:
Protected Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Dim expression As New RadListViewSortExpression()
listview .SortExpressions.Clear()
expression.FieldName = "price"
expression.SortOrder = RadListViewSortOrder.Ascending
listview.SortExpressions.AddSortExpression(expression)
listview .Rebind()
End Sub
My issue is it sort by price considering the column as string. For instance:
30 will be greater than 200
How can I tell the sortexpressions that it sort decimals?
Thanx
I've a listview,
The datasource is a dataset builded like that:
Dim dataSet As DataSet = New DataSet
Dim dtPart As DataTable = New DataTable("Products")
dtPart.Columns.Add("id", Type.GetType("System.String"))
dtPart.Columns.Add("name", Type.GetType("System.String"))
dtPart.Columns.Add("brand", Type.GetType("System.String"))
dtPart.Columns.Add("price", Type.GetType("System.Double"))
then I ve a method to sort it by price:
Protected Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Dim expression As New RadListViewSortExpression()
listview .SortExpressions.Clear()
expression.FieldName = "price"
expression.SortOrder = RadListViewSortOrder.Ascending
listview.SortExpressions.AddSortExpression(expression)
listview .Rebind()
End Sub
30 will be greater than 200
How can I tell the sortexpressions that it sort decimals?
Thanx