Hi,
I'm working with jqGrid to develop a time management module for a customer. We have already deployed jqGrid extensively over the rest of the site so we're working to make it fit this role too.
We need to be able to display a column for each day of a calendar month, each day then being split into two columns for overtime worked (HV – text input box) and the reason (R – select dropdown). I've got the grid designed to an extent (overtime/reason columns, list of branch staff etc) but am having trouble writing the processor. The code below shows what I currently have. This populates the grid (via another file) with a list of employees. The column list (day numbers 1-31) is generated from a PHP function which determines the current month and year. Grid.php then posts to gridsave.php when the row is clicked-off.
I would like to be able to determine which field has been edited as easily as possible. I do not want 62 columns (HV and R for each day of a 31 day month) in my database just in case, I'd like to programmatically determine the field id (date) and store that in a date column using my processor. If at all possible, I'd like to only pass modified fields to my processor to save on processing time.
Then, in reverse, I need to be able to extract this information (based on the date determined above) and input it into the correct column in jqGrid.
Needless to say I've now come up against a brick wall and not sure how to proceed on any of the above so will have to bow to superior knowledge. I'm not worried about validation of user input at this exact moment in time, I'm just trying to determine if this will work in theory! Any assistance in this will be much appreciated..
grid.php
Copyright 2014 TriRand LtdAll Rights ReservedRSS
Back to Top