Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
70
get combo selected value in the top of the page
posted

Hi ig web team
I think the below is not normal.
i have created Combo1 and combo2 with default selected value selectedItems: [{ index: 0 }] for each of them and it is has no problems in loading.

 in the begining of the page

$.ig.loader(function (){

i try to get the selected value of each of them in this way

$("#combo1").igCombo("value")
but it doesn’t return any value 

I tried to create the combos in the top of the page before I get the values but actually it doesn’t matter where you create them, the same problem when you select the value. 

I solved this in 2 ways:
1- to get selected value in this way

$("#combo1").on("igcombodatabound", function (evt, ui) {

Here you can get the value

 2- To delay the execution of this part for even 0

 setTimeout(function () {

$("#combo1").igCombo("value")

}, 0);

 I solved the problem in these ways but I just want to know why you render the code of creating the combo in long time or in a specific area in the page which I can’t get selected value of course in that time.Please more clarification needed.
Thank you
AL