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

Multiple Xs appear over comboBox

6 Answers 99 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Jordan
Top achievements
Rank 1
Jordan asked on 12 Oct 2016, 01:49 AM

Hello,

I currently have multiple comboBoxes in a modal view, once everythig is opened up there is a single x above the comboBox (photo 1) but if i leave the page and come back a new x will appear over the comboBoxes (photo2). 

the code for the html portion is 

<div data-role="view" data-title="New Simulation" data-layout="back" data-model="app.newSim" data-before-show="app.newSim.beforeShow">
     <a href="#NewSimModal" data-rel="modalview" data-role="button">Open Modal</a>

</div>

 

<div data-role="modalview" id="NewSimModal" style="width: 75%; height: 70%;  border-style:double;" data-modal="false">
<input id="Manufacturer" />
<input id="ProductFam" />
  <input id="CCT" />
  <input id="CRI" />
  <input id="PartNumber" />
  <a data-role="button" data-click="app.newSim.addLED">add LED</a>
</div>

 

And a piece of the javascript portion is 

$("#CCT").kendoComboBox({
    dataTextField: "CCT",
    dataValueField: "CCT",
    dataSource: app.CCTData,
    index: 0
});

$("#CRI").kendoComboBox({
    dataTextField: "CRI",
    dataValueField: "CRI",
    dataSource: app.CRIData,
    index: 0
});

$("#PartNumber").kendoComboBox({
    dataTextField: "LEDPartNumber",
    dataValueField: "LEDPartNumber",
    //dataSource: app.data
});

 

6 Answers, 1 is accepted

Sort by
0
Eduardo Serra
Telerik team
answered on 12 Oct 2016, 04:42 PM
Hello Jordan,

You refer to two images in the post and they are not attached or linked in the text; could try sharing them with us again?

Thank you very much.

Regards,
Eduardo Serra
Telerik by Progress
 
Get started with Kendo UI in days. Online training courses help you quickly implement components into your apps.
 
0
Jordan
Top achievements
Rank 1
answered on 13 Oct 2016, 03:51 PM
0
Eduardo Serra
Telerik team
answered on 13 Oct 2016, 06:05 PM
Hello Jordan,

I don't see anything in the code you shared with us that could be causing this peculiar problem. In order for us to offer the best help we can, please share with us a sample in the Kendo UI Dojo that reproduces the issue. 

Once we have it, we will be able to debug and see what's causing this behavior.

Thank you.

Regards,
Eduardo Serra
Telerik by Progress
 
Get started with Kendo UI in days. Online training courses help you quickly implement components into your apps.
 
0
Jordan
Top achievements
Rank 1
answered on 01 Nov 2016, 03:27 AM

Hello again,

I really dont know how to reproduce the code in the dojo, I am using the telerik appbuilder is there a way to show you through it?

0
Jordan
Top achievements
Rank 1
answered on 01 Nov 2016, 06:37 AM
nevermind I got it!
Deepak
Top achievements
Rank 1
commented on 02 Mar 2023, 01:35 PM

Hi Jordan, 

Can you please share the solution which you got. We are experiencing the same after Kendo jQuery upgradation.

Thank you.  
Georgi Denchev
Telerik team
commented on 06 Mar 2023, 09:43 AM

Hi, Deepak,

I'm looking at the Overview demo for the ComboBox, however I cannot see the described problem:

https://demos.telerik.com/kendo-ui/combobox/index 

Could you please provide me with a Dojo example where the issue can be seen so that I can try to debug it?

Best Regards,

Georgi

0
Naimesh
Top achievements
Rank 1
Iron
answered on 20 Jun 2023, 05:58 AM
This happened for us when ComboBox is initialized twice in the code.
Which was not an issue with older kendo versions.
$("#element").kendoComboBox();
.
.
.
.
.
.
$("#element").kendoComboBox({
  dataSource: objData,
  filter: "contains",
  dataTextField: "Text",
  dataValueField: "Value",
  autoWidth: true
});

Georgi Denchev
Telerik team
commented on 21 Jun 2023, 07:51 AM

Hi, Naimesh,

You must always ensure that a previous instance of a component is destroyed before you initialize a new one(when you're using the same element).

Alternatively, you can use the setOptions method to override the initial configuration and apply a new one(if that is the goal).

Best Regards,

Georgi

Naimesh
Top achievements
Rank 1
Iron
commented on 21 Jun 2023, 09:55 AM

Thanks, Georgi, really apricate the response.

We are getting data from the WebMethod, which can be delayed on the page load.
So we found setdatasource more suitable for our needs.


$("#element").kendoComboBox({
  filter: "contains",
  dataTextField: "Text",
  dataValueField: "Value",
  autoWidth: true
});
.
.
.
.
.
Webmethod{
$("#element").data("kendoComboBox").setDataSource(dataSource);
}


Regards,
Naimesh.
Tags
ComboBox
Asked by
Jordan
Top achievements
Rank 1
Answers by
Eduardo Serra
Telerik team
Jordan
Top achievements
Rank 1
Naimesh
Top achievements
Rank 1
Iron
Share this question
or