jQWidgets Forums

Forum Replies Created

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • in reply to: jqxComboBox default selected jqxComboBox default selected #59693

    Cwi
    Participant

    Thank you.

    This works, surely the “async: false” I had not used.

    I will also update my version.

    have a nice day

    in reply to: jqxComboBox default selected jqxComboBox default selected #59652

    Cwi
    Participant

    I’m trying but it does not work.

    Neither the key / value or the name, lower and upper case …

    <script type="text/javascript">
    $(function(){
    	// Liste des pays
    	var sourcePays = {
    		datatype: "json",
    		datafields: [
    			{ name: 'IDPays' },
    			{ name: 'NomPays' }
    		],
    		url: "../data_json.php?DataType=ListePays"
    	};
    	var dataAdapter = new $.jqx.dataAdapter(sourcePays);
    	// Create a jqxComboBox
    	$("#PaysListe").jqxComboBox({ 
    		source: dataAdapter, 
    		displayMember: "NomPays", 
    		valueMember: "IDPays", 
    		width: 200, 
    		height: 25
    	});
    	$("#PaysListe").jqxComboBox('selectItem', 'FR');
    });
    </script>
    <div id="PaysListe" name="IDPays" value=""></div>

    Json data :
    [{"IDPays":"AF","NomPays":"AFGHANISTAN"},{"IDPays":"ZA","NomPays":"AFRIQUE DU SUD"},{"IDPays":"AX","NomPays":"\u00c5LAND, \u00ceLES"},{"IDPays":"AL","NomPays":"ALBANIE"},{"IDPays":"DZ","NomPays":"ALG\u00c9RIE"},{"IDPays":"DE","NomPays":"ALLEMAGNE"},{"IDPays":"AD","NomPays":"ANDORRE"},{"IDPays":"AO","NomPays":"ANGOLA"},{"IDPays":"AI","NomPays":"ANGUILLA"},{"IDPays":"AQ","NomPays":"ANTARCTIQUE"},{"IDPays":"AG","NomPays":"ANTIGUA-ET-BARBUDA"},{"IDPays":"SA","NomPays":"ARABIE SAOUDITE"},{"IDPays":"AR","NomPays":"ARGENTINE"},{"IDPays":"AM","NomPays":"ARM\u00c9NIE"},{"IDPays":"AW","NomPays":"ARUBA"},{"IDPays":"AU","NomPays":"AUSTRALIE"},{"IDPays":"AT","NomPays":"AUTRICHE"},{"IDPays":"AZ","NomPays":"AZERBA\u00cfDJAN"},{"IDPays":"BS","NomPays":"BAHAMAS"},{"IDPays":"BH","NomPays":"BAHRE\u00cfN"} ....

    in reply to: jqxComboBox default selected jqxComboBox default selected #59623

    Cwi
    Participant

    I wish I could select a default jqxComboBox an item via its index.

    As against the index is not a numeric key, but a key text.

    Example of basic read:

    <select name="Pays">
    	...
    	<option value="EN">Anglais</option>
    	<option value="FR">Francais</option>
    	...
    </select>

    I tested both ways but none works …
    (I want to select eg ‘FR’ to open the page)

    
    $("#jqxComboBox").jqxComboBox({
          source: source,
          theme: 'energyblue',
          width: '200px',
          height: '25px',
          <strong>selectedIndex: 'FR'</strong>
      });
    
    $("#jqxComboBox").jqxComboBox({
          source: source,
          theme: 'energyblue',
          width: '200px',
          height: '25px',
          <strong>selectItem: 'FR'</strong>
      });
    in reply to: jqxComboBox default selected jqxComboBox default selected #59446

    Cwi
    Participant

    Thank you for the link it will serve me later.

    My concern for now is to just post the key to save it.

    In fact I think I found, you just add:

    <div id = “CountryList” name = “IDPays” value = “”> </ div>


    Cwi
    Participant

    A made ​​in the jqxInput not reference its contents logic.

    it must be done that I use in jqxComboBox autocomplete (ajax) option to load the list after the seizure.

    Is it possible to charge a jqxComboBox in autocomplete after the seizure of the first letter?


    Cwi
    Participant

    In a traditional working on the select: Value (key)

    example:
    <select name=”test”>
    <option value=”Key1″>item1</option>
    <option value=”Key2″>tiem2</option>
    </select>

    So I need simpement can recover the value to save …

    But in this example, and empty Value, not sent to the post.

    If I select eg Item2 I should get the choice to save Key2

Viewing 6 posts - 1 through 6 (of 6 total)