Hi,
We are in the process to integrate flexmonster in our application, however we are facing an issue to get the entire row data object on a particular row click. Please advise on this asap, since we have to present this POC by this week.
Thanks,
Satya
Hello, Satya,
Thank you for writing to us.
We have prepared a demo showing to get the entire row data object: https://jsfiddle.net/flexmonster/1aj6egwt/.
In order to get the entire row you will need:
Here are a couple of useful links:
rowData
is used to get the row)Hope it helps.
Regards,
Tanya
Thanks for the quick response. Can you explain this in angular.
We have to enable a drop-down element while clicking on a particular row selection and need to pass entirer bject to a function
What is the event for row selection in angular to bind?
Hello, Satya,
Thank you for your reply.
We would like to point out that the same concept remains in Angular. The only difference is how the events are specified and called.
In Angular, events are specified in round brackets in the fm-pivot
directive, for example:
<fm-pivot [componentFolder]="'https://cdn.flexmonster.com/'"
[toolbar]="true"
[width]="'100%'"
[height]="500"
[licenseKey]="'XXXX-XXXX-XXXX-XXXX-XXXX'"
[report]="'https://cdn.flexmonster.com/reports/report.json'"
(celldoubleclick)="oncelldoubleclick($event)">
Flexmonster will appear here
</fm-pivot>
The line (celldoubleclick)="oncelldoubleclick($event)"
means that oncelldoubleclick
handles the celldoubleclick
event.
Here is an example of how to specify the event handler function in app.copmponent.ts
:
oncelldoubleclick(cell: Flexmonster.CellBuilder): void {
if (cell.rowData) {
alert("Open the console");
console.log("Below is the array of cells from the underlying data row:");
console.log(cell.rowData);
}
}
Could you please give us more details about the use case? Also, could you please specify which grid type
: compact
, flat
, or classic
you are using?
This will help our team to understand your situation better.
We are looking forward to hearing from you.
Best Regards,
Vera
Hello, Satya,
Thank you for providing via email more details concerning your case.
1. We would like to point out that at the moment Flexmonster doesn't have an event for an entire row selection.
Could you please specify if you are using flat
, compact
or classic
table?
Our team needs this information in order to see whether a workaround is possible for your case.
2. You can get the report after changes are made by using the getReport() API call when the update event gets fired.
Here is a JSFiddle example for illustration.
Information about displayed fields and applied filters can be found in the slice property of the returned report
object.
We are looking forward to hearing from you.
Best Regards,
Vera