jQuery UI Widgets Forums Grid Alternatives for ensurerowvisible?

This topic contains 6 replies, has 3 voices, and was last updated by  Hristo 7 months, 3 weeks ago.

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
  • Alternatives for ensurerowvisible? #81304

    berkshirereal
    Participant

    I have a large, scrolling, jqx grid that is supposed to have it’s row expand, and have its row visible on screen when given a url id. This seems to be working fine with “showrowdetails”. However, when I want to ensure that row is visible on the screen, “ensurerowvisible” is not working like expected. I get weird behavior like having the view focus on random rows. My question is, are there any other alternatives or “hacks” that can take the place of “ensurerowvisible”? I’ve tried window.scrollTo(), but it only works on the visible screen, not the grid as a whole. As a summary:

    $("#jqx_grid").jqxGrid('showrowdetails', row_index); //works fine
     $('#jqx_grid').jqxGrid('ensurerowvisible', row_index); //does not work
    Alternatives for ensurerowvisible? #81329

    Hristo
    Participant

    Hello berkshirereal,

    This are two methods with different functionality ‘showrowdetails’ and ‘ensurerowvisible’.
    An another way is to use “scrolloffset” method.
    Please take a look this example: http://jsfiddle.net/txhi/ssx62324/

    Best Regards,
    Hristo Hristov

    jQWidgets team
    http://www.jqwidgets.com

    Alternatives for ensurerowvisible? #107304

    Bogdan W.
    Participant

    This sample does not work … I have similar issues with using ‘selectrow’ and/or ‘ensurerowvisible’ when using ‘details’.
    For this sample, after data loads, click on ‘showdetails’ for the first row, then click on ‘Select the 100 element’ button …
    grid does not scroll at all.

    Alternatives for ensurerowvisible? #107305

    Bogdan W.
    Participant

    Update on my last post – it appears that ‘ensurerowvisible’ does nothing is grouping is used, at least in the version 5.4
    as is my case.
    Is any workaround this?
    How about ‘selectrow’ with grouping?

    Alternatives for ensurerowvisible? #107308

    Hristo
    Participant

    Hello Bogdan W.,

    About the selectrow method it does not show the selected row it just select it.

    I think there is some misunderstanding.
    We have a similar discussion about this, please, take a look at this topic:
    https://www.jqwidgets.com/community/topic/does-ensurerowvisible-work-with-grouped-rows/

    You could check all of these as you use the expandallgroups method before all other methods.

    Best Regards,
    Hristo Hristov

    jQWidgets team
    https://www.jqwidgets.com

    Alternatives for ensurerowvisible? #107314

    Bogdan W.
    Participant

    1.
    Thanks for ‘selectrow’ explanation.
    2.
    The sample you are referring to still does not work.
    I expanded like 20+ groups and clicked the button yet nothing happened …
    Possibly 50 groups have to be expanded, if so, please rethink the sample.
    3.
    I do not understand why this is so convoluted.
    If ‘grouping’ is ‘on’ one would expect that calling ‘ensurerowvisible’
    will scroll down to the group containing the row, expand it if necessary, and show the row.
    This would be expected and common sense behavior …

    Alternatives for ensurerowvisible? #107339

    Hristo
    Participant

    Hello Bogdan W.,

    The ensurerowvisible method shows the group which contains that row in current use, too.
    But this is a personal choice about the groups to be or not expanded when using the method above.
    Please, take a look at this example.
    I hope this will help.

    Best Regards,
    Hristo Hristov

    jQWidgets team
    https://www.jqwidgets.com

Viewing 7 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic.