Trying to create a dynamic chart using grid footer totals. Quite easy to do in suite 5 using getFooterLabel :
`var col_01 = myGrid.getFooterLabel(1);`
I searched through the documents and cannot seem to get a lead on where to look…is there a way to programmatically get the footer values of a grid?
Thanks
Please, try to call:
grid.config.columns[column_index].footer[footer_row_index].text
Thanks sematik…tried it but not sure how to apply it:
I presume column_index will be 0 based …so if I am trying to get the value of the 5rd column … the index is 4…but what is the footer row index based on…and how would I get it?
As an example…I have a grid that I need to get the value of its footer that the value aligns up with “total” column or the (4) - 5th column of grid…how would set your example with this information?
Thanks again!
If you have one footer row its index is 0, if you have 2 footer rows then the first row will have index 0, the second one 1, and so on.
Here is the example:
https://snippet.dhtmlx.com/kb04t515
This way you are able to get the text that was set in the footer. It is not available to get the value of the calculated functions this way.
It is not available to get the value of the calculated functions this way.
Ah, this explains why I thought it was not working as I was getting ‘undefined’ on the footer values that had been calculated.
So, there is no method to grab an alphanumeric value like getFooterLabel()? What is advised to feed a chart object data has already been calculated? … is the only option to recalculate using (column/row counts) into variables?
Thanks!
Hello.
Currently the opnly solution in this case is to calculate the needed result by yourself.
iterating through the grid data:
https://docs.dhtmlx.com/suite/data_collection__api__foreach.html