Get Free Trial

Custom Datasource how get cell info

Massimo asked on July 22, 2021

Hello team,
I’have a question, we have in our project a .NET custom datasource like the example in a scenario with a filtered pivot table if a user click on a cell (1.jpg) how can i get the information about the children? Do you have any suggestion ?


3 answers

Vera Didenko Vera Didenko Flexmonster July 22, 2021

Hello, Massimo, 
Thank you for writing to us.
If we understand correctly, you are wondering how to get the raw data behind the cell to show the drill-through pop-up for the custom data source API. If so, this can be done by handling the /select request for the drill-through view.
Also, you are welcome to inspect the required response structure for the drill-through view in the following JSFiddle example: (by inspecting the page and navigating to the network tab). 
Please let us know if this is what you are looking for. If not, could you please provide a bit more details on what you would like to achieve? More insight will help us to understand the situation better.
Looking forward to your response.
Kind regards,

Massimo July 28, 2021

Hi vera,
it’s exactly what we want! I have a new question, how can we get the request info? The getFilters seems good for obtain the list of filters but about fields is there a method? (i don’t know if it’s importat but in our case we have disable the “drill-through pop-up” )
Kind regards 

Vera Didenko Vera Didenko Flexmonster July 29, 2021

Hello, Massimo,
Thank you for your reply.
If the drill-through pop-up is disabled in the report options, Flexmonster won’t send requests for the drill-through data.
With this in mind, the simplest solution is to enable the drill-through pop-up. This way, on double-click Flexmonster will send the requests for the data.
If you don’t want the built-in drill-through pop-up to be shown, it is possible to hide it. See the following Support Forum thread answer for more details on this approach.
Another way is to get the necessary cell information on the cellclick or celldoubleclick event. Here is a JSFiddle example showing how to get the clicked cell information. For example, you can get the column, measure, and row details of the clicked cell in the "columns", "measure", and "rows" sections of the returned Cell Data Object. Based on the cell details, you can compose and send the request to your server to retrieve the data.
Please let us know if this helps.
Kind regards,

This question is now closed