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
200
PerformAutoResize() refresh issue?
posted

I have a fairly basic 3 band grid and I am doing auto resize of visible rows within InitializeLayout() handler (calling PerformAutoResize(PerformAutoSizeType.VisibleRows) for each column in the 2nd band) and then calling it again within BeforeRowExpanded so that newly expanded row cells get auto-resized. I noticed that PerformAutoResize(PerformAutoSizeType.VisibleRows) does not seem to resize the newly expanded row for whatever reason, the width of the cell is set to width of the column header (even though all data has been bound). However, as soon as I expand one of the other top level nodes within the grid, I see the width of the cells within the first expanded row change and become what it should have been when the row was expanded.

To me it looks like some sort of a 'refresh' issue however Application.DoEvents() does not seem to help. I am using NetAdvantage 2009 V2. Any input will be appreciated? Is this a known issue? Thanks.

Parents
  • 48586
    posted

    Hello ,

     

    Probably it is not very good approach to PerformAutoResize(PerformAutoSizeType.VisibleRows) in BeforeRowExpanded event, because in this event the rows are still hidden and auto size shouldn’t affect them. My suggestion is to call

    ultraGrid1.DisplayLayout.Bands[0].PerformAutoResizeColumns(false, Infragistics.Win.UltraWinGrid.PerformAutoSizeType.AllRowsInBand, true);

     

    Please try this suggestion and let me know for the result.

Reply Children