How to insert the Nested Grid

Aug 28, 2012 at 10:08 AM

Hi There,

I'm doing some changes in the sample ThemeGrid project. I want to move the Sub Tasks as a nested grid to the ToDo grid.

But it seems the grid's layout is related to the Themes\Test\DataGrid.cshtml and the code doesn't support to do this.

 

I'm newbie in asp.net mvc area, please correct me if I'm wrong, and kindly tell me how to insert the nested grid please.

 

Thanks.

Coordinator
Aug 28, 2012 at 12:12 PM

In general themed controls are obtined by giving standard templates to controls. The themed grid is organized in columns that have standard didplay and edit modes. You can supply a custom column template but you can change the overall row template. The themed grid is jus an example on how to to build complex controls based on the basic Mvc Controls Toolkit controls. 

You can write from scratch a new Themes\Test\DataGrid.cshtml that implements a new type of grid, but this require experience with razor an .net reflection.

More simply you can use the simple DatagridFor and furnish your custom row templates that are specific for the items you need to show in the grid. You can nest another grid into the row twmplate, but this is not adviced for performance reasons. A good tutorial on the datagrid is this one, a tutorial on how to add data filtering capabilities is this one

Aniway if you need to render nested data consider using the treeview.

Aug 29, 2012 at 2:29 AM

Thank you, Frank,

I'm looking at the posts what you suggested. Wish it can help.

 

Thanks again! ;)