Dashboard: Expand all rows automatically

I’ve got a dashboard that is grouped by two columns, and there are often a lot of rows. It’s a pain to expand all the rows manually. I did find this thread: Expand ALL groups at start of Dashboard

I’m missing something, and don’t know C# well enough to make it work. Right now I’m trying to figure out what event I can use to trigger this (when dashboard is refreshed).

Might start by looking here:
http://help.infragistics.com/Help/Doc/WinForms/2011.2/CLR2.0/html/WinGrid_Expand_All_Rows_in_WinGrid.html

Try something like this on the EpiViewNotification event

This is CollapseAll you would use ExpandAll

private void edvCallContextBpmData_EpiViewNotification(EpiDataView view, EpiNotifyArgs args)
{
// ** Argument Properties and Uses **
// view.dataView[args.Row][“FieldName”]
// args.Row, args.Column, args.Sender, args.NotifyType
// NotifyType.Initialize, NotifyType.AddRow, NotifyType.DeleteRow, NotifyType.InitLastView, NotifyType.InitAndResetTreeNodes
if ((args.NotifyType == EpiTransaction.NotifyType.Initialize))
{
if ((args.Row > -1))
{
EpiUltraGrid myGrid = (EpiUltraGrid)csm.GetNativeControlReference(“de3436fa-d5de-4d03-900f-bd57c430c88a”);
myGrid.Rows.CollapseAll(true);
}
}
}

1 Like

It isn’t working on the EpiViewNotification event. I tried to get it to fire when the grid updates, but unfortunately that isn’t working either. Not sure if this has something to do with the fact that though there are 3 different panels, they all have grids called “myGrid”. Or maybe because it’s not a custom control…

private void myGrid_AfterRowUpdate(object sender, Infragistics.Win.UltraWinGrid.RowEventArgs args)
{
	// ** Place Event Handling Code Here **
	MessageBox.Show("TEST");
}

the myGrid in the line below is a variable, you would need to define each of your grids by different variables myGrid1, myGrid2 and myGrid3.

EpiUltraGrid myGrid = (EpiUltraGrid)csm.GetNativeControlReference(“de3436fa-d5de-4d03-900f-bd57c430c88a”);

The bold text above is the GUID of the grid, each grid will have a different GUID. You get this from the grid properties.

1 Like

This worked. Thanks!