Hi,
I’m new to Handsontable, could you please advise on the below use case with possible implementation details.
We are creating a resource time tracking view, the time a resource spent on each project is available at the server. A web service will fetch this data into the UI. Another web service will fetch the capacity (in hours) of each resource. The data need to be presented as shown in the attached screenshot.
The rows ‘Total’, Availability and Capacity after each resource (rows 4,5,6, 10,11,12) is read-only.
Sequence of steps
- Fetch the project hours of a resource from web service
- For each project,
a. Display the project hours in a new row - Create a ‘Total’ row that will show the sum of hours for each project
- Fetch the Capacity and Availability data from another web service.
- Add a row for capacity and availability
- repeat the above steps for each resource
The user can edit the hours from the spreadsheet. The edited cells need to be highlighted.
I tried by looping through the web service data and inserting rows one by one, and then set the value of each cell by setDataAtCell. And inserting the Total, Availability and Capacity rows after iterating all projects of the resource. Is there any better way of binding the data directly to the spreadsheet.
In order to detect the edits, i hooked the afterchange() event, but it is triggered even when i insert the data initially from the server with setDataAtCell(). How can i detect the edits to the data in the sheet (only what the user edits in the UI.