Below is my grid. I am setting the datasource in the code behind to a dataset that contains two datatables. A relation is setup between the two tables. The arrow shows up on the right records, so I know there is data there, but when I click the arrow the status bar in IE shows something is happenning but nothing happens. My nested grid does not show up. What am I doing wrong?
<ig:WebHierarchicalDataGrid ID="gridAsset" runat="server" Height="550px" Width="98%"> <ExpandCollapseAnimation SlideOpenDirection="Auto" SlideOpenDuration="300" SlideCloseDirection="Auto" SlideCloseDuration="300" /> <Behaviors> <ig:Sorting Enabled="false"></ig:Sorting> <ig:Filtering Enabled="false"></ig:Filtering> <ig:Paging PageSize="10" PagerAppearance="Bottom" Enabled="true"></ig:Paging> </Behaviors> </ig:WebHierarchicalDataGrid>
Could you give us the Code Behind ?
Below is the line to setup the relation. That ffunction returns the dataset so the next 2 lines are assigning the datasource.
dsSQL.Relations.Add("Relation1", dsSQL.Tables("AssetList").Columns("AssetID"), dsSQL.Tables("AssetHistoryList").Columns("AssetID"))
gridAsset.DataSource = objAsset.ReturnAuditAsset(ddWorkCenter.SelectedValue)gridAsset.DataBind()
I followed the code sample listed here
http://blogs.infragistics.com/blogs/kiril_matev/archive/2010/04/26/grouping-in-the-asp-net-ajax-webhierarchicaldatagrid-with-on-demand-loading-of-grouped-records.aspx
and I added after my relations.add statement the following
dsSQL.Tables("AssetList").PrimaryKey = New DataColumn() {dsSQL.Tables("AssetList").Columns("AssetID")}
And now it works just fine!