HeatMap CellClicked

Is it possible to send more data on CellClicked event other than XDataMapping,YDataMapping, ValueMapping, for example to send an object or to map an object to ValueMapping?
Thanks!

1 Reply

SP Sowmiya Padmanaban Syncfusion Team March 18, 2020 09:17 AM UTC

Hi Lulia,  
 
Greetings from Syncfusion support. 
 
We have checked your reported problem. We suspect that your requirement is to send the additional data in cellClicked event.  In Heatmap component, you can only get the mapped data in cellClicked by default. 
 
If you want to access the all the declared data in datasource on cellClicked() event. In that case, you need to fetch the particular data in datasource. 
 
Refer the below code snippet. 
    public void cellClicked(ICellClickEventArgs args) 
    { 
        // Fetch the clicked cell value in Datasource. 
        var CellValue = Data.Where(x => x.RowId == args.XLabel && x.ColumnId == args.YLabel).Select(x => x).ToList(); 
        // Fetch the particular value. 
        var id = CellValue[0].Id; 
    } 
 
 
Refer the below sample for your reference. 
 
If we misunderstand your requirement. Can you please share the additional details regarding your requirement. It will helpful for us to resolve your problem at earlier. 
·       Exact Requirement. 
·       Video or code snippet. 
 
Please let us know, if you have any concerns. 
 
Regards,  
Sowmiya.P 


Loader.
Up arrow icon