select2 and autofilter

Questionsselect2 and autofilter
Sergio Pulido asked 10 years ago

By using "select2" the autofilter does not work, and I saw that in the demo does not work, is there any solution ?.
regars, Sergio Pulido.

3 Answers
Abu Ghufran answered 10 years ago

Demo is updated now.
Latest lib build is required, which i am emailing you.

Demo: http://phpgrid.org/demo/demos/integrations/dropdown-select2.php
Code: http://phpgrid.org/demo/demos/integrations/dropdown-select2.phps

Abu Ghufran answered 10 years ago

Select2 supports images in dropdown.
See https://select2.github.io/examples.html -> Templating

In grid code, you can include templateResult: formatState like below and copy function as in select2 website example.

$('select[name='+id+'].editable, select[id='+id+']').select2({width:'95%', dropdownCssClass: 'ui-widget ui-jqdialog', templateResult: formatState});

Vygandas answered 9 years ago

Hello, Abu,

Select2 is working perfectly, just what I needed.
Is there any chance to integrate an image/jpg in dropdown ?

DEMO: http://dhtmlx.com/docs/products/dhtmlxCombo/ (Combobox with icons)

Your Answer

14 + 14 =

Login with your Social Id:

OR, enter

Attach code here and paste link in question.
Attach screenshot here and paste link in question.



How useful was this discussion?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate it.

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?