Quantcast
Channel: Project Customization and Programming forum
Viewing all articles
Browse latest Browse all 5347

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

$
0
0

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; } }




Viewing all articles
Browse latest Browse all 5347

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>