Hi,
I have set up some code that fires when the "save changes" link it clicked during a batchedit session. The only goal I have here is to set the border color to red if the number entered does not fall into a certain range. I've left the test for the range out of the code below because it isn't important.
I have looked through countless telerik posts and finally came upon a line of code to set the bordercolor of the cell to red that doesn't blow up and tell me that some part of the line of code has a property or method that doesn't exist in the idcell object (see below); the line of code does execute with no error:
idCell.style.backgroundColor == "red";
However the cell border does not turn red;
I am confident that the code I'm using does access the cell because this line does work:
var id = batchManager.getCellValue(idCell);
So basically I can't figure out how to turn the border color to red. Here is a boiled down version of the code to give you an idea of what code I'm using. Any help would be appreciated:
if (args.get_commandName() == "BatchEdit") {
var masterTable = sender.get_masterTableView();
var batchManager = sender.get_batchEditingManager();
var dataItems = masterTable.get_dataItems();
var idCell = dataItems[i].get_cell("LINE")
var id = batchManager.getCellValue(idCell);
var regexpString = "^\\d+\\.\\d{0,decimal}$";
var fieldValid = regexp.test(id);
if (fieldValid)
batchManager.changeCellValue(idCell, id);
idCell.style.backgroundColor == "red"; //THIS DOES NOT TURN TO BORDER TO RED
}