Cruachan
Cruachan

Reputation: 15971

jqGrid - cannot populate select in search dialog - but ok in toolbar

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?

Upvotes: 0

Views: 1738

Answers (1)

Oleg
Oleg

Reputation: 221997

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.

Upvotes: 3

Related Questions