Simon Bauman
Posts: 0
Joined: Wed Oct 16, 2013 9:50 pm

Proper way to to show/hide a grid (and it's contents)

I'm having an issue where I have a grid setup on a page that is not visible by default but I want to make visible (and it's contents) onload.

I'm testing in Chrome and Firefox and it seems like firefox works as expected with ().show but Chrome doesn't. (I've tried clearing cache etc.) My question is, what is the proper way to show/hide a grid (and it's contents)

Here's what I've tried in my onload javascript:

ONLOAD:
Appery('sanity_grid').show(); // doesn't work
Appery('sanity_grid').css("display", "block"); // works
$('[dsid=sanity_grid]').show(); //doesn't work

Lastly, when I run this test directly under the code below, I always get, 'sanity grid is not visible'.

if ( Appery("sanity_grid").is(":visible") ) {
alert ('sanity grid is visibly');
} else {
alert ('sanity grid is not visible');
}

Thanks!

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

Proper way to to show/hide a grid (and it's contents)

Hi Simon,

We've tested this. Appery('sanity_grid').show(); should work.

Are there any console errors? Please share the app with a href="mailto:support@appery.io" rel="nofollow"support@appery.io/a

Simon Bauman
Posts: 0
Joined: Wed Oct 16, 2013 9:50 pm

Proper way to to show/hide a grid (and it's contents)

No console errors. The project is shared. I found that going to the page directly does show the grid however, the is(":visible") still fails. When accessing the page through an onclick button from a different page, the grid does not show.

Sanity Check page:

Previous page (click the "Details" button):

Alena Prykhodko
Posts: 0
Joined: Tue Apr 09, 2013 7:36 am

Proper way to to show/hide a grid (and it's contents)

Hi Simon,

Please try on Page show event instead of Load event.

Simon Bauman
Posts: 0
Joined: Wed Oct 16, 2013 9:50 pm

Proper way to to show/hide a grid (and it's contents)

Works! Thanks you!

Return to “Issues”