Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
140
UltraWinGrid ScrollBar
posted

Hi,

Can any one help me with the following scenario. Might be simple one.

I want the vertical scroll bar to be enable when ever the number of record exceeds the desired number. Else, no need to display the scroll itself. The Vertical scroll will not be available what so ever.

Thanks for your help in advance.

Regards

Mithilesh

  • 469350
    Suggested Answer
    Offline posted

    Hi Mithilesh,

    sumansms said:
    I want the vertical scroll bar to be enable when ever the number of record exceeds the desired number.

    sumansms said:
    The Vertical scroll will not be available what so ever.

    You seem to be contradicting yourself here.

    Assuming that the second quote is a typo, then it sounds like all you need to do is set the grid.DisplayLayout.ScrollBars property to exclude the vertical scrollbar based on the number of rows. The most difficult part of this is trapping all of the place where the number of rows may change.

    If you are directly updating the data source that the grid is bound to, then you will need to track this separately from the grid - there's no grid event that exposes these changes.

    For changes that occur within the grid, I think you would just need to handle the AfterRowsDelete and AfterRowInsert events.