Folks, does the equivalent existing the WHDG? Basically, i want to enable the groupby feature but hide the columns that are grouped - point of grouping is to unclutter the screen.
tnx
Hi jh72i,
This is not a built in feature, but it can be handled with events. You will need to handle the grouped changed server event. Then hide the columns that are grouped on the band. Also, in 10.3 and prior, you would need to handle the row island data bound server event and then make sure the columns in the grid have the same Hidden status as the columns on the band. So, in order to accomplish this, you would need to define your own columns. If you would like it as an option on the grouping feature, please submit a feature request.
regards,David Young
Not sure I get all that but I'll investigate - I had been trying to add a client-side event just now but that (too!! having loads of issues with this grid!) failed with some messagebox or other.
As for submitting feature requests can I submit just one... implement all of the features of your UltraWinGrid that work and are feasible in the web. I cannot imagine the design meeting where someone decided upon the GroupBy feature but neglected to allow the grouped columns to be hidden!! I have been singing the praises of Infragistics for many, many years in the Winforms environment. I'm pretty muted this week with regard to the web offerings.
Now, another question if I may (and still have your ear after the above!!??): do you have the concept of column (as opposed to row) groups in this grid? aka. the UltraGridGroup in winforms? Please tell me you do!!!
I couldn't figure this. I can attach the serverside event you suggest but I have no idea which column is causing the event to fire:
void WebHierarchicalDataGrid1_GroupedColumnsChanged(object sender, Infragistics.Web.UI.GridControls.GroupedColumnsChangedEventArgs e) { switch (e.Action) { case Infragistics.Web.UI.GridControls.GroupByChangeAction.Group: break; case Infragistics.Web.UI.GridControls.GroupByChangeAction.Ungroup: break; }
How to find the column that is being grouped or ungrouped?? All I have is:
e.Actione.Bande.GroupedColumns
?
e.Ac
answered my own question on this: use the GroupedColumnsChanging event instead of the WebHierarchicalDataGrid1_GroupedColumnsChanged event. The 'e' arg there has much more useful information.
Question about column grouping is still open though?
Yes, that is what i did also.
And yes that is the feature i need.
Here are my events I handle to accomplish this.
protected void WebHierarchicalDataGrid1_GroupedColumnsChanging(object sender, GroupedColumnsChangingEventArgs e)
{
if (e.Action == GroupByChangeAction.Group)
foreach (GroupedColumn col in e.EffectedColumns)
e.Band.Columns[col.ColumnKey].Hidden = true;
if (e.Action == GroupByChangeAction.Ungroup)
e.Band.Columns[col.ColumnKey].Hidden = false;
}
protected void WebHierarchicalDataGrid1_RowIslandDataBound(object sender, RowIslandEventArgs e)
for (int x = 0; x < e.RowIsland.Columns.Count; ++x)
if (x < e.RowIsland.Band.Columns.Count)
e.RowIsland.Columns[x].Hidden = e.RowIsland.Band.Columns[x].Hidden;
As to your column grouping question, I'm not really familiar with the WinGrid. Is this where you have multi-line headers and mutliple columns in the second line are under one grouping in the first? But this only affects the header? This is currently not supported in the WDG or WHDG. You could try to do it with custom html on the client. However, this feature is in our plans to add this feature.
-Dave