PZ
Peter Zaborski
October 15, 2003 08:30 PM UTC
I forgot to mention, I am setting
AllowResizeToFit = false;
in my code.
-Peter
AD
Administrator
Syncfusion Team
October 16, 2003 08:08 AM UTC
The grid.Model.ColWidths.ResizeToFit is purely a functional call. It will size the columns according to the data in the columns at the time of the call. There is no way around that.
So, after your dataprovider has been instantiated and has access to its data store, and after you have set this dataprovider to the DataProvider property of the grid, then if you call ResizeToFit, the grid should have access to the data it needs to do the sizing. Does this not work for you?
Is there no way for you to call the ResizeToFit method after the data is available?
Another thing you can do is to explicitly set the grid.Model.ColWidths[row] values to something yourself. This you can do without the grid having access to the actual data (though it would need access to the proper column count that might be part of your dataprovider).