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

Scrolling a GGC nested table cell into grid view

Hello,

How can I scroll a GGC nested table cell into the grid view?

Thanks,
Helen

2 Replies

HA haneefm Syncfusion Team April 11, 2007 05:25 PM UTC

Hi Helen,

You can get the position of vertical scroll bar using the TableControl.GetCurrentVScrollPixelPos() method and set the position of vertical scroll bar using the TableControl.SetCurrentVScrollPixelPos() method. Using these methods you can able to move the ScrollBar as required

this.gridGroupingControl1.TableControl.SetCurrentVScrollPixelPos(PixelPosition);

Best regards,
Haneef


HE Helen April 12, 2007 09:25 AM UTC

Hi Haneef,

Thanks for your suggestion, however hard-coding the scroll bar is not what I need. Sorry for being unclear.

Anyway, I have already found what I need. GridGroupingControl has built-in means to scroll cells into the visible area. For the root table, we can use the this.grid.TableControl.ScrollCellInView(...) method to make the cell visible. For the nested table, we can also use the ScrollCellInView(...) method, but it should be applied to the GridNestedTableControl object. I just had difficulties with getting the GridNestedTableControl object corresponding to the needed nested table, but now it's clear.

Here is the code I use, in case anyone needs something like this:

GridTableCellStyleInfoIdentity cellIdentity = (childTable.ParentTable as GridTable).GetTableCellStyle(rec, "ColumnName").TableCellIdentity;
GridNestedTableControl ntc = cellIdentity.GetActiveGridView() as GridNestedTableControl;
ntc.ScrollCellInView (cellIdentity.RowIndex, cellIdentity.ColIndex);


Best regards,
Helen

Loader.
Live Chat Icon For mobile
Up arrow icon