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?
Mike,
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
-Chris
Hi Chris,
Hm, this doesn't tell me much. It's normal for the grid to make the control visible/invisible in the normal process of showing the EditingControl for a cell.
The only other thing I can think to try at this point is for you to post a video of how you are duplicating the problem. There must be something that I am doing differently when following the steps you posted here.
For example, when you are scrolling the grid, are you using the scroll thumb, or the scrollbar arrow or clicking in the track? Does it matter if you do it a different way?
What operating system are you running?
Whoops, forgot to get the latest release. I got the latest release (11.1.20111.2026), and am still having the issue.
I hooked up the resize event to the control, and when the issue happens, this never gets hit. I also hooked up the location changed, and this never gets his as well. But i did hook up the visiblechanged event, and this was hit when the error occurs. Below is the call stack. One thing i don't think i mentioned before is after the issue occurs once, once you set another cell as active, the rendering control is drawn correctly, but then when the control becomes active again, the editing control is incorrect again, and this happens until the applicatin is restarted.
> TestWinGridPrintingWithFilters.exe!TestWinGridPrintingWithFilters.UCAuthentication.txtAssocNum_VisibleChanged(object sender = {Text = ""}, System.EventArgs e = {System.EventArgs}) Line 64 C# System.Windows.Forms.dll!System.Windows.Forms.Control.OnVisibleChanged(System.EventArgs e = {System.EventArgs}) + 0x158 bytes System.Windows.Forms.dll!System.Windows.Forms.Control.OnParentVisibleChanged(System.EventArgs e) + 0x14 bytes System.Windows.Forms.dll!System.Windows.Forms.Control.OnVisibleChanged(System.EventArgs e = {System.EventArgs}) + 0x12a bytes System.Windows.Forms.dll!System.Windows.Forms.Control.OnParentVisibleChanged(System.EventArgs e) + 0x14 bytes System.Windows.Forms.dll!System.Windows.Forms.Control.OnVisibleChanged(System.EventArgs e = {System.EventArgs}) + 0x12a bytes System.Windows.Forms.dll!System.Windows.Forms.ScrollableControl.OnVisibleChanged(System.EventArgs e) + 0x3f bytes System.Windows.Forms.dll!System.Windows.Forms.Control.OnParentVisibleChanged(System.EventArgs e) + 0x14 bytes System.Windows.Forms.dll!System.Windows.Forms.Control.OnVisibleChanged(System.EventArgs e = {System.EventArgs}) + 0x12a bytes System.Windows.Forms.dll!System.Windows.Forms.ScrollableControl.OnVisibleChanged(System.EventArgs e) + 0x3f bytes System.Windows.Forms.dll!System.Windows.Forms.Control.SetVisibleCore(bool value) + 0x226 bytes System.Windows.Forms.dll!System.Windows.Forms.Control.Visible.set(bool value) + 0x11 bytes Infragistics2.Win.v11.1.dll!Infragistics.Win.ControlContainerEditor.OnBeforeEnterEditMode(ref bool cancel = false) + 0x3e5 bytes Infragistics2.Win.v11.1.dll!Infragistics.Win.EmbeddableEditorBase.EnterEditMode(Infragistics.Win.EmbeddableUIElementBase embeddableElement = {Infragistics.Win.UltraWinEditors.ControlContainerEmbeddableUIElement}) + 0x229 bytes Infragistics2.Win.UltraWinGrid.v11.1.dll!Infragistics.Win.UltraWinGrid.UltraGridCell.EnterEditorIntoEditMode(bool byMouse = true) + 0x597 bytes Infragistics2.Win.UltraWinGrid.v11.1.dll!Infragistics.Win.UltraWinGrid.UltraGridCell.EnterEditMode(bool byMouse = true, bool showingDropDown = false) + 0x49d bytes Infragistics2.Win.UltraWinGrid.v11.1.dll!Infragistics.Win.UltraWinGrid.UltraGridCell.EnterEditMode(bool byMouse = true) + 0x28 bytes Infragistics2.Win.UltraWinGrid.v11.1.dll!Infragistics.Win.UltraWinGrid.UltraGridCell.SetFocusAndActivate(bool byMouse = true, bool enterEditMode = true, bool byTabKey = false) + 0xda bytes Infragistics2.Win.UltraWinGrid.v11.1.dll!Infragistics.Win.UltraWinGrid.UltraGridCell.SetFocusAndActivate(bool byMouse = true, bool enterEditMode = true) + 0x30 bytes Infragistics2.Win.UltraWinGrid.v11.1.dll!Infragistics.Win.UltraWinGrid.CellUIElementBase.OnEmbeddableElementMouseDown(object sender = {Infragistics.Win.UltraWinGrid.EmbeddableEditorOwnerInfo}, Infragistics.Win.EmbeddableMouseDownEventArgs e = {Infragistics.Win.EmbeddableMouseDownEventArgs}) + 0x23f bytes Infragistics2.Win.UltraWinGrid.v11.1.dll!Infragistics.Win.UltraWinGrid.GridEmbeddableEditorOwnerInfoBase.OnEditorMouseDown(Infragistics.Win.EmbeddableUIElementBase embeddableElem = {Infragistics.Win.UltraWinEditors.ControlContainerEmbeddableUIElement}, Infragistics.Win.EmbeddableMouseDownEventArgs e = {Infragistics.Win.EmbeddableMouseDownEventArgs}) + 0x117 bytes Infragistics2.Win.v11.1.dll!Infragistics.Win.EmbeddableUIElementBase.RaiseMouseDownEvent(Infragistics.Win.EmbeddableMouseDownEventArgs e = {Infragistics.Win.EmbeddableMouseDownEventArgs}) + 0x47 bytes Infragistics2.Win.v11.1.dll!Infragistics.Win.UltraWinEditors.ControlContainerEmbeddableUIElement.OnMouseDown(System.Windows.Forms.MouseEventArgs e = {X = 600 Y = 509 Button = Left}, bool adjustableArea = false, ref Infragistics.Win.UIElement captureMouseForElement = null) + 0x17d bytes Infragistics2.Win.v11.1.dll!Infragistics.Win.UltraWinEditors.ControlContainerEmbeddableUIElement.InternalOnMouseDown(System.Windows.Forms.MouseEventArgs e = {X = 600 Y = 509 Button = Left}, bool adjustableArea = false, ref Infragistics.Win.UIElement captureMouseForElement = null) + 0x30 bytes Infragistics2.Win.v11.1.dll!Infragistics.Win.UltraWinEditors.ControlContainerEditorEditAreaUIElement.OnMouseDown(System.Windows.Forms.MouseEventArgs e = {X = 600 Y = 509 Button = Left}, bool adjustableArea = false, ref Infragistics.Win.UIElement captureMouseForElement = null) + 0xa6 bytes Infragistics2.Win.v11.1.dll!Infragistics.Win.ControlUIElementBase.ProcessMouseDownHelper(object sender = {Infragistics.Win.UltraWinGrid.UltraGrid}, System.Windows.Forms.MouseEventArgs e = {X = 600 Y = 509 Button = Left}) + 0x447 bytes Infragistics2.Win.v11.1.dll!Infragistics.Win.ControlUIElementBase.ProcessMouseDown(object sender = {Infragistics.Win.UltraWinGrid.UltraGrid}, System.Windows.Forms.MouseEventArgs e = {X = 600 Y = 509 Button = Left}) + 0x179 bytes Infragistics2.Win.v11.1.dll!Infragistics.Win.Utilities.ProcessEvent(System.Windows.Forms.Control control = {Infragistics.Win.UltraWinGrid.UltraGrid}, Infragistics.Win.ControlUIElementBase.ProcessEvent eventToProcess = MouseDown, System.EventArgs e = {X = 600 Y = 509 Button = Left}) + 0x307 bytes Infragistics2.Win.v11.1.dll!Infragistics.Win.UltraControlBase.OnMouseDown(System.Windows.Forms.MouseEventArgs e = {X = 600 Y = 509 Button = Left}) + 0x2a bytes Infragistics2.Win.UltraWinGrid.v11.1.dll!Infragistics.Win.UltraWinGrid.UltraGrid.OnMouseDown(System.Windows.Forms.MouseEventArgs e = {X = 600 Y = 509 Button = Left}) + 0x30 bytes System.Windows.Forms.dll!System.Windows.Forms.Control.WmMouseDown(ref System.Windows.Forms.Message m, System.Windows.Forms.MouseButtons button, int clicks) + 0xcf bytes System.Windows.Forms.dll!System.Windows.Forms.Control.WndProc(ref System.Windows.Forms.Message m) + 0x86e bytes System.Windows.Forms.dll!System.Windows.Forms.Control.ControlNativeWindow.OnMessage(ref System.Windows.Forms.Message m) + 0x10 bytes System.Windows.Forms.dll!System.Windows.Forms.Control.ControlNativeWindow.WndProc(ref System.Windows.Forms.Message m) + 0x31 bytes System.Windows.Forms.dll!System.Windows.Forms.NativeWindow.Callback(System.IntPtr hWnd, int msg = 513, System.IntPtr wparam, System.IntPtr lparam) + 0x5a bytes System.Windows.Forms.dll!System.Windows.Forms.NativeWindow.DefWndProc(ref System.Windows.Forms.Message m = {msg=0x201 (WM_LBUTTONDOWN) hwnd=0x198039e wparam=0x1 lparam=0x1fd0258 result=0x0}) + 0x130 bytes System.Windows.Forms.dll!System.Windows.Forms.NativeWindow.WndProc(ref System.Windows.Forms.Message m) + 0x5 bytes Infragistics2.Win.v11.1.dll!Infragistics.Win.EditorWithMask.AccessibleTextManager.AccessibleTextSubclasser.WndProc(ref System.Windows.Forms.Message msg = {msg=0x201 (WM_LBUTTONDOWN) hwnd=0x198039e wparam=0x1 lparam=0x1fd0258 result=0x0}) + 0xaf bytes System.Windows.Forms.dll!System.Windows.Forms.NativeWindow.Callback(System.IntPtr hWnd, int msg = 513, System.IntPtr wparam, System.IntPtr lparam) + 0x5a bytes System.Windows.Forms.dll!System.Windows.Forms.NativeWindow.DefWndProc(ref System.Windows.Forms.Message m = {msg=0x201 (WM_LBUTTONDOWN) hwnd=0x198039e wparam=0x1 lparam=0x1fd0258 result=0x0}) + 0x130 bytes System.Windows.Forms.dll!System.Windows.Forms.NativeWindow.WndProc(ref System.Windows.Forms.Message m) + 0x5 bytes Infragistics2.Win.v11.1.dll!Infragistics.Win.FormattedLinkLabel.FormattedLinkEditor.AccessibleTextManager.AccessibleTextSubclasser.WndProc(ref System.Windows.Forms.Message msg = {msg=0x201 (WM_LBUTTONDOWN) hwnd=0x198039e wparam=0x1 lparam=0x1fd0258 result=0x0}) + 0xa2 bytes System.Windows.Forms.dll!System.Windows.Forms.NativeWindow.Callback(System.IntPtr hWnd, int msg = 513, System.IntPtr wparam, System.IntPtr lparam) + 0x5a bytes System.Windows.Forms.dll!System.Windows.Forms.NativeWindow.DefWndProc(ref System.Windows.Forms.Message m = {msg=0x201 (WM_LBUTTONDOWN) hwnd=0x198039e wparam=0x1 lparam=0x1fd0258 result=0x0}) + 0x130 bytes System.Windows.Forms.dll!System.Windows.Forms.NativeWindow.WndProc(ref System.Windows.Forms.Message m) + 0x5 bytes Infragistics2.Win.v11.1.dll!Infragistics.Win.FormattedLinkLabel.IMENativeWindowManager.IMENativeWindow.WndProc(ref System.Windows.Forms.Message m = {msg=0x201 (WM_LBUTTONDOWN) hwnd=0x198039e wparam=0x1 lparam=0x1fd0258 result=0x0}) + 0x3a bytes System.Windows.Forms.dll!System.Windows.Forms.NativeWindow.DebuggableCallback(System.IntPtr hWnd, int msg = 513, System.IntPtr wparam, System.IntPtr lparam) + 0x57 bytes [Native to Managed Transition] [Managed to Native Transition] System.Windows.Forms.dll!System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(int dwComponentID, int reason = -1, int pvLoopData = 0) + 0x24e bytes System.Windows.Forms.dll!System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(int reason = -1, System.Windows.Forms.ApplicationContext context = {System.Windows.Forms.ApplicationContext}) + 0x177 bytes System.Windows.Forms.dll!System.Windows.Forms.Application.ThreadContext.RunMessageLoop(int reason, System.Windows.Forms.ApplicationContext context) + 0x61 bytes System.Windows.Forms.dll!System.Windows.Forms.Application.Run(System.Windows.Forms.Form mainForm) + 0x31 bytes TestWinGridPrintingWithFilters.exe!TestWinGridPrintingWithFilters.Program.Main() Line 18 + 0x1d bytes C# [Native to Managed Transition] [Managed to Native Transition] mscorlib.dll!System.AppDomain.nExecuteAssembly(System.Reflection.Assembly assembly, string[] args) + 0x19 bytes mscorlib.dll!System.Runtime.Hosting.ManifestRunner.Run(bool checkAptModel) + 0x6e bytes mscorlib.dll!System.Runtime.Hosting.ManifestRunner.ExecuteAsAssembly() + 0x84 bytes mscorlib.dll!System.Runtime.Hosting.ApplicationActivator.CreateInstance(System.ActivationContext activationContext, string[] activationCustomData) + 0x65 bytes mscorlib.dll!System.Runtime.Hosting.ApplicationActivator.CreateInstance(System.ActivationContext activationContext) + 0xa bytes mscorlib.dll!System.Activator.CreateInstance(System.ActivationContext activationContext) + 0x3e bytes Microsoft.VisualStudio.HostingProcess.Utilities.dll!Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssemblyDebugInZone() + 0x23 bytes mscorlib.dll!System.Threading.ThreadHelper.ThreadStart_Context(object state) + 0x66 bytes mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state) + 0x6f bytes mscorlib.dll!System.Threading.ThreadHelper.ThreadStart() + 0x44 bytes
Thanks again 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 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