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.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

GridGroupingControl - Fixing Record (display) Position in Grid

Thread ID:

Created:

Updated:

Platform:

Replies:

67172 Aug 9,2007 03:50 PM UTC Aug 10,2007 02:35 AM UTC Windows Forms 1
loading
Tags: GridControl
Badri Rajani Kanth
Asked On August 9, 2007 03:50 PM UTC

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

Rajagopal [Syncfusion]
Replied On 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

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;