Forum
Topic RSS
17:38
05/08/2011
OfflineI'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
18:55
05/08/2011
OfflineOk 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 },
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.comModerators: tony: 7721, Rumen[Trirand]: 81
Administrators: admin: 66
Log In
Home