This is a migrated thread and some comments may be shown as answers.
multiselect ajax and displaying selected values
4 Answers 123 Views
This is a migrated thread and some comments may be shown as answers.
William Dunn
Top achievements
Rank 1
William Dunn asked on 12 Apr 2013, 03:19 PM
I have an ajax multiselect with autobind of false.  When returning to the page I would like my selected value(s) to display when the page loads, but they currently do not display until I click in the mulitselect.

Is there anything I can do to make this happen? 

I've attached a sample project.
@(Html.Kendo().MultiSelectFor(x => x.ReportOwner)
    .DataTextField("Name")
    .DataValueField("Pid")
    .DataSource(dataSource => dataSource
        .Read(read => read.Action("_RelatedEmployees", "AdvancedSearch"))
        .ServerFiltering(false)
        .Events(events => events.Error("onError"))
    )
    .AutoBind(false)
    .Placeholder("Select report owners...")
)

4 Answers, 1 is accepted

Sort by
0
Accepted
Georgi Krustev
Telerik team
answered on 15 Apr 2013, 08:49 AM
Hello William,

 
The desired functionality is available in the the last internal build (2013.1.411). You will need to pass the selected data items (not just the values) to the Value method of the wrapper:

@(Html.Kendo().MultiSelectFor(x => x.ReportOwner)
    .DataTextField("Name")
    .DataValueField("Pid")
    .DataSource(dataSource => dataSource
        .Read(read => read.Action("_RelatedEmployees", "AdvancedSearch"))
        .ServerFiltering(false)
        .Events(events => events.Error("onError"))
    )
    .AutoBind(false)
    .Placeholder("Select report owners...")
    .Value(List<[your model]>)
)

Regards,
Georgi Krustev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
William Dunn
Top achievements
Rank 1
answered on 15 Apr 2013, 11:03 AM
Much appreciated... Thank You.
0
William Dunn
Top achievements
Rank 1
answered on 29 May 2013, 05:12 PM
I have finally got around to implementing this with the latest version of Kendo.

When I return to the page the previously selected items do appear.

When I click on the multiselect it does not call the read method again to give me the other values to select.

I have attached a sample project.

thanks
0
Georgi Krustev
Telerik team
answered on 31 May 2013, 08:54 AM
Hello William,

 
Currently, this is not supported. The serverFiltering needs to be true and the end user should type something in the input in order to initiate filtering.

We will improve current behavior in the next internal build due the next week.

Regards,
Georgi Krustev
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Asked by
William Dunn
Top achievements
Rank 1
Answers by
Georgi Krustev
Telerik team
William Dunn
Top achievements
Rank 1
Share this question
or