Forum

November 2nd, 2014
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
Clear Toolbar Button
05/06/2013
14:44
Avatar
Adriien M
France
Member
Members
Forum Posts: 9
Member Since:
05/06/2013
sp_UserOfflineSmall Offline

Hello,

This is my first post in this Forum and first of all, I thank you for this amazing plugin !!

I am here to propose a new functionnality to the toolbar searching module.

Indeed, I think that adding a new button to clear the current search would be quite useful.

Here is what it would look like:

jqgrid toolbar clear buttonImage Enlarger

At the moment, in order to achieve this functionnality, I use the grid's LoadComplete event in conjonction with the ClearToolbar method.

But I think it would be nice a functionnality to have natively (with a new option).

I am looking forward to hearing from you all.

Best regards.

07/06/2013
08:14
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

Hello,

Thank you very much for this recommendation.

I too think - it is a really usefull.

I will try to include it in the next release.

Thanks

Best Regards

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.

04/11/2013
11:05
Avatar
lorife
Member
Members
Forum Posts: 15
Member Since:
01/04/2010
sp_UserOfflineSmall Offline

Hi, Is there a way to hide the button and go back as before?

Thank you, lorenzo

tony said:

Hello,

Thank you very much for this recommendation.

I too think – it is a really usefull.

I will try to include it in the next release.

Thanks

Best Regards


04/11/2013
11:19
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

Hello,

In colMode searchoptions set clearSearch : false and the clear button will not appear.

Regards

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.

04/11/2013
16:15
Avatar
OlegK
Germany
Member
Members
Forum Posts: 1255
Member Since:
10/08/2009
sp_UserOfflineSmall Offline

Hi Tony,

to be exact the usage of the property clearSearch: false not full solve the problem. I don't posted the issue before, but even if we use cmTemplate: { clearSearch: false } we have still a litte reduced width for the searching elements. I have to use grids with a lot of columns with chechboxes inside. So the width of the columns should be the little the possible to represent only the arrow of select element in the searching toolbar. After updating to the last version of jqGrid I had to make small fix. One need to hide <td> element where the clear icon will be created. The current version hold the cell visible and empty, which get about 2px place. To fix the problem one can for example modify the lines of the filterToolbar method from 

if(soptions.clearSearch) {
    $("td:eq(2)",stbl).append("<a title='Clear Search Value' style='padding-right: 0.3em;padding-left: 0.3em;' class='clearsearchclass'>x</a>");

to

if(soptions.clearSearch) {
    $("td:eq(2)",stbl).append("<a title='Clear Search Value' style='padding-right: 0.3em;padding-left: 0.3em;' class='clearsearchclass'>x</a>");
} else {
    $("td:eq(2)", stbl).hide();

Best regards
Oleg

P.S. I posted the simple pull request. Please Tony take a look in it.

04/11/2013
18:53
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

Oleg,

Thanks.

Best Regards

Tony

P.S. I have merged your pull request

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.

12/11/2013
17:13
Avatar
lorife
Member
Members
Forum Posts: 15
Member Since:
01/04/2010
sp_UserOfflineSmall Offline

thank you all.

lorenzo

19/11/2013
12:09
Avatar
Adriien M
France
Member
Members
Forum Posts: 9
Member Since:
05/06/2013
sp_UserOfflineSmall Offline

Hello,

Thanks for the feature implementation!

It works perfectly, however, the title isn't internationalized, indeed it's hardcoded with the value "Clear Search Value".

It's not really a problem, I change the title on the GridComplete event but it would be nice to add a translation for others languages or simply use the 'Reset' translation…

Regards

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

Currently Online:
28 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