Hi, i have a UltraDataGrid and i attach popup menu with Grid.if i right click on header of grid or grid row where is no data.then menu is popup.so i dont want to show popup menu, when user i right click on header or empty row of grid.is there ant solutionof this problem.
Hi Amit,
I want to implemen the same funcationality that you has implemened. Ie when ever the user clicks on the Grid, if there are no rows also I need to dispaly the context menu. Please let me know how you have implemented this.
Regards,
Abhi
Hello Abhi,
When the grid has not data, it simply displays the "no data" message and does not really expose any events, cell / header / row collections, etc, etc. I believe this is the normal and expected behaviour.
So in the case where the grid is empty and your datasource has 0 records, you will need to handle this by yourself - you can just create any HTML element and nest the grid there, the handle the onclick event of the element and use code similar to what Ivan showed above to show the menu.
So you will just need to popup a generic context menu and do not rely on grid client-side events for that when there is no data.
Hope this helps.