0

This doesn't seem to make sense, and unfortunately the one example on trirand seems to have the same bug

with this column model

{name:'txtFixtureType', index:'txtFixtureType', width:110,
stype: 'select',
edittype:'select', editoptions: { 
value: ":All;1:Division 1;2:Division 2"}},

Enabling a toolbar search results in a select for the column, with the values populated. However with the advanced search dialog the select appears, but contains no values.

Is there some addition property that needs to be set?

Cruachan
  • 15,733
  • 5
  • 59
  • 112

1 Answers1

3

Try with

{ name: 'txtFixtureType', index: 'txtFixtureType', width: 110,
    edittype: 'select',
    editoptions: { value: ":All;1:Division 1;2:Division 2" },
    stype: 'select',
    searchoptions: { sopt: ['eq', 'ne'], value: ":All;1:Division 1;2:Division 2" }
}

Additionally depend of your data saved it can be needed to use formatter: 'select' (see the documentation).

In general you can do combine toolbar searching with advance searching. See the demo from the answer.

Community
  • 1
  • 1
Oleg
  • 220,925
  • 34
  • 403
  • 798
  • Duh. Of course one needs searchoptions not editoptions, but what threw me was that for the toolbar search editoptions works too. – Cruachan Nov 17 '11 at 13:12
  • @Cruachan: You can share `editoptions` and use it for the searching too, but in case of 'select' the usage of `editoptions` without ':All' part has more sense. In general if would be better if the ':All' or some other base on the muster will be added automatically by jqGrid in the searching toolbar. The part ':All' are not needed in case of advanced searching for example. – Oleg Nov 17 '11 at 13:22