C cfyam Aug 17, 2003 #1 After I set the datagrid allowsort is true, the position of data binding will not correct when i click the row header! How can I slove the problem?
After I set the datagrid allowsort is true, the position of data binding will not correct when i click the row header! How can I slove the problem?
D Dmitriy Lapshin [C# / .NET MVP] Aug 18, 2003 #2 Hello, There are several possible problems matching your description. Could you please be more specific on what do you want to achieve and what is going wrong?
Hello, There are several possible problems matching your description. Could you please be more specific on what do you want to achieve and what is going wrong?
P Preeti Aug 18, 2003 #3 You will have to do something like this in the DataGrid_SortCommand Event. DataView SortedView =(DataView)(DataGrid1.DataSource); SortedView.Sort= e.SortExpression+" DESC"; DataGrid1.DataSource=SortedView; DataGrid1.DataBind(); This will sort in the descending order.
You will have to do something like this in the DataGrid_SortCommand Event. DataView SortedView =(DataView)(DataGrid1.DataSource); SortedView.Sort= e.SortExpression+" DESC"; DataGrid1.DataSource=SortedView; DataGrid1.DataBind(); This will sort in the descending order.