Hello,
I'm noticing inconsistency when auto-sizing columns. I'm auto-sizing this way:
grdIG.DisplayLayout.PerformAutoResizeColumns(False, UltraWinGrid.PerformAutoSizeType.AllRowsInBand, UltraWinGrid.AutoResizeColumnWidthOptions.All)
This works as expected, except for string columns that have input mask. If one cell contains empty string value and, as an example, the input mask is "a", then the column will be wider than expected.
I have attached an image that shows the same column, first with an input mask of "a" and then with no input mask. Both captures are after calling PerformAutoResize. The column width is roughly doubled for the instance where it uses input mask (about 50px vs 25px).
Is this a known bug?
Thanks,
Trausti
This issue was fixed and fix was included in our latest service release for version 17.1. The fix will also be included in all feature version of Infragistics for Windows Forms.
Thanks for confirming this Mike. We got around this by removing masks on fields that did not really need them in first place and that took care of it.
A fix for this in future release would still be appreciated, so thanks for submitting this for further review.
I have asked our engineering staff to examine this further. To ensure that it will receive attention, I have logged this behavior in our internal tracking system with a Development ID of 241717. The next step will be for a developer to review my investigation and confirm my findings or to offer a fix, or other resolution.
I will leave this case open and update you with any new information after the review. You can also continue to send updates to this case at any time.
You can view the status of the development issue connected to this case by selecting the "Development Issues" tab when viewing this case on the web site.
Please let me know if you need more information.
Hi Trausti,
Well, this was not a know bug before but it's known now. I tried this out and I am getting the same results. This only happens when there is a cell in the mask column with no value, though. Basically what's happening is that the editor is calculating the width for each cell in the column. Typically, it uses the actual displayed text in the cell and measures it. In this case, the cell is blank. For some reason, the code is falling back to measuring some hard-coded string. Which doesn't make a lot of sense.
This bug has probably been around a long time but no one ever noticed, because it only happens under such obscure circumstances. First, you have to have a column with a mask that allows null. And your mask has to be shorter than the default string. Most masks are generally pretty long to account for serial numbers or currency or things like that.
Anyway, I'm going to write this up for developer review and I will update the case with more details after I do that.