Solved

DataGrid Sorting

Posted on 2007-11-15
2
240 Views
Last Modified: 2013-12-17
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
Comment
Question by:gvector1
2 Comments
 
LVL 40

Accepted Solution

by:
evilrix earned 250 total points
ID: 20292016
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
 
LVL 18

Assisted Solution

by:vbturbo
vbturbo earned 250 total points
ID: 20292292
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: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

We all know that functional code is the leg that any good program stands on when it comes right down to it, however, if your program lacks a good user interface your product may not have the appeal needed to keep your customers happy. This issue can…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

820 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question