Hello,
I'm having an issue with the autoresize of columns in the UltraWinGrid control.Columns containing date+time are not property resized.
Resizing is done by double clicking between columns or using "column.PerformAutoResize(PerformAutoSizeType.AllRowsInBand, True)" action.
The autoresize result ignores the time part of the field and gives the following result:
The expected result would be:
The bound property of this field is of type "Nullable(Of DateTime)".
Any assistance would be greatly appreciated.
Kind regards,
Michael
Hi MIchael,
What version of the controls are you using?
Can you post a small sample project which demonstrates this behavior? To attach a file to your post, just go to the Options tab when replying.
Hey Mike,
We are using version 11.1.20111.2026
They key property I think is:DisplayLayout.Override.CellDisplayStyle = CellDisplayStyle.PlainText
Screenshot of test application:
Test application included.
Hi,
I think I know what's happening. When you set the CellDisplayStyle to PlainText, the grid does not honor the Format property of the column. That should matter, since you are not setting the Format, anyway. But for DateTime columns, the grid applies a default Format (I beleive it uses "d" for the Short Date pattern which excludes the time).
When the grid is doing the AutoSizing of the column, it must be sizing the text based on the Format, even though it's not displayed.
This looks like a bug and I am going to forward this thread over to Infragistics Developer Support so they can write this up for developer review.
In the mean time, you can work around this by making the column's format match the actual display so that the sizing is correct.
band.Columns["MyDateTime"].Format = "G";
AutoResize of columns has been addressed in service release versions:WinForms_10.3.20103.2140WinForms_11.1.20111.2050WinForms_11.2.20112.2004
This service release is now available under your account at the Infragistics Website. To download the service release, log in to ‘My IG’ and select ‘Keys & Downloads’. Select the appropriate tab for this product; then the license key. The available service releases (Hot Fixes) should now be listed on the page.
Please let me know if you have futher questions regarding this matter.
I will be happy to help you out with this issue.
I have created a case for you to better assist you with this issue going forward. To access the case, simply log into your IG account and click on My Support Activity.
Please let me know if you have further questions in this matter utilizing the case created.
The workaround by setting the Format works. It's a bit wider then needed, but it's good enough for now.
Thanks for the help,