Update columns in grid based on another column's edited value when using customTemplate

Hi Team,

In grid component, I am using custom template for a column where I have ejs-autocomplete component in it. On change of value in autocomplete input, we need to change values of columns depending on it and also I need to update whole row's data.

so I want to update few/all columns of the row in grid based on value change in custom-template.

GRID

        <ejs-grid
          ref="SO_lineItem_Grid"
          :allowResizing="true"
          :showColumnChooser="true"
          rowHeight="40"
          :dataSource="dataGrid"
          :editSettings="editSettings"
          :selectionSettings="selectionOptions"
          :rowSelected="rowSelected"
          :actionBegin="actionBegin"
          :allowPaging="true"
          :pageSettings="pageSettings"
          :toolbar="toolbar"
        >
          <e-columns>
            <e-column
              field="ItemCode"
              headerText="Item Code"
              :editTemplate="itemCodeTemplate"
              minWidth="150"
              width="200"
              maxWidth="300"
              textAlign="left"
            ></e-column>
            <e-column
              field="ItemDescription"
              headerText="Description"
              minWidth="100"
              width="100"
              maxWidth="150"
              textAlign="left"
            ></e-column>
            <e-column
              field="subCode"
              headerText="Subcode"
              allowEditing="false"
              minWidth="100"
              width="100"
              maxWidth="150"
              textAlign="left"
            ></e-column>
            <e-column
              field="ItemQuantity1"
              headerText="UOM0"
              minWidth="55"
              width="55"
              maxWidth="80"
              textAlign="left"
            ></e-column>
            <e-column
              field="ItemQuantity2"
              headerText="UOM1"
              minWidth="55"
              width="55"
              maxWidth="80"
              textAlign="left"
            ></e-column>
            <e-column
              field="ItemQuantity3"
              headerText="UOM2"
              minWidth="55"
              width="55"
              maxWidth="80"
              textAlign="left"
            ></e-column>
            <e-column
              field="ItemQuantity4"
              headerText="UOM3"
              minWidth="55"
              width="55"
              maxWidth="80"
              textAlign="left"
              :visible="false"
            ></e-column>
            <e-column
              field="ItemQuantity5"
              headerText="UOM4"
              minWidth="55"
              width="55"
              maxWidth="80"
              textAlign="left"
              :visible="false"
            ></e-column>
            <e-column
              field="BaseItemQuantity"
              headerText="Qty"
              minWidth="75"
              width="75"
              maxWidth="90"
              textAlign="left"
              :allowEditing="false"
            ></e-column>
            <e-column
              field="MRP"
              headerText="MRP"
              minWidth="100"
              width="100"
              maxWidth="150"
              textAlign="left"
              :allowEditing="false"
            ></e-column>
            <e-column
              minWidth="105"
              width="105"
              maxWidth="150"
              field="ItemPrice"
              headerText="Item Price"
              :editTemplate="ItemPriceEditTemplate"
              :template="ItemPriceViewTemplate"
              textAlign="left"
            ></e-column>
            <e-column
              field="Discount"
              headerText="Discount"
              minWidth="100"
              width="100"
              maxWidth="150"
              textAlign="left"
              :allowEditing="false"
            ></e-column>
            <e-column
              field="ItemExciseTax"
              headerText="Tax"
              minWidth="100"
              width="100"
              maxWidth="150"
              textAlign="left"
              :allowEditing="false"
            ></e-column>
            <e-column
              field="free"
              headerText="Free"
              minWidth="100"
              width="100"
              maxWidth="150"
              textAlign="left"
            ></e-column>
            <e-column
              field="LineNetAmount"
              headerText="LineNetAmount"
              minWidth="100"
              width="100"
              maxWidth="150"
              :allowEditing="false"
              textAlign="left"
            ></e-column>
          </e-columns>
        </ejs-grid>


data properties

dataGrid: [],
pageSettings: { pageSize: 5 },
 toolbar: ['Add''Edit''Delete''Update''Cancel''ColumnChooser'],
 selectionOptions: { type: 'Single'mode: 'Row' },
 editSettings: { allowEditing: trueallowAdding: true },



Custom_Template- In methods

