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

ComboBox: onchange event does not fired for Numeric Values

4 Answers 68 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Suresh Babu
Top achievements
Rank 1
Suresh Babu asked on 17 Jul 2013, 03:00 PM

Hi,

The attached sample project is based on your combo box sample post along with other elements.  

In this project combo box onchange event does not fired if it has numeric value.  Below are details for the same.

             1.  I have 2 combo boxes and 1 label in the attached project: Alphabet Combo, Numeric Combo and Selected Value:  Alphabet Combo has values: A-1, B-2, C-3, D-4 and Number Combo has values: 1-A, 2-B, 3-C, 4-D
             2. Select Alphabet combo by pressing letter 'A' or 'B' or 'C' or 'D' by using keyboard, onchange event fired and selected value and selected text will show on label control  (working fine)

             3. But I have done for Numeric Combo same as above, but it won't show selected value and selected text due to onchange event does not fired. 

For testing, 
    -  Alphabet Combo:  Press 'A' by using keyboard and press Tab, it will show the selected value and text
    - Numberic Combo: Press '1' by using keyboard and press Tab, it wont show the selected value and text

Code for above requirement:
1) Alphabet Combo:
     @(Html.Kendo().ComboBox()
                      .Name("AlphabetCombo")
                      .Suggest(true)
                      .Filter("StartsWith").MinLength(0)
                      .HighlightFirst(true)
                      .Placeholder("Select fabric...")
                      .DataTextField("Text")
                      .DataValueField("Value")
                      .BindTo(new List<SelectListItem>() {
                           new SelectListItem() {
                            Text = "Select", Value = "0"   
                          },
                          new SelectListItem() {
                            Text = "A-1", Value = "1"   
                          },
                          new SelectListItem() {
                            Text = "B-2", Value = "2"   
                          },
                          new SelectListItem() {
                            Text = "C-3", Value = "3"   
                          },
                          new SelectListItem() {
                            Text = "D-4", Value = "4"   
                          }
                      })
                     .SelectedIndex(0)
                     .Events(events =>
                      {
                          events.Change("Combo_Change");
                      })
                )

2) Numeric Combo:
      @(Html.Kendo().ComboBox()
                              .Name("SampleData2")
                      .Suggest(true)
                      .Filter("StartsWith").MinLength(0)
                      .HighlightFirst(true)
                      //.Placeholder("Select fabric...")
                      .DataTextField("Text")
                      .DataValueField("Value")
                      .BindTo(new List<SelectListItem>() {
                           new SelectListItem() {
                            Text = "Select", Value = "0"   
                          },
                          new SelectListItem() {
                            Text = "1-A", Value = "1"   
                          },
                          new SelectListItem() {
                            Text = "2-B", Value = "2"   
                          },
                          new SelectListItem() {
                            Text = "3-C", Value = "3"   
                          },
                          new SelectListItem() {
                            Text = "4-D", Value = "4"   
                          }
                      })
                     .SelectedIndex(0)
                     .Events(events =>
                      {
                          events.Change("Combo_Change");
                      })
                )

3) Label to show selected value and text
   <b>Selected Value is : </b> <label id="lblSelectedValue" runat="server"></label>

4) OnChange Event: JavaScript code
      <script language="javascript" type="text/javascript">
        function Combo_Change(e) {
            var combo = e.sender;
            $('#lblSelectedValue').text(combo.value() + ', ' + combo.text());
        }
    </script> 

Please help me to resolve the issue.  Thanks in advance.

.

4 Answers, 1 is accepted

Sort by
0
Daniel
Telerik team
answered on 19 Jul 2013, 04:30 PM
Hi,

I reproduced the problem you wrote about and I have logged it in our system. We will look into it and I will follow up in this thread as soon as there is more information.

Regards,
Daniel
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Suresh Babu
Top achievements
Rank 1
answered on 23 Jul 2013, 05:39 AM
Hi Daniel,

Thank you for look into my issue and hope you gives good solution in soon for the same.

Thanks,
Suresh
0
Daniel
Telerik team
answered on 26 Jul 2013, 02:56 PM
Hello Suresh,

Unfortunately, it seems that the problem is a little more complicated than we originally thought and will require further investigation. We will follow up in this thread once it has been resolved.

Regards,
Daniel
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Daniel
Telerik team
answered on 03 Oct 2013, 02:10 PM
Hello,

I am glad to inform you that the issue is now fixed. The fix will be available in the next official release.

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