Solved

Infragistics UltraWinGrid: Sort Question

Posted on 2006-11-17
2
3,058 Views
Last Modified: 2012-05-05
I am using Infragistics UltraWinGrid v3.1

How can I set the ActiveRow to the first row in the grid after it has been sorted?  When I first display the grid I set the first row to the ActiveRow using
grdResults.ActiveRow = grdResults.GetRow(ChildRow.First);

Once the grid has been sorted this no longer works as the row is the first row in the dataset but not the sorted gird.  Any help is appreciated!
0
Comment
Question by:thespiceman
2 Comments
 
LVL 15

Accepted Solution

by:
ozymandias earned 500 total points
Comment Utility
I'm not sure but it should be something like this :

grdResults.ActiveRow = grdResults.Rows[0];
0
 

Author Comment

by:thespiceman
Comment Utility
The code works but it needs the following additional code...

private void InitializeComponent()
{
...
this.grdResults.AfterSortChange += new Infragistics.Win.UltraWinGrid.BandEventHandler(this.grdResults_AfterSortChange);
...
}
                  
private void grdResults_AfterSortChange(object sender, Infragistics.Win.UltraWinGrid.BandEventArgs e)
{
       grdResults.ActiveRow = grdResults.Rows[0];
}

Also this code works
grdResults.ActiveRow = grdResults.GetRow(ChildRow.First);
but I didn't have it in the "AfterSortChange" event handler.
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Introduction Although it is an old technology, serial ports are still being used by many hardware manufacturers. If you develop applications in C#, Microsoft .NET framework has SerialPort class to communicate with the serial ports.  I needed to…
This article introduced a TextBox that supports transparent background.   Introduction TextBox is the most widely used control component in GUI design. Most GUI controls do not support transparent background and more or less do not have the…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

744 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now