Hello guys,
You can pass dynamic variable to DataAdapter depending on certain condition?
example:
var source = new $.jqx.dataAdapter({
datatype: 'json',
datafields:[{ name: 'field' }, { name: 'field' }],
url: 'mypage.php',
data: { mydata: ????? }, // <-- variable
cache: false,
async: false
});
$('$jqxGrid').jqxGrid({
...
columns: [
{
text: 'my',
datafield: 'my',
width: 200,
columntype: 'dropdownlist',
createeditor: function( row, cellvalue, editor ){
editor.jqxDropDownList({ source: [], displayMember: 'field', valueMember: 'field' });
},
initeditor: function( row, cellvalue, editor, celltext ){
/*
Loads the source based on cellvalue
*/
editor.jqxDropDownList({ source: source, displayMember: 'field', valueMember: 'field' });
},
.. etc
]
});