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

The comboBox control sets the Template and HeaderTemplate templates to trigger the Change event twice

1 Answer 56 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
wang
Top achievements
Rank 1
wang asked on 05 Sep 2017, 01:53 AM

 @(Html.Kendo().ComboBoxFor(m => m.DeviceId)
                                      .HtmlAttributes(new { required = "required", data_required_msg = "请选择装置名称", style = "padding: 0px;width:562px" })
                                      .DataTextField("DeviceName")
                                      .DataValueField("Id")
                                      .HtmlAttributes(new { style = "width: 100%;" })
                                      .DataSource(source =>
                                      {
                                          source.Read(read =>
                                          {
                                              read.Action("GetOrganizeDeviceNameList", "OrganizeDevice", new { Id = Model.Id, InspectionCycleId = Model.InspectionCycleId });
                                          })
                                          .ServerFiltering(true);
                                      })
                                      .Filter(FilterType.Contains)
                                      .CascadeFromField("DeviceName")
                                      .Suggest(true)
                                      .Height(300)
                                      .Events(eve =>
                                      {
                                          eve.Change("initListData");
                                          eve.DataBound("Gridchange");
                                      })
                                    .HeaderTemplate("<ul class='table2' width='100%' >" +
                                    "<li class='name1'>DeviceCode</li>" +
                                    "<li class='name2'>DeviceName</li>" +
                                    "<li class='name3'>Scale</li>" +
                                    "</ul>")
                                    .Template("<ul class='table2\'width='100%' >" +
                                    "<li class='name1'>#: data.DeviceCode #</li>" +
                                    "<li class='name2'>#: data.DeviceName #</li>" +
                                    "<li class='name3'>#: data.Scale #</li>" +
                                    "</ul>")
                                    .FooterTemplate("")
                                    )

 

 

The comboBox control sets the Template and HeaderTemplate templates to trigger the Change and Select events twice

Plase Help Me

1 Answer, 1 is accepted

Sort by
0
Neli
Telerik team
answered on 05 Sep 2017, 12:52 PM
Hello Wang,

I tried to reproduce the issue by using following demo for cascading ComboBox with templates for each ComboBox added and subscription for Select and Change events, but the events are triggered only once.

Could you please send us a runnable project where the issue can be reproduced, so we could have a look locally and provide further assistance.

Regards,
Neli
Progress Telerik
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
General Discussions
Asked by
wang
Top achievements
Rank 1
Answers by
Neli
Telerik team
Share this question
or