| |||||||||||
DataGridColumn.SortExpression PropertySystem.Web.UI.WebControls Namespace DataGridColumn Class Sets or retrieves the field name or expression to pass to the DataGridSortCommandEventHandler when a column is selected for sorting. Syntax
Property Value
The property is read/write with no default value. RemarksUse the SortExpression property to specify or determine the name of the field to pass to the SortCommand event handler when a column is selected for sorting. When AutoGenerateColumns is true, the SortExpression property for each column in the DataGrid is automatically set with the field name bound to the column. Otherwise ( when AutoGenerateColumns is false ), you need to manually set the SortExpression property for each column that you want to enable sorting for. The value of the SortExpression property for the selected column is passed to the SortCommand event handler as part of the DataGridSortCommandEventArgs object. ExampleThe following example demonstrates how to access the SortExpression property of a DataGridSortCommandEventArgs object, to determine which column the user selected to sort the DataGrid control by.
See AlsoDataGridColumn Members DataGridSortCommandEventArgs DataGridSortCommandEventHandler |
| ||||||||||
Check out related books at Amazon
© 2000-2008 Rey Nuñez All rights reserved.
If you have any question, comment or suggestion
about this site, please send us a note
You can help support aspxtreme