In the ultraWinGrid i call methods CalculateAutoResizeWidth(PerformAutoSizeType.AllRowsInBand, False) for each column, but it doesn't perform any action, while calling method PerformAutoResize(PerformAutoSizeType.AllRowsInBand) at the same point in the code, it works.
The problem is that i'd like not consider the width of the header capition for the autosize, and I thought that CalculateAutoResizeWidth was the right method to having this.
Any ideas? Thanks
Riccardo
Ok now seems to work properly.
first i calculate the width with the CalculateAutoresizeWidt method, and then i apply the width calculated to the width property of column.
es:
.Columns(i).width = .Columns(i).CalculateAutoResizeWidth(PerformAutoSizeType.AllRowsInBand, False)
Thanks
CalculateAutoResizeWidth returns the width, but it doesn't change it. UltraGrid does not seem to provide a publicly exposed way to control whether the header width is included in the resize; you could probably do something like handle MouseDoubleClick, hit test for a column header (and also whether the mouse is in the adjustable area of the header element), then manually set the column's width to the value returned from the CalculateAutoResizeWidth method.