CGDevTools Forum

Welcome to the Official CGDevTools Support Community Forums.

JQPivot

Suggest new components/features

by etwoss » 12 May 2014 13:07

Hi

Currently the pivotUIOptions cols,rows and vals are made available in Delphi

Code: Select all
function TIWCGJQPivotUIOptions.GetFixedScript(AIWCGJSonFunc: TIWCGJSonFunc; var AInsertFirst: Boolean): string;
begin
  Result:= '';
  if AIWCGJSonFunc.MemberName = 'onRefresh' then
  begin
    Result:= Format('var $ops = %s.data("pivotUIOptions");',[CGJSContainer.IDJQuery]) + CGIfDebug(sLineBreak);
    Result:= Result + Format('CGSetHiddenInputVal("%s",$ops.cols.toString());',[CGJSContainer.HTMLName + InputColsSuffix]) + CGIfDebug(sLineBreak);
    Result:= Result + Format('CGSetHiddenInputVal("%s",$ops.rows.toString());',[CGJSContainer.HTMLName + InputRowsSuffix]) + CGIfDebug(sLineBreak);
    Result:= Result + Format('CGSetHiddenInputVal("%s",$ops.vals.toString());',[CGJSContainer.HTMLName + InputValsSuffix]) + CGIfDebug(sLineBreak);
    Result:= Result + 'return true;';
  end;
end;


Can you please add the selected AggregatorName and RenderName to it.
Why?

I would like to save all these (rows,cols,vals , AggregatorName and RenderName) values to next time the pivot is shown, the pivot show itself with same settings as user left it.

Eric
etwoss
 
Posts: 1205
Joined: 06 Feb 2014 08:58

by Alexander Bulei » 12 May 2014 18:03

Hi Eric,

Added in V2.1.0.3597.

Changelog:

Code: Select all
JQPivot
- Added: property OverwriteDataOpts - is a boolean defaulting to false which controls what happens if this function is called repeatedly on the same element. If set to true, the options object overwrites the current state of the UI. If set to false, only the input data set changes, and the state of the UI remains the same, unless this is the first call, at which point the UI will be set to the options.

- Added: save the AggregatorName and RendererName onRefresh


Best Regards.
Group: Developers | Support Team

  • info [at] cgdevtools.com - General information
  • sales [at] cgdevtools.com - Sales department
  • support [at] cgdevtools.com - Product and Technical Support
User avatar
Alexander Bulei
Site Admin
 
Posts: 3635
Joined: 15 May 2012 08:52
Location: Mealhada, Portugal

by etwoss » 13 May 2014 07:56

Hi

is a boolean defaulting to false which controls what happens if this function is called repeatedly on the same element


which function do you mean with 'this function'?

Eric
etwoss
 
Posts: 1205
Joined: 06 Feb 2014 08:58

by Alexander Bulei » 13 May 2014 09:19

Hi Eric,

Quoted from plugin documentation, so "function" refers to initialization of plugin.

In other words, if you want overwrite the saved options (client browser) you should set this property to True.

Best Regards.
Group: Developers | Support Team

  • info [at] cgdevtools.com - General information
  • sales [at] cgdevtools.com - Sales department
  • support [at] cgdevtools.com - Product and Technical Support
User avatar
Alexander Bulei
Site Admin
 
Posts: 3635
Joined: 15 May 2012 08:52
Location: Mealhada, Portugal

by etwoss » 13 May 2014 09:52

Hi

The function which uses this property is "pivotUI(input [,options [,overwrite]])".
However we can't call this directly from our code ,right?

i'm also looking at what to do when i want to refresh the UI because data is based on a combobox i have on the form.
I now call AjaxRerender to force a new "GetPivotData" event of the pivot

Eric
etwoss
 
Posts: 1205
Joined: 06 Feb 2014 08:58

by Alexander Bulei » 13 May 2014 09:58

Hi Eric,

The function which uses this property is "pivotUI(input [,options [,overwrite]])".
However we can't call this directly from our code ,right?


right, and you don't need it..

'm also looking at what to do when i want to refresh the UI because data is based on a combobox i have on the form.
I now call AjaxRerender to force a new "GetPivotData" event of the pivot


Why are you not using the OnGetPivotData event for dynamic data?
In this case, you don't need AjaxReRender...


Check the demo, point "Get Data Event".

Best Regards.
Group: Developers | Support Team

  • info [at] cgdevtools.com - General information
  • sales [at] cgdevtools.com - Sales department
  • support [at] cgdevtools.com - Product and Technical Support
User avatar
Alexander Bulei
Site Admin
 
Posts: 3635
Joined: 15 May 2012 08:52
Location: Mealhada, Portugal

by etwoss » 13 May 2014 10:08

Hi

I use GetDataEvent, but i need to be able to force the component to re-call that method again.

The image shows a department code comboBox, when i choose a differnet department the pivot has to be re-drawn , so the GetDataEvent has to be called again. I tried ReDraw and Refresh but both do not force the cmponent to call the event, only AjaxreRender works

Eric
You do not have the required permissions to view the files attached to this post.
etwoss
 
Posts: 1205
Joined: 06 Feb 2014 08:58

by Alexander Bulei » 13 May 2014 11:43

Hi Eric,

I was checking the plugin, and there no methods available to re-get the data (confused with another plugin, sorry).

Best Regards.
Group: Developers | Support Team

  • info [at] cgdevtools.com - General information
  • sales [at] cgdevtools.com - Sales department
  • support [at] cgdevtools.com - Product and Technical Support
User avatar
Alexander Bulei
Site Admin
 
Posts: 3635
Joined: 15 May 2012 08:52
Location: Mealhada, Portugal


Return to Suggestions

Who is online

Users browsing this forum: No registered users and 2 guests

Contact Us.