I need to exit a cell and fire some kind of event. From what I have tested and read the editCellEnding and editCellEnded only fires when the row editing has ended. This will not work because I need to populate other cells based on the value of a cell after exit.
Is this possible?
Donnie,
Use the events of the editor for the column instead of the events of the grid. This should work for you. I was trying to use the events of the grid as well and had to instead use the events of the specific column editor. Example below when setting the column settings under the updating feature. The $gridJobService is a reference to the grid:
columnKey: "Quantity",
required: true,
editorType: 'numeric',
defaultValue: 1,
editorOptions: {
maxDecimals: 2,
nullValue: 1,
maxValue: 99999999.99,
validatorOptions: getValidationOptions,
valueChanged: function (evt, ui) {
var value = ui.value;
if (value != "") {
var estTimeEditor = $gridJobService.igGridUpdating("editorForKey", "EstTime");
var estUnitPriceEditor = $gridJobService.igGridUpdating("editorForKey", "EstUnitPrice");
var estExtTimeEditor = $gridJobService.igGridUpdating("editorForKey", "EstExtTime");
var estExtPriceEditor = $gridJobService.igGridUpdating("editorForKey", "EstExtPrice");
var theEstUnitPrice = $(estUnitPriceEditor).igEditor("value");
var theEstTime = $(estTimeEditor).igEditor("value");
var theEstExtTime = parseFloat(theEstTime) * parseFloat(value);
var theEstExtPrice = parseFloat(theEstUnitPrice) * parseFloat(value);
$(estExtTimeEditor).igEditor("value", theEstExtTime);
$(estExtPriceEditor).igEditor("value", theEstExtPrice);
}
I actually got the value of the cell but now I need to set the value of the adjacent cell.
This works great but I can't seem to get the values from the ui variable. It just give me an undefined. So like ui.value give me undefined.
Hello Donnie,
I assume you're using editMode: 'row'. igGridUpdating uses igEditor instances when in edit mode to edit the grid cells. You can bind to igEditor events by using the editor options in the updating columnSettings like this:
{
name: "Updating",
editMode: "row",
columnSettings: [
columnKey: "Name",
blur: function (evt, ui) {
console.log("blur event fired");
]
The best way to edit other cell value is to use its editor. To get the other cell editor use the igGridUpdating.editorForKey API method. The Editing Combo Editor sample demonstrates this.
Note: This method is not applicable when the editMode: 'cell'. In this mode only one editor is shown at a time.
Hope this helps,Martin PavlovInfragistics, Inc.