2
« on: March 27, 2014, 11:30:59 pm »
I'm using dataModel = 'local' and loading data manually. When I reassign pqGrid, the columns that were editable on initial load are no more editable.
If I destroy pqgrid before 2nd load, it fixed the problem, but sometimes I don't know if pqgrid is already loaded (and if it's not and I call destroy, and error occurs). I tried to see if there's an API that will tell me fi the grid is loaded and couldn't find anything.
Here's my code.
var dataSource = dataArray;
var obj = {};
obj.width = 1000;
// obj.height = 400;
columnModel = [
{title:"SeedWeightID", hidden:true},
{title:"Plant", width:150, dataType:"float", align:"right", className:'grid-col', editable: false},
{title:"", width:350, dataType:"float", className:'grid-col', editable: false},
{title:"", width:150, dataType:"float", className:'grid-col', editable: true},
{title:"", width:150, dataType:"string", className:'grid-col'},
{title:"", width:150, dataType:"string", className:'grid-col'}
];
dataModelSource = {data: dataSource};
$( "#grid_array" ).pqGrid(
{scrollModel:{pace: 'fast', horizontal: false} },
{editModel: {saveKey: 13}},
{editable: true},
{flexWidth: true} ,
{flexHeight:true},
{colModel: columnModel},
{dataModel: dataModelSource},
obj );
Any suggestions?