Manual CRUD WebHierarchicalDataGrid

[Infragistics] Radoslav Minchev / Saturday, December 18, 2010

Hello all,

        I would like to share a sample implementation of one of the most common operations on data known as CRUD (Create Read Update and Delete) implemented with WebHierarchicalDataGrid. The grid is a really complex and easy to use component. The developer only needs take the right direction and take advantage of the grid’s reach feature set.  Samples showing the grid features can be found here .  
        There are a lot of scenarios that require the developer to implement delete update and insert operations on his own.  This approach is called Manual CRUD and this blog post will show how the grid is supposed to be used in such cases.
Please, see the running sample below: 
        In the page we have implemented two javascript functions which delete a row in the parent as well in the child bands. When a delete button is pressed the respective function is called and in response a row is deleted.  That action triggers an AJAX call to the server and gives the developer a chance to persist the changes made on the client. 


        The grid exposes RowDeleting event on the server.  WebHierarchicalDataGrid1_RowDeleting handler is called and all changes are persisted. The sample deals with Session object as a persistent mechanism. This is supposed to simplify the process of setup and running the sample. Sample can be downloaded below.
 Special thanks to Nikolai Dimitrov (Product  Guidance Team)