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.
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
Hi 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.
Mike,
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 went ahead and upgraded to 11.1.20111.1003 instead of the latest service release, and the problem still exists. It did take me a little bit longer this time, maye 10 tries or so, and would scroll using the scrollbar quickly, but i was able to reproduce the issue with 11.1. Pleaze let me know if you have any other ideas. Thanks for your time
Okay... but updating to 11.1 doesn't really mean much unless you also get the latest service release for 11.1. The problem you are having could still have been fixed in a bug fix which is only available in the service release and is not in the 11.1 release.
Looking at the screen shots you have here, it does seem like the controls are being positioned or sized incorrectly. You might want to try putting a breakpoint in the Resize event of the text editor controls you are using here and see if it's ever getting called with a really small height. If so, you could post the call stack and that might give us a clue.
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