Solved

DataGrid Sorting

Posted on 2007-11-15
2
241 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 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

Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
This video shows how to use Hyena, from SystemTools Software, to update 100 user accounts from an external text file. View in 1080p for best video quality.

734 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