Home › Forums › WinForms controls › Xceed Grid for WinForms › Sort & Primary Key. › Reply To: Sort & Primary Key.
Actually, you don’t need to keep the two collections sorted the same way. You can send the SourceObject of the SelectedRows to the edit form to get the right rows, instead of using the myDataView. For example :
ArrayList mySourceObjects = new ArrayList();
foreach( Row selectedRow in gridControl1.SelectedRows )
{
mySourceObjects.Add( ( ( Xceed.Grid.DataRow )selectedRow ).SourceObject );
}
//pass mySourceObjects to the edit form.
You can look at the following <a href=”http://www.xceedsoft.com/Forums/ShowPost.aspx?PostID=4396″> forum</a> to see an example of using the SourceObject.
Imported from legacy forums. Posted by André (had 4014 views)