I would like that NO ajax call will be made in the sub-grid if we know that there is NO record to be displayed in the sub grid. I am using this grid in a Category section where I am displaying Parent in main and child in sub grid. Along with the parent name in main grid I am also displaying the count of child categories within the parent category. Here I don’t want to call the ajax to look for the sub categories where the count is 0. and instead of showing a blank sub grid I would like to dsplay a message like ‘No Record Found’ … An another best solution for such case would be that we should not allow sub grid expension in case of 0 record.
If you use the grid as subgrid this can be easy. The idea is to perform some checking in subGridRowExpanded event – in case of zero records you can add custom display message and do not perform ajax call.
If you use the other way I will think about this. We can use params array to do that.
I am using grid as a subgrid. But I am not able to find out how to stop the ajax call in case of no record. We just have loadComplete method and don’t have any beforeSend method where we can simply return false in case of no record.