Hiding rows based on a condition

2 posts, 0 answers
  1. Chris
    Chris avatar
    3 posts
    Member since:
    Jun 2017

    Posted 30 Jun 2017 Link to this post

    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();
                }
            }
        };

     

  2. Georgi
    Admin
    Georgi avatar
    676 posts

    Posted 03 Jul 2017 Link to this post

    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.
Back to Top