Hello,
I have a custom control that is added to the grid column via the UltraControlContainerEditor. I have defined both an editting control as well as a rendering control (which happen to be pointing to different instances of the same class). Everything is working when the grid comes up...editting and rendering are solid and I am happy with it. However, if the main grid is sized smaller so that a horizontal scroll bar appears and I actually scroll to the right and then back...then the control drawing gets messed up. When in rendering mode everything is still fine...however when I click on the control (going to rendering mode) my control rendering is "off".
I have tried with both EnterEditModeMouseBehavior = EnterEditModeAndClick and with this not set...to no avail. Do you have any suggestions?
A little more detail:
My custom control contains 3 controls inside of it....a checkbox, picturebox and a label. After I do a horizontal scroll then click on the cell the label control shows up just fine but not the picture box and checkbox.
I opened up Spy++ and tool a look at the custom control. Here is what I saw:
The label controls rect was showing up inside of the rect for the main control. However the checkbox and the picture box rects were well outside of the main controls rect. This explains why they are not drawing. What I don't get is why this is happening....because I am not programatically moving these other two controls.
Hi,
I can't see any reason why the ControlContainerEditor might move the controls within your Editing or Rendering control. But the ControlContainerEditor will manipulate properties on your control such as it's size and position on the screen. So maybe your control is anchoring or docking the controls within it and this docking/anchoring is somehow getting corrupted at some point. I've seen some very strange things happen in Visual Studio when using anchoring and docking. There seems to be some timing bugs that can crop up occasionally.
You might want to handle the Resize event on the control and position the controls within it manually instead of relying on the Docking or Anchoring and see if that helps.
Hi Chris,
What version of the controls are you using?
If the controls inside your UserControl are Docked or Anchored, then perhaps what's happening is that at some point, only part of a cell is visible and the grid is therefore setting the size of your control to something really small which causes the docked/anchored controls to be moved incorrectly.
In theory, that should not happen, but I suppose it depends on your UserControl and the Dock/Anchor settings you are using and could also be affecting by any control resizing or repositioning you are doing in your code.
Mike,
I am currently using 10.3.20103.2083
My UC contains a groupbox that is docked at Fill in the UC, and then there are several controls in the group box (4 labels, 2 textboxes, and a button), that are all anchored the standard top.left inside the groupbox. As far as any resizing or repositioning I am doing in my code, there is none.
I have created a sample application that demonstrates the issue, but cannot figure out the exact way to duplicate the issue. If you run the sample, then scroll to the bottom where the UCAuthentication controls are, then activate them, then scroll up and click on one of the radio buttons, then scroll back down and click on the UCAuthentication again, sometime the issue will happen. I will continue to work at the exact way to duplicate the behavior, and when I figure it out, post how to do it here.
In the meantime, any other ideas?
Thanks again, Chris
Update:
OK, so this does not work every time to duplicate the issue, but it does work sometimes.
Steps to reproduce:
Thanks again for your help.
by the way, i am recieving double alert emails from this posts
-Chris
I tried following your steps and I did it about a dozen times, but I did not see any problems.
I, of course, am testing with the latest service release. The latest version is build 2151, so quite a bit newer than the one you are using. So I recommend getting the latest.
None of the controls on your usercontrol appear to be docked or anchored, though, so my theory was probably wrong.
Maybe you can post a screen show of what it looks like on your system when the problem occurs.that might give me some clue about what's happening there.
I will try upgrading later today. I did attach screenshots of the before and after. One wierd thing is one time it could be the textbox dissapearing, other times it could be the labels dissapearing, and i've even seen the button dissapear once. Please let me know if you think of anything, i will will let you know the results of my upgrade
I am attaching the video file here.
It has been sent to support@infragistics.com
You can send the video to Normal 0 false false false EN-US JA X-NONE MicrosoftInternetExplorer4 support@infragistics.com.
Our QA was able to create a video of the problem, but cannot compress it down to less than 3 Megs. How would i be able to get this to you?
Posting a video might be quite hard, as i currently don't have any video recording softare. Would we be able to do a LogMeIn session, i can create a case if necessary?
As for scrolling in the grid, the way that i have gotten the issue is by scrolling using the scroll thumb. I have not tried using the arrows or clicking on the track. I am currently running Windows 7.
Thanks