I am using 2 UltraCombos which make multi selection.
The selection of first ultracombo affect the items of the second ultracombo.
At the AfterCloseUp eventhandler of the firest ultracombo, I change the items of the second ulracombo.
However, after executing the eventhandler, the unknown exception occured.
This is the code.
private void ultraCombo1_AfterCloseUp(object sender, EventArgs e) {
ultraCombo2.DataSource = SharedInfo.SelectedItems;
for (int i = 0; i < ultraCombo2.Rows.Count; i++) { ultraCombo2.Rows[i].Cells["Selected"].Value = true; }
}
The exception is,
위치: Infragistics.Win.UltraWinGrid.UltraDropDownBase.Infragistics.Win.IValueList.ResolveItemAppearance(Int32 itemIndex, AppearanceData& appData, AppearancePropFlags& flags, ComponentRole componentRole) 위치: Infragistics.Win.EditorWithTextUIElement.GetImage(String text, AppearanceData& appData) 위치: Infragistics.Win.EditorWithTextUIElement.PositionChildElements() 위치: Infragistics.Win.UIElement.VerifyChildElements(ControlUIElementBase controlElement, Boolean recursive) 위치: Infragistics.Win.UIElement.VerifyChildElements(ControlUIElementBase controlElement, Boolean recursive) 위치: Infragistics.Win.UIElement.VerifyChildElements(ControlUIElementBase controlElement, Boolean recursive) 위치: Infragistics.Win.UIElement.VerifyChildElements(ControlUIElementBase controlElement, Boolean recursive) 위치: Infragistics.Win.UIElement.DrawHelper(Graphics graphics, Rectangle invalidRectangle, Boolean doubleBuffer, AlphaBlendMode alphaBlendMode, Boolean clipText, Boolean forceDrawAsFocused, Boolean preventAlphaBlendGraphics) 위치: Infragistics.Win.UIElement.Draw(Graphics graphics, Rectangle invalidRectangle, Boolean doubleBuffer, AlphaBlendMode alphaBlendMode, Boolean forceDrawAsFocused, Boolean preventAlphaBlendGraphics) 위치: Infragistics.Win.ControlUIElementBase.Draw(Graphics graphics, Rectangle invalidRectangle, Boolean doubleBuffer, AlphaBlendMode alphaBlendMode, Size elementSize, Boolean preventAlphaBlendGraphics) 위치: Infragistics.Win.ControlUIElementBase.Draw(Graphics graphics, Rectangle invalidRectangle, Boolean doubleBuffer, AlphaBlendMode alphaBlendMode, Size elementSize) 위치: Infragistics.Win.ControlUIElementBase.Draw(Graphics graphics, Rectangle invalidRectangle, Boolean doubleBuffer, AlphaBlendMode alphaBlendMode) 위치: Infragistics.Win.UltraControlBase.OnPaint(PaintEventArgs pe) 위치: Infragistics.Win.UltraWinGrid.UltraCombo.OnPaint(PaintEventArgs e) 위치: System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer) 위치: System.Windows.Forms.Control.WmPaint(Message& m) 위치: System.Windows.Forms.Control.WndProc(Message& m) 위치: System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m) 위치: System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) 위치: System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam) 위치: System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg) 위치: System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData) 위치: System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context) 위치: System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context) 위치: System.Windows.Forms.Application.Run(Form mainForm)
Hi,
What kind of exception is it?
My best guess is that the second Combo has a value and when you change the list, you are changing or removing the item on the list that matches that value. So you might just want to set the second Combo's value to null first, because you change the list, and see if that helps.
The UltraCombos have a band which has two columns that are "Selected" and "Value".
"Selected" column for multi selection, "Value" column for item list.
You said that the second Combo's value to null first, and then change the list,
but if I set the second Combo's DataSource to null, the "Selected" column is removed.
So another exception occur named "Argument Excetpion : key not found".
I'd like to know how to change the datasource of "Value" column in UltraCombo.