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!
Hello jdymond,I would suggest you to use one Self-Reference table instead of these three. For example:
ID PARENTID NAME 1 null Metal 2 null Rock 2 1 Ratt 3 1 Whitesnake 4 2 Van Halen 5 3 Out of the Cellar 6 3 Invasion of your Privacy 7 4 Slide it in 8 5 Fair Warning
Please find the attached Sample and let me know if you need additional assistance
Hmmm... Can't really do that. Is there a way to accomplish what I was asking? Appreciate the help! VB.NET would be even better. Thanks!!!
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!
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
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!
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>
I exactly do all same, except that i use LLB Gen Pro generic collections than the Dataset
Hello madhu_penta,
I'm not familiar with LLB Gen Pro, but suppose that it generates codes. If the generated datasource is supported by WebHierarchicalDataGrid, then it should be working fine.
WebHierarchicalDataGrid supports the following data sources:
http://help.infragistics.com/NetAdvantage/ASPNET/2011.1/CLR4.0/?page=WebHierarchicalDataGrid_Data_Binding.html