Hi, Actually i am using your UltraGrid. In run time i m able to drag the column to "Drag a column header here to Group by that Column" but my i want to set header column by using coding. so can u plz provide me which code i used to set the Group by column programatically. Thanks, Waiting Your Reply,
Grouping and sorting and very closely related. So to group a column, you use the SortedColumn.Add method.
grid.DisplayLayout.Bands[0].SortedColumns.Add("My Column", true, true);
Thanks
hey i am trying to get the column name that user want to group by when he Drag a column header into the ultragrid who can i do this please some help thx
You can handle the BeforeSortChanged event and examine the event arguments to determine what the new sorted state will be. To determine if a column is grouped, you use the IsGroupByColumn property on the column.
I have to add and remove the buttons each tile the user groups and ungroup at runtime
I tried using initializegroupbyrow event but that adds button only once i.e level1 grouping
Plz help
hi
how can i access sorted column value?
i sorted the grid by column vendor,
grid.DisplayLayout.Bands[0].SortedColumns.Add("Vendor", true, true)
i want to sum up the amount column, how can i access by group by row or sorted option?
Hello Anandraj,
If you would like you could use a summaries for that column like:
ultraGrid1.DisplayLayout.Bands[0].Summaries.Add("summaryKey",SummaryType.Sum,e.Layout.Bands[0].Columns["Amount"]);
In order to have a summaries in the GroupByRow you could set the summary positions according to your requirements like:
ultraGrid1.DisplayLayout.Override.SummaryDisplayArea = SummaryDisplayAreas.InGroupByRows;
Please let me know if you still need further assistance with your requirements.