Problem with ComboBox CellType

I have three cells with ‘Combobox” as their celltype in GDBG. I am using the following code for the combobox. Please see the code in attached file. Problem: If I don’t click on any cell on Column #1 and Column #2, then my Dropdown on column #3 works with no problem. But If I click on any cell of Column # 1 OR Column #2 first (basically click on dropdown list) then click on any cell of Column #3 I get the following error message. Type: System.NullReferenceException Message: Object reference not set to an instance of an object. Stack Trace: at Syncfusion.Windows.Forms.Grid.GridComboBoxCellModel.GetItemValue(Object dataSource, String valueMember, Object item) at Syncfusion.Windows.Forms.Grid.GridComboBoxCellRenderer.SynchronizeDisplayText(Int32 index) at Syncfusion.Windows.Forms.Grid.GridComboBoxCellRenderer.ListBoxMouseUp(Object sender, MouseEventArgs e) at System.Windows.Forms.Control.OnMouseUp(MouseEventArgs e) at Syncfusion.Windows.Forms.Grid.GridComboBoxListBoxPart.OnMouseUp(MouseEventArgs e) at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.ListBox.WndProc(Message& m) at Syncfusion.Windows.Forms.Grid.GridComboBoxListBoxPart.WndProc(Message& msg) at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m) at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m) at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam) Please provide some help. thanks,

combobox0.zip

4 Replies

ST stanleyj Syncfusion Team November 28, 2005 04:26 AM UTC

Hi VS, Can you modify this sample to show up the behavior? or can you upload your sample, we will try debugging it here. Best regards, Stanley


AD Administrator Syncfusion Team November 28, 2005 05:00 PM UTC

I didn’t need to modify anything on my side. I am running 3.0.1.1. Steps to reproduce: 1. Run the application 2. Select something from combobox from column 1 or Column2 3. Try to select something from column 3 4. Get the attached error Please do help.

screen2.zip


AD Administrator Syncfusion Team November 28, 2005 05:37 PM UTC

If you want to use both DataSource and ChoiceList comboboxes in the same grid, try registering a second combobox celltype. Here is the sample back modified to do this. http://www.syncfusion.com/Support/user/uploads/Forum_37603_e9adc5d5.zip


AD Administrator Syncfusion Team November 28, 2005 08:28 PM UTC

Thanks Clay.

Loader.
Up arrow icon