Datatable richselect editor question

Hello.

I was looking at how to fill an other column with a given value when I select something in an other column richselect editor. It works as exppected… I don’t know if it is the best way to do it.
http://webix.com/snippet/4b165d1f

But I have one question about that snippet. Is it possible to have the ID (or any other field) of the selected element displayed in place of the default ‘value’ option field? I thought the template of the suggest element would have done the job, but it’s not the case.

Thanks in advance,

Jonathan

The solution is fine. Probably a bit better will be to store options in a separate data collection, so access for selected item attributes will be a bit more simple. Check http://webix.com/snippet/10cd41d7

As for element which is displayed in the grid, it is trivial to use the id value, just use template:“year” - template with master property, which stores ID in grid’s dataset.

If you want to show some other value, you can use a template as function. Check http://webix.com/snippet/e5e41b8c

I see… I tried template:"#id#" but didn’t think anymore I had to refer to the data field, not the editors value. Many thanks for your help, again.