Articles in this section
Category / Section

How to hide detail button for some rows

4 mins read

In TreeGrid, it is possible to hide the detail button for some rows by using rowDataBound and detailsShown event. The rowDataBound event will be triggered while rendering each row and the detailsShown event will be triggered when details template pop-up is shown in TreeGrid.

HTML

<script type="text/javascript"> 
        $(function () { 
            $("#TreeGridContainer").ejTreeGrid({ 
                //.. 
                rowDataBound: "rowDataBound", 
                detailsShown: "detailsShown", 
            }); 
        }); 
        function rowDataBound(args) { 
            if (employee.indexOf(args.data.EmployeeID) != -1) 
                args.rowElement.find(".e-detailsrowcell").text(""); 
        } 
        function detailsShown(args) { 
            if (employee.indexOf(args.data.EmployeeID) != -1) 
                args.cancel = true; 
        } 
 </script> 

 

Hide detail button for some rows.

A simple sample to hide the detail button for some rows is available here

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please sign in to leave a comment
Access denied
Access denied