Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Param Query Eval

Pages: [1]
1
Team, We have observed that when we add notes for an edited cell the styles are getting changed and it looks to be a stlye issue.
i have attached a screenshot for reference. could you pls confirm whether it is a style issue or anything to be done on settings. Thanks!

2
Thanks, when we passed render: false to exportData method, it solves plain html string issue for customized render column and increased performance. But we have faced an another issue where some calculated column values are not rendered for all rows.[PFA for reference]. so we have combined render: false and exportRender: true[for calculated columns] to solve the issue.
Reference link: we have done weekly summary calculation as per earlier thread suggestion.
https://paramquery.com/forum/index.php?topic=3551.0

Also we observed when we export using https://paramquery.com/jszip-2.5.0/filesaver.js, it is working fine in Firebox, but in Chrome it opens file in new tab with file name "download", no extension. i'm quite surprise to see that the below demo is working fine in chrome
which refers above fileSaver libraryhttps://paramquery.com/pro/demos/export_local.
So we have referenced https://cdnjs.cloudflare.com/ajax/libs/FileSaver.js/1.3.8/FileSaver.min.js which works fine in both Firebox and Chrome. I'm not sure if anyone else faced the same issue and what is cause for the same.

3
Hi Paramvir,
We have done little customization on column rendering(Added few dynamic classes and prepend with few popover plugins through i tag).
When i export to excel, html string added in column rendering is coming as plain text for the specific column. Is there any way we can customize and export innerText without any plain HTML or is there any other way to achieve the same?

Also, observed that when we export to excel with bulk data, to say around 10k rows, usually it exports in 10-15 secs. but sometimes it takes around 50-60 secs. Is it an exiting behavior or is there anything can be done to make it consistent way.[however grid renders very fast in 2 to 3 seconds.]

4
Team,
We require to display some information in footer/status bar in grid. It is something similar to excel display sum/average of selected cell's value. So we would like to know whether such option available in pqGrid and if there is no such option in out of box then, is there any way to customize summaryrow or pager to achieve the same.
Thank you..

5
Thanks for the details.

6
Okay, thanks!

7
Do we have any option to configure for pqGrid to inject unique identifier field for each row.
For example, to track grid changes, it is required to give a unique identifier of each row in dataModel property of recIndx.
Also in treeModel, it is expected to a field which stores unique identifier of each row.

Is there any way to configure for pqGrid to make unique identifier internally for each row in absence of "Id" field.[We don't get any identity field in JSON data from service. If pqGrid has any such option then we don't required to iterate and set id field manually].
Thanks!

8
Excellent! This is the solution we would like to achieve it. There are two follow up questions in below solution.
1) For each cell change it refresh the grid view in cellSave event.
As per doc, it is mentioned that grid refresh is a computational intensive operation.
Our worry is that grid performance may hit when few thousand of rows in grid.[Will it refresh only visible cells in grid page, if not is it any  approach to do it better without much performance impact]
Code: [Select]
cellSave: function(){
//cell changes affect other cells.
this.refresh();
}
2) Irrespective of 'pq_rowprop:{edit: false},//make the row uneditable. ' edit property set false for parent row in tree, it allows to edit the row. I believe it is column edit option takes precedence over here. So we we are trying to use global editable event to achieve the same.
Will the below one would be a efficient solution or do we have any simple option to set at row level.
Code: [Select]
editable: function(ui){
var parentNode = ui.rowData.children;
return !parentNode;
}
,
Thanks..

9
Due to some library reference issue jsfiddle was not rendering grid properly. so i have attached the code sample for reference which is running in ParamQuery edit and run window. Also i have attached the high level screenshot of what we are trying to solve it.
Basically we are trying to do two different things.
1) calculation on weekly basis by referring previous cells.[p.s: column name would be dynamic and there may be multiple weeks data loaded and each weekly calculation column should refer only respective week days(previous 7 columns of respective row)].
2) Apply some formula on parent row cell by referring respective child row cells[p.s: no.of child would be vary for different parent node].
As cell render event gives row index and data index property we have analysed to build excel formula over there.
Since it is previously mentioned column render is not right for excel formula, we would like to get your approach/suggestion to tackle this use case.

10
The issue got resolved now, it was not with pgGrid event. Basically popover doesn't bind on dynamic elements as like static elements. so we have to bind in different way. Stackoverflow link for reference if anyone interested.
https://stackoverflow.com/questions/16990573/how-to-bind-bootstrap-popover-on-dynamic-elements

11
In fact using column() formula is not elegant when building formula like below one and it is not evaluating correct value.
pg_fn { "WEEKSUM" : SUM(CONCATENATE(CHAR(COLUMN()+(64-6)),ROW(),\":\",(CHAR(COLUMN()+(64-1))),ROW()))}
Do we have any other approach to achieve the desired result.

12
I want to add bootstrap popover for one of the column to display some details through ajax request.
it is working fine outside of grid element not in grid column cell[attachment for reference].
however there is no javascript error in console. Is it might be conflict between between pqGrid and popover js.
P.S: we tried with pqGrid tooltip however it displays comments in a absolute place. we want to display the tooltip where the user clicked help icon.

13
great, it works! Is there any approach to accomplish when more than 26 columns.

14
Thank you for the suggestions.
1) The challenge in the first approach is that if we use excel formula in column render then it is not evaluating other than current page(when scroll left/right). I also tried to use the formula as part of json string as like pq_fn: {"WeekSummary" : "SUM("+getReferenceName(COLUMN())-7+"ROW():"+getReferenceName(COLUMN())-1+"ROW())"}. But i couldn't able to use javascript function which gives reference cell number like 'C' when pass column number 3. Basically i would like to achieve something like pq_fn: {"WeekSummary" : SUM(C1:G1) }. Any reference code snippet would be really helpful.
2) Yes, we are considering javascript formula's when 2 or 3 columns involved, when it involves to calculate 5 or 10 cells range then we prefer to use excel formula for easy understanding.

15
Team, we have a requirement where we need to evaluate excel formula for a cell based on couple of previous cells in the same row. Since the column index is dynamic and difficult to calculate it before rendering, we tried adding formula through column render event.
The problem is that the formula added in render doesn't get evaluated and it displays the formula directly in cell.[Reference attachment1].
So when we tried to refresh the view like using complete : function(){this.refreshView();}, it evaluates the formula only for current view port page. when we scroll vertically other formulas still shows as plain text. (so we have to use refreshView() in scroll event each time and it may hit grid performance for more data)

I have attached sample code where it use SUM formula, but it evaluated only in current page and when scroll up/down of grid, it shows old value and double click of cell shows plain formula as text in cell.

So, is there any suggestion on what would be best approach to add excel formula to a column(we know source column index at the time of rendering only) and it evaluates formula without manual trigger event.

Pages: [1]