Hello,
I'm reaching out because I can't manage to get a dropdown to work while adding an entry in Grid.
I'm using React with functional components.
I have defined the editType attribute in my Grid column and also made an object with parameters for the "edit" attribute like in the examples shown
here, although I keep getting error when clicking the Grid's Add button.
The error I get is:
Uncaught TypeError: col.edit.create is not a function
at EditRender.getEditElements (edit-renderer.js?4820:220)
at EditRender.addNew (edit-renderer.js?4820:30)
at Observer.eval (normal-edit.js?e95e:524)
at Observer.notify (observer.js?811a:102)
at GridComponent.ComponentBase.trigger (component-base.js?c9da:209)
at InlineEdit.NormalEdit.addRecord (normal-edit.js?e95e:516)
at InlineEdit.addRecord (inline-edit.js?94a9:32)
at Edit.addRecord (edit.js?aa15:175)
at GridComponent.Grid.addRecord (grid.js?9c37:2834)
at Observer.eval (toolbar.js?e09d:354)
My Grid's column is:
<ColumnDirective field='TeamDescr' headerText='Team' textAlign='Left' editType='dropdownedit' edit={teamParams} validationRules={{ required: true }} />
And the props function for the "edit" property is:
const teamParams = {
params: {
actionComplete: () => false,
allowFiltering: true,
dataSource: new DataManager([
{ TeamDescr: 'Team 1', id: '1' },
{ TeamDescr: 'Team 2', id: '2' },
{ TeamDescr: 'Team 3', id: '3' }
]),
fields: { text: "TeamDescr", value: "id" },
query: new Query()
}
}
If I remove the "edit" property, Dropdown is shown without options and it makes a request in the background to the remote datasource for the Grid's data.
I am trying for hours to debug this but I have not had any luck, I would really appreciate some help.
Thank you in advance.
Best regards!