PDA

View Full Version : help on dynamically change values on EditorGrid



SchattenMann
19 May 2009, 10:42 AM
hello my friends

i'm having a really hard time to solve this so i'm asking your help...

basically i have a EditorGridPanel with a checkColumn. i enable the click listener and what i want is to when checked change the value of a row...

so what i have is this:



checkColumn.on('click', function(element, evt, record) {

var checked = record.data[element.dataIndex];

console.debug(checked);

if(checked){

record.data.a_pagar = 1;
console.debug('yes');
console.debug(record.data.a_pagar);


}else{

record.data.a_pagar = 0;
console.debug('no');
console.debug(record);
console.debug(record.data.a_pagar);

}
});


the code itself is working BUT and here comes the troubles the value of a_pagar is changed but we don't see it...

i'll try to explain: a_pagar is another editable textfield. when checked the value is changed to 1 BUT whe only see it if we click to edit that field.

the value is beeing changed but not display.i supose that the edited value is only validated by the EditorGrid onblur or something like that...

so theres probably another way to set the value diferent the one i'm using (record.data.a_pagar = 1)

anyone have any idea on how?

hope you understand because it tooked me a long time to me :P

SchattenMann
19 May 2009, 1:15 PM
found my answer

tks anyway :D