This is a migrated thread and some comments may be shown as answers.

MultiSelectFor - javascript error when deleting selected item

1 Answer 90 Views
MultiSelect
This is a migrated thread and some comments may be shown as answers.
Paul
Top achievements
Rank 1
Paul asked on 19 Jun 2015, 11:05 AM

Hi there,

I am using the MultiSelectFor control bound to a model property in a MVC 5 razor webpage. I am able to select multiple items and create data in our backend system - however, I am running into a few problems when editing this data.

Model property:

[DataType("MultiSelect")]
[Required]
public List<string> Teams { get; set; }

 

Editor Template:

 

@model IList<string>
@Html.Kendo().MultiSelectFor(m => m)
     .DataTextField("Text")
     .DataValueField("Value")
     .Filter("contains")
     .AutoClose(false)
     .Placeholder("Please Select")
     .ValuePrimitive(true)
     .Deferred()
     .BindTo(selectList)
     .ToClientTemplate();

The list it is bound to is an IEnumerable<SelectListItem>

When the screen loads, everything appears fine - the multiselect field is bound to the correct items and displays correctly.

However, if I attempt to remove one of the selected items by clicking on the delete option, I receive a javascript error in kendo.all.min.js:

 
0x800a138f - JavaScript runtime error: Unable to get property 'top' of undefined or null reference

 

 

The multiselect then appears to have lost it's list of values, which will only reappear if I start typing.

Any ideas what could be the issue here? If I expand the list first prior to deleting, I receive no issues when removing a selected item.

 

Thanks,

Paul.

 

 

 

1 Answer, 1 is accepted

Sort by
0
Georgi Krustev
Telerik team
answered on 19 Jun 2015, 03:33 PM
Hello Paul,

The described issue is a known bug that is already addressed. Please upgrade to the latest internal build of Kendo UI / UI for ASP.NET MVC. You can also check the next official release (Q2 2015) due to the end of this month.

Regards,
Georgi Krustev
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
MultiSelect
Asked by
Paul
Top achievements
Rank 1
Answers by
Georgi Krustev
Telerik team
Share this question
or