Hi guys,
I cannot getSelectedValue from jqxDropDownList on page load.
var myURL2 ='phase2/HourlyAnalysis_data.php?e=2';
var srcYears =
{
url: myURL2,
datatype: 'json',
cache: false,
async: true,
datafields: [
{ name: 'year', type: 'number' },
],
};
var daYears = new $.jqx.dataAdapter(srcYears);
$("#ddlYears").jqxDropDownList({
source: daYears,
selectedIndex: 0,
theme: theme,
displayMember: 'year',
width: '100px'
});
var year = $("#ddlYears").jqxDropDownList('getSelectedItem').value; //on this line I get undefined dropdownlist....
Variable year cannot be assigned.
Am I doing something wrong?
One more thing. If I use localData everything works ok.
Thanks