I have a grid which loads 10 columns * 30 rows by default.
Based on a tabstrip selection, I want to rebind the grid with data fetched using JSON serialization. Everything is OK until the OnSuccess method where the correct result is returned.
Do note that the result can bring in variable number of columns (either a subset of default or totally new columns) -- say for my first tab click, 6 totally new columns are returned along with 30 rows.
In this case the following does *NOT* work -- basically it does not reset the state of the grid & its underlying master table view on the client side. And I'm unable to manually set the .innerHTML of the cells since iterating through the columns of the master view accessed by get_masterTableView() contains the column collection loaded by default.
function updateGrid(result, userContext, methodName)
{
tableView.set_dataSource(result);
tableView.dataBind();
}
Please suggest a workaround as to how I can reset the state to 6 cols * 30 rows ?
Thanks a lot
- Arun