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_Related Related Topics sp_TopicIcon
Where is the "filters" param
02/04/2010
11:48
Avatar
davykiash
Member
Members
Forum Posts: 6
Member Since:
05/02/2010
sp_UserOfflineSmall Offline

Am rather new to jqgrid and I have been going through the documentation.
In the search_adv.php I see

$searchstr = Strip($_REQUEST['filters']);

However in my post values on firebug I see and I cant find the "filters" param.

_search         true
nd              1270148130165
page            1
rows            10
searchField     income_types_desc
searchOper      eq
searchString    5
sidx            income_types_desc
sord            asc

What am I missing in my script?

<div class="fikket_grid span 14 last">            
    <!-- the grid definition in html is a table tag with class 'scroll' -->
    <table id="list" class="scroll" cellpadding="0" cellspacing="0"></table>
    <!-- pager definition. class scroll tels that we want to use the same theme as grid -->
    <div id="pager" class="scroll" style="text-align:center;"></div>                
</div>

<script type="text/javascript">
    $(document).ready(function(){
        $("#list").jqGrid({
            width: 900,
            height: 240,
            autowidth: false,
            rownumbers: true,
            rownumWidth: 40,
            url:'<?php echo $this->baseUrl() ?>/incometypes/list',
            datatype: 'json',
            mtype: 'POST',
            colNames:['ID','Description','Budget Amount','Budget Period'],
            imgpath: '<?php echo $this->baseUrl() ?>/js/themes/coffee/images',
            colModel :[
                {name:'id', index:'id',
                    width:10,
                    hidden:true
                },                
                {name:'income_types_desc', index:'income_types_desc',
                    width:50,
                    sortable:true,
                    editable:true,
                    editoptions:{size:20}
                },
                {name:'income_types_budgetamount', index:'income_types_budgetamount',
                    width:30,
                    sortable:true,
                    editable:true,            
                    editoptions:{size:20},
                    search:true,
                    searchoptions:{sopt:['eq','ne','lt','le','gt','ge']}                    
                },
                {name:'income_types_budgetperiod', index:'income_types_budgetperiod',
                    width:40,
                    sortable:true,
                    editable:true,
                    edittype:"select",
                    editoptions:{value:"<?php echo $values?>"}                                        
                }
            ],
            pager: $('#pager'),
            rowNum:10,            
            rowList:[10,20,30],
            sortname: 'income_types_desc',
            sortorder: "asc",
            viewrecords: true,
            viewsortcols: [true,'horizontal',true],
            gridview: false,
            hidegrid: false,
            editurl:"<?php echo $this->baseUrl() ?>/incometypes/edit",
            caption: 'Define Your Various types of Income',
            forceFit : true
        });                    
               
        $("#list").jqGrid('navGrid','#pager',                                
                {add:true,addtext:'Add',edit:true,edittext:'Edit',del:true,deltext:'Delete',search:true,searchtext:'Search',refresh:true,refreshtext:'Refresh'},                
                {url:'<?php echo $this->baseUrl() ?>/incometypes/edit',
                closeAfterEdit:'true'},
                {url:'<?php echo $this->baseUrl() ?>/incometypes/add',
                closeAfterAdd:'true'},                                                               
                {url:'<?php echo $this->baseUrl() ?>/incometypes/delete',closeAfterAdd:'true'},
                {closeOnEscape:true, multipleSearch:true, closeAfterSearch:true },
                {multipleSearch:true} // search options                                        
              );    
    });

</script>

03/04/2010
17:59
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

Yes the default search is a single search. You missed to see the code on how the multiple Search should be set - in the same example.

(Instead use multipleSearch set to true)

Best 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:
43 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