This is a migrated thread and some comments may be shown as answers.

Hiding rows based on a condition

1 Answer 1840 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Chris
Top achievements
Rank 1
Chris asked on 30 Jun 2017, 09:58 AM

This code is driving me insane I have a click event that fires upon a radio button selection. It then executes jquery that should hide the row, however it doesn't. The code is as follow:

 document.getElementById("showSubOrgs").addEventListener("click", function () {
        ShowSubOrganisations();
    });

 function HideSubOrganisations() {
        var grid = $("#gridOrganizations").data("kendoGrid");
        var gridData = grid.dataSource.view();
        for (var i = 0; i < gridData.length; i++) {
           var currentOrgid = gridData[i]._OrganisationID;
            var ParentOrgID = gridData[i]._ParentOrganisationID;
            if (currentOrgid != ParentOrgID) {
               debugger;
               grid.table.find("tr[_OrganisationID='" + currentOrgid + "']").hide();
            }
        }
    };

 

1 Answer, 1 is accepted

Sort by
0
Georgi
Telerik team
answered on 03 Jul 2017, 02:02 PM
Hi Chris,

I used the code you sent me in order to recreate your situation, however I was able to hide the rows. Please use the following sample as reference and let me know if it works for you:



Regards,
Georgi
Progress Telerik
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
Grid
Asked by
Chris
Top achievements
Rank 1
Answers by
Georgi
Telerik team
Share this question
or