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
Search events
02/04/2009
15:58
Avatar
kritro
Member
Members
Forum Posts: 5
Member Since:
02/04/2009
sp_UserOfflineSmall Offline

I cant get search events like onInitializeSearch og afterShowSearch working. I try to use a datepicker in the search form. I use the search button in the navigator and have configured it like this.

{
            sopt:['cn','bw','eq','ne','lt','gt','ew'],
            onInitializeSearch : function(id) {
                //alert('jad');
                                       $("#sval".id).datepicker({
                                                        showOn: 'focus'
                                          });
            }
        } // search options );

I use jqgrid 3.4.3 and I read that this should work as from 3.4.

I just started using this so I'm no expert and was wonder if I'm using it right.

kritro

03/04/2009
02:20
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

I think it should be:

$(”#sval”).datepicker({...});

The .id is not needed, but you will have datepicker every time click in this field, instead that you select another. If you have only one field to search this is ok, but it will make some confusions if you serarch on more than one field.

Regards

Tony

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.

03/04/2009
03:49
Avatar
kritro
Member
Members
Forum Posts: 5
Member Since:
02/04/2009
sp_UserOfflineSmall Offline

Thanks for the reply!

I know this would be a problem, but I was planning to if I could solve this some way or another, but maby its not possible.

The problem now is that the event is not triggered at all. If I do an alert

onInitializeSearch : function() {
                alert('jad');
            }

nothing happens when running the search form.

Is there maby another way to make it possible to search on date field with datepicker. Maby I can make my own search form for this.

03/04/2009
06:50
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

Which version do you use? There was a bug in previous versions. Use the last stable

Regards

Tony

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/04/2009
09:52
Avatar
kritro
Member
Members
Forum Posts: 5
Member Since:
02/04/2009
sp_UserOfflineSmall Offline

Thanks

I use 3.4.3. I will try with 3.4.2 and see what that does.

kritro

14/04/2009
18:28
Avatar
auz1111
Member
Members
Forum Posts: 3
Member Since:
14/04/2009
sp_UserOfflineSmall Offline

Is there maby another way to make it possible to search on date field with datepicker. Maby I can make my own search form for this.


I was wondering if this is possible also. I would like to be able to search on a date column, but do not know if this is possible. Is this already a feature?

16/04/2009
02:49
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

I consider this to be included in 3.5 version

Regards

Tony

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.

30/04/2009
08:29
Avatar
snobo
Member
Members
Forum Posts: 34
Member Since:
05/03/2009
sp_UserOfflineSmall Offline

tony said:

Hello,

Which version do you use? There was a bug in previous versions. Use the last stable

Regards

Tony


I use the last stable (3.4.3) and the usage of three event callbacks is impossible due to, AFAIU, a bug in grid.formedit.js:

if ( $.isFunction('onInitializeSearch') ) { p.onInitializeSearch( $("#srchcnt"+gID) ); };
if ( $.isFunction('beforeShowSearch') ) { p.beforeShowSearch($("#srchcnt"+gID)); };
if($.isFunction('afterShowSearch')) { p.afterShowSearch($("#srchcnt"+gID)); }

These checks always fail... Must have been

if ( $.isFunction(p.onInitializeSearch) )

etc... Correct?

05/05/2009
08:08
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello snobo,

Thanks for this. Fixed.

Regards

Tony

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.

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

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