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
date input in toolbar-searching
25/05/2010
15:03
Avatar
waiting
Member
Members
Forum Posts: 40
Member Since:
22/12/2008
sp_UserOfflineSmall Offline

i set a col by this:

            {name: 'starttime', index:'starttime', width: 100, fixed:true, editable:false, align:'center', title: false,
                searchoptions: {sopt: xxxx,
                    dataInit: function(el){    $(el).datepicker();    }
                }
            },

use toolbar searching, i click it then datepicker dialog appear, when i choose a date the datepicker dialog disappear but searching not excute. I have to click cell again , press Enter (this time datepicker dialog exists) to trigger the toolbar searching.

can it do action like select-cell (stype: 'select') ?

30/05/2010
12:36
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

Try to use

searchOnEnter : false

in the filterToolbar method.

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.

31/05/2010
11:02
Avatar
waiting
Member
Members
Forum Posts: 40
Member Since:
22/12/2008
sp_UserOfflineSmall Offline

Hi tony,

It not work with:

  {name: 'starttime', index:'starttime', width: 100, fixed:true, editable:false, align:'center', title: false,
    searchoptions: {sopt: xxxx,

      autosearch: true,

      searchOnEnter: false,
       dataInit: function(el){    $(el).datepicker();    }
    }
  },

It  says:

autosearch boolean Search is performed according to the following rules: for text element when a Enter key is pressed while inputting values and search is performed. For select element when the value changes. The search parameter in grid is set to true and ajax call is made.

in the page http://www.trirand.com/jqgridw....._searching. and Default is true.

I found even in normal txt cell, autosearch also not work when typing char, must use ENTER:

 {name: 'name', index:'name', width: 250, editable: true,

       searchoptions:{sopt: xxx, searchOnEnter: false, autosearch: true},
       formatter:'showlink', formatoptions: {baseLinkUrl:'download.php', target: '_blank'}
 },

this occurs whit version 3.65,3.64. without 3.62. but with v3.63 this no works yet:

 {name: 'issue_date', index:'issue_date', width: 100, fixed: true, editable: false, align:'center', title: false,
         searchoptions: {sopt: ['xxxx'],
                 searchOnEnter : false,
                 autosearch: true,
                 dataInit: function(el){    $(el).datepicker();    }
          }
 },

I have a way to solve the datepick-autosearch problem temporarily:

  {name: 'issue_date', index:'issue_date', width: 100, fixed: true, editable: false, align:'center', title: false,
        searchoptions: {sopt:opt.sopt.num,
              dataInit: function(el){
                      $(el).datepicker( {onClose: function(dateText, inst) { myGrid[0].triggerToolbar(); }} );   // not use onSelect
               }
         }
 },

….

var myGrid = $('#id').jqGrid({…..});

02/06/2010
20:32
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

You put these options in the wrong place. Please read carfully the docs

http://www.trirand.com/jqgridw.....autosearch

These are parts of filterToolbar and not a part from colModel.

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/06/2010
05:40
Avatar
waiting
Member
Members
Forum Posts: 40
Member Since:
22/12/2008
sp_UserOfflineSmall Offline

Hello tony,

text-cell autosearching works with:

myGrid.jqGrid('filterToolbar', {searchOnEnter : true}); or

myGrid.jqGrid('filterToolbar', {});

select-cell autosearching not works yet with:

 {name: 'issue_date', index:'issue_date', width: 100,
     searchoptions: {sopt: ['xxxx'],   dataInit: function(el){  $(el).datepicker(); }  }
 },

var myGrid = $('#id').jqGrid({…..});

myGrid.jqGrid('filterToolbar', {searchOnEnter : false});

best regards

waiting

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

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