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

Change the style of a single cell in Timesheet JSGrid?

$
0
0

Hi all,

Please, consider this scenario:

var ts;

_spBodyOnLoadFunctionNames.push("TimesheetMain");function TimesheetMain() {
  ts = new TimesheetExtension();
}function TimesheetExtension() {var _grid;var _satellite;if (window.PJ == null || PJ.AddGridSatelliteInitializationNotifier == null) {return;
  }

  PJ.AddGridSatelliteInitializationNotifier(
    function (satellite) {if (PJ.TimesheetSatellite != null) {
        satellite = PJ._NotifySatelliteInitComplete.arguments[0];
        _satellite = satellite;

        _grid = satellite.GetJsGridControlInstance();
        _grid.AttachEvent(SP.JsGrid.EventType.OnRightClick, RightClick);
      }
    }
  );

    function RightClick(eventArgs) {// Cell style change code in here?
    }

 

Is it possible to change the cell style in the RightClick(eventArgs) function? If so, how exactly do I do it? The eventArgs parameter contains the recordKey (TimesheetLineUID) and fieldKey (column) so I can localize it within the grid, but I've found no way to set the cell style other than _satellite._gridFieldMap[eventArgs.fieldKey]._defaulCellStyleId, which actually sets the cell style for the entire column.

I'd appreciate any help on this matter.

Regards,

Arnar


Viewing all articles
Browse latest Browse all 5347

Trending Articles



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