We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on : November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

GridDataBound - ComboCellType

Thread ID:

Created:

Updated:

Platform:

Replies:

24010 Jan 26,2005 07:28 PM UTC Feb 10,2005 11:36 PM UTC WinForms 5
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On January 26, 2005 07:28 PM UTC

What''s wrong with this code StringCollection col1 = new StringCollection(); col1.Add("1"); col1.Add("2"); col1.Add("3"); gridBoundColumn2.StyleInfo.ChoiceList = col1; In Deigner the cell type of this column has been assigned to ComboBox Type. i can see the combo box but when i select the items from combo box .. it doesn''t update the grid.. Regards Yogi

Administrator [Syncfusion]
Replied On January 26, 2005 07:36 PM UTC

Are there any exceptions being shown in the output window? Have you set gridBoundColumn2.StyleInfo.CellValueType to something other than string? (or, is the datatype for teh column in the datasource something othe rthan a string?). If so, you will not be able to use a ChoiseList of strings as choices. Instead, you would need to do something like create a datatable and have a column of the same datatype as the grid column, and use that new datatable as the datasource for the gridBoundColumn2.StyleInfo.DataSource. You would also need to set gridBoundColumn2.StyleInfo.ValueMember and DataMember.

Administrator [Syncfusion]
Replied On January 26, 2005 07:53 PM UTC

both cellvaluetype and its underlying datatable column type are string.. it still fails... >Are there any exceptions being shown in the output window? > >Have you set gridBoundColumn2.StyleInfo.CellValueType to something other than string? (or, is the datatype for teh column in the datasource something othe rthan a string?). If so, you will not be able to use a ChoiseList of strings as choices. Instead, you would need to do something like create a datatable and have a column of the same datatype as the grid column, and use that new datatable as the datasource for the gridBoundColumn2.StyleInfo.DataSource. You would also need to set gridBoundColumn2.StyleInfo.ValueMember and DataMember.

Administrator [Syncfusion]
Replied On January 26, 2005 07:58 PM UTC

pretty wierd... i deleted my old data set.. cerated a new one from scratch and then assigned it to DataBoundGrid.. now it is working fine Regards Yogesh S >both cellvaluetype and its underlying datatable column type are string.. it still fails... > >>Are there any exceptions being shown in the output window? >> >>Have you set gridBoundColumn2.StyleInfo.CellValueType to something other than string? (or, is the datatype for teh column in the datasource something othe rthan a string?). If so, you will not be able to use a ChoiseList of strings as choices. Instead, you would need to do something like create a datatable and have a column of the same datatype as the grid column, and use that new datatable as the datasource for the gridBoundColumn2.StyleInfo.DataSource. You would also need to set gridBoundColumn2.StyleInfo.ValueMember and DataMember.

Ken Law
Replied On February 10, 2005 03:30 AM UTC

I am having the exact same problem - my combobox fields in gdbgrids fail in the same manner after moving to 3.0.1.0. I have made sure the gridBoundColumn2.StyleInfo.CellValueType is a string (the underlying datatable column is a string). I also set StrictValueType = False. If I use only mouse clicks to try to select an item from the combobox, it fails but there is no exception. However, if I then try to type into the combobox field (it''s editable), I get the following exception in the output window: System.NullReferenceException: Object reference not set to an instance of an object. at Syncfusion.Windows.Forms.Grid.GridComboBoxCellModel.GetItemValue(Object dataSource, String valueMember, Object item) at Syncfusion.Windows.Forms.Grid.GridComboBoxCellRenderer.OnKeyPress(KeyPressEventArgs e) at Syncfusion.Windows.Forms.Grid.GridCellRendererBase.ProcessKeyEventArgs(Message& m) at Syncfusion.Windows.Forms.Grid.GridCellRendererBase.RaiseProcessKeyEventArgs(Message& m) at Syncfusion.Windows.Forms.Grid.GridTextBoxControl.ProcessKeyMessage(Message& m) at System.Windows.Forms.Control.WmKeyChar(Message& m) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.TextBoxBase.WndProc(Message& m) at System.Windows.Forms.RichTextBox.WndProc(Message& m) at Syncfusion.Windows.Forms.Grid.GridTextBoxControl.WndProc(Message& msg) catched at Syncfusion.Windows.Forms.Grid.GridTextBoxControl

Administrator [Syncfusion]
Replied On February 10, 2005 11:36 PM UTC

Ken, we made a couple of fixes with Combobox after 3.0.1.0 but I am not sure if that is related to your problem. If you prepare a sample project we can debug into it. Thanks, Stefan >I am having the exact same problem - my combobox fields in gdbgrids fail in the same manner after moving to 3.0.1.0. I have made sure the gridBoundColumn2.StyleInfo.CellValueType is a string (the underlying datatable column is a string). I also set StrictValueType = False. > >If I use only mouse clicks to try to select an item from the combobox, it fails but there is no exception. However, if I then try to type into the combobox field (it''s editable), I get the following exception in the output window: > >System.NullReferenceException: Object reference not set to an instance of an object. > at Syncfusion.Windows.Forms.Grid.GridComboBoxCellModel.GetItemValue(Object dataSource, String valueMember, Object item) > at Syncfusion.Windows.Forms.Grid.GridComboBoxCellRenderer.OnKeyPress(KeyPressEventArgs e) > at Syncfusion.Windows.Forms.Grid.GridCellRendererBase.ProcessKeyEventArgs(Message& m) > at Syncfusion.Windows.Forms.Grid.GridCellRendererBase.RaiseProcessKeyEventArgs(Message& m) > at Syncfusion.Windows.Forms.Grid.GridTextBoxControl.ProcessKeyMessage(Message& m) > at System.Windows.Forms.Control.WmKeyChar(Message& m) > at System.Windows.Forms.Control.WndProc(Message& m) > at System.Windows.Forms.TextBoxBase.WndProc(Message& m) > at System.Windows.Forms.RichTextBox.WndProc(Message& m) > at Syncfusion.Windows.Forms.Grid.GridTextBoxControl.WndProc(Message& msg) >catched at Syncfusion.Windows.Forms.Grid.GridTextBoxControl > >

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;