Articles in this section
Category / Section

How to get the clicked Grid cell details

1 min read

You can get the clicked grid cell details by passing the target element to the “getRowInfo” method of Grid component.

This is explained in the following sample code in which the “click” event has been bound to the Grid element and clicked cell details is retrieved by using the “getRowInfo” method. The cell value is displayed in an alert popup.


let grid: Grid = new Grid({
  dataSource: data,
  columns: [
    { field: "OrderID", headerText: "Order ID", width: 120, textAlign: "Right"  },
    { field: "CustomerName", headerText: "Customer Name", width: 150 },
    { field: "Freight", width: 120, format: "C2", textAlign: "Right" },
    { field: "ShipCountry", headerText: "Ship Country", width: 150 }
document.getElementById("Grid").addEventListener("click", function(args) {
  if (( as any).classList.contains("e-rowcell")) {
    let rowInfo = grid.getRowInfo(; // Get row information


Typescript Demo

Angular Demo

React Demo

Did you find this information helpful?
Help us improve this page
Please provide feedback or comments
Comments (0)
Please sign in to leave a comment