Sigma Php Ajax framework, Ajax Components, GUI Builder
February 11, 2012, 05:38:11 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: load a grid on button click  (Read 640 times)
sotya
Newbie
*
Posts: 3


View Profile
« on: July 09, 2010, 06:42:01 PM »

hi
im absolutely new to javascript
i have this issue:
when i tried to load the grid directly after the page load with javascript/JQuery function like this:



it loads successfully.

but when i remark the JQuery document ready function and call the loadMyGrid function from HTML button click event like this:



it didnt work, the grid wont load at all!
why is that?
Can someone give me a working example/or suggestion of how to load a grid on HTML button click event, but WITHOUT pre-loading it for the first time when the document is Loaded?

thanks
sotya
« Last Edit: July 09, 2010, 06:47:44 PM by sotya » Logged
sotya
Newbie
*
Posts: 3


View Profile
« Reply #1 on: July 16, 2010, 07:17:39 PM »

hi. just wanna info you guys
i found a solution after reading this thread:
http://sigmawidgets.com/forum/ajax-data-grid-view/create-and-render-grid-in-an-onclickcell-function-of-another-grid

it is very simple actually but give me headache just to find out..
it is: mygrid.render();

so my complete code to load the grid on button click would be:


ps. this is just my suggestion, i think the live demo code should not use Sigma.Util.onLoad(Sigma.Grid.render(mygrid));, it confuse newbie javascript developer (like me... hahaha...) , rather call the grid's render method directly, mygrid.render();

anyway, your grid is the best on the net!

thank you.
« Last Edit: July 16, 2010, 11:24:49 PM by sotya » Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.7 | SMF © 2006-2008, Simple Machines LLC Valid XHTML 1.0! Valid CSS!