Sync problem

I’ve this problem. I’m using this code to save a form:;

After the form saving the grid must be reloaded. After this i need to recreate an array in this way:

CreateList = function(grid)
		var strId = grid.getAllRowIds(";");
		MyArray = strId.split(";");

The trouble is that when CreateList is called the grid are not ready and grid.getAllRowIds(";") and return nothing.

Following code works as expected at local example:


function CreateList(){
var strId = Grid.getAllRowIds(";");
MyArray = strId.split(";");

I need to pass grid like arguments because i need to use that function with many grids.

You can use “this” variable inside CreateList function.