itemCodeTemplatefunction() {
    // To access component data
    return {
      template: Vue.component('itemcodeTemplate', {
        template: `<ejs-autocomplete
              :dataSource="itemCodeOptions"
              :filtering="getProducts"
              @change="changeSelectedProduct"
              ref="sideBarSearchInline"
              v-model="data.ItemCode"
              :focus="getProducts"
              id='ItemCode'
            ></ejs-autocomplete>`,
        data() {
          return {
            data: {},
            itemCodeOptions: [],
            productMaster: [],
            itemAddObj: {}
          }
        },
        methods: {
          getProducts(searchText) {
            console.log(searchText'autocomplete')
            if (!searchText.isInteracted) {
              return
            }
            this.itemCodeOptions = []
            const client = api()
            client
              .get('/products')
              .then(response => {
                if (response.data.ProductMaster && response.data.ProductMaster.length > 0) {
                  this.itemCodeOptions = response.data.ProductMaster
                }
              })
              .catch(error => {
                console.error(error'Unable to search products!')
              })
          },
          changeSelectedProduct(event) {
            if (!event.isInteracted) {
              return
            }
            if (event.itemData && event.itemData.id) {
              let selectedItem = this.productMaster.find(item => item.ItemNumber === event.itemData.id)
              const client = api()
              client
                .get('/products', {
                  params: {
                    ItemNumber: selectedItem.ItemNumber
                  }
                })
                .then(response => {
                  if (response.data) {
                    this.itemAddObj.ItemNumber = event.itemData.id  // set selected value
                    this.itemAddObj.ItemCode = event.itemData.text  // set selected value
                    //   NEED TO UPDATE ALL COLUMNS IN ROW HERE
                    
                  }
                })
                .catch(error => {
                  console.error(error'Unable to get product MRP details')
                })
            } else {
              this.itemAddObj = {}
            }
          }
        }
      })
    }
  }


I have screen recording gif, where on selection of "Item Code", all columns in the row are updated.

Thanks & Regards,
Sandeep G



Attachment: customtemplate_with_autocomplete_in_column_grid_a789f70b.zip

11 Replies

SK Sujith Kumar Rajkumar Syncfusion Team September 21, 2021 09:11 AM UTC

Hi Sandeep, 
 
Greetings from Syncfusion support. 
 
Based on the query we could understand that your requirement is to update other column values when auto complete edit column value changes in Grid edit. You can achieve this in the auto complete change event by retrieving the required edit input element from the Grid edit module’s form object and updating its value as demonstrated in the below code snippet, 
 
// Edit auto complete’s change event handler 
onChange(args) { 
    if (args.value === "Argentina") { 
        // Since the edit template creates a separate component instance, the Grid instance needs to be accessed from the root as shown below 
        var gridInst = this.$root.$children[0].$refs.grid.ej2Instances; 
        // The edit control id will be set as ‘Grid ID’ + ‘Column field name’ using which it can be accessed 
        // Here the ‘CustomerID’ column’s edit input is retrieved 
        var customerIDEle = gridInst.editModule.formObj.element.querySelector('#' + gridInst.element.id + 'CustomerID'); 
        // The ‘CustomerID’ edit input value is modified 
        customerIDEle.value = 'VICTE'; 
    } 
} 
 
 
We have prepared a sample based on this for your reference. You can find it below, 
 
 
Please get back to us if you require any further assistance. 
 
Regards, 
Sujith R 



SG Sandeep G September 22, 2021 11:02 AM UTC

Hi Sujith,

when trying to get grid's instance using   var gridInst = this.$root.$children[0].$refs.grid.ej2Instances; 
its throwing below error

Error in console

package.json

  "dependencies": {
    "@syncfusion/ej2-vue-calendars""^19.2.62",
    "@syncfusion/ej2-vue-dropdowns""*",
    "@syncfusion/ej2-vue-grids""*",
    "@syncfusion/ej2-vue-treegrid""^19.1.67",
    "axios""^0.21.1",
    "bootstrap""4.5.3",
    "bootstrap-vue""^2.21.2",
    "core-js""^3.6.5",
    "font-awesome""^4.7.0",
    "moment""^2.29.1",
    "vue""^2.6.12",
    "vue-autosuggest""^2.2.0",
    "vue-good-table""^2.21.10",
    "vue-i18n""^8.24.4",
    "vue-loading-overlay""^4.0.2",
    "vue-router""^3.5.1",
    "vuex""^3.6.2"
  },


component.vue

