edit cell in grid

1 Answer 50 Views
Grid
Rivka
Top achievements
Rank 1
Rivka asked on 01 Sep 2022, 11:07 AM

I have a grid that has a field that applies an array of numbers
While reading, I present his values like this:
[2,5,900]
While editing it doesn't show me anything
how do I do it
Would appreciate help
Thanks

read:

edit:

1 Answer, 1 is accepted

Sort by
0
Ivan Danchev
Telerik team
answered on 06 Sep 2022, 08:43 AM

Hello Rivka,

For editing a column bound to a collection of items, you can use a MultiSelect editor. We have an example of using the MultiSelect as an editor in the Grid in our Github repo: https://github.com/telerik/ui-for-aspnet-mvc-examples/tree/master/grid/multiselect-in-grid

The column bound to the Territories field uses a custom editor located in Views/Home/EditorTemplates/

In the custom template a MultiSelect is initialized.

Note that the model field has a UIHint value that matches the name of the custom editor template TerritoriesEditor.cshtml: https://github.com/telerik/ui-for-aspnet-mvc-examples/blob/master/grid/multiselect-in-grid/MultiSelectInGrid/Models/EmployeeViewModel.cs

 

Regards,
Ivan Danchev
Progress Telerik

The Premier Dev Conference is back! 

Coming to you live from Progress360 in-person or on your own time, DevReach for all. Register Today.


Tags
Grid
Asked by
Rivka
Top achievements
Rank 1
Answers by
Ivan Danchev
Telerik team
Share this question
or