Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
345
Hidden columns still affect formatting - how to hide better
posted

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.

  • 345
    Verified Answer
    posted

    I was able to resolve this by setting the column width of all hidden columns to 0%.

  • 12333
    posted

    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.