Hi,
I would like to use a version of this code
// Event fires upon a cell is intering into edit mode
function OnBatchEditOpening(sender, args) {
// get the unique name of the column
var columnName = args.get_columnUniqueName();
// get the currently edited row's ID
var rowId = parseInt(args.get_row().id.split("__")[1]);
// Setup a condition for the row ID
if (rowId % 3 == 0) { // If condition 1 is met
// if this row and the Freight column
if (columnName == "Freight") {
// cancel the Editing event
args.set_cancel(true);
}
}
}to get the value of the cell. If the cell is empty (null or a space), then I don't want the cell to be editable. In this Javascript, how do I get the actual value of the cell?
This code is getting me close
var cell = args.get_cell(); alert(cell.childNodes[0].innerHTML)
but it is showing the whole span, like this:
<span id="ctl00_MainContent_mygrid_ctl00_ctl10_mylabel">this is the value I want to access</span>
Thanks!