Make individual cells readonly in js grid of the schedule web part RRS feed

  • Question

  • I need to be able to modify individual cells in the js grid on the schedule web part to make them editable or read only based on certain conditions pertaining to that specific record.  I've figured out how to make an entire record in the grid read only by using delegates, but I'm having trouble getting to the specific cell and making it read only.  The code I have for making an entire row read only is below.  I'd like to do something along these lines but for cells, not rows...


    PJ.AddGridSatelliteInitializationNotifier ( function (satellite) { satellite = PJ._NotifySatelliteInitComplete.arguments[0]; _myGrid = satellite.GetJsGridControlInstance(); _myGrid.SetDelegate(SP.JsGrid.DelegateType.GetRecordEditMode, CheckToAllowEdit); } ); function CheckToAllowEdit(record) { if (record.GetDataValue('TASK_WORK') == 0) { //i need to find a way to get the cell in question here and then make it ready only

    return SP.JsGrid.EditMode.ReadOnly; } else { return SP.JsGrid.EditMode.ReadWrite; } }

    • Edited by gmhamm0 Thursday, December 6, 2012 10:52 PM
    Thursday, December 6, 2012 10:51 PM

All replies