0

I have a JQGrid with say 3 columns 1) ID, 2) Country, 3 Description

id| country | Description  
1 | France  | this is just a test    
2 | China   | this is just a test  
3 | Russia  | this is just a test  
4 | France  | this is just a test   
5 | France  | this is just a test

Now what is needed is a external select dropdown which contains unique country names

Like for the above the dropdown values will be France China Russia

1) Is it possible to achieve this via Jquery or something without a DB Hit to populate the dropdown? 2) This would be simple, but upon selection the grid needs to filter for the country selected

The select Dropdown is external in the page and not inside the jqgrid

shaan N
  • 85
  • 1
  • 1
  • 3

1 Answers1

0

Which datatype you use? Which version and fork of jqGrid you use (free jqGrid, Guriddo jqGrid JS or some old jqGrid version <=4.7)?

In general you can follow the idea described in the answer (modification of the old one) to generate unique values in the column and to use there in select or autocomplete. The old answer uses internal select and input of the filter toolbar, but you can use external elements in the same way.

One more demo from the answer uses select2 control, which I personally like. It has the advantages of select and autocomplete.

Community
  • 1
  • 1
Oleg
  • 220,925
  • 34
  • 403
  • 798