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
Pager Not Showing
09/09/2008
10:21
Avatar
michael_echlin
Member
Members
Forum Posts: 3
Member Since:
29/07/2008
sp_UserOfflineSmall Offline

Hi

I must be missing something obvious. But I have an  intermittent problem

with the pager not showing, in the main grid and never in the sub grid. Works fine on my other pages:-

// JavaScript Document
$(document).ready(function(){
$("#editusergrid").jqGrid({
       url:'inc/asp/ajaxGridUserAdd.asp',
    pager: jQuery('#edituserpagergrid'),
    datatype: "xml",
       colNames:['ID', 'UserName', 'FirstName', 'LastName', 'Password', 'Salary', 'Admin?', 'Active?'],
       colModel:[
           {name:'UserID',index:'UserID', width:60,editable:false,editoptions:{readonly:true,size:10}},
           {name:'UserName',index:'UserName', width:100,editable:true,editoptions:{size:25},editrules:{required:true}},
           {name:'FirstName',index:'FirstName', width:100,editable:true,editoptions:{size:25},editrules:{required:true}},
        {name:'LastName',index:'LastName', width:100,editable:true,editoptions:{size:25},editrules:{required:true}},
        {name:'Password',index:'Password', width:100,editable:true,editoptions:{size:25},editrules:{required:true}},
        {name:'Salary',index:'Salary', width:70,editable:true,editoptions:{size:10},editrules:{required:true,number:true}},
        {name:'Admin',index:'Admin', width:100,editable:true,edittype:'select',editoptions:{value:"True:True;False:False"}},
        {name:'Active',index:'Active', width:100,editable:true,edittype:'select',editoptions:{value:"True:True;False:False"}}],
    height: "100%",
    pgbuttons: false,
    pginput: false,
    editurl: 'inc/asp/ajaxUserEditAdd.asp',
    imgpath: 'inc/themes/basic/images',
    subGrid: true,
    subGridRowExpanded: function(subgrid_id, row_id) {
        var subgrid_table_id, pager_id;
        subgrid_table_id = subgrid_id+"_t";
        pager_id = "p_"+subgrid_table_id;
        $("#"+subgrid_id).html("<table id='"+subgrid_table_id+"' class='scroll'></table><div id='"+pager_id+"' class='scroll'></div>"); jQuery("#"+subgrid_table_id).jqGrid({
    url : 'inc/asp/ajaxGridUserAddSubGrid.asp?q='+row_id,
    datatype: "xml",
    height: "100%",
    pgbuttons: false,
    pginput: false,
    imgpath: 'inc/themes/basic/images',
    colNames : ['ID', 'Job', 'Salary'],
    colModel : [
            {name:"ID", index:"ID", width:80,editable:false},
            {name:"Job", index:"Job", width:300,editable:false},
            {name:"Salary", index:"Salary", width:80,editable:true,editoptions:{size:10},editrules:{required:true,number:true}}
            ]
        }).navGrid("#"+pager_id,{edit:true,add:false,del:false,search:false})
    },
    subGridRowColapsed: function(subgrid_id, row_id) {
    // this function is called before removing the data
    //var subgrid_table_id; //subgrid_table_id = subgrid_id+"_t";
    //jQuery("#"+subgrid_table_id).remove(); }
    }
    }).navGrid('#edituserpagergrid',{edit:true,add:true,del:false,search:false});
});

Any help greatly appreciated.

10/09/2008
06:34
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

I sugest you to try first without subgrid. See if the pager is present, and the step by step include your code

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