I am using Ultragrid 10.1.20101.1007
I have my grid anchored to a form and when the form resizes i want the columns in the grid to resize also. I set the AutoFitStyle = ResizeAllColumns and it works as expected. I have two columns that I want to prevent resizing so as per other posts in this forum I set the max and min widths to the same value.
However, this is not preventing the column from resizing.
The only thing I can think of that might be causing the problem is that my rows have columns in two levels. I tried LockedWidth = True but that only prevent the user from resizing but when the grid resizes the column does also.
Any Ideas?
TIA,
Kim
More to this. It appears the minwidth is working, just not the maxwidth. I am not using groups in my rows.
Hi Kim,
I've never seen a case where this did not work. It might be a bug. Can you post a small sample project demonstrating this behavior so we can check it out?
Zip file attached.
As I said, the minwith seem to prevent the column from shrinking, but when I make the form larger, the columns expand beyond maxwidth.
All columns are locked excpet for the description. My expectation was that only the description column would resize.
Maybe I am configuring something incorrectly?
I removed the second level to see if that was causing it be the behaviour was the same
-Kim
Here is the attachment.
Yes that fixed it. Thank you.
Hi,
This appears to be the result of the fact that you are using RowLayouts. In RowLayout mode, the column sizing is handled a bit differently that in the normal mode.
Any particular reason you are using RowLayouts in this sample? There doesn't appear to be anything in this layout that would require RowLayouts to be used.
If I reset the RowLayoutStyle property on the band, it works fine.
Hi Mike, I have attached a link to a sample project with a datasource set. Like i said, it honors the MinWidth, but not the maxwidth.
ftp://64.46.34.49:2121/SampleINFRA_0823.Zip
I'm not sure if this is causing the problem, but the first thing I noticed about your sample is that your grid has no DataSource. The WinGrid cannot be used unbound, it MUST have a data source in order function in any way.
The link to a sample.
ftp://64.46.34.49:2121/SampleINFRA.Zip