jQuery UI Widgets Forums Grid Grid Grouping | Get particular column value under grouped header

This topic contains 7 replies, has 4 voices, and was last updated by  jaydeep 4 years, 6 months ago.

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

  • rskbuvan
    Spectator

    First I would like to say Wow for this wonderful UI Widget.

    Issue & Requirement:
    I’m using the grid grouping widget, where I would like to customize the group header by showing one icon. On mouse over of this icon, I need to populate a tooltip with the list of values from a particular column which are sub-rows of group header i.e. the collapsed header.

    Creating a tooltip is not a issue for me but I need to get the sub-rows data. In particular, one of the column value of each sub-rows under the group header.

    Reason why I require:
    When all group header are in collapsed state by default, Instead expanding the rows and seeing the details. I need one icon at the group header, which populates the tootip with details of a particular column values. Those column values are sub-rows of that group header.

    Tried:
    I used “groupsrenderer” property to get the number of sub items which are grouped and I could not able to traverse the sub-rows under the header.

    Can anyone please help me, how to retrieve the sub-rows data in grid grouping widget?

    Thanks in Advance.

    Regards,
    \_rssb


    Peter Stoev
    Keymaster

    Hi,

    The following sample: http://www.jqwidgets.com/jquery-widgets-demo/demos/jqxgrid/groupsrenderer.htm?web shows how to use the GroupsRenderer. The sample also uses the Group’s sub rows.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com/


    rskbuvan
    Spectator

    Peter,

    In the given example, Price column is used for grouping and same is used for calculating the sum using “getcolumnaggregateddata” method.

    In my case, I need to use one column as group header and get another column values which are sub-rows of that group header.

    For your better under standing below is my column structure,

    var columns = [
    { text: ‘Account‘, filtertype: ‘checkedlist’, datafield: ‘AccountName’, width:”60%”},
    { text: ‘Service‘, datafield: ‘Service’, width:”10%”},
    { text: ‘View’, datafield: ‘View’, cellsalign: ‘center’, align: ‘center’, columntype: ‘checkbox’, filterable: true, filtertype: ‘bool’, width:”10%”, editable: true},
    { text: ‘Edit’, datafield: ‘Edit’, cellsalign: ‘center’, align: ‘center’, columntype: ‘checkbox’, width:”10%”, editable: true,filterable: false},
    { text: ‘Ccy’, datafield: ‘Ccy’, cellsalign: ‘center’, align: ‘center’, width:”10%”, editable: true,filterable: false},
    { text: ‘Limits’, datafield: ‘Limits’, align: ‘center’, cellsalign: ‘center’, editable: false,filterable: true}
    ];

    In my XML, I’ve different accounts which shares the same service, so I’m using “Service” column as group header and I want to retrieve each “Account Name” column values which are sub-rows of that group header. That values, I’ll customize in the header and I’ll show through tooltip when all group headers are in collapsed state.

    I hope you are understanding my requirement. Below is the structure for your reference,

    Account Name | Ccy | Limits
    ——————————————————————————–
    > Service: Service Name (4) | Icon
    ——————————————————————————–
    Account 1 | EUR | 20,000
    Account 2 | EUR | 5,000
    Account 3 | EUR | 3,000
    Account 4 | EUR | 2,000
    ——————————————————————————–
    > Service: Service Name (2) | Icon
    ——————————————————————————–
    Account 1 | EUR | 20,000
    Account 2 | EUR | 5,000

    Here, I need to get Account Name column values under each group header. Which I will shown in tooltip when all group headers are in collapsed state.

    Looking for your solution.

    \_rssb


    rskbuvan
    Spectator

    Hi Peter,

    I’m looking solution for the above requirement. Please help me.

    Regards,
    \_rssb


    rskbuvan
    Spectator

    Hi,

    We are about to integrate a jqWidget components(Grid, Splitter etc.) in one of our big project and planning to buy for commercial use. Hence we require this support to get this grid issue fixed to go ahead for purchase. This issue seems to be a show stopper for us to proceed further.

    Looking for a solution.

    Regards,
    \_rssb


    Peter Stoev
    Keymaster

    Hi,

    In the sample I suggested you there is a code:

    if (data.subItems.length > 0) {
    var aggregate = this.getcolumnaggregateddata(data.groupcolumn.datafield, ['sum'], true, data.subItems);
    }

    The data.subItems in the above code is a collection of records. The getcolumnaggregateddata callback function uses just one datafield for aggregation – data.groupcolumn.datafield. However, you can use any of the other fields, too.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com/


    JackalDark
    Participant

    Are we able to use this groups renderer with KnockoutJS ?


    jaydeep
    Participant

    i was not group that column
    In my case i want to display other column which column property groupable:false then how to display ???

    • This reply was modified 4 years, 6 months ago by  jaydeep.
Viewing 8 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic.