Forum

July 12th, 2025
A A A
Avatar

Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

The forums are currently locked and only available for read only access
sp_Feed Topic RSS sp_TopicIcon
Customizing available options for searchfield and searchoperator r
05/08/2011
17:38
Avatar
johnpino1
New Member
Members
Forum Posts: 2
Member Since:
05/08/2011
sp_UserOfflineSmall Offline

I've already implemented a jqgrid with an xml data source and the search button for cases where the operator is "eq" or "cn."  I don't really need/want the user to be able to search with other operators so I don't want them to show up in the search window drop down.  There are also certain fields or columns that I don't want the user to be able to select from when they click the search button.

This is all just the limit what I have to implement in the controller class.  Are there properties of the columns I should define in the javascript file that will not allow a search by them? Or are there things I have to add to or around this line?

jQuery("#dataTypeOutputsTable").jqGrid('navGrid', "#outputsPager", {edit: false, add: false, del: false });

Thanks for all of your help

John

05/08/2011
18:55
Avatar
johnpino1
New Member
Members
Forum Posts: 2
Member Since:
05/08/2011
sp_UserOfflineSmall Offline

Ok answered my own question,

Addthe following to the column definition in the colModel property of the grid:

search: false

to disallow searching on a certain column or:

searchoptions: { sopt: ['eq', 'cn', 'othersearchoptionshere']}

to limit the search options on that column.

 $("#dataTypeOutputsTable").jqGrid({
        caption: "Outputs",
        colNames: ["Id", "Name", "Attributes", "Memo", "Valid", "Promoted", "Value", "TimeStamp"],
        colModel: [
                { name: "outputid", index: "outputid", width: 30, searchoptions: { sopt: ['eq', 'cn']} },
                { align: "center", name: "attributes", index: "attributes", width: 50, search: false },

Forum Timezone: Europe/Sofia

Most Users Ever Online: 994

Currently Online:
19 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

OlegK: 1255

markw65: 179

kobruleht: 144

phicarre: 132

YamilBracho: 124

Renso: 118

Member Stats:

Guest Posters: 447

Members: 11373

Moderators: 2

Admins: 1

Forum Stats:

Groups: 1

Forums: 8

Topics: 10592

Posts: 31289

Newest Members:

, razia, Prankie, psky, praveen neelam, greg.valainis@pa-tech.com

Moderators: tony: 7721, Rumen[Trirand]: 81

Administrators: admin: 66

Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information