The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
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.
ADAdministrator 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
CAcareedApril 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?
ADAdministrator 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