Articles in this section
Category / Section

How to hide the content of specific cells in TreeGrid?

1 min read

In TreeGrid control, you can cover or hide the content of some particular cells of the column, without affecting the data source. It is achieved by using the client-side event, QueryCellInfo. Refer to the following code example for more details.

JS

<script type="text/javascript">
$(function () {       
      $("#gantt").ejGantt({
                         //…
             queryCellInfo: queryCellInfo
       })
 });
 function queryCellInfo(args) {
         if (args.data.Id == 13) {
                   if (args.column.field == "Id" || 
 args.column.field == "Name" ||
args.column.field == "StartDate" || 
args.column.field == "EndDate") {
                       args.cellElement.textContent = "DATA HIDDEN";
                    }
          }
   }
</script>

 

 

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