Search
Grid.selectCell Method
See Also
 






Selects the cell at the specified position.

Namespace: MindFusion.DataViews
File: Grid.js

 Syntax

JavaScript  Copy Code

function selectCell (row, column)

 Parameters

row

Number. The cell row.

column

Number. The cell column.

 Example

The following code uses custom drawing for a Grid cell and selects it:

JavaScript  Copy Code
grid.customDrawCell.addEventListener(function (sender, args)
{
     var div = document.createElement("div");
     var img = document.createElement("img");
     img.src = "../images/calendar.png";
     img.className = "circle-image";
     img.addEventListener("click", (e) =>
      {
          grid.selectCell(args.row, args.column);         
      });
     div.appendChild(img);
     div.appendChild(args.defaultContent);
     args.content = div;
}

 See Also