• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 261
  • Last Modified:

DataGrid Sorting

Is there any way to determine what column a datagrid is sorted on given only the datagrid and the datatable.  Ex. I have a datagrid that is using a datatable as a datasource.  The user clicks on a column header to sort the datagrid.  When the datatable is refreshed, the datagrid goes back to the default sort order.  At the time I go to refresh the datatable, is there any way I can determine the current sort order?????????
0
gvector1
Asked:
gvector1
2 Solutions
 
evilrixSenior Software Engineer (Avast)Commented:
Isn't the idea that you bind the grid to a DataView and it's the view that holds the state, including the sort criteria?

http://msdn2.microsoft.com/en-us/library/system.data.dataview.aspx
0
 
vbturboCommented:
picking up on evilrix (sort criteria defined)

try read this PAQ
http://www.experts-exchange.com/Programming/Languages/.NET/Q_21095550.html

vbturbo
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now