This topic has been archived. It cannot be replied.
-
工作学习 / 专业技术讨论 / .NET DataGridView Custom Sorting?
Does anyone know how to do datagrid custom sorting in .net? How to disable the build in sorting feature of datagrid and use the sorting function created by myself.
-ttaaoo(tao);
2007-1-24
(#3454256@0)
-
For DataGridView: Set DataGridViewColumn.SortMode Property to Programmatic and use DataGridView.Sort Method. For System.windows.form.DataGridIf you don't define your own DataGridTableStyle, set DataGrid.AllowSorting Property to false.
If you define your own DataGridTableStyle, set DataGridTableStyle.AllowSorting =false which overrides DataGrid.AllowSorting Property .
Bind DataView to DataGrid.DataSource (Don't use datatable or DataSet, etc). Then Set DataView.Sort programmaticlly.
-tjhong(TjHong);
2007-1-24
{353}
(#3454358@0)