This is my combogrid ;
$('#cg_odanum').combogrid({
panelWidth: 130,
url: 'odalar_getdata.php',
idField: 'odano',
textField: 'odano',
mode: 'remote',
fitColumns: false,
columns: [
[
{
field: 'odano', title: 'Oda No', width: 60, sortable: true
},
{
field: 'tip', title: 'Tip', width: 50
}
]
]
});
If I dont use the below code the combogrid works fine, but when I use the code below,
1) The combogrid search function don't work as aspected. For example: If I type "a" it doesn't find the lines which has "a" inside. After typing the whole text then it finds it.
2) fitColumns definition is set to false. If I don't use the code below it works fine, but when The code below starts working , The combogrid behaves like the fitColumns is set to true.
$('#cg_odanum').combogrid({
onChange: function() {
var modano = $('#cg_odanum').combogrid('getValue');
var modatip = "";
if(modano != "") {
var cgrid = $('#cg_odanum').combogrid('grid'); // get datagrid object
var rowgrid = cgrid.datagrid('getSelected'); // get the selected row
modatip = rowgrid.tip;
$("#cg_odatip").combogrid('setValue', modatip);
$('#cg_odatip').combogrid('readonly', true);
} else {
$("#cg_odatip").combogrid('setValue', '');
$('#cg_odatip').combogrid('readonly', false);
}
}
});
Is this a bug ? or can I find another way to solve this. All I want is to trigger a function using combogrid's onchange event
EasyUI