I am using the combobox in a datatable. The values appear correctly in the combobox, but once I sel

I am using the combobox in a datatable. The values appear correctly in the combobox, but once I select the value and the editor closes, the datatable shows the id instead of the value.

Here i am loading options using “url”

this.config.suggest = {
	view: "suggest",
	body: {
		url: function () {
			return webix.ajax().headers({
				Accept: 'application/json; charset=utf-8'
			}).get("abc/childelements/0/58/1").then(function (data) {
				var recs = data.json().ROOT && data.json().ROOT.I;
				Ext.each(recs, function (item) {
					item.id = item.ID;
					item.value = item.TEXT;
				});
				return recs;
			});
		}
	}
};

please give comments on this

Hi WebixTeam,
Please give me any suggestions.

Hello,
the data which is parsed directly from the editor (suggest) to the cell can correspond only to id of the option.
If there is a collection in the column, id is still a key attribute, but the value of an item (from the collection) is rendered in a cell.
as a solution, it is possible to use custom logic:

  • use collection with some default set of options (which will be rendered initially in the datatable)
  • use suggest with dataFeed
  • once editing is performed, add missing items to the collection

First Thanks for your response.

didn’t understand your logic, may i can understand with example.

Any way i got solution for this by doing some changes on complete edit, I mean while setting value to column

As I understood, you used combo as editor in the datatable

Try to enter “Argentina”, so you will see that the value will be in the input, not id. It’s connected with the creation of collection
Here is a quick sample:
https://snippet.webix.com/x9htpkev

That’s perfect!

Thanks for explanation.