I have a very complex Model which has multiple objects some of them are lists.
for example :
Data.MylistObject[0].StatusID
when I pass
var name = ViewData.TemplateInfo.GetFullHtmlFieldName(string.Empty);
@Html.Kendo().ComboBox().Name(name)
on the page html the
jquery that creates the combo will look like :
jQuery(function(){jQuery("#Data.MylistObject[\\0\\]_StatusID.kendoComboBox
but jscript code refrencing the combo written in @
$('[name=@id].data('kendoComboBox')
is translatet to this code on the page
$('[name=Data.MylistObject_0__StatusID].data('kendoComboBox')
this inconsistency causes the code that is ment to taggle the options.filter paramenter to stop working due to the fact that the combo is not selected due to the difference in names.
the only way I found arround this is to pass the id to the name property @Html.Kendo().ComboBox().Name(id)
and use
$('#@id].data('kendoComboBox')
which works , there seems to be a problem with the way kendo parse [0] part of the member name.
Yours,
Ariel
for example :
Data.MylistObject[0].StatusID
when I pass
var name = ViewData.TemplateInfo.GetFullHtmlFieldName(string.Empty);
@Html.Kendo().ComboBox().Name(name)
on the page html the
jquery that creates the combo will look like :
jQuery(function(){jQuery("#Data.MylistObject[\\0\\]_StatusID.kendoComboBox
but jscript code refrencing the combo written in @
$('[name=@id].data('kendoComboBox')
is translatet to this code on the page
$('[name=Data.MylistObject_0__StatusID].data('kendoComboBox')
this inconsistency causes the code that is ment to taggle the options.filter paramenter to stop working due to the fact that the combo is not selected due to the difference in names.
the only way I found arround this is to pass the id to the name property @Html.Kendo().ComboBox().Name(id)
and use
$('#@id].data('kendoComboBox')
which works , there seems to be a problem with the way kendo parse [0] part of the member name.
Yours,
Ariel