Forum
03:44
13/10/2013
Hello Everyone,
I have encountered this issue recently:
By default SearchToolbar performs "contains" search which is good but when LoadOnce is set to True the SearchToolbar switches to "BeginsWith" which is an issue for the users. I tried to set the SearchToolbarOperation:"contains" manually for that particular column but it doesn't works.
Trirand team can you please look at this problem.
Thanks in advance.
Regards,
Piyush
Edit:
Forgot to add additional information:
ASP.NET Webforms Version 4.5.2
Visual Studio 2010
asp code
<cc1:JQGrid ID="JQGrid1" runat="server" Width="500" Height="400" LoadOnce="True">
<Columns>
<cc1:JQGridColumn DataField="Name"/>
<cc1:JQGridColumn DataField="Age"/>
</Columns>
<SearchToolBarSettings SearchToolBarAction="SearchOnKeyPress" />
<PagerSettings PageSize="25" ScrollBarPaging="True" />
<ToolBarSettings ShowSearchToolBar="True" ToolBarPosition="Top">
</ToolBarSettings>
</cc1:JQGrid>
page behind
protected void Page_Load(object sender, EventArgs e)
{
//ClientScript.RegisterClientScriptBlock(GetType(), "script", "returnVal();", true);
DataTable dt = new DataTable();
DataColumn name = new DataColumn("Name", typeof(string));
DataColumn age = new DataColumn("Age", typeof(Int32));
dt.Columns.Add(name);
dt.Columns.Add(age);
Random rnd = new Random();
string[] names = new string[13] { "aaron", "abdul", "abe", "abel", "abraham", "adam", "adan", "adolfo", "adolph", "adrian","abby", "abigail", "adele"};
int index;
for (int i = 0; i < 20; i++)
{
var row = dt.NewRow();
index = rnd.Next(0,13);
row[name] = names[index];
row[age] = rnd.Next(20, 28);
dt.Rows.Add(row);
}
JQGrid1.DataSource = dt;
JQGrid1.DataBind();
}
15:35
Moderators
30/10/2007
For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.
Most Users Ever Online: 715
Currently Online:
38 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