Hello! have you put the save action parameter?
In your grid configuration add this two line:
,save_action: 'link_to_your_mgr_processor/updatefromgrid'
,autosave: true
and then, make your updatefromgrid processor, something like this:
* parse JSON */
if (empty($scriptProperties['data'])) return $modx->error->failure('Invalid data2.');
$_DATA = $modx->fromJSON($scriptProperties['data']);
if (!is_array($_DATA)) return $modx->error->failure('Invalid data.');
/* get obj */
if (empty($_DATA[OBJ_ID])) return $modx->error->failure('obj not specified');
/* manage url */
$object = $modx->getObject(TBL,$_DATA[OBJ_ID]);
if (empty($object)) return $modx->error->failure('object not found');
$object->fromArray($_DATA);
/* save */
if ($object->save() == false) {
return $modx->error->failure('err_save');
}
return $modx->error->success('',$object);
When you put a save_action to your grid configurations all the field will be editable by default. if you want to make some field not editable just add to your column configuration:
hope can help
[ed. note: solidusite last edited this post 12 years, 11 months ago.]