function Wdg1_CellEditing_ExitingEditMode(sender, eventArgs)
{
///
/// If the a field in Column "Basename" is not "Standard" then set the values for columns "TextA" and "TextB"
///
///
///
var answers;
var grid;
var cellName;
var theVal;
var cell = eventArgs.getCell();
cellName = cell.get_column().get_key();
//the next code row gets the wrong value, it is the former value not the actual selected!!
//theVal = cell.get_value().toLowerCase();
//the actual selected value can be found in the eventArgs!
theVal = eventArgs.get_displayText()
if (cellName == "Basename")
{
if (theVal != "")
{
if (theVal != "standard") //if not Standard then set the default values
{
strReturn = searchWdg2(theVal); //here I do a "lookup" in another grid, you can also have these values already or do a query....
answers = strReturn.split(":"); //I get 2 values in one string separated by ":" and convert this to an array
impBCell = cell.get_row().get_cellByColumnKey("TextA");
impBCell.set_value(answers[0]); //put in the first value of the array
impFCell = cell.get_row().get_cellByColumnKey("TextB");
impFCell.set_value(answers[1]); //put in the second value of the array
}
}
}
}