473,408 Members | 2,009 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,408 software developers and data experts.

DataGrid, how to determine which column is being sorted on

Hi,

I've a DataGrid and a DataSet (not a DataView) as the DataSource.
Users can click on column headers and sort the contents of the DataGrid.
I want to know how to determine which column is being used to order the sorted data.
I can't see in the microsoft DataGrid in vb.net the Event 'SortCommand'.
I think that its because I'm using vb.net not asp.

Thanks in advance.
Nov 20 '05 #1
3 3752
Hi Paul,

Everything you wanted to know about the datagrid.
http://www.syncfusion.com/FAQ/WinForms/FAQ_c44c.asp

When it is not there it will be hard to find.

I hope this helps?

Cor

I've a DataGrid and a DataSet (not a DataView) as the DataSource.
Users can click on column headers and sort the contents of the DataGrid.
I want to know how to determine which column is being used to order the sorted data. I can't see in the microsoft DataGrid in vb.net the Event 'SortCommand'.
I think that its because I'm using vb.net not asp.

Nov 20 '05 #2
I have the same quesiton and this was the first place I looked. I see using
the bindingmanagerbase to do this, but I don't know where to put this. What
event is it when the user sorts? I want this to fire automatically after
the sort occurs, but I'm not sure where to stick the code that is on this
link to reference that row.

Thanks,
Ben

"Cor Ligthert" <no**********@planet.nl> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
Hi Paul,

Everything you wanted to know about the datagrid.
http://www.syncfusion.com/FAQ/WinForms/FAQ_c44c.asp

When it is not there it will be hard to find.

I hope this helps?

Cor

I've a DataGrid and a DataSet (not a DataView) as the DataSource.
Users can click on column headers and sort the contents of the DataGrid.
I want to know how to determine which column is being used to order the

sorted data.
I can't see in the microsoft DataGrid in vb.net the Event 'SortCommand'.
I think that its because I'm using vb.net not asp.


Nov 20 '05 #3
Hi,

There isn't a sort event. On the mousedown event for the datagrid
check and see if the person clicked on a columnheader.

http://www.onteorasoftware.com/downl...redcolumns.zip

Ken
----------------------

"Becker" <be*@benbecker.net> wrote in message
news:#E*************@TK2MSFTNGP11.phx.gbl:
I have the same quesiton and this was the first place I looked. I see
using
the bindingmanagerbase to do this, but I don't know where to put this.
What
event is it when the user sorts? I want this to fire automatically after

the sort occurs, but I'm not sure where to stick the code that is on this

link to reference that row.

Thanks,
Ben

"Cor Ligthert" <HYPERLINK
"mailto:no**********@planet.nl"no**********@planet .nl> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
Hi Paul,

Everything you wanted to know about the datagrid.
HYPERLINK
"http://www.syncfusion.com/FAQ/WinForms/FAQ_c44c.asp"http://www.syncfusion.c
om/FAQ/WinForms/FAQ_c44c.asp

When it is not there it will be hard to find.

I hope this helps?

Cor


I've a DataGrid and a DataSet (not a DataView) as the DataSource.
Users can click on column headers and sort the contents of the
DataGrid.
I want to know how to determine which column is being used to order
the
sorted data.

I can't see in the microsoft DataGrid in vb.net the Event
'SortCommand'.
I think that its because I'm using vb.net not asp.



--
Outgoing mail is certified Virus Free.
Checked by AVG Anti-Virus (http://www.grisoft.com).
Version: 7.0.230 / Virus Database: 263.3.3 - Release Date: 6/18/2004
Nov 20 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Oliver Drobnik | last post by:
Hi, I have a datagrid bound to a datatable. Now if I sort the datagrid by clicking on one of the column heads I can no longer use the index in the datagrid to find the corresponding row in the...
8
by: pcPirate | last post by:
Hi, I've followed some advice through this forum in which I would change the dataset value in order to change the particular cell value in datagrid via coding. What I'm doing now is that, if I...
1
by: Das | last post by:
Hi, I'm using c# windows application & set the allowsort property to true. I wanted to know. when user clicks the header of any column the data is sorted by that column. How can I know which is...
5
by: Jason | last post by:
I've been trying to figure out a good way to do this but haven't had much luck, any input would be greatly appreciated. Basically, after a datagrid is sorted, how can I get the primary key value...
13
by: pmcguire | last post by:
I have a DataGrid control for which I have also created several new extended DataGridColumnStyles. They behave pretty nicely, but I can't figure out how to implement Selected Item formatting for...
10
by: JohnR | last post by:
I have a datatable as the datasource to a datagrid. The datagrid has a datagridtablestyle defined. I use the datagridtablestyle to change the order of the columns (so they can be different than...
0
by: rn5a | last post by:
A DataGrid control displays records from a SQL Server 2005 DB table. The AllowSorting property of the DataGrid has been set to True & the SortExpressions of the BoundColumns have been set to the...
1
by: ECD | last post by:
Hello all, I can usually find solutions to my .NET problems by searching these groups, but I'm stumped on this one. I have a datagrid in VB.NET (2.0 framework). I want to disable sorting on...
3
by: rn5a | last post by:
A DataGrid has the following TemplateColumn: <asp:DataGrid ID="dgCart"...OnSortCommand="SortGrid" AllowSorting="true"....> <Column> <asp:TemplateColumn HeaderImageUrl="Images\Up.gif"...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.