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

Scroll problem in Syncfusion grid

There was a problem regarding scrolling within a grid.Please give some solution to this problem. Step 1 - I Loaded a lengthy grid Step 2 - Observed what the last item is. Step 3 - I adjusted ANY of the column widths. Results: The last item disappeared from view again behind the horizontal scrol bar. A user must arrow down to reveal the hidden item number.

4 Replies

AD Administrator Syncfusion Team March 2, 2004 11:06 AM UTC

I assume you mean to change the column width so that a previously hidden horizontal scrollbar appears so it hides the last row. Is that correct? The problem I see when I do this is that clientarea is not adjusted to take into account the area removed by showing the horizaontal scrollbar. As a result, the scrollbar is still positioned at the bottom even though not all rows are visible. I was able to work around this problem by subscribing to the grid.Model.ColWidthsChanged event and forcing the clientarea to be readjusted.
private void gridModel_ColWidthsChanged(object sender, GridRowColSizeChangedEventArgs e)
{
	this.gridDataBoundGrid1.ViewLayout.Reset();
	this.gridDataBoundGrid1.UpdateScrollBars(); 
}


US uschie March 5, 2004 03:13 AM UTC

I tried what you have mentioned in the form load event but it did not work. Also please tell me what is the event that is analogous to ''ColWidthsChanged'' in VB.Net for a databound grid. Thanks Uschie >I assume you mean to change the column width so that a previously hidden horizontal scrollbar appears so it hides the last row. Is that correct? > >The problem I see when I do this is that clientarea is not adjusted to take into account the area removed by showing the horizaontal scrollbar. As a result, the scrollbar is still positioned at the bottom even though not all rows are visible. > >I was able to work around this problem by subscribing to the grid.Model.ColWidthsChanged event and forcing the clientarea to be readjusted. >
>private void gridModel_ColWidthsChanged(object sender, GridRowColSizeChangedEventArgs e)
>{
>	this.gridDataBoundGrid1.ViewLayout.Reset();
>	this.gridDataBoundGrid1.UpdateScrollBars(); 
>}
>


AD Administrator Syncfusion Team March 5, 2004 07:36 AM UTC

ColWidthsChanged is a member of the grid.Model. So, you could subscribe to the event through the grid.Model property in FormLoad.
''in formload
AddHandler Me.grid.Model.ColWidthsChanged, AddressOf gridModel_ColWidthsChanged

Private Sub gridModel_ColWidthsChanged(sender As Object, e As GridRowColSizeChangedEventArgs)
   Me.grid.ViewLayout.Reset()
   Me.grid.UpdateScrollBars()
End Sub ''gridModel_ColWidthsChanged


US uschie March 9, 2004 03:58 AM UTC

Thanks. This has worked as desired. Actually I was keen to know another thing which is not about syncfusion.Pl.suggest.(It''s in VB.Net) 1.There is a main window that has an mdi child. 2.The child window is minimised using minimise button & then dragged below the desktop. 3.Scroll bars appear on the main window. 4.The main window(image & text) appears distorted .

Loader.
Up arrow icon