Hello,
I am trying to recreate this
columns: [
{
label: 'First Name', dataField: 'firstName', editor: 'input'
},
{ label: 'Last Name', dataField: 'lastName', editor: 'autoComplete' },
{
label: 'Product', dataField: 'productName', template: 'dropDownList', editor: {
template: 'dropDownList',
dataSource: ["Black Tea", "Green Tea",
"Caffe Espresso", "Doubleshot Espresso",
"Caffe Latte", "White Chocolate Mocha",
"Caramel Latte", "Caffe Americano",
"Cappuccino", "Espresso Truffle",
"Espresso con Panna", "Peppermint Mocha Twist"]
}
},
which I found here: https://www.htmlelements.com/docs/grid-cell-edit/
in C#, but I can’t figure it out. This is what I have so far.
new GridColumn()
{
DataField = field.FieldName,
Label = field.AliasName,
ColumnGroup = field.GroupName,
ValidationRules = field.DataType.ValidationRules,
DataType = field.DataType.GetSmartType(),
CellsClassName = "font-change",
ClassName = "ColumnHeaderName",
Template = "dropdownlist",
Editor = "dropDownist"
});
Thank you.