PROJECT DESCRIPTION
This example extends the online example of RadMenu as context menu in RadGrid for hierarchical table structure. The extra part is to store the id of the clicked table in another hidden field on the page. Then you can pass this id server-side (to determine the GridTableView instance which has been clicked by the user) and perform the designated operation for the chosen grid row.

Note that the actual update operation is not implemented but the demo can be extended to support updates in the same way as in the online demo with flat grid linked above.

Additionally, if you want to display different context menus for each table in the hierarchy, you can set the Name property of each GridTableView and then extract the Name value inside the OnRowContextMenu handler.
Then, depending on the value extracted in the handler, you can invoke the show client method of the relevant menu instance to render it as context menu.

In the attached modified version of the application the context menus differ only by their Skin property value, however you can visualize completely distinctive menus by extending the demo implementation.

Sebastian

You can also enable multi-row selection and editing in the grid and perform an action (choosing item from the context menu) for all selected rows simultaneously.
In the project attached to this message the available options from the context menu are Edit, Delete or Reset. The edit or delete command will be executed for all highlighted rows in the grid (having client multi-row selection enabled). The reset command will refresh the grid data and will clear the edit indexes/sort/group expressions.
The technique for saving indexes for the selected rows is pretty much the same as the one presented in this online demo of the product (parsing hidden field content on the server).

Note that the real delete is not implemented but you can extend the example to include it as well.

ramesh s

Hi, I have a scenarion which u have shown in 037328_PerformActionForAllSelectedRowsWithContextMenu.zip example but it is not working in the same way in 2007 Q1 version can somebody help me.Regards,Ramesh.S

Sebastian

I have updated the example to use the latest version of our controls (RadGrid 5.0.1 and RadMenu 4.4.1). Refer to the new entry attached to the previous post for a demo version using the Prometheus counterparts of RadGrid, RadMenu and RadAjax.

Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. See Trademarks or appropriate markings.