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

ResizeToFit issue

I have a grid where I am resizing the row heights to fit the text in a note cell. The grid is only 120 pixels high. If there is only one item in the grid and the row height exceeds the height of the grid, the vertical scrollbar is not shown. Is there anything I can do to fix this? JH

8 Replies

AD Administrator Syncfusion Team June 10, 2004 12:11 PM

You should be able to force the scrollbar to appear by setting: grid.VScrollBehavior = GridScrollbarMode.Enabled; You probably also need to set grid.VScrollPixel = true; to enable pixel scrolling.


JH Jamie Hill June 10, 2004 12:24 PM

I forgot to mention that I am using version 1.6.1.8 of the controls. Is VScrollPixel available in this version? I cannot find it. JH >You should be able to force the scrollbar to appear by setting: > >grid.VScrollBehavior = GridScrollbarMode.Enabled; > > >You probably also need to set > >grid.VScrollPixel = true; > >to enable pixel scrolling.


AD Administrator Syncfusion Team June 10, 2004 12:27 PM

No, it is not, and you will not be able to scroll to the bottom of the cell that has been cut off for this reason. Version 1.6.1.8 requires that the grid scrolls whole rows.


JH Jamie Hill June 10, 2004 12:28 PM

I have tried setting this already and the scrollbar shows, but is disabled. >You should be able to force the scrollbar to appear by setting: > >grid.VScrollBehavior = GridScrollbarMode.Enabled; > > >You probably also need to set > >grid.VScrollPixel = true; > >to enable pixel scrolling.


AD Administrator Syncfusion Team June 10, 2004 12:49 PM

The reason it is disabled is that you cannot scroll anything in this situation.


SA Satish June 10, 2004 09:12 PM

I have same requirement like DataBoundGrid I want make it as a readonly but allow the user to scroll. Is it possible? thanks Satish >The reason it is disabled is that you cannot scroll anything in this situation.


AD Administrator Syncfusion Team June 11, 2004 02:03 AM

ReadOnly does not affect the ability to scroll. If a GridControl has more than one row in it and all rows are not visible, then you should be able to scroll it whether or not it is readonly. If a GridControl has a single row in it, and the rowhieght is such that the cell is not fully visible, then you have to be using 2.0, and set VPixelScroll = true to allow things to scroll. And this does not depend upon whether or not the grid is readonly. To set a GridControl readonly, you can use GridControl.ReadOnly or GridControl.TableStyle.ReadOnly.


SA Satish June 11, 2004 04:57 AM

Clay, Great it worked. Thanks Satish >ReadOnly does not affect the ability to scroll. > >If a GridControl has more than one row in it and all rows are not visible, then you should be able to scroll it whether or not it is readonly. > >If a GridControl has a single row in it, and the rowhieght is such that the cell is not fully visible, then you have to be using 2.0, and set VPixelScroll = true to allow things to scroll. And this does not depend upon whether or not the grid is readonly. > >To set a GridControl readonly, you can use GridControl.ReadOnly or GridControl.TableStyle.ReadOnly.

Loader.
Live Chat Icon For mobile
Up arrow icon