DataGrid is very easy to use .NET web control, TreeView is also, but there is no mature control can integrate the advantages of both to express structure more complex data.
Denis Bauer offers a solution he called "hierarchy data" (http://www.denisbauer.com/aspnetcontrols/hierargrid.aspx), this program is very good, but you need to explain
1. The "Hierarchy DataGrid" implemented here is not the same as the structure of the MSHFlexGrid (ie, Microsoft Hierarchy FlexGrid) commonly used in VB 6. In the MSHFLEXGRID, the items of the parent layer are in parallel, while the sub-layer follows the right side of the parent layer (the columns of each layer are called one BAND). This implementation, the sublayer is to start like TreeView, and I think it is more appropriate to "treec".
2, "Hierarchy DataGrid" implemented here is that each layer makes a USER Control, while the class of Denis Bauer provides a universal call method from Page to User Control.
3, this implementation is a bad place is that it is difficult to implement the EDIT function. Because the parent layer only passes DataSource to the sublayer, the status in the sub-layer is not recorded, or the EditIndEx of the sub-DataGrid.
Svg brother implemented a TreeView, which is basically like a DataGrid, but the most left column like TreeView, can be dynamically expanded. His idea is to read data with JavaScript XMLHTTP, and then write the left column with JavaScript. The process of writing the left left, similar to the HTC file of the TreeView generated a method. The disadvantage of this method is that the code that is written is more, and when modifies the sub-data, the DataGrid has been implemented.
Recently, one project also made a similar requirement. At first I used Nested DataGrid, but the DataGrid of the nesting sub-layers did not belong to the same DataGrid, and they could not align between them. Later, I thought it was a method, successful.
In fact, it is not complicated to wear it. In MSDN's article "Http://msdn.microsoft.com/Workshop/Author/tables/buildtables.asp), relative to DOM (Document Object Model), with