When using 'Group By' on a Table, is it possible to show everything (as if I clicked on every + to expand) when opening the form?

I have a Dashboard and I want to group by GL Account. When I expand a line (by clicking on the + icon), I can see the different periods for each GL Account with the budget and actuals.

image

I would like that every line is already expanded when I open the Dashboard. I know that I can do it directly in ‘Dashboard’ and then saving and deploying but I need to do it programatically to use the same code later for another dashboard.

Thanks

Thanks but it seems like it only expends the first row. I don’t understand why.

I used the form load event and I call this function:

private void Expand_All_Rows_in_WinGrid_Load()
	{
		myGrid = (EpiUltraGrid)csm.GetNativeControlReference("8dc6b497-02f3-4051-97c9-2299d46ab611");
		myGrid.DisplayLayout.ViewStyleBand = ViewStyleBand.OutlookGroupBy;
		myGrid.DisplayLayout.Bands[0].SortedColumns.Add("GLAccount_GLAccount", false, true);
		myGrid.Rows.ExpandAll(true);
	}

Well on form load you won’t have all your data there yet. You have to find a different event to place it or put it on. The data comes in later, perhaps put it on a button click? or an event that fires after your data is loaded.

2 Likes

Search google for c# code, there should be an ExpandAll() method on a grid…

Got it, I just added the function that josecgomez replied in his comment and I added it to another event when the data is loaded. It works great, thanks!

1 Like

A post was split to a new topic: How to add summary column on ultra grid

Updated Link from Jose post.

I believe the menu item must be Dashboard-Assembly also for customization.

1 Like

Here is my basic code after creating a button.

private void epiButtonC1_Click(object sender, System.EventArgs args)
{
		// ** Place Event Handling Code Here **
		EpiUltraGrid myGrid = (EpiUltraGrid)csm.GetNativeControlReference("0b641cad-563a-4303-b432-961a740fe41d");
		myGrid.Rows.ExpandAll(true);																																																							
}
1 Like