I'm setting the BackColor of certain rows in the UltraCombo's grid and in doing so, the columns width became apparent. When resizing the the drop down, the columns width stayed the same and left a large blank and unwanted space. I've attempted at overriding the UltraCombo to catch the events for these (since they are not hit while in a grid's cell) and observed the the client rectangle, dropdownwitdh and other properties remained static.
Is there a way of getting the new width of the resized drop down and handling it?
Here's a screenshot which should further outline the problem I am having.
I did attempt using the AutoFitStyle property but with no success. Why must the DropDownWidth property always be -1? Otherwise I could catch the OnAfterDropDownResize event and resize it manually.
Hi,
Is this an UltraCombo you are displaying here? It doesn't look like one - it looks more like UltraComboEditor. There are not columns, and no row or cell borders. In fact, this appears to be a dropdown in a grid cell, which means it could be just a ValueList.
Assuming it's an UltraCombo, then how are you attaching it to the grid? Are you using it as a ValueList or as an EditorControl/EditorComponent?
I think the issue here might be that you are using an UltraCombo control and you are checking the DropDownWidth on the UltraCombo control itself. Bu the grid does not actually use the control. The control simply provides an editor or a list to the grid. So the DropDownWidth on the control on the form would not be affected by anything you do in the grid. You have to get the actual dropdown being used by the grid.
It is an UltraCombo, just formatted to appear like a value list to match other columns within the band. I'm uncertain how one would access the drop down being used by the grid, could you provide a little more information on that topic for me? Thanks!
EDIT: Sorry, yes to clarify it is used as the columns editor component.Unrelated: the validator's tooltip will also not display with this setup.
Okay, I was wrong. DropDownWidth is simply not affecting by the resize handle. The property you are looking for is call PreferredDropDownSize on the UltraCombo control itself.
The fact that AutoFitStyle is not working (and I verified that it is not) seems like a bug to me. So I am going to forward this thread over to Infragistics Developer Support so they can get that fixed.
Yes, I did take a quick look at preferred width earlier, however its value remained constant.Thank you for your help! Looking forward to this being fixed. :)
Hello,
This issue has been resolved with the latest service release.
PreferredDropDownSize works fine for me. It returns the new size of the dropdown in the AfterDropDownResize event.