How to expand all rows after group by column programmatic
i.e
Dim Column As UltraGridColumn = UltraWebGrid1.DisplayLayout.Bands(0).Columns(Index)
UltraWebGrid1.DisplayLayout.ViewType = ViewType.OutlookGroupByUltraWebGrid1.DisplayLayout.Bands(0).SortedColumns.Add(Column, False)UltraWebGrid1.Columns(Index).IsGroupByColumn = True
Hello Sameh,
Thank you for posting your inquiry to the Infragistics ASP.Net Forums. To expand all the GroupBy rows, handle the UltraWebGrid InitializeGroupByRow event and call the Expand method for the rows as shown here:
protected void UltraWebGrid1_InitializeGroupByRow(object sender, RowEventArgs e){ e.Row.Expand(true);}
Please let me know if this information helps or if you have any questions.Sincerely,Mike D.Developer Support EngineerInfragisticswww.infragistics.com/support
Thanks for this solution .
Hello Mahfuz,The UltraWebGrid GroupByRowStyle property affects all the GroupByRows for the grid and cannot be set for a specific GroupByRow by Column Index or Key. To set different BackColors for GroupByRows, use the InitializeGroupByRow event. The following code demonstrates how to check if the current Row in the InitializeGroupByRow has a ParentRow, if the grid were grouped by more than one column and if true, checks if grouped by two specific columns checking their Keys and if true, sets e.Row.Style.BackColor to SeaGreen else will set e.RowStyle.BackColor to Red:void UltraWebGrid1_InitializeGroupByRow(object sender, Infragistics.WebUI.UltraWebGrid.RowEventArgs e) { if (e.Row.HasParent) { if ((e.Row.Band.Columns[6].IsGroupByColumn) && (e.Row.Band.Columns[5].IsGroupByColumn)) { e.Row.Style.BackColor = Color.SeaGreen; } } else { if ((e.Row.Band.Columns[6].IsGroupByColumn) || (e.Row.Band.Columns[5].IsGroupByColumn)) { e.Row.Style.BackColor = Color.Red; } }}Please try the above code in your application and let me know if you have any questions.Thank you.Sincerely,Mike D.Developer Support EngineerInfragisticswww.infragistics.com/support
I assined :
UltraWebGrid1.DisplayLayout.Bands[0].Columns[5].Band.GroupByRowStyle.BackColor = System.Drawing.
Color.SeaGreen;
UltraWebGrid1.DisplayLayout.Bands[0].Columns[6].Band.GroupByRowStyle.BackColor = System.Drawing.
Color.Red;
but BackColor of Group Columns[5] and Group Columns[6] display same color as Red.
How to display different color as per Group?
Mahfuz
Dhaka
PRAN-RFL Group