I have some columns that I hide programmatically, by setting the UltraGridColumn.Hidden =true. This, however, results in an unsightly area on the right hand side of my grid where there are no visible coumns - I'd like to have the remaining, visible columns expand to fill the space made available by the hiding of the hidden columns - is there an easy way to do this?
The hiding is being done on the server side, after DataBind.
Infragistics NetAdvantage for ASP.NET 3.5.
I was able to resolve this by setting the column width of all hidden columns to 0%.
Hi,
You can use the following event handler and code to see if this does the trick for you:
protected void UltraWebGrid1_InitializeLayout(object sender, Infragistics.WebUI.UltraWebGrid.LayoutEventArgs e)
{
e.Layout.Bands[0].Columns.FromKey("MyLastColumn").Width = Unit.Percentage(100);
}
...Where "MyLastColumn" represents the last visible column in your schema.