Jump to content

How get column value from UnidbPivotGrid via exevent rowselect or cellselect?


zilav

Recommended Posts

44 minutes ago, zilav said:

Hello everybody,
Need help
How get column value from UnidbPivotGrid via exevent rowselect or cellselect?
when mouse select row or cell I need read value of cell or column via ajaxevent

Hello

You can use "select" event.

  With UniDBPivotGrid1, JSInterface do
  begin
    JSAddListener('select', JSFunction('this,selected', 'console.log("this",this);console.log("selected",selected);'))
  end;

 

  • Like 1
Link to comment
Share on other sites

20 hours ago, Hayri ASLAN said:

Hello

You can use "select" event.


  With UniDBPivotGrid1, JSInterface do
  begin
    JSAddListener('select', JSFunction('this,selected', 'console.log("this",this);console.log("selected",selected);'))
  end;

 

This method doesn't work ..
Can you show the sample more detail how get from ajaxrequest..

I have PivotGrid LeftAxis  FIELD1,FIELD2,FIELD3,FIELD4

I need when rowselect or cellselect get value from FIELD1

  • Like 1
Link to comment
Share on other sites

2 hours ago, zilav said:

This method doesn't work ..
Can you show the sample more detail how get from ajaxrequest..

I have PivotGrid LeftAxis  FIELD1,FIELD2,FIELD3,FIELD4

I need when rowselect or cellselect get value from FIELD1

When you select a cell you will get below values.

Which one do you need?

image.thumb.png.9808ac2786f4f2ac232a991afa329faa.png

  • Like 1
Link to comment
Share on other sites

10 hours ago, zilav said:

Hi,
I need for sample c1 and ext-36 wich you marking  values how getit and send ajaxrequest with this values?

UnidbPivotgrid
from ajaxevent
 if eventame = 'blabla'
 var1:= value1
        var2:= value2

Thank's advance

Hello, eventname is onSelect.

  With UniDBPivotGrid1, JSInterface do
  begin
    JSAddListener('select', JSFunction('a,b', 'ajaxRequest('#1', "onSelect", b.data);  '))
  end;

 

  • Like 1
Link to comment
Share on other sites

working code

 

procedure TMainForm.UniDBPivotGrid1AjaxEvent(Sender: TComponent;
  EventName: string; Params: TUniStrings);
begin
  if EventName='onSelect' then
     ShowMessage(Params.Values['bdata']);
end;

procedure TMainForm.UniFormShow(Sender: TObject);
begin
  {With UniDBPivotGrid1, JSInterface do
  begin
    JSAddListener('select', JSFunction('selected', 'console.log("this",this);console.log("selected",selected);'))
  end;}
  With UniDBPivotGrid1, JSInterface do
  begin
    JSAddListener('select', JSFunction('a,b', 'ajaxRequest('#1', "onSelect", ["bdata="+b.data["ext-35"]]);'))
  end;

end;

 

  • Like 1
Link to comment
Share on other sites

@zilav , @Hayri ASLAN

Good evening.

Can I implement this event?  
Can you help for double clicking? I found this event from sencha doc "pivotitemdoubletap"  but I don't know how use it like your sample with ajaxevent

This code doesn't work for me

  With UniDBPivotGrid1, JSInterface do
  begin
    JSAddListener('pivotitemcelldoubletap', JSFunction('a,b', 'ajaxRequest('#1', "onSelect", ["bdata="+b.data["ext-35"]]);'))
  end;

 

Link to comment
Share on other sites

1 minute ago, ReaderF said:

@zilav , @Hayri ASLAN

Good evening.

Can I implement this event?  
Can you help for double clicking? I found this event from sencha doc "pivotitemdoubletap"  but I don't know how use it like your sample with ajaxevent

This code doesn't work for me


  With UniDBPivotGrid1, JSInterface do
  begin
    JSAddListener('pivotitemcelldoubletap', JSFunction('a,b', 'ajaxRequest('#1', "onSelect", ["bdata="+b.data["ext-35"]]);'))
  end;

 

Hello

Which build and version are you using?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...