Source language: Translate to:

Refresh Grid

Questions about our Advanced Database plug-in

Moderator: Neosoft Support

Refresh Grid

Postby asawyer13 » Wed Apr 06, 2011 10:59 am

Okay, I have a dbpgrid on a page. I have a button on the Master Page that takes me to the page that has the grid.

My question is, I have data in the grid, but it the data is changed in the deatabase (not using NB app), I want the grid to essentially refresh so it has the newest data. When I click on the button to go to the page with the grid, it doesn't appear to do the query again, I'm assuming because it's already on the page.

Can I put something on the Page Enter or something so that the grid will refresh? Or maybe in the button code?

Alan
asawyer13
 
Posts: 123
Joined: Sun Aug 22, 2010 6:13 pm

Postby Gaev » Wed Apr 06, 2011 11:54 am

Alan:

Perhaps you should consider dbpCloseTable in the PageExit section of the page housing the Grid ... and dbpOpenTable (followed by the commands to render the Grid) in the PageEnter section of the same page.
User avatar
Gaev
 
Posts: 3716
Joined: Fri Apr 01, 2005 7:48 am
Location: Toronto, Canada

Postby asawyer13 » Wed Apr 06, 2011 12:07 pm

I have tried that but it didn't help.

According to the Actions screen in the debugger, if I'm in Page1, and my button says gotopage Page1, then it doesn't actually do anything.. so the PageEnter and PageExit events never fire.

Alan
asawyer13
 
Posts: 123
Joined: Sun Aug 22, 2010 6:13 pm

Postby asawyer13 » Wed Apr 06, 2011 12:45 pm

What I have done for now is create a page called Refreshing that just has a Label that displays refreshing data, then on my Master Page button,
I gotopage "Refreshing" and then gotopage "mypagewithgrid"

It may not be the most elegant solution but it works until I find something better.

Alan
asawyer13
 
Posts: 123
Joined: Sun Aug 22, 2010 6:13 pm


Return to NeoBookDBPro

Who is online

Users browsing this forum: No registered users and 3 guests