RowIndex after Sorting DataGrid in VB.NET

blumenhause

Member
Joined
Jun 27, 2006
Messages
5
Programming Experience
Beginner
Hi,

I tried my best, but couldn't solve this..

Once I sort a DataGrid column by clicking the Column Header, the selected row (which I have designed to highlight while clicking with mouse or using Up/Down Keys) doesn't get highlighted again..Now none of the rows are highlighted(I have set Grids SelectionBackColor)..

I know that CurrentRowIndex property doesnt change after sorting, but is there a way that the same row can be highlighted (Currently its done using Me.DataGrid1.Select(Me.Datagrid1.CurrentRowIndex) in the MouseUp event Handler) after the Column is sorted.. I am binding the DataGrid some TextBox controls below so that the TextBoxes gets populated with Grid Data once the Row is Clicked..

I am using VB.NET 2003 (Not ASP.NET) with Windows XP.. Any help on this would be greatly appreciated..

Regards,

Blumen
 
Back
Top