Hello,
I am trying to add a row expand button next to each of my row. Instead of binding a dataset with two related tables, I am trying bind my grid to one table. But I need to have a expandIndicator to the left of each row which I can use to look up further data if the user chooses so. Any ideas highly appreciated
-Saravanan.
Saravanan,
You would still need to add the child rows through a related table/structure in the underlying DataSource, even if you don't want to populate it until it is requested. Therefore, you will still need to define this related table so that the grid is aware of the hierarchy, then you could use the BeforeRowExpanded event to populate the child table.
-Matt
Matt,
If I pump in all the data while retrieving the Dataset with both the tables (parent and child) and define the relationship I am able to see the rows with expansion indicator from which I can access child records. But the problem with this approach is it takes too long to load. In my case child table has 330k+ records.
If I have the child datatable in the dataset with no records but still define the relationship, I cannot see the expansion indicator. How can I make the expansion indicator appear in this case so that I can use the BeforeRowExpanded event to populate it on demand?.
I got it. I was looking to set
UltraGrid.Rows.Band.Override.ExpansionIndicator = Infragistics.Win.UltraWinGrid.ShowExpansionIndicator.Always
I was searching in the wrong place before. Thanks.
-Saravanan
By default you should be seeing the expansion indicators even if the child table doesn't have any data (and in fact this is what happened in my test project). The grid.DisplayLayout.Override.ExpansionIndicator is what you want to look at in this case; you will probably want to set this either to Always or CheckOnExpand.