In building grid component for desktop, i was guided by Selwyn to use the session variable, these work very well for me in my test.
OnGridInitialize event, i have these codes to override the sql connection string within the grid componenet builder, allowing to change sql server ip address on the fly, this is very useful, consider you develop your grid on your local notebook while away from the main server, then when arriving in office, you simply change the ip address in a variable and expect your grid component to work against the real data instantly.
function OnGridExecute as v (e as p)
e.rv.Session.server = "192.168.1.15" .... i want this change to equal desktop variable, the sample now fixed with the ip address
e.rv.Session.user = "sa"
e.rv.Session.password = "alpha5v7"
dim sn as c
sn = e.rv.session.server
dim un as c
un = e.rv.session.user
dim pw as c
pw = e.rv.session.password
e.tmpl.cs.connectionstring = "{A5API='SQLServer',Server='"+sn+"',A5ANSINullPadWarn=Default,UserName='"+un+"',\
Password='"+pw+"',Database='logistic',A5LoginTimeout=15}"
end function
question here ???
how do i make my "ordinary desktop variable" visible by the grid event. for example....
e.rv.Session.server = "192.168.1.15" replace to become...
e.rv.Session.server = my desktop variable
i don't seems to understand well, i know these desktop versus web variables are not connected. There got to be way to let web or grid component to use my desktop variable.
Considering that i am not using web, i am still 100% using desktop with the new "grid component on desktop" feature.
appreciate any guidance, Thanks
Ken Tjia
Extract from the "events sample"
function OnGridInitialize as v (e as p)
'This event fires when the Grid is initialized. It also fires when the Grid is
're-initialized after a session has expired.
'e.tmpl - component definition
'e.rv - Request Variables (allows you to get at page variables and session variables - e.g. e.rv.var1, e.rv.session.sessionvar1)
'e.rv.Session - session variables. TIP: To set a session variable: e.rv.Session.myNewSessionVariable = "Alpha"
'e.rtc - Run-time calculations (allows you to pass data to other event handlers)
'Example:
'Define a list for a drop-down box
'e.rtc.list1 = comma_to_crlf("Red,Green,Blue")
end function
OnGridInitialize event, i have these codes to override the sql connection string within the grid componenet builder, allowing to change sql server ip address on the fly, this is very useful, consider you develop your grid on your local notebook while away from the main server, then when arriving in office, you simply change the ip address in a variable and expect your grid component to work against the real data instantly.
function OnGridExecute as v (e as p)
e.rv.Session.server = "192.168.1.15" .... i want this change to equal desktop variable, the sample now fixed with the ip address
e.rv.Session.user = "sa"
e.rv.Session.password = "alpha5v7"
dim sn as c
sn = e.rv.session.server
dim un as c
un = e.rv.session.user
dim pw as c
pw = e.rv.session.password
e.tmpl.cs.connectionstring = "{A5API='SQLServer',Server='"+sn+"',A5ANSINullPadWarn=Default,UserName='"+un+"',\
Password='"+pw+"',Database='logistic',A5LoginTimeout=15}"
end function
question here ???
how do i make my "ordinary desktop variable" visible by the grid event. for example....
e.rv.Session.server = "192.168.1.15" replace to become...
e.rv.Session.server = my desktop variable
i don't seems to understand well, i know these desktop versus web variables are not connected. There got to be way to let web or grid component to use my desktop variable.
Considering that i am not using web, i am still 100% using desktop with the new "grid component on desktop" feature.
appreciate any guidance, Thanks
Ken Tjia
Extract from the "events sample"
function OnGridInitialize as v (e as p)
'This event fires when the Grid is initialized. It also fires when the Grid is
're-initialized after a session has expired.
'e.tmpl - component definition
'e.rv - Request Variables (allows you to get at page variables and session variables - e.g. e.rv.var1, e.rv.session.sessionvar1)
'e.rv.Session - session variables. TIP: To set a session variable: e.rv.Session.myNewSessionVariable = "Alpha"
'e.rtc - Run-time calculations (allows you to pass data to other event handlers)
'Example:
'Define a list for a drop-down box
'e.rtc.list1 = comma_to_crlf("Red,Green,Blue")
end function
Comment