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

TimeSheet / JS Grid (PWA 2010)

$
0
0

I am writing a PWA TimeSheet modification, which will allow the user to add comments to the "actuals" values of a timesheet (eg. one comment for the actual field Mon 1/10, another for the actual field Tue 1/11, both in project X, Task Y).

I can intercept a right click (or other events) on the JS Grid all right. In these events I can access the recordKey (eg "18d61997-0f64-08c8-27ca-d9c77aefef4f"), and the fieldKey (eg "TPD_col1a"). The recordKey is the link to the TimeSheet task record, for which the right-pane grid displays details, the fieldKey reflects the position in the grid. But how can I access the period displayed in the timesheet (determined by the "Select Period" button on the TimeSheet ribbon), and relate it to the cell clicked? It is not enough to be able to look up the column header of the right pane for the column in question (eg. the topmost cell in col1, where the month and date of the actual and planned time is displayed), since it does not include the whole date. Anyway, it would be nice to be able to do that ALSO - meaning: how do I look up the value of any cell in the JSGrid by grid coordinates - the fieldKey cannot be the value to look up by, since it is null for the header cells.

I know where the values are stored in the database, once the TimeSheet is saved/published (in the table MSP_TIMESHEET_ACTUALS), but before that they are only in the JSGrid and somewhere in the state of the TimeSheet page.

Supplemental question:
Can I change the style of a single cell - akin to the red border surrounding the cell when it is an error state. I would like to be able to do something similar to indicate that the cell has had a comment attached. I have found a way to do it for the entire record row, but not for a single cell.

I have been through practically all the existing information, notably Patrick Malatacks excellent 3 part webcast "TimeSheet JS Grid Extensions" (https://msevents.microsoft.com/CUI/WebCastEventDetails.aspx?culture=en-US&EventID=1032448989&CountryCode=US) , but no luck there.


Martin Skau

Viewing all articles
Browse latest Browse all 5347

Trending Articles



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