<template>
  <div class="container-fluid pt-0 px-0">
    <ejs-grid
      ref="SO_lineItem_Grid"
      :allowResizing="true"
      :showColumnChooser="true"
      rowHeight="40"
      :dataSource="dataGrid"
      :editSettings="editSettings"
      :toolbar="toolbar"
      :selectionSettings="selectionOptions"
      :rowSelected="rowSelected"
      :allowPaging="true"
      :pageSettings="pageSettings"
      :load="load"
      :dataBound="dataBound"
      :actionComplete="actionComplete"
      :actionBegin="actionBegin"
    >
      <e-columns>
        <e-column
          field="ItemCode"
          headerText="Item Code"
          :editTemplate="itemCodeTemplate"
          minWidth="150"
          width="200"
          maxWidth="300"
          textAlign="left"
        ></e-column>
        <e-column
          field="ItemDescription"
          headerText="Description"
          minWidth="100"
          width="100"
          maxWidth="150"
          textAlign="left"
          :editTemplate="editTemplate"
        ></e-column>
        <e-column
          field="subCode"
          headerText="Subcode"
          allowEditing="false"
          minWidth="100"
          width="100"
          maxWidth="150"
          textAlign="left"
        ></e-column>
        <e-column
          field="ItemQuantity1"
          headerText="UOM0"
          minWidth="55"
          width="55"
          maxWidth="80"
          textAlign="left"
        ></e-column>
        <e-column
          field="ItemQuantity2"
          headerText="UOM1"
          minWidth="55"
          width="55"
          maxWidth="80"
          textAlign="left"
        ></e-column>
        <e-column
          field="ItemQuantity3"
          headerText="UOM2"
          minWidth="55"
          width="55"
          maxWidth="80"
          textAlign="left"
        ></e-column>
        <e-column
          field="ItemQuantity4"
          headerText="UOM3"
          minWidth="55"
          width="55"
          maxWidth="80"
          textAlign="left"
          :visible="false"
        ></e-column>
        <e-column
          field="ItemQuantity5"
          headerText="UOM4"
          minWidth="55"
          width="55"
          maxWidth="80"
          textAlign="left"
          :visible="false"
        ></e-column>
        <e-column
          field="BaseItemQuantity"
          headerText="Qty"
          minWidth="75"
          width="75"
          maxWidth="90"
          textAlign="left"
          :allowEditing="false"
        ></e-column>
        <e-column
          field="MRP"
          headerText="MRP"
          minWidth="100"
          width="100"
          maxWidth="150"
          textAlign="left"
          :allowEditing="false"
        ></e-column>
        <e-column
          minWidth="105"
          width="105"
          maxWidth="150"
          field="ItemPrice"
          headerText="Item Price"
          textAlign="left"
        ></e-column>
        <e-column
          field="Discount"
          headerText="Discount"
          minWidth="100"
          width="100"
          maxWidth="150"
          textAlign="left"
          :allowEditing="false"
        ></e-column>
        <e-column
          field="ItemExciseTax"
          headerText="Tax"
          minWidth="100"
          width="100"
          maxWidth="150"
          textAlign="left"
          :allowEditing="false"
        ></e-column>
        <e-column
          field="free"
          headerText="Free"
          minWidth="100"
          width="100"
          maxWidth="150"
          textAlign="left"
        ></e-column>
        <e-column
          field="LineNetAmount"
          headerText="LineNetAmount"
          minWidth="100"
          width="100"
          maxWidth="150"
          :allowEditing="false"
          textAlign="left"
        ></e-column>
      </e-columns>
    </ejs-grid>
  </div>
