Hello
Attached you'll find 4 screenshots of a wingrid that is using a UltraControlContainerEditor (UCCE). The issue that I'm experiencing is when the edit control within the UCCE is painted, it will become distorted under the following scenario:
The "Start" screenshot shows the editor control (which is a user control) contained in the UCCE displayed properly on the last completely visible row in the wingrid. When I select the row that is partially visible to become the selected row, the grid positions the row so it is completely visible in the grid. When I go into edit mode of the UCCE, i get the display as shown in the "Next 1" screenshot. If I continue to do this scenario, each display gets progressive worse (see "Next 2"). Also, the layout of the users control remains distorted on all subsequent displays (see "Final")
In the user control used in the editor containor of the UCCE, all autosize are set to False; the Anchors are all Top,Left; and all object min and max sizes are set to 0,0. I'm using version 10.2
Questions
Is this distortion a result of the editor control being drawn beyond the grid?
How can I force the dropdown to stay within the size of it's parent? Specifically, can I cause the dropdown to spawn above the row?
Can I force the re-rendering of the user control within the UCCE to correct the distortion issue on subsequent uses?
Thanks
Clay Seifert
Start
Next1
Next2
Final
Hi Clay,
I'm a little confused by what I am seeing here. It looks like you are using the UltraControlContainerEditor to place a UserControl in the grid, but that the UserControl is just a single button with a dropdown.
Using UltraControlContainer for this seems like a bit of overkill, since you could achieve the same thing using using a DropDownEditorButton in the cell. But I guess you want the button to fill the whole cell, so that makes sense.
But... if the distortion here is occurring in the DropDown, then I don't see what that could possibly have to do with the UltraControlContainerEditor. The UCCE will resize your UserControl, but I don't see how the resizing of your UserControl could possibly be having any effect on the DropDown, since the dropdown is not contained inside the UserControl - it's being displayed in a dropdown.
What control are you using to provide the dropdown button? I'm guessing it's probably UltraDropDown Button.
What is the control you are placing in the dropdown area? Is that another UserControl? Is is a Panel that is placed on the existing UserControl at design-time?
It appears from these screen shots that the size of the control within the dropdown is changing. So it's important to know what control that is and what (if any) kind of docking or anchoring the controls within that dropdown control are using.
Also... what version of NetAdvantage are you using?
Mike Saltzman"] It looks like you are using the UltraControlContainerEditor to place a UserControl in the grid, but that the UserControl is just a single button with a dropdown. What control are you using to provide the dropdown button? I'm guessing it's probably UltraDropDown Button. What is the control you are placing in the dropdown area? Is that another UserControl? Is is a Panel that is placed on the existing UserControl at design-time?
It looks like you are using the UltraControlContainerEditor to place a UserControl in the grid, but that the UserControl is just a single button with a dropdown.
The user control consists of a UltraDropDown Button that uses a UltraPopupControl Container that pops a UltraPanel. The ultra panel contains upwards of 20 various controls
Mike Saltzman"] Using UltraControlContainer for this seems like a bit of overkill, since you could achieve the same thing using using a DropDownEditorButton in the cell. But I guess you want the button to fill the whole cell, so that makes sense.
That is the correct assumption on your part.
Mike Saltzman"] It appears from these screen shots that the size of the control within the dropdown is changing. So it's important to know what control that is and what (if any) kind of docking or anchoring the controls within that dropdown control are using. Also... what version of NetAdvantage are you using?
In the control displayed in the dropdown is the UltraPanel. All controls in the UltraPanel have autosize are set to False; the Anchors are all Top,Left; and all object min and max sizes are set to 0,0. I'm using version NetAdvantage 10.2
There was one part of my questions that you did not answer - where is the UltraPanel located at design-time? I assume it's on the UserControl, but I just want to make sure.
ClaySeifert said:the Anchors are all Top,Left;
That's surprising. The screen shots here seem to show an increasing gap between the Date controls at the top of the panel (which appear to be an UltraLabel and an UltraDateTimeEditor) and the Time controls under them (which look like some UltraLabels and an UltraTrackBar).
If these controls are all docked to the top left, then this is quite a puzzle. Even if the UltraPanel is resizing, there's no reason why controls docked to the top left should be moving. And there's no reason I can see why the UltraPanel should be resized.
I have two suggestions to help track this down.
Try trapping the LocationChanged event of those Time-related controls and see if it's ever firing. If those controls are moving, then the event should be firing, and if so, the call stack might tell us why.
Also, hook the Resize event of the UltraPanel and see if it's being Resized on the second and subsequent dropdowns.
My second suggestion is to try this:
this.ultraGrid1.DisplayLayout.UseScrollWindow = UseScrollWindow.None;
See if that makes the problem go away.
Hello Clay,
Base on this forum thread I have created a case for you with id CAS-72592-4K6R20 in order to investigate this issue further for you. I will update you for the progress of this as soon as I have information for you.
Thank you for using Infragistics Component.
The grid uses ScrollWindow to optimize scrolling performance when it can. Another issue similar to the one you are experiencing here was recently reported on these forums and when we looked into it, we found that since the EditingControl is getting parented to the grid control, the call to ScrollWindow is affecting the display of controls inside the EditingControl without affecting their Bounds or Location.
Here's a link to the forum thread where the issue was reported:
UltraControlContainerEditor editting control messed up after scroll - Infragistics Community
It's actually pretty weird. The location of the control on the screen is getting offset somehow, even though the properties of that control still return the same location.
Anyway, you can turn off UseScrollWindow for now. The issue has already been reported as a bug and should be fixed in the near future.
Hey Mike
The this.ultraGrid1.DisplayLayout.UseScrollWindow = UseScrollWindow.None; corrected the problem. Please explain why.
Regarding your other questions, the ultrapanel is on the user control. I've attached the class for your reference.
Clay