KendGrid - adding new record chosing from fetched values

#1

Hi all,
I’m trying to implement a KendoGrid that have 2 columns/fields. When the user click on “Add new record” I would that he/she can’t edit manually the fields but select them from a drop down menu (same thing if the user want to modify one of these columns on an existing row, he/she has to take the value from a menu). The KendoGrid is “editable”= true, so I have the 3 buttons up on the Grid.

“columns” : [
{
“label”: “{~Enterprise.ThresholdsListView.facility~}”,
“field”: “facility.id”,
“value”: “{{facility.name}}”,
“format”: “titleize”,
“width”: 150,
“align”: “left”,
“sortable”: true,
“link”: “/enterprise/facility/{{facility.id}}”
},
{
“label”: “{~Enterprise.ThresholdsListView.alertType~}”,
“field”: “alertType”,
“align”: “left”,
“sortable”: true
}
]

For the first field I would a drop down menu that shows a list of value fetched from backend (value returned by a Facility.fetch() where I show the field name and I want to save the field id).
For the second field I would a drop down menu of fixed string values (for example 3 options , the first “STRING1”, second “STRING2”, third “STRING3”).

Thanks!
Laura

0 Likes

#2

This feature isn’t supported by our KendoGrid. You will need to create some custom components and features to implement this feature.

0 Likes

#3

Hi, in the documentation I found the component “C3.view.DynamicGrid”. It seems to be what I’m searching, but have you an example of implementation/use of this? It could help me to configure my table.

Thanks,
Laura

0 Likes

#4

Hi, I found a way to use KendoGrid and have a field that shows a list of fixed values, ​​to choose from the drop-down menu. You can do this defining in the KendoGrid column element the “editor”: “select” and the “editorData” as an array of values.

Regards,
Laura

0 Likes