I have autocomplete in one of my Grid column.Based on value being selected from auto complete. I use that value's code to update one of the cell in grid. to achieve this i am using change event in my autocomplete like below:
However, I get value and grid instance. but I can not use "updatecell" method. and get this error
TypeError: this.editModule.updateCell is not a function
Hi,
Thanks for contacting Syncfusion support.
The updateCell method is used only for the Batch edit mode. Before proceeding with your query, we need the following details to provide a better solution.
Regards,
Rajapandiyan S
Can you please share an example which has AutoComplete in Grid. and Based on Selection of value. I need to populate other column in same Row.
Sample Array = [{ "Name":"A",Code:1
} ,
{ "Name":"B",Code:2
}
]
Upon selecting Name I want to populate Code in other column
Don't want to share my code. which is really messed up and don't want to divert into wrong direction
Hi PDev,
Thanks for your update.
Currently we are validating your query, we will provide further details on or before 20th June, 2022. We appreciate your patience until then.
Regards,
Joseph I.
Hi PDev,
Could you please confirm what type of edit mode you are
using in your
“editSettings” based on
which we could prepare an appropriate solution and share a sample with you. Because
each edit type has a different edit form structure by default.
Regards,
Pavithra S
It's Normal
Hi PDev,
Thanks for your update.
Currently we are validating your query, we will provide further details on or before 4th July, 2022. We appreciate your patience until then.
Regards,
Joseph I.
Hi PDev,
Thanks for your patience.
In Inline Edit, you can directly get the other column’s input element using its id to change the value. We have prepared a simple sample for your reference, you can get it from the below link.
Sample: https://stackblitz.com/edit/angular-b5qcu2?file=app.component.ts,app.component.html
|
change: function (args) { if (args.itemData) { (document.getElementById('grid' + 'Code') as any).value = args.itemData.Code; } },
|
Please get back to us if you need further assistance.
Regards,
Rajapandiyan S
In your above sample, If I change this
to
Auto Complete does not work... Can you please help here ?
Hi PDev,
Based on your query, when you set the `field.value` property to Code from Name, the autocomplete was not working. By default, field.text property maps the text column from the data table for each list item and the field.value property Maps the value column from the data table for each list item. The filter action will be based on the field.value property. In your case, Since you have changed the field.value property to Code, you have to type the Code values for the autocomplete to filter the data items from the list. Refer to the video below.
Video: https://www.syncfusion.com/downloads/support/directtrac/general/ze/WINDOW~2664991372
Sample: https://stackblitz.com/edit/angular-b5qcu2-3h4xw5?file=app.component.ts,app.component.html
Regards,
Joseph I.