</template>
<script>
import Vue from "vue";
import api from "../service";
import { AutoCompletePlugin } from "@syncfusion/ej2-vue-dropdowns";
import {
  GridPlugin,
  Edit,
  Toolbar,
  ColumnChooser,
  Resize,
  CommandColumn,
  Page,
from "@syncfusion/ej2-vue-grids";
import moment from "moment";
Vue.use(DatePickerPlugin);
Vue.use(GridPlugin);
Vue.use(AutoCompletePlugin);
export default {
  name: "SalesOrderFormV1",
  provide: {
    grid: [EditToolbarColumnChooserResizeCommandColumnPage],
  },
  data() {
    return {
      // grid properties starts here
      dataGrid: []
      pageSettings: { pageSize: 10 },
      toolbar: ["Add""Edit""Delete""Update""Cancel""ColumnChooser"],
      selectionOptions: { type: "Single"mode: "Row" },
      editSettings: {
        allowEditing: true,
        allowAdding: true,
        newRowPosition: "Top",
      },
      SO_lineItem_Grid_Loaded: false,
      // grid properties ends here
    };
  },
  methods: {
    // GRID METHODS STARTS HERE
    itemCodeTemplate: function () {
      let _this = this;
      return {
        template: Vue.component("itemcodeTemplate", {
          template: `<ejs-autocomplete
                :dataSource="productMaster"
                :filtering="getProducts"
                @change="changeSelectedProduct"
                ref="sideBarSearchInline"
                v-model="data.ItemCode"
                :focus="getProducts"
                id='ItemCode'
              ></ejs-autocomplete>`,
          data() {
            return {
              data: {},
              productMaster: [],
              itemAddObj: {},
            };
          },
          methods: {
            getProducts(searchText) {
              console.log(searchText"autocomplete");
              if (!searchText.isInteracted) {
                return;
              }
              const client = api();
              client
                .get("/products", {
                  params: {
                    requesttype: 16,
                    CustomerID: _this.selectedOutlet,
                    _: new Date().getTime(),
                  },
                })
                .then((response=> {
                  if (
                    response.data.ProductMaster &&
                    response.data.ProductMaster.length > 0
                  ) {
                    this.productMaster = response.data.ProductMaster;
                  }
                })
                .catch((error=> {
                  console.error(error"Unable to search products!");
                  this.$bvToast.toast("Unable to search products!", {
                    title: `Error`,
                    variant: "danger",
                    solid: true,
                    autoHideDelay: 3000,
                  });
                });
            },
            changeSelectedProduct(event) {
              console.log("this.changeSelectedProduct"event);
              if (!event.isInteracted) {
                return;
              }
              var gridInst =
                this.$root.$children[0].$refs.SO_lineItem_Grid.ej2Instances;
              console.log(gridInst"gridInst");
            },
          },
        }),
      };
    },
    editTemplate: function () {
      return {
        template: Vue.component("datePicker", {
          template: `<ejs-autocomplete id='ShipCountry' @change="onChange" v-model='data.ShipCountry' :dataSource='dropData'></ejs-autocomplete>`,
          data() {
            return {
              data: {},
              dropData: [
                "Argentina",
                "Austria",
                "Belgium",
                "Brazil",
                "Canada",
                "Denmark",
                "Finland",
                "France",
                "Germany",
                "Ireland",
                "Italy",
                "Mexico",
                "Norway",
                "Poland",
                "Portugal",
                "Spain",
                "Sweden",
                "Switzerland",
                "UK",
                "USA",
                "Venezuela",
              ],
            };
          },
          methods: {
            onChange(args) {
              if (args.value === "Argentina") {
                var gridInst =
                  this.$root.$children[0].$refs.SO_lineItem_Grid.ej2Instances;
                console.log(gridInst"gridInst");
                var customerIDEle =
                  gridInst.editModule.formObj.element.querySelector(
                    "#" + gridInst.element.id + "CustomerID"
                  );
                customerIDEle.value = "VICTE";
              }
            },
          },
        }),
      };
    },
    // getGridData() {
    //   console.log(this.$refs.SO_lineItem_Grid.ej2Instances.dataSource)
    // },
    actionBegin(args) {
      console.log(args"actionBegin");
      if (args.requestType === "save" && args.action === "add") {
        var grid = this.$refs.SO_lineItem_Grid.$el.ej2_instances[0];
        args.index = grid.currentViewData.length;
      }
    },
    actionComplete(args) {
      var grid = this.$refs.SO_lineItem_Grid.$el.ej2_instances[0];
      if (args.requestType === "save" && args.action === "add") {
        grid.addRecord();
      }
      if (args.requestType === "add") {
        setTimeout(() => {
          // Need to add focus on grid
          // args.form.querySelector('#' + grid.element.id + 'ItemCode').focus()
        }, 100);
      }
    },
    rowSelected: function (args) {
      console.log("rowSelected => "args);
      let selectedrowindex =
        this.$refs.SO_lineItem_Grid.ej2Instances.getRowInfo(args.target);
    },
    commandClick: function (args) {
      console.log("commandClick =>"args);
      if (args.commandColumn && args.commandColumn.type === "View") {
        let selectedrowindex =
          this.$refs.SO_lineItem_Grid.ej2Instances.getRowInfo(args.target);
      }
    },
    load: function () {
      this.SO_lineItem_Grid_Loaded = true;
    },
    dataBound: function () {
      if (this.SO_lineItem_Grid_Loaded) {
        this.SO_lineItem_Grid_Loaded = false;
        var grid = this.$refs.SO_lineItem_Grid.$el.ej2_instances[0];
        grid.addRecord();
      }
    },
    // GRID METHODS ENDS HERE
  },
};
</script>
<style></style>


Regards,
Sandeep G



SK Sujith Kumar Rajkumar Syncfusion Team September 23, 2021 08:31 AM UTC

Hi Sandeep, 
 
We would like to let you know that the support for accessing root instance in the Grid template component was provided in our latest packages and since you have used different package versions for the Syncfusion components(from the shared package.json code) we suspect that older dependent or duplicate packages could have been installed in your application causing the problem. So please follow the steps provided below to remove duplicated packages(if any) and update to the latest packages, 
 
  • Delete package.lock.json file from your application.  
  • Remove the @syncfusion package folder from the node_modules.
  • Use latest version or “*”(Installs the latest packages) for all Syncfusion components in package.json file.  
  • Then install the NPM packages.
 
Once installed, clear the browser cache and try running the application and check if the problem is resolved. Also try opening it in other browsers. 
 
If problem still persists then please share us the following information to validate further on this, 
 
  • Share us console screenshot image of the properties returned when accessing ‘this.$root’ and ‘this.$root.children’ from the auto complete’s change event.
  • If possible share us a simple sample to replicate the problem or try reproducing it in the previously shared sample. It would be helpful to identify your exact problem case and provide the solution based on that
 
Regards, 
Sujith R 



SG Sandeep G September 23, 2021 12:09 PM UTC

Hi Sujith,

I have tried with solution but issue still exits. I'm adding screenshots of consoles for reference

package.json - existing project

{
  "name""fuji",
  "version""0.1.0",
  "private"true,
  "scripts": {
    "serve""vue-cli-service serve",
    "build""vue-cli-service build",
    "lint""vue-cli-service lint"
  },
  "dependencies": {
    "@syncfusion/ej2-vue-calendars""*",
    "@syncfusion/ej2-vue-dropdowns""*",
    "@syncfusion/ej2-vue-grids""*",
    "@syncfusion/ej2-vue-treegrid""*",
    "axios""^0.21.1",
    "bootstrap""4.5.3",
    "bootstrap-vue""^2.21.2",
    "core-js""^3.6.5",
    "font-awesome""^4.7.0",
    "moment""^2.29.1",
    "vue""^2.6.12",
    "vue-autosuggest""^2.2.0",
    "vue-good-table""^2.21.10",
    "vue-i18n""^8.24.4",
    "vue-loading-overlay""^4.0.2",
    "vue-router""^3.5.1",
    "vuex""^3.6.2"
  },
  "devDependencies": {
    "@vue/cli-plugin-babel""~4.5.0",
    "@vue/cli-plugin-eslint""~4.5.0",
    "@vue/cli-service""~4.5.0",
    "babel-eslint""^10.1.0",
    "eslint""^6.7.2",
    "eslint-plugin-vue""^6.2.2",
    "vue-template-compiler""^2.6.11"
  },
  "eslintConfig": {
    "root"true,
    "env": {
      "node"true
    },
    "extends": [
      "plugin:vue/essential",
      "eslint:recommended"
    ],
    "parserOptions": {
      "parser""babel-eslint"
    },
    "rules": {}
  },
  "browserslist": [
    "> 1%",
    "last 2 versions",
    "not dead"
  ]
}


this.$root
this.$root.$children



I have also tried replicating the same issue in sample project(I have commented few lines in datasource.js to avoid few errors). Its throwing different error. I am also adding project here.


Please let me know how to get grid's instance to update columns data


Thanks,
Sandeep G


Attachment: ejsgridcolumnupdate_32aed359.zip


SK Sujith Kumar Rajkumar Syncfusion Team September 24, 2021 01:00 PM UTC

Hi Sandeep, 
 
The modified sample you shared had template compilation issues and on resolving them we checked the problem but could not reproduce it from our end. This is because in this sample the parent root instance’s child was the vue component which had the Grid and so we were able to access instance there as shown in the below image, 
 
 
 
We suspect that your problem might be occurring because the vue component in your application where the Grid is rendered does not have the root component as its immediate parent. And in this case you would have to identify the vue component with Grid from the root and access the component instance from there. So can you please share us your vue application structure(Main root component to vue component which has Grid) to validate this case further based on your exact project structure. Also if possible please implement your application structure in the below updated sample and share it to us, 
 
 
Regards, 
Sujith R 



SG Sandeep G September 28, 2021 07:18 AM UTC

Hi Sujith,

Thanks for your reply. It helped me to get grid's instance by identifying vue component from the "$root " and able to update fields. I also need to update hidden columns based on another edited column.


when trying to get form object using below method, I am unable to get hidden column elements

gridInst.editModule.formObj.element.querySelector(






Unable to get and update hidden columns

Thanks,
Sandeep G



SK Sujith Kumar Rajkumar Syncfusion Team September 29, 2021 01:05 PM UTC

Hi Sandeep, 
 
You’re welcome. We are glad to hear that your previous query has been resolved. 
 
As for this query – “I also need to update hidden columns based on another edited column”, we would like to let you know that the hidden column will not be rendered in the edit form. So you can update this column value(based on other column values) in the Grid’s actionBegin event as demonstrated in the below code snippet, 
 
// Grid’s actionBegin event handler 
actionBegin: function(args) { 
    // Check if event is triggered for save action 
    if (args.requestType === 'save') { 
        var newVal = args.data["Freight"] * 10; 
        // Here the new value can be updated to the hidden column field 
        args.data["Total"] = newVal; 
    } 
} 
  
 
Let us know if you have any concerns. 
 
Regards, 
Sujith R 



SG Sandeep G October 1, 2021 07:14 AM UTC

Hi Sujith,


Thanks for your reply, let me explain our requirement.

We need to have a autocomplete dropdown, where user will search and select item, and response of the autocomplete item contain data for the rest of the visible columns and hidden columns. So we can not update hidden columns on actionBegin (eventHandler) as it works only when user saves the grid.

I am supposed to update hidden columns when user changes value in one of the visible column. How can we achieve this?
Can we call actionBegin event inside a custom template and update hidden columns?

Regards,
Sandeep G



SK Sujith Kumar Rajkumar Syncfusion Team October 4, 2021 01:00 PM UTC

Hi Sandeep, 
 
As mentioned in our previous update, since the hidden columns are not rendered in Grid edit form the hidden column values have to be updated in the Grid’s actionBegin event when the ‘save’ action is getting performed. However for your case, you can achieve the requirement by storing the hidden columns values returned in the auto complete selected data response in a global variable and then access this variable to update the column values in the actionBegin event as demonstrated in the below code snippet, 
 
// Auto complete change event  
onChange: function(args) {  
                     ... 
        // Here the response data is stored in a global variable 
        this.updatedData = resData; 
    }  
}, 
// Grid’s actionBegin event handler  
actionBegin: function(args) {  
    // Check if event is triggered for save action  
    if (args.requestType === 'save') {  
        // Here the updated response data stored is the global variable is retrieved  
        var newData = this.updatedData; 
        // The hidden column fields can now be updated with this data 
        args.data["PriceRet"] = newData["PriceRet"];  
        args.data["Discount"] = newData["Discount"];  
    }  
 
 
 
Let us know if you have any concerns. 
 
Regards, 
Sujith R 



SG Sandeep G October 8, 2021 06:26 AM UTC

Hi Sujith,

Thanks for your reply. When I try to update value of a column which has custom template, value is getting updated but after saving it we are not able to see updated value in grid. I am adding a sample where freight column has custom template.

How to update/save column's value which is having custom template in grid?



Attachment: gridUpdated_c4192b42.zip


SK Sujith Kumar Rajkumar Syncfusion Team October 11, 2021 10:15 AM UTC

Hi Sandeep, 
 
We checked the shared sample and would like to inform you that the problem was occurring because the ‘Freight’ columns’s edit component name was not properly provided. The updated cell values will be retrieved from the Grid edit form based on its component name which matches with the Grid’s data field name. The default rendered edit control elements will have the column field as its name. Now since you are rendering input element as a custom edit control using edit template, you need to set the corresponding column field name as the edit control’s “name” in order for it to be fetched and updated in Grid on save. 
 
We have modified the shared sample based on this for your reference. You can find it below, 
 
 
Let us know if you have any concerns. 
 
Regards, 
Sujith R 


Loader.
Up arrow icon