hihi
hihi

Reputation: 1

Questions about Toast UI Grid

First of all, I ask for your understanding that I am not good at English.

I use Toast Ui Grid

if grid cell click => i want get first cell.value

The cell is configured like this.

|board_no|board_title|user|

if click board_title -> i want get board_no number

i use for formatter, then i get board_no and i use

formatter: function (e) {
  return `<a href="detail?no=${e.value}">${e.value}</a>`;  
},

how can i get board_no, when i click board_title?

thanks for your help

Upvotes: 0

Views: 153

Answers (1)

hihi
hihi

Reputation: 1

grid.on("click", function (ev) {
    let board = grid.getRow(ev.rowKey);
    location.href = "/detail?no=" + board.board_no;
});

find rowKey method and this is my answer i finished

Upvotes: 0

Related Questions