I have a standard grid...
1. I create an xbasic function to load session variables i.e
function SetSessionVars(e as p) as c
'debug(1)
dim e.Session.MonitorID as n
dim e.Session.MonitorEmail as c
e.Session.MonitorID = e._currentRowDataNew.ID
e.Session.MonitorEmail = e._currentRowDataNew.Email
end function
2. I create an 'Info' button to run an a5w page which contains the following code
<%A5
a5w_info()
%>
3. I create a "SetVars' button that uses the Ajax call back and runs 'SetSessionVars'
4. I create a third button 'SetRun' that has two actions the first is EXACTLY the same as the above... it then has another action that opens another grid.
When I run the grid and press 'SetVars' then 'Info' and scroll down I can see the session variables are correctly set..
BUT
If I run the grid again then I press 'SetRun' ... you would expect the 'SetSessionVars' is run (it appears to if you enable the debug!)... The new grid is open... I close that grid and press 'Info' the session variables are NOT set... If I run press 'SetSessionVars' before 'SetRun'... then close the newly opened grid and press 'Info' the variables are set..
The onlyway I could get the session variables loaded and the new grid open on the 'SetRun' button was to execute the Ajax callback on 'MouseOver' then open the new grid on 'MouseClick' (Tried MouseDown then MouseClick but that didn't work).... Is this a bug or an I missing something?...
If so what is the 'normal' way to load session variables from one grid for subsequent use in another grid... using an ajax call back on a mouse over to execute the xbasic then the click event to run the new grid is the only was that I have found that works... I am sure there is a 'better' way... Any comments
1. I create an xbasic function to load session variables i.e
function SetSessionVars(e as p) as c
'debug(1)
dim e.Session.MonitorID as n
dim e.Session.MonitorEmail as c
e.Session.MonitorID = e._currentRowDataNew.ID
e.Session.MonitorEmail = e._currentRowDataNew.Email
end function
2. I create an 'Info' button to run an a5w page which contains the following code
<%A5
a5w_info()
%>
3. I create a "SetVars' button that uses the Ajax call back and runs 'SetSessionVars'
4. I create a third button 'SetRun' that has two actions the first is EXACTLY the same as the above... it then has another action that opens another grid.
When I run the grid and press 'SetVars' then 'Info' and scroll down I can see the session variables are correctly set..
BUT
If I run the grid again then I press 'SetRun' ... you would expect the 'SetSessionVars' is run (it appears to if you enable the debug!)... The new grid is open... I close that grid and press 'Info' the session variables are NOT set... If I run press 'SetSessionVars' before 'SetRun'... then close the newly opened grid and press 'Info' the variables are set..
The onlyway I could get the session variables loaded and the new grid open on the 'SetRun' button was to execute the Ajax callback on 'MouseOver' then open the new grid on 'MouseClick' (Tried MouseDown then MouseClick but that didn't work).... Is this a bug or an I missing something?...
If so what is the 'normal' way to load session variables from one grid for subsequent use in another grid... using an ajax call back on a mouse over to execute the xbasic then the click event to run the new grid is the only was that I have found that works... I am sure there is a 'better' way... Any comments
Comment