DataCollection and suggest

Hi

Is it possible to create a DataCollection, and then use it to provide data to a suggest-list attached to a ui.text ?

I need to load data from the server, using a specific proxy and datatype. A DataCollection seems to be able to do that, but I cannot see if (and how) a suggest-list should be based on it.

-mads

Hi,

You can link a suggest list to a DataCollection and then synchronize it with suggest list of the needed text control: http://webix.com/snippet/9287f815

At the same time you can provide extra configuration (including proxy and datatype) within the suggest list itself:

webix.ui({
    view:"text",  suggest:{
         url:"myproxy->server/data.php",
         datatype:"..." 
    }
});

Thanks a lot for the answers.
I found that I can actually also create a suggest-list, and use the DataCollection as the data for it, directly:

var dc =new webix.DataCollection({
url: ‘/my/url’
});

webix.ui({
view: ‘suggest’,
input: ‘myTextInput’,
data: dc
});