jQuery UI Widgets Forums Grid JqxGrid Group Header Click

This topic contains 5 replies, has 2 voices, and was last updated by  Hristo 3 weeks, 2 days ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
  • JqxGrid Group Header Click #107568

    emoticon
    Participant

    I think it would be nice if we could expand/collapse Group of Grid when we click the header as well as we click the icon on the left.
    I’m referring to JQXTree.
    Would it be included on the road map? I hope

    JqxGrid Group Header Click #107582

    Hristo
    Participant

    Hello emoticon,

    You could use the expandgroup method to expand a particular group.
    This method could be used in custom logic when recognizing which cell is clicked.
    For this purpose, you could bind to the cellclick event.
    More details about these options you could find in the API Documentation page.

    Best Regards,
    Hristo Hristov

    jQWidgets team
    https://www.jqwidgets.com

    JqxGrid Group Header Click #107591

    emoticon
    Participant

    for $(‘#jqxGrid’).jqxGrid(‘expandgroup’, group_index);

    when I use cellclick,

    $("#jqxGrid").on("cellclick", function (event) 
    {
        // event arguments.
        var args = event.args;
        // row's bound index.
        var rowBoundIndex = args.rowindex;
        // row's visible index.
        var rowVisibleIndex = args.visibleindex;
        // right click.
        var rightclick = args.rightclick; 
        // original event.
        var ev = args.originalEvent;
        // column index.
        var columnindex = args.columnindex;
        // column data field.
        var dataField = args.datafield;
        // cell value
        var value = args.value;
    });      
    

    what value that I can use for group_index?

    • This reply was modified 1 month ago by  emoticon.
    • This reply was modified 1 month ago by  emoticon.
    JqxGrid Group Header Click #107610

    Hristo
    Participant

    Hello emoticon,

    There is no built-in feature for this, unfortunately.
    I would like to suggest you look at this example.
    This demonstrates only the approach which you could use to achieve that.
    I hope this will help.

    Best Regards,
    Hristo Hristov

    jQWidgets team
    https://www.jqwidgets.com

    JqxGrid Group Header Click #107624

    emoticon
    Participant

    Wow! That’s very nice trick!

    I will share my improved code here,
    but btw, why when I expand the group with this function, the scrollbar go up?

    Please help me again to fix this..
    This is the only glitch that I need to be fixed

    Thank you very much, @hristo!

    JqxGrid Group Header Click #107706

    Hristo
    Participant

    Hello emoticon,

    You could try to use the ensurerowvisible method or also the scrolloffset method of the jqxGrid.
    After the expanding action you could try some of the mentioned methods.

    Best Regards,
    Hristo Hristov

    jQWidgets team
    https://www.jqwidgets.com

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

You must be logged in to reply to this topic.