HighDots Forums  

Show/Open jqGrid with hiddengrid: true on a click event

jQuery jQuery is a fast, concise, JavaScript Library that simplifies how you traverse HTML documents, handle events, perform animations, and add Ajax interactions to your web pages. jQuery is designed to change the way that you write JavaScript.


Discuss Show/Open jqGrid with hiddengrid: true on a click event in the jQuery forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Massimiliano Marini
 
Posts: n/a

Default Show/Open jqGrid with hiddengrid: true on a click event - 11-04-2009 , 06:29 PM






Hi all,

I'm using jqgrid with: hiddengrid: true, when the page is loaded the
grid is collapsed.

I ask if there's a way to open/show the grid when I made a click event
on a link.

In example:

$("a.show-grid").click(function(e){
//code to open/show the grid which is now collpased.
e.preventDefault();
});

--
Massimiliano Marini - http://www.massimilianomarini.com
"It's easier to invent the future than to predict it." -- Alan Kay

Reply With Quote
  #2  
Old   
Tony
 
Posts: n/a

Default Re: Show/Open jqGrid with hiddengrid: true on a click event - 11-11-2009 , 02:36 PM






Hello,
There is a method for this purpose and your code can look like this
(see documentation at http://www.trirand.com/jqgridwiki/doku.php?id=wiki:methods#add_on_grid_methods
)

$("a.show-grid").click(function(e){
//code to open/show the grid which is now collpased.
$("#mygrid").jqGrid('setGridState','hidden');//or 'visible'
return false;
});

Hope this helps
Tony

On 5 îÏÅÍ, 01:29, Massimiliano Marini <max.linuxt... (AT) gmail (DOT) com> wrote:
Quote:
Hi all,

I'm usingjqgridwith: hiddengrid: true, when the page is loaded the
grid is collapsed.

I ask if there's a way to open/show the grid when I made a click event
on a link.

In example:

$("a.show-grid").click(function(e){
š//code to open/show the grid which is now collpased.
še.preventDefault();

});

--
Massimiliano Marini -http://www.massimilianomarini.com
"It's easier to invent the future than to predict it." š-- Alan Kay

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.