I need to run some light JavaScript when the NoRecordsTemplate kicks in for a RadGrid (when there are no records in the DataSource) anywhere across a web application.
Since I didn't find an analogous client side API method built in for this, I thought this would still be pretty easy by using the OnGridCreating event handler to add a function that runs later (following page load) & includes a conditional that checks for data items or something similar.
Surprisingly, I'm finding the OnGridCreating event is not firing when the NoRecordsTemplate kicks in when hooked up via the grids' ClientSettings. Should it? (Note : when the NoRecordsTemplate does not kick in the OnGridCreating
get fired as expected & function runs normally/as expected)
I can understand why OnGridCreated possibly wouldn't fire in a no records situation, but it seems like OnGridCreating should fire regardless of if the grid ends up having records or no records.
I'm also open to other approaches if this turns out to be a 'working as designed not as desired' situation.
Since I didn't find an analogous client side API method built in for this, I thought this would still be pretty easy by using the OnGridCreating event handler to add a function that runs later (following page load) & includes a conditional that checks for data items or something similar.
Surprisingly, I'm finding the OnGridCreating event is not firing when the NoRecordsTemplate kicks in when hooked up via the grids' ClientSettings. Should it? (Note : when the NoRecordsTemplate does not kick in the OnGridCreating
get fired as expected & function runs normally/as expected)
I can understand why OnGridCreated possibly wouldn't fire in a no records situation, but it seems like OnGridCreating should fire regardless of if the grid ends up having records or no records.
I'm also open to other approaches if this turns out to be a 'working as designed not as desired' situation.