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
Yes, that is what i did also.
And yes that is the feature i need.
Hi jh72i,
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
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?
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
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!!!