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
385
CalculateAutoResizeWidth : what does it take into account to calculate the size?
posted

Hi,

I want to optimize the column widths in a UltraGrid using the following method:

 foreach (UltraGridBand gridBand in table.GridControl.DisplayLayout.Bands) {
     gridBand.Columns[columnKey].CalculateAutoResizeWidth(PerformAutoSizeType.AllRowsInBand, false)); 
 }

When, I have a column  that has the following features, it returns always a size of 32:

- MinWidth = 8
- Type: Text Cell
- No text set
- No header caption set
- Embeddable editor has no ButtonsRight and no ButtonsLeft

Can you explain, what else could make it calculate the size to 32?  In my opinion the size should be 8.

Best regards,

Reto


Parents
No Data
Reply
  • 469350
    Suggested Answer
    Offline posted

    Hi Reto,

    Is your grid using multiple bands or just a single band? If it's multi-band, then the column might need more space in order to account for synchronizing with the child band column. This is especially likely if this is the first visible column, since it also might need to account for the row selectors.

    If that does not help, perhaps you can post a small sample project demonstrating the issue and I will be happy to take a quick look.

Children