I am using VS2010 with 2011.1 controls with VB.NET. I have 3 unnamed datatables that are returned as a single dataset in the code behind. I need to bind this dataset to a WebHierarchicalDataGrid. I do not wish to display any headers and would like to add an unbound checkbox as the first column in each row. When I check "Metal", the grid will expand to show "Ratt" and "Whitesnake". If I expand "Whitesnake", the grid will expand to show "Slide it in". Pretty simple in concept but I cannot for the life of me get it to work even after looking at several code examples. Thanks for the help!
I exactly do all same, except that i use LLB Gen Pro generic collections than the Dataset
The markup for the attached sample should look lite this:
<ig:WebHierarchicalDataGrid ID="WebHierarchicalDataGrid1" runat="server" Height="350px" Width="400px" DataKeyFields="ID" DataMember="Genres" AutoGenerateBands="False" AutoGenerateColumns="False" Key="Genres"> <Bands> <ig:Band AutoGenerateColumns="False" DataMember="Bands" Key="Bands" DataKeyFields="ID"> <Bands> <ig:Band AutoGenerateColumns="False" DataMember="Songs" Key="Songs" DataKeyFields="ID"> <Columns> <ig:BoundDataField DataFieldName="ID" Key="ID"> <Header Text="ID" /> </ig:BoundDataField> <ig:BoundDataField DataFieldName="ParentID" Key="ParentID"> <Header Text="ParentID" /> </ig:BoundDataField> <ig:BoundDataField DataFieldName="Name" Key="Name"> <Header Text="Name" /> </ig:BoundDataField> </Columns> </ig:Band> </Bands> <Columns> <ig:BoundDataField DataFieldName="ID" Key="ID"> <Header Text="ID" /> </ig:BoundDataField> <ig:BoundDataField DataFieldName="ParentID" Key="ParentID"> <Header Text="ParentID" /> </ig:BoundDataField> <ig:BoundDataField DataFieldName="Name" Key="Name"> <Header Text="Name" /> </ig:BoundDataField> </Columns> </ig:Band> </Bands> <Columns> <ig:UnboundCheckBoxField Key="Check" HeaderChecked="False"/> <ig:BoundDataField DataFieldName="ID" Key="ID"> <Header Text="ID" /> </ig:BoundDataField> <ig:BoundDataField DataFieldName="ParentID" Key="ParentID"> <Header Text="ParentID" /> </ig:BoundDataField> <ig:BoundDataField DataFieldName="Name" Key="Name"> <Header Text="Name" /> </ig:BoundDataField> </Columns> </ig:WebHierarchicalDataGrid>
What would the code look like if we defined the columns and bands in the .aspx page? Still trying to get a feel for what the grid can do... Thanks!
Normal 0 false false false EN-US X-NONE X-NONE
You could use Unbound Checkbox Column. Browse the online samples and the online documentation for more detail information.Please let me know if you need additional help
Works beautifully! Other trick now is to add an unbound checkbox to each of the rows. When a parent item is checked or unchecked, it should check or uncheck all of the child items. Thanks for the help!