JSFiddle - React, Tailwind, and code Playground
HTML
<link rel="stylesheet" href="http://www.jeasyui.com/easyui/themes/gray/easyui.css">
<script src="http://www.jeasyui.com/easyui/jquery.easyui.min.js"></script>
<script src="http://www.jeasyui.com/easyui/datagrid-cellediting.js"></script>
<button id="btn1">Get Selected</button>
<table id="dg"></table>
JavaScript
$('#dg').datagrid({
onCellEdit: function(index, field){
alert('selected row index:'+index);
},
columns:[[
{field:'f1',title:'title1',width:150,editor:'text'},
{field:'f2',title:'title2',width:150,editor:'text'}
]],
data: [
{f1:'value11',f2:'value12'},
{f1:'value21',f2:'value22'}
]
}).datagrid('enableCellEditing');
$('#btn1').click(function(){
var cell = $('#dg').datagrid('cell');
console.log(cell);
});