?
Solved

DataGrid Sorting

Posted on 2007-11-15
2
Medium Priority
?
252 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 40

Accepted Solution

by:
evilrix earned 1000 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 1000 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

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

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…
For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…

649 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