Solved

Infragistics UltraWinGrid: Sort Question

Posted on 2006-11-17
2
3,061 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
ID: 17968857
I'm not sure but it should be something like this :

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

Author Comment

by:thespiceman
ID: 17969148
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
IO.FileSystemWatcher dies when used in Powershell 1 44
Visual Studio 2013 debugging 2 35
Iterate two lists and remove inactive 11 49
Server Error 11 47
Extention Methods in C# 3.0 by Ivo Stoykov C# 3.0 offers extension methods. They allow extending existing classes without changing the class's source code or relying on inheritance. These are static methods invoked as instance method. This…
Article by: Ivo
C# And Nullable Types Since 2.0 C# has Nullable(T) Generic Structure. The idea behind is to allow value type objects to have null values just like reference types have. This concerns scenarios where not all data sources have values (like a databa…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

929 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

12 Experts available now in Live!

Get 1:1 Help Now