I am using jqgrid and toolbar filters. By default it only gives you a text box to enter data. Does it support a dropdown support kickbox, where I can give a list of values to choose from ??
jqGrid
{name: 'category', index: Category ', Width: 200, Formatter:' Selection ', Stype:' 'There are some sort of sorting for all types. Where categoriesStr is defined code> Miscellaneous categories credit = ": all; 1: game; 2: science "; Here the standard "1: game; 2: science" value is included in the "All:" string that does not filter you columns. You can of course use ":" or ": choose ..." and for this
You can see close results on the prepared.
Renewed : Your question is made interesting and interesting to me. It shows how to create a selective ComboBox that can be based on the text that is related to the column in the Search toolbar or in the Advanced Search dialogue. For a column I use additional, you can modify the code to use the more powerful powerful alternative to autocomplete. Here's the code code: {id: "1", name: "Miroslav Klose", Category: "Game", Subcategory: "Football"}, {ID: "Alcohol Einstein", Category: "Science", Subcategory: "Mathematics", "2", Name: "Michael Schumacher", Category: "Game", Suburb: "Formula 1"}, {ID: "3" } "," Science ", subcategory: : Texts = grid.jqGrid ('getCol', columnName), unique text, [=], textsLength = texts.length, text, textsMap = {}, i; {Text = texts [i] for (i = 0; i & lt; textsLength; i ++); If text (text! == undefined & amp; textsmap [text] === undefined) {// to test whether the text is unique, we put it on the map. TextsMap [text] = True; UniqueTexts.push (text); }} Unique Tests Return; }, BuildSearchSelect = function (unique name) {var value = ": all"; $ .short (unique name, work () {value + = ";" + + ":" + this;}); Return value; }, SetSearchSelect = function {columnName} {grid.jqGrid ('setColProp', columnName, {stype: 'select', search options: {value: buildSearchSelect (getUniqueNames (columnName)), sopt: ['eq']}}) ; }; Grid.jqGrid ({Data: MyData, Datatype: 'Local', Kolmelodel: [{name: 'name', index: 'name', width: 200}, {name: 'category', index: 'category', width Sort name: 'name', visible: true, daily: true, sort: "desc", ignore: true, true, Pager: '#pager', height: "auto", caption: "how to use local filter filterbar")). JqGrid ('Navigrade', '# Pager', Edit: Wrong, Add: Wrong, Del: Wrong, Search: Wrong, Refresh: Incorrect}}; setSearchSelect ('Category'); setSearchSelect ('Subcategory'); Grid.jqGrid ('setColProp', 'name', {searchoptions: {sopt: ['cn'], dataset: function (amm) {$ (elem). Autocomplete ({source: getUniqueNames ('name'), delay: 0, minlong: 0});}}}; Grid.jqGrid ('FilterToolbar', {stringResult: true, searchonent: true, default search: "cn"}); Do you want it?
Renewed : Another option may be the use of plug-ins that are available for dropdown and casual files. If you search by autocomplete, look for demo (and) and code examples and see demo (see demo) Renewed 2 : jqGrid 4.6 / 4.7 or working with it Is included in the amendment of the above code.
Comments
Post a Comment