Results 1 to 5 of 5

Thread: grid scrollOffset auto

  1. #1

    Default grid scrollOffset auto

    Hii,
    Is it possible to show scrolloffset space (and scroll) when it is required in the grid?
    Since we can define autoExpandColumn so can be found space for scroll.

    I hope it can be done. Because it is not good looking when there is a empty space on the right of the grid.

    Thanks a lot.

  2. #2
    Sencha User Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,245

    Default

    It's not that easy. There is no event when a scrollbar appears or disappears, so you have to add event handlers to everything that could cause a scrollbar to appear/disappear (all store events, row expander events etc.) and check if the scrollbar is visible and if the grid needs to be relayed out with or without a scrollOffset.

  3. #3

    Default

    Quote Originally Posted by Condor View Post
    It's not that easy. There is no event when a scrollbar appears or disappears, so you have to add event handlers to everything that could cause a scrollbar to appear/disappear (all store events, row expander events etc.) and check if the scrollbar is visible and if the grid needs to be relayed out with or without a scrollOffset.
    I see...
    What about calculation of the height of the inner grid? If it exceeds the container height showing scrollOffset? And checking this control all load and add, remove events.
    It is only an idea...

    Thanks Condor.

  4. #4
    Sencha User Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,245

    Default

    Yes, that would be the solution.

    The problem is that Ext doesn't know all events that can cause a grid to change size (plugins, user extensions etc.).

  5. #5

    Default

    Actually, I am not using such plugins. Only simple grid.

    What do you think about this idea;
    There is div inside the grid its class name is "x-grid3-body",
    I plan to add "DOMSubtreeModified" event on its Element class. And when it is fired,
    I will calculate the heigh and reconfigure the grid with scrollOffset...
    (And also in container resize event)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •