2 grids- 1 scrollbar

I’d like to have 2 grids on a form, one on top of the other. I’d like to have the horizontal scroll bar invisible on the top grid and when the user scrolls on the bottom grid, have it scroll both grids.

Is this possible? Can you provide code if so?

Thanks.

Hi,

We will investigate if we can fulfill your requirement. We need some time to evaluate it.

I have logged it with an id: CELLSNET-17617. Once we have any update about it, we will notify you.

Thank you.

Hi,


We have supported your requirement in Aspose.Cells.GridDesktop v2.2.0.2001 (attached). Please handle the Scroll event of the second GridDesktop control with the following code:

private void gridDesktop2_Scroll(object sender, ScrollEventArgs e)

{

if (e.ScrollOrientation == ScrollOrientation.HorizontalScroll)

{

int firstCol = gridDesktop2.GetActiveWorksheet().GetFirstVisibleColumn();

gridDesktop1.GetActiveWorksheet().SetFirstVisibleColumn(firstCol);

}

else

{

int firstRow = gridDesktop2.GetActiveWorksheet().GetFirstVisibleRow();

gridDesktop1.GetActiveWorksheet().SetFirstVisibleRow(firstRow);

}

<span style=“font-size: 10pt; font-family: “Courier New”;” lang=“EN-US”>
}



Thank you.