I am working with summary in grid but summarycell for a particular column is bigger in size than the size of column. And i am not getting a way to autofit column size based on column header ,column cell's Value and summary cell for column.
is there any way where i can define column size to fit all values(header caption,summary values,and cell's value)?
or define column width based on summary cell?
Thanks
Yashpal Sharma
Hi Yashpal.
Try calling PerformAutoResize on the column. Be sure to specify AllRowsInBand.
Mike,
I tried your suggestion but instead of increasing the column size it is decreasing the size of column based on column header size and cells value. And not showing the summary cell with full text.
At other end i was taking time to resize column.
can you tell me if there is any other way to resize column based on summary cell?
Hi Yashpal,
So the PerformAutoResize does not account for the size of the summary? Hm, that's odd. That may be a bug.
There's another method on the column called CalculateAutoResizeWidth that calculates the width of the column without setting the width. This method has more options that PerformAutoResize, so maybe one of the options allows you to include the summaries.
If that doesn't work, then the only other option would be to measure the summary text yourself. Or report the issue of the PerformAutoResize method not accounting for summaries as a bug.