Hello,
To check if a listgrid contains any data, i do the below call for regular listgrids.
However, for grouped grids, i have a custom method that checks whether it has data. This method is ancient, and i am not sure whether i need it:
Do i need this, or is the getRecords() enough also for grouped grids? I must have made the method for SOME reason back in the day....
To check if a listgrid contains any data, i do the below call for regular listgrids.
Code:
if (reportGrid.getRecords() != null && reportGrid.getRecords().length > 0)
Code:
public static boolean checkTreeGridHasData(ListGrid gridThatIsGrouped){ Tree tree = gridThatIsGrouped.getGroupTree(); return (tree != null && tree.getChildren(tree.getRoot()) != null && tree.getChildren(tree.getRoot()).length > 0); }
Comment