jQWidgets Forums

jQuery UI Widgets Forums Grid Grid Grouping | Custom Group Header Rending Issue

This topic contains 4 replies, has 2 voices, and was last updated by  Vladimir 9 years, 9 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author

  • raj
    Participant

    Hi Folks,

    I’m using the Grouping Grid and I customized the group header using “groupsrenderer” property where I’m showing the Group text at the left-hand side and input button at the right-hand side of the group header.

    On click of the button, I change the button to a disabled state and toggle the button text i.e. For Example: Approve to Approved. Here when I scroll the grid, the button state & text is resetting to it’s default i.e. normal.

    Can someone suggest me how to retain the button state and text even when the grid is scrolled?

    Looking for solution.

    Regards,
    Raj


    Vladimir
    Participant

    Hello Raj,

    Since the groupsrenderer function rerenders the content, in order to achieve what you want, you need to store the value of the button in a variable (outside the scope of the renderer function) and use its value to set the initial state of the button in the renderer function.
    This way it will always rerender with the proper state.

    Best Regards,
    Vladimir

    jQWidgets Team
    http://www.jqwidgets.com


    raj
    Participant

    Hi Vladimir,

    Thanks for your quick turnaround.

    By doing this way, it will impact the grid performance right?

    Is there any callback function for groupsrenderer? so that I can reset the state of button once after the groupsrenderer is complete.

    Thanks,
    Raj


    raj
    Participant

    In addition to that, can I able to get the unique group header index using groupsrenderer function?

    var groupsrenderer = function (text, group, expanded, data) {
    }

    Thanks,
    Raj


    Vladimir
    Participant

    Hello Raj,

    The groupsrenderer function is a callback itself, so no there is no callback of the callback function.
    Performance is expected to be affected as much as any custom rendering logic affects it, so it shouldn’t be an issue for you.

    As for your second question.
    You can get the data.groupcolumn.datafield to identify the column criteria for the grouping, and you can use the group parameter to identify the unique value according to which these records are grouped together.

    Best Regards,
    Vladimir

    jQWidgets Team
    http://www.jqwidgets.com

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

You must be logged in to reply to this topic.