|
Question : Sorting a date column in dataview
|
|
I'm implementing column sorting in a dataset with:
Sub BindGrid(SortField As String) Dim Source As DataView = dsScores.DefaultView Source.Sort = SortField
dgScores.DataSource = Source dgScores.DataBind() End Sub
Works great on alph/num column but sorts the date column as an alpha. Haven't found anything in the docs that hints at how to type column datatypes for either the dataView or the DataSet that used to create dataview.
thankx --steve...
|
|
Answer : Sorting a date column in dataview
|
|
Steve
check whether the date column in a dataset is not typeof(string) make sue it is typeof(DateTime)
this could be the reason for sorting date column alphabetically.
Rajesh
|
|
|