Hi,
i am facing issue with Kendo Combo boxes, where the Change event is getting fired two times, please find the below code.
<table>
<tr id="controls">
<td>
<label id="lbl1">Config Type:</label>
</td>
<td>
@(Html.Kendo().ComboBox()
.Name("cmb_configType")
.HtmlAttributes(new { @class = "fieldentertext", required = "required", style = "width:85%;", validationmessage = "" })
.Placeholder("Select Config Type...")
.DataTextField("ConfigTypes")
// .DataValueField("Names")
.Filter(FilterType.Contains)
.Events(e =>
{
e.Change("OnChange_ConfigType");
//.Select("OnSelect_Config")
//.Open("OnOpen_Config")
//.Close("OnClose_Config")
//.DataBound("OnDataBound_Config")
//.Filtering("OnFiltering_Config");
})
)
</td>
<td>
<label id="lbl3">Config Name:</label>
</td>
<td>
@(Html.Kendo().ComboBox()
.Name("cmb_confignames")
.HtmlAttributes(new { @class = "fieldentertext", required = "required", style = "width:85%;", validationmessage = "" })
.Placeholder("Select Config Name...")
.DataTextField("ConfigNames")
// .DataValueField("Names")
.Filter(FilterType.Contains)
.Events(e =>
{
e.Change("OnChange_ConfigNames");
//.Select("OnSelect_Config")
//.Open("OnOpen_Config")
//.Close("OnClose_Config")
//.DataBound("OnDataBound_Config")
//.Filtering("OnFiltering_Config");
})
)
</td>
<td>
<button class="btn-brdr" id="btnctrl">+</button>
</td>
</tr>
</table>
i am creating two combo boxes 1. Config Type 2. Config Name
when user clicks on first combo, based on the selection i am loading data to second combo box.
when User clicks on Second Combo box(Config Name), It is firing the event for(Config Type) once again and then it is firing event for(Config Name), Why it is firing event for First combo box, when i select on Second combo box?
And also i observed that, if i click on any where in the page these two events are firing, What is wrong in this code?
Here are my fucntions which gets hit on event.
function OnChange_ConfigType(obj)
{
---------------------
}
function OnChange_ConfigName(obj)
{
--------------------
}
Please help on this.