PDA

View Full Version : update Grid on submit



kheiron
22 Feb 2008, 3:12 AM
Yho Guys, Im really depressed here, can someone please help me archieve this

I have a grid which pops out data on a window when you click on it, now this window gives the user the ability to edit the data or just view it, I want to be able to submit the data and the window closes, at this point the grid should be updated with the new data, I tried reloading the dataStore, redirecting the page to itself, nothing seems to work

here is the code bit

success:function(){
Ext.Msg.alert('Status', 'Article saved!.', function(btn, text){
if (btn == 'ok'){

window.close();
//restart();
//var redirect = 'start.php';
//window.location = redirect;

restart();
}
});

======================restart method

function restart()
{
createDS();
ds.load();
createGrid();
}

22 Feb 2008, 4:22 AM
does your DS Load properly? ds.load should work? Do you get errors that restart() is not defined?

Iveco
22 Feb 2008, 6:03 AM
getyourComp().getDS().reload() <- not works?

kheiron
25 Feb 2008, 3:54 AM
yo, thanks for your input guys, I managed to solve it

it was a scoping problem, I called my ds.load() in the wrong place, my window closed before that and I guess by the tome I tried to call it I had already terminated the process