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. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Scrolling a GGC nested table cell into grid view

Thread ID:

Created:

Updated:

Platform:

Replies:

59329 Apr 11,2007 10:38 AM UTC Apr 12,2007 09:25 AM UTC WinForms 2
loading
Tags: GridControl
Helen
Asked On April 11, 2007 10:38 AM UTC

Hello,

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

Thanks,
Helen

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

Helen
Replied On 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

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

;