ParamQuery grid support forum
General Category => ParamQuery Pro Evaluation Support => Topic started by: billybraga on May 12, 2016, 11:56:20 pm
-
1. Why postRender isn't called for summary cells ?
2. Why can't I call refreshCell for a summary cell ?
I am using the summaryData option to render a summary at the bottom of my grid and I want to manually refresh some of those cells at specific moments.
-
Set the summaryData option whenever you want to refresh whole or part (cells) of summary rows.
grid.option( 'summaryData', new_summary_data );
Example: http://paramquery.com/pro/demos/summary
-
So what you propose is to do this ?
$("#grid").pqGrid("summary", "summaryData", [ { property: value } ])
It doesn't seem to re-render the summary cell(s).
-
Please share a jsfiddle so that I can look into it.
-
https://jsfiddle.net/2kg6equo/15/ (https://jsfiddle.net/2kg6equo/15/)
-
Grid requires a refresh after summary data is assigned from an external function.
http://jsfiddle.net/kqag7bvh/
-
That is exactly what I am trying to avoid. I don't want to repaint the grid each time something changes in the summary.
-
I don't want to repaint the grid each time something changes in the summary.
May I know the reason?
Normally the summary data is dependent upon data in the grid, so when data changes in the grid ( typically due to editing or filtering ), grid main data and summary data are shown/ refreshed in a single repaint and repaint of the grid is quite fast in virtual mode.
Anyway the ability to repaint only the summary table can be get from createTable() API.
http://paramquery.com/pro/api#method-createTable
and if you are still not content and want the full infrastructure of main grid like postRender and refreshCell, you could probably use link scrolling to show summary grid underneath the main grid.
http://paramquery.com/pro/demos/scroll
-
The reason is that I am integrating knockoutJS in the grid. The cells are knockout templates bound to javascript objects containing knockout observables. Their content are automatically updated by the knockoutjs library and I refresh only the parts of the grid I need depending if the cell height changes. The summary cells are also bound to knockout observables so I would like to refresh them individually to avoid rebinding each and every cell of the grid to their knockout template and context.
I'll look into the links you provided.