Hi,
Can you show me an example where a ListView or a Multiselect is inside an form. This form is called from a "grid" on next way .Editable(e => e.Mode(GridEditMode.PopUp).TemplateName("ProductorEdit"))
Thanks in advance
Xavier de la Rubia.
3 Answers, 1 is accepted
Although we do not have a demo exactly matching your criteria, I would suggest checking the following links:
Regards,
Alexander Popov
Telerik
I’m going to explain our case. The Grid has Popup property and the form ProductorEdit assigned to EditorTemplate property.
Code from Grid
.Editable(e => e.Mode(GridEditMode.PopUp).TemplateName(
"ProductorEdit"
))
Code from Form ProductorEdit
<div
class
=
"form-group"
>
@Html.LabelFor(model => model.SelectedFacilities,
new
{ @
class
=
"col-md-1 control-label"
})
<div
class
=
"col-md-9 col-md-offset-1"
>
@Html.Kendo().MultiSelectFor(m => m.SelectedFacilities).Name(
"SelectedFacilities"
).BindTo(
new
SelectList((System.Collections.IEnumerable)ViewBag.Facilities,
"OptionId"
,
"Name"
))
</div>
</div>
Code from Model
[DisplayName(
"Característiques"
)]
public
List<
int
> SelectedFacilities {
get
;
set
; }
In resume
The data are correctly assigned to control MultiSelect from ViewBag.Facilities, but the action Create and Update does not receive the data from the SelectedFacilities property of Model, we think that behavior is because the control MultiSelect sends an object to controller and should be a request POST.
Thanks in advance
Xavier Delarubia.
Hello Xavier,
Please find attached a sample project that shows how the Kendo UI MultiSelect widget could be used in custom popup editor.
Regards,
Boyan Dimitrov
Telerik