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
filterToolbar and datatype: local
01/08/2010
15:57
Avatar
flack
Member
Members
Forum Posts: 5
Member Since:
01/08/2010
sp_UserOfflineSmall Offline

Hi!

I'm trying to get a filtertoolbar working with datatype: local, but so far I had no luck.

Here are the options I'm using:

var open_tasks_grid_entries = []; //lots of entries that are useless to copy n paste
var start_height = 500; //dynamically calculated
        jQuery("#open_tasks_grid").jqGrid({
              datatype: "local",
              data: open_tasks_grid_entries,
              colNames: [], //colnames removed for better readability 
              colModel:[
                {name:'id', index:'id', hidden:true, key:true},
                {name:'index_task', index:'index_task', hidden:true},
                {name:'task', index: 'index_task', width: 100},
                {name:'index_project',index:'index_project', hidden:true},
                {name:'project', index: 'index_project', width: 80},
                {name:'index_priority',index:'index_priority', sorttype: "integer", hidden:true},
                {name:'priority', index: 'index_priority', width: 60, align: 'center', fixed: true},
                {name:'index_customer', index: 'index_customer', hidden:true},
                {name:'customer', index: 'index_customer', width: 60},
                {name:'index_agreement', index: 'index_agreement', hidden:true},
                {name:'agreement', index: 'index_agreement', width: 80},
                {name:'manager', index: 'manager', width: 60},
                {name:'index_start', index: 'index_start', sorttype: "integer", hidden: true },
                {name:'start', index: 'index_start', width: 80, align: 'center', fixed: true},
                {name:'index_end', index: 'index_end', sorttype: "integer", hidden: true },
                {name:'end', index: 'index_end', width: 80, align: 'center', fixed: true},
                {name:'index_reported', index: 'index_reported', hidden:true},
                {name:'reported', index: 'index_reported', width: 60, align: 'right'}
             ],
            pager : "#p_open_tasks_grid",
            autoWidth: true,
            height: start_height,
            forceFit: true,
            shrinkToFit: true,
            hoverrows: true,
            loadonce: true,
            altRows: true,
            altclass: 'even',
            caption: "open tasks",
            footerrow: true,
            scroll: 1,
            sortname: 'id',
            viewrecords: true,
            sortorder: "asc"
         });

        jQuery("#open_tasks_grid").jqGrid('footerData', 'set', [""]); //removed for better readability

        jQuery("#open_tasks_grid").jqGrid('filterToolbar',{stringResult: true,searchOnEnter : false}); 

With this, the grid doesn't get populated (instead I see the "Loading" message indefinately). If I remove the sortname: 'id' option, the grid loads fine and I also see the filtertoolbar, but it doesn't do anything when I enter text.

Where did I go wrong?

====

Update: I just saw in Firebug that when I type something in the filtertoolbar, the DOM of the table rows seems to get updated, but it still completely ignores my input, except in the field "manager". The only one that doesn't have a separate index. Does that mean that local filtering only works if you don't have a separate index defined?

I'm using 3.7.1 BTW

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

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