passing array of elements to Grid
Team,
I have two grids , in which one of the grid contains data loaded from db.
On Cell click, I want to get the selected values of first grid and query them and display the result in second grid.
I was successful in getting records into this array. How to pass this array to secondgridStore which was already loaded.
var reqarr= new Array();
reqarr=finalreq.split(',');
alert(reqarr);
var secondgriddata= {
records:[
for(i=0; i<reqarr.length;i++)
{name:reqarr[i]}
]
};
secondgridStore.loadData(secondgriddata);
It is showing error in Console(Syntax error in for loop).
when I try like this
var secondgriddata= {
records:[
{name:reqarr[0]},
{name:reqarr[1]}
]
};
this results in success, but keeping static values is not good at all times right!!
How to pass this array to Data records?
Please help me out at earliest....