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
Show jqgrid by clicking a button
01/12/2009
22:37
Avatar
edgar9000
Member
Members
Forum Posts: 14
Member Since:
22/08/2009
sp_UserOfflineSmall Offline

I'm using the jqgrid but I want to show it by clicking a button, I mean if a select some paramaters it change the content of the grid, I have used a button with a onclick event that call the jqgrid but the problem is that it just works in the first time, if I want to change some parameter and show the jqgrid again it doesn't update the content. There is some way I can reload the url where I get the data by clicking a button??

There is the code I'm using:

$(function() {

function showGrid() 
        {       
                      
            jQuery("#informesTable").jqGrid({
              url: 'showInfo.php',
              datatype: 'json',
              width:850,
              height:'auto',
              mtype: 'GET',
              colNames: ['Id', xxx', 'xxx', 'xxx', 'xxx', 'xxx' , 'xxx' , 'xxx'],
              colModel: [
                            { name: 'Id', index: 'Id', width: 40,hidden:true, align: 'left', editable:false},
                            { name: 'xxx', index: 'xxx', width: 120,align: 'left', editable:false},
                            { name: 'xxx', index: 'xxx', width: 40,align: 'left', editable:false},
                            { name: 'xxx',index:'xxx', width: 130,editable: false},
                            { name: 'xxx',index:'xxx', width: 130,editable: false},
                            { name: 'xxx',index:'xxx', width: 150,editable: false},
                            { name: 'xxx',index:'xxx', width: 100,editable: false},
                            { name: 'xxx',index:'xxx', width: 80,editable: false}
                         ],
              pager: jQuery('#pager'),
              rowNum: 10,
              rowList: [10, 15, 30, 50],
              sortname: "ID",
              sortorder: "desc",
              loadonce: true,
              multiselect: true,
              viewrecords: true,
              editurl: 'EditData.php',  
              imgpath: '/content/images',
              caption: 'Infol'
          });
         
        jQuery("#pager").jqGrid('navGrid',"#pager",{edit:false,add:false,del:false});
               
        }

$("#send").click(function(event){       
    
                showGrid();
                   
        });   

        });    

Thanks in advance...

02/12/2009
10:26
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

Look here:

http://www.trirand.com/blog/?p.....s-and-json

You have the same problem

Reagrds

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