hello again,
why i can't set text on combogrid editor on event onBeginEdit?
here is my code:
var carrier_id = $(this).datagrid('getEditor',{index:index,field:'carrier_id'});
var carrier_id_b = $(this).datagrid('getEditor',{index:index,field:'carrier_id_b'});
console.log(carrier_id);
console.log(carrier_id_b);
$(carrier_id.target).combogrid('setText','test');
$(carrier_id_b.target).textbox('setText','opasdk');
if (!is_master_detail){
if (state.row == 'new_row'){
$(carrier_id.target).combogrid({
onSelect:function(index,row){
// AJAX REQUEST
$.get(init_url,{prm_carrier_id: row.carrier_id},function(data){
$(carrier_id_b.target).textbox('setValue',data.val);
},'json');
}
});
}
}
when i do that, combogrid still empty,its like combogrid is forced to default value when i setText or set his value,and strangely when i use clear or reset method its working.
but when i try to set text on textbox, it works. my questtion is why?
is there a problem when i put large function on event onBeginEdit?
many thanks for the answer