473,660 Members | 2,445 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Event for Datagrid sorting?

Hi

I just want to know if there is a event for the datagrid's sorting in
C#? I am developing a windows application in Visual Studio 2003.

Thanx in advance for any help!
Paul

Nov 17 '05 #1
2 1562
Hi,

There is no such event as of .NET Framework 1.1, to the best of my
knowledge. What you can do however is to handle the MouseUp event, do a hit
test and if the click was performed on a column header and sorting is
enabled, you know that the sort order has probably changed. Of course don't
forget to keep track of the current sort column so you know whether the user
has just changed the sort order for the current column or changed the sort
column altogether.

--
Sincerely,
Dmytro Lapshyn [Visual Developer - Visual C# MVP]
"PJHORNSA" <sp**@qbcon.com > wrote in message
news:11******** **************@ z14g2000cwz.goo glegroups.com.. .
Hi

I just want to know if there is a event for the datagrid's sorting in
C#? I am developing a windows application in Visual Studio 2003.

Thanx in advance for any help!
Paul


Nov 17 '05 #2
Thanx for the information. I am sure it would help!

Nov 17 '05 #3

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

Similar topics

0
1013
by: Karlo Swart via .NET 247 | last post by:
Hi. I am creating a dynamic datagrid. The columns are based on a request.querystring value. Eg: I will pass in a 'func=toys' parameter, which will cause the datagrid to load create columns specific to a toys xml file I pass in. I have a problem with the sort functionality. I have created the sorting command handler and this works fine when the columns are not created dynamically. I successfully create the columns for the datagrid in the...
3
4083
by: | last post by:
Is there an event that is invoked when a user sorts a column in a Windows Forms DataGrid? I have context senstive icons that are enabled\disabled depending upon the selected item in the datagrid. When I sort the datagrid the selected item changes. I can not find the event that is fired when the sorting occurrs therfore I cannot enable\disable the icons Thanks in advance,
1
4110
by: Lisa | last post by:
I have a web app that gets a recordset from the database and fills a grid. You can drilldown from this table to a detail table. Because the tables sometimes get huge, and because I have to go back to the database again every time I postback anyway, I wanted to disable ViewState in the grids. Just to minimize the amount of stuff that gets downloaded to the client. The problem is that none of the postbacks work. They postback, but...
2
1535
by: Shiju Poyilil | last post by:
I have a link button "lButton" created dynamically at the item databound event of the data grid "datagrid1" in the footer.so i want to execute the item command event of the datagrid on clicking the dynamicaly created link button, but when at runtime i click the dymanic created control it disapears from the datagrid footer and then it doesnt fire the itemcommand event of the datagrid. I am pasting below the pieces of my code for your...
1
1844
by: John | last post by:
When sorting a datagrid by clicking its column header, a ListChanged event is raised by the dataview on that the datagrid is based. However, inside the ListChanged event handler, I loop through the dataview and see that the order of the dataview is not changed. I have a SequenceNumber column in that dataview and wish to reset the column when the datagrid is sorted. I don't want to loop through the datagrid, it's slow. Any suggesstions,...
2
4044
by: shuckjunkmail | last post by:
It was suggested that I re-submit this question as a new post rather than adding onto an old and unanswered post. The basic problem has to do with the .NET datagrid and sorting. I am having trouble getting the correct row of data from the datagrid immediately after re-sorting the datagrid. I am using the dataview for accessing the data and am using the following code as previously mentioned in a different post: Dim bm As...
1
1453
by: Carl Dreher | last post by:
I need to detect when the user clicks on a column header to resort the data in a DataGrid. I've added an event handler to my class, which is a form that hold the DataGrid: Private Sub DataGridLamps_Navigate(ByVal sender As System.Object, ByVal ne As System.Windows.Forms.NavigateEventArgs) Handles MyDataGrid.Navigate 'do stuff here End Sub The form also has:
1
3080
by: Mark Gilkes | last post by:
I have a DataGrid which I am adding to the page dynamically at the Init stage of the page load. The DataGrid has AutoGenerateColumns turned off, has BoundColumns and is bound to a DataView for its’ data source. I have also added a TemplateColumn which is defined in a derived class and contains an ImageButton. The derived TemplateColumn class contains an event handler for DataBinding and in this handler I assign the ImageButton ID. The...
2
1892
by: Anup | last post by:
Hi Group, In my application I am using a datagrid, now I m implementing sorting for that datagrid, I am changing the flag for ascending and descending when SortCommand event of datagrid is fired. Now the problem I am facing is that the Sort Command event is being fired twice even if I click the header in datagrid only once thus my flag is getting reset to the original value.
0
8341
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
8542
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7362
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6181
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5650
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4177
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4343
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2760
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1984
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.