Unplanned
Last Updated: 21 Jan 2021 06:52 by ADMIN
Kalhara
Created on: 12 Aug 2014 05:19
Category: PivotGrid
Type: Feature Request
9
Pivot grid cells selectable feature together with events to retrieve the pivot grid data for the selected cell.
Pivot grid cells selectable feature together with events to retrieve the pivot grid data for the selected cell.
1 comment
ADMIN
Alex Hajigeorgieva
Posted on: 21 Jan 2021 06:52

Hello, Kalhara,

Until the selectable feature gains more popularity, you can implement your own logic to make the cells appear selected by adding and removing the "k-state-selected" class on click.

 $("#pivotgrid").on("click", ".k-grid-content td", function(e){
        var cell = $(e.target);
         cell.toggleClass("k-state-selected");
         var cellInfo = pivotgrid.cellInfoByElement(cell);
         console.log(cellInfo);
});

As for the data for the selected cell, we already have a cellInfoByElement() method that can be used:

https://docs.telerik.com/kendo-ui/api/javascript/ui/pivotgrid/methods/cellinfobyelement

Here is a sample runnable Dojo for your convenience:

https://dojo.telerik.com/uqUDErON

Regards,
Alex Hajigeorgieva
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.