We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

GridGroupingControl - Fixing Record (display) Position in Grid

Hi All,

We are using GridGroupingControl v4.2.0.37.

Our grid dataset will be updated at regular intervals, which meens no of records in grid keeps getting changed.

Now my problem is, when I select a row, say 5th row from top, it should appear at same screen postion irrespective of rows addition/deletion, sort, grouping etc. I tried ScrollInView but it dint work as expected. I mean scrollbar should automatically get adjusted to show me the selected row at same screen position.

Can you plz tell me how to achieve this?

Thanks & Rgds
Rajani Kanth

1 Reply

RA Rajagopal Syncfusion Team August 10, 2007 02:35 AM UTC

Hi Rajani,

Please try the code below in the SourceListListChanged event of the grid to retain the row position in the grid when rows are added/deleted.

Record rec = this.gridGroupingControl1.Table.Records[5];
int rowIndex = this.gridGroupingControl1.Table.DisplayElements.IndexOf(rec);
this.gridGroupingControl1.TableControl.CurrentCell.MoveTo(rowIndex, 1, GridSetCurrentCellOptions.ScrollInView);

Let me know if this helps.

Have a nice time.
Regards,
Rajagopal

Loader.
Live Chat Icon For mobile
Up arrow icon