Hi,
  I am wondering like the below code which i am implementing is right or not?
I have four columns in that  one column is date column,based on number of days from data loaded we need to control it.
Eg:( every tuesday we have data loaded in our databases like next 2 weeks data;right now i want to edit only curent week records like from sun – sat (from oct 5 to 11) and next week data should be in read mode..because next week data will be uploaded again for next tme..in order to avoid data overwritten..
Â
based on date how can i control?
Â
function GridComplete() {
 var grid = $(‘#results’);
 var rowids = grid.getDataIDs();
 var columnModels = grid.getGridParam().colModel;
Â
 // check each visible row
 for (var i = 0; i < rowids.length; i++) {
   var rowid = rowids;
   var data = grid.getRowData(rowid);
   if (data.date== ‘0’) {      // view only
     // check each column
     for (var j = 0; j < columnModels.length; j++) {
       var model = columnModels[j];
       if (model.editable) {
         grid.setCell(rowid, model.name, ”, ‘not-editable-cell’, {editable: false});
       }
     }
   }
 }
}
Copyright 2014 TriRand LtdAll Rights ReservedRSS
Back to Top