Have a datagrid bound to dataview. Initial Dataview.Sort is empty. Datagrid displays fine initially. After clicking on a column header, the datagrid comes back empty. The DataGrid_SortCommand is simply:
DataView1.Sort = e.SortExpression
DataGrid1.DataBind()
The datagrid does display properly (including being sorted) if I re-retrieve the data in the DataGrid_SortCommand:
DataView1.Sort = e.SortExpression
SqlDataAdapter1.Fill(DsCategories1)
DataGrid1.DataBind()
I shouldn't have to re-retrieve the data, should I? I've read other posts that the datagrid is kind of funky, but what I'm doing comes right from the examples. Any thoughts?
DataView1.Sort = e.SortExpression
DataGrid1.DataBind()
The datagrid does display properly (including being sorted) if I re-retrieve the data in the DataGrid_SortCommand:
DataView1.Sort = e.SortExpression
SqlDataAdapter1.Fill(DsCategories1)
DataGrid1.DataBind()
I shouldn't have to re-retrieve the data, should I? I've read other posts that the datagrid is kind of funky, but what I'm doing comes right from the examples. Any thoughts?