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

Scroll problem in Syncfusion grid

Thread ID:

Created:

Updated:

Platform:

Replies:

11299 Mar 2,2004 08:22 AM UTC Mar 9,2004 03:58 AM UTC WinForms 4
loading
Tags: GridControl
uschie
Asked On March 2, 2004 08:22 AM UTC

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.

Administrator [Syncfusion]
Replied On 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(); 
}

uschie
Replied On 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(); 
>}
>

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

uschie
Replied On 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 .

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

;