In the "changed" event, I can use getSelectedRecord() function from the "item" parameter. In this way I can access all data in "comboboxitem" selected record . As in the example below. I have access to the "HesapBaglantiTipi" data.
"var baglantiTipi = selectedRecord.HesapBaglantiTipi; "
In the "canEditCell" event, how can I access the all data like I accessed with getSelectedRecord () in "ComboboxItem"? I'm trying to do the following example.
"var baglantiTipi = selectedRecord.HesapBaglantiTipi; "
Code:
changed: function (form, item, value) { var selectedRecord = item.getSelectedRecord(); if (selectedRecord == null)[INDENT]return; [/INDENT] var baglantiTipi = selectedRecord.HesapBaglantiTipi; [INDENT]if (baglantiTipi = "C")[/INDENT] form.grid.showFields(["CariTipi.CariTipiAdi", "CariKodu.CariAdi", "BelgeTipi.BelgeAdi", "VadeTarihi", "BelgeNumarasi", "BelgeTarihi", "BelgeSeriNo", "YedekAlan12"]); }
Code:
canEditCell: function (rowNum, colNum) { var record = this.getEditedRecord(rowNum), fieldName = this.getFieldName(colNum); if (fieldName == "CariTipi.CariTipiAdi") { if (!(record && record.HesapPlani && record.HesapPlani.HesapBaglantiTipi != null && (record.HesapPlani.HesapBaglantiTipi === "C" || record.HesapPlani.HesapBaglantiTipi === "CD"))) return false; else return true; } return this.Super("canEditCell", arguments); },
Comment