I've written a JavaScript that cancels a postback but it's behaving oddly. Here's the handler:
<
ClientSideEvents CellChangeHandler="setCheckBoxCancelPostback" />
and here's the script:
function setCheckBoxCancelPostback(gridName, cellId, button)
{
var last_char = cellId.charAt(cellId.length - 1);
if (last_char < 4)
var rowObj = igtbl_getRowById(cellId);
igtbl_cancelPostBack(rowObj.gridId)
if (last_char == 1)
rowObj.getCellFromKey('CheckBox').setValue(true);
}
Basically it checks to see if the column that was clicked is the first column and if so cancels the postback. What's odd is, I have to click it twice to get it to work. Really close on fixing this thing, hoping someone has some insight.
Thanks,
Hi stretch73,
For your particular implementation I suggest you use the CellClickHandler event. The CellChangeHandler event is fired when you mouse-over on a cell (or between cells) and that is probably causing the function to behave oddly. Using the CellClick event will most likely solve your issue.
Please contact me if you have any further questions.
Best Regards,Petar IvanovDeveloper Support EngineerInfragistics, Inc.