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. Image for the cookie policy date
close icon

GridGroupingControl ComboBox CellType

I would like to format my grid grouping control so that one of the columns is displayed as a combobox when the record is being edited. When I try to change the CellType property of the column under AnyRecordFieldCell, the following error message is displayed immediately: NullReferenceException: Object reference not set to an instance of an object. What could be causing this error? Thanks.

3 Replies

AD Administrator Syncfusion Team April 18, 2006 09:00 AM UTC

Hi Careed, To display one of the columns as a combobox on edit mode, you can use EditItem Templates for the column. To do this right click on the grid and then Choose the Edit Templates where you can choose any of the column and then place the controls. Regards, A.Sivakumar


CA careed April 18, 2006 05:14 PM UTC

I have successfully added a dropdownlist control to the EditItemTemplate of the column that I would like to display as a dropdownlist. The dropdownlist is bound to a datatable and at run-time it does contain the correct list of values. However, the dropdownlist does not display the selected item when it is initially displayed. How do I make the dropdownlist control display the cell''s current value? Is there a sample that demonstrates using a dropdownlist?


AD Administrator Syncfusion Team April 19, 2006 05:58 AM UTC

Hi careed, You can use Container.StyleInfo.Text to display the ''Current item'' take a look at our ''EditAllRows'' Sample where a text box will contain the current value this is achieved by Templates. I am not sure on whether the following sample matches your scenario but you can take a look at our Related Tables/Editing with Foreign Key Values sample, where when editing a row, drop down box will contain the related data''s , this is achieved by setting a Relation Kind of a grid to ForeignKeyReference. Thanks, A.Sivakumar

Loader.
Live Chat Icon For mobile
Up arrow icon