jQuery UI Widgets › Forums › DataTable › Making a % of total time column?
Tagged: angular datatable, bootstrap datatable, javascript datatable, jquery datatable, jqwidgets datatable, jqxdatatable
This topic contains 4 replies, has 2 voices, and was last updated by MatthewV 9 years, 3 months ago.
-
Author
-
I have a table that tracks how much time is spent working on each project. I would like to have a column at the end of the table that will automatically calculate what percent of the total time spent working was done on that project. So for example, if a person worked on 4 projects for 40 hours and spent 10 hours on each project the column would read “10%”, is this possible to do in the DataTable?
Hello MatthewV,
I would like present to you few topics on the same theme:
http://www.jqwidgets.com/community/topic/calculated-row-based-on-other-rows/
http://www.jqwidgets.com/community/topic/computed-column/
(in the example above compute new column dataField before loading)
http://www.jqwidgets.com/community/topic/jxgrid-computed-column/
Those examples are for the Grid but could use same principles (focus oncellsRenderermember of the column property of the DataTable).Best Regards,
Hristo HristovjQWidgets team
http://www.jqwidgets.comThank you, I will take a look into those. Is there a way to access the Aggregate column (generated by ‘showAggregates: true’ value to use in the computer column?
Hello MatthewV,
Unfortunately, we do not have such options to achieve this in DataTable.
However, if you would like to try the options of the Grid could find more options.
Please, take a look this our topic:
http://www.jqwidgets.com/community/topic/get-the-value-of-aggregates-in-a-column/
This could be useful to create some workaround.Best Regards,
Hristo HristovjQWidgets team
http://www.jqwidgets.comShame. I would rather not load a larger grid module just for access to the aggregates. I will look into the grid as well as other options that might reduce load on mobile users.
-
AuthorPosts
You must be logged in to reply to this topic.