Reputation: 35
Good evening to everyone,
I use jqgrid with jsonstring datatype, and i use search box for searching.
This results (and it sounds normal) to a searhbox which has the column names as filters.
Eg
colNames:['Name','StartDate','EndDate']
will lead to a drop down in the searchbox with three option values:
Name, StartDate and EndDate
Is there a way to keep Name, StartDate and EndDate as my grid headers, but have different option values in the filter drop down of the searhbox?
Thanks in advance for your help
Upvotes: 1
Views: 963
Reputation: 221997
You can use label
property to define the text of column which will be displayed in the Searching Dialog. For example the demo uses the following properties
colNames: ["Client", "Date", "Amount", "Tax", "Total",
"Closed", "Shipped via", "Notes"],
colModel: [
{ name: "name", ..., label: "Client Name" },
{ name: "invdate", ..., label: "Start Date" },
{ name: "amount", ..., label: "Amount without TAX" },
{ name: "tax", ... },
{ name: "total", ..., label: "Total Price" },
{name: "closed", ..., label: "Is Closed?" },
{name: "ship_via", ... },
{ name: "note", ... }
],
Upvotes: 1