jQuery UI Widgets Forums Grid Nested grid loosing child grid on filter

This topic contains 4 replies, has 2 voices, and was last updated by  mflach 7 years, 10 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
  • Nested grid loosing child grid on filter #91815

    mflach
    Participant

    I have a nested grid with one sub-grid. Everything works fine until I added filtering to the parent grid. As soon as I filter the parent all my child grids go away. I loose the “expand icon” used to show the child grid. I tried this with simple row filtering and custom filtering using applyfilters. For what it’s worth, I noticed that bindingcomplete is called when the page first loads but not when the filter is loaded.

    Nested grid loosing child grid on filter #91818

    Peter Stoev
    Keymaster

    Hi mflach,

    bindingcomplete is raised when binding is completed, not when filtering, sorting or grouping is applied.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

    Nested grid loosing child grid on filter #91823

    mflach
    Participant

    So why am I loosing my child rows when I filter the parent rows?

    Nested grid loosing child grid on filter #91836

    mflach
    Participant

    The reason I asked about bindcomplete is it looks like that event needs to be called to build the child grid. Here is my code for this:

    $("#SummaryGrid").bind('bindingcomplete', function (event) {
    	if (event.target.id == "SummaryGrid") {
    		$("#SummaryGrid").jqxGrid('beginupdate');
    		var datainformation = $("#SummaryGrid").jqxGrid('getdatainformation');
    		for (i = 0; i < datainformation.rowscount; i++) {
    			$("#SummaryGrid").jqxGrid('setrowdetails', i, "<div id='grid" + i + "' style='margin: 10px;'></div>", 220, true);
    		}
    		$("#SummaryGrid").jqxGrid('resumeupdate');
    	}
    });
    Nested grid loosing child grid on filter #91837

    mflach
    Participant

    I figured it out. I was using a older implementation. Now I’m using:

    rowdetailstemplate: { rowdetails: "<div id='grid' style='margin: 10px;'></div>", rowdetailsheight: 220, rowdetailshidden: true },
    
Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.