Curt Rabon
Top achievements
Rank 1
Veteran
Curt Rabon
asked on 18 Mar 2015, 01:57 AM
Kendo MVC 2014.3.1516
Bug:
If you use a MultiSelectFor in an EditorTemplate, the grid's "save" event will only fire once for that cell. The second time you update the same cell (by picking an additional item or removing an item from the MultiSelect list), the grid's save event is not called.
Bug:
If you use a MultiSelectFor in an EditorTemplate, the grid's "save" event will only fire once for that cell. The second time you update the same cell (by picking an additional item or removing an item from the MultiSelect list), the grid's save event is not called.
9 Answers, 1 is accepted
0
Curt Rabon
Top achievements
Rank 1
Veteran
answered on 18 Mar 2015, 02:07 AM
columns.Bound(c => c.HTMLAttributes)
.Title(
"HTML Attr"
).Sortable(
false
).Filterable(
false
)
.EditorTemplateName(
"HtmlAttributes"
);
EditorTemplate (AppCache.HtmlAttributes is a server array of a custom object)
@model
object
@(Html.Kendo().MultiSelectFor(m => m)
.Name(
"HtmlAttrList"
)
.Animation(
false
)
.DataValueField(
"ID"
)
.DataTextField(
"Text"
)
.BindTo(AppCache.HtmlAttributes)
)
0
Curt Rabon
Top achievements
Rank 1
Veteran
answered on 18 Mar 2015, 02:02 PM
@(Html.Kendo().Grid<Field>()
.Name(
"fieldGrid"
)
.Columns(columns => ....)
.Scrollable(scrollable => scrollable.Virtual(
true
))
.Sortable()
.Filterable()
.Editable(e => e.Mode(GridEditMode.InCell))
.AutoBind(
false
)
.Events(e => e
.Edit(
"myEdit"
)
.Save(
"mySave"
)
)
.DataSource(ds => ds
.Ajax()
.ServerOperation(
false
)
.Model(model =>
{
model.Id(c => c.Name);
model.Field(c => c.Name).Editable(
false
);
})
)
)
0
Hello Curt,
The Grid widget does not support and it is not intended to edit nested arrays out-of-the-box. You can use the work-around from this code library project to enable such support:
http://www.telerik.com/support/code-library/using-multiselect-in-grid
Kind Regards,
Petur Subev
Telerik
The Grid widget does not support and it is not intended to edit nested arrays out-of-the-box. You can use the work-around from this code library project to enable such support:
http://www.telerik.com/support/code-library/using-multiselect-in-grid
Kind Regards,
Petur Subev
Telerik
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.
0
Curt Rabon
Top achievements
Rank 1
Veteran
answered on 20 Mar 2015, 03:33 PM
I don't understand what using a MultiSelect as a column editor has to do with "nested arrays". Does the grid support using the Kendo MultiSelect as a column editor? If so, then shouldn't the grid "save" event always be called when updating the column value by using the MultiSelect?
0
Curt Rabon
Top achievements
Rank 1
Veteran
answered on 20 Mar 2015, 03:40 PM
OK, I now understand what you are saying. The MultiSelect produces an array and that's not supported as a column editor when editing inline or inCell.
Is there a document that tells me what Kendo widgets are or are not supported in the grid? Please don't leave it up to your customers to guess.
Is there a document that tells me what Kendo widgets are or are not supported in the grid? Please don't leave it up to your customers to guess.
0
Accepted
Hello Curt,
MultiSelect is the only widget which value is actually an array. DatePicker, DropDownLists , ComboBoxes, inputs, color pickers are all single values. For the specific case with the MultiSelect we have created the code library article.
http://www.telerik.com/support/code-library/using-multiselect-in-grid
Kind Regards,
Petur Subev
Telerik
MultiSelect is the only widget which value is actually an array. DatePicker, DropDownLists , ComboBoxes, inputs, color pickers are all single values. For the specific case with the MultiSelect we have created the code library article.
http://www.telerik.com/support/code-library/using-multiselect-in-grid
Kind Regards,
Petur Subev
Telerik
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.
0
Curt Rabon
Top achievements
Rank 1
Veteran
answered on 24 Mar 2015, 07:48 PM
Thank you.
0
Neil
Top achievements
Rank 1
answered on 12 Jul 2017, 07:56 PM
How do you get the Editor to come up with the selected items already highlighted?
0
Hello Neil,
If the multi select inputs in the edit template are named as the properties in the model, the multi select will bound automatically to the values in the properties.
Please refer to the attached sample (custom-editor.zip) which illustrates how multi selects bind to the property with the same name.
Regards,
Georgi
Progress Telerik
If the multi select inputs in the edit template are named as the properties in the model, the multi select will bound automatically to the values in the properties.
Please refer to the attached sample (custom-editor.zip) which illustrates how multi selects bind to the property with the same name.
Regards,
Georgi
Progress Telerik
Try our brand new, jQuery-free Angular 2 components built from ground-up which
deliver the business app essential building blocks - a grid component,
data visualization (charts) and form elements.