0

I'm using the wijmo grid. Within the grid if a user click on a cell I want to know the id field is.

i.e. if the header details was id, name, surname, dob

When they click on surname I need to be able to retrieve the id. Bit of a rubbish example, but I also need to use selectionMode: "singleCell",

So I don't want to select the full row just one cell, but to be able to retrieve the other cell information within that row

Any Ideas?

Shane
  • 1,603
  • 4
  • 26
  • 54

3 Answers3

1

You can handle the onCurrentCellChanging event and get the desired column's value.

$("#gridview2").wijgrid({
   selectionMode: "singleCell",
   currentCellChanging: function (e, args) {
        $(this).wijgrid("data")[args.rowIndex][0];
   }
});
AbdiasM
  • 613
  • 4
  • 15
0

Try:

$("#gridElementId").wijgrid('currentCell')

It returns type $.wijmo.wijgrid.cellInfo and that represents current cell of the grid.

drndivoje
  • 319
  • 2
  • 17
  • What I'm trying to is get the current cell detect what row it is and get the Id or value from the first cell – Shane Nov 18 '12 at 22:01
0

In the end I found this, so I'll use a split function to get the data I need.

function onSelectionChanged() {
    var dataItem = $("#datatable table").wijgrid('currentCell').row().data;
//     alert(dataItem);
Shane
  • 1,603
  • 4
  • 26
  • 54