Hi. I hope you can help. I've been programming in Alpha for many years, but I've never used session variables. What I want to do is probably simple, but whatever I've tried hasn't worked:
Here's what I want to do: On a single screen, I have several Grids open (I designed this application more than 7 years ago). They are connected as Parent/Child, BUT the 2 grids where I want to share data are NOT directly connected (one grid is a child to a parent and the other grid is a child to a third grid which is a child of the same parent... I'm not sure that's relevant to what I'm trying to do here, but I thought it would be useful for you to know):
Here's what I want to do: I'd like the user to be able to click a row in Grid A and have a session variable set for one of the fields in that row. Then, I want the user to be able to double-click a field in Grid B and have the value of that session variable inserted. That seems like it would be the easiest way to move the data between the 2 grids.
In Grid A, here are 2 commands in the on-click function:
var1 = {dialog.object}.getvalue('G','TRUCKID',{grid.rowNumber});
alert(var1);
That works PERFECTLY! When I click the row, I get an alert with the TruckID of that row.
So, I tried this.
session.TruckID = {dialog.object}.getvalue('G','TRUCKID',{grid.rowNumber});
... thinking that would set a Session Variable called "TruckID" that I could recall in Grid B. But, it never worked. I don't believe the Session Variable was ever set, but since I've never used session variables, I'm not sure.
In Grid B's double-click event on a textbox, no matter what I tried, I could not insert the TruckID.
I hope this sounds easy to you and you can let me know how to get this working. I'd appreciate any help.
Thanks,
Phil
Here's what I want to do: On a single screen, I have several Grids open (I designed this application more than 7 years ago). They are connected as Parent/Child, BUT the 2 grids where I want to share data are NOT directly connected (one grid is a child to a parent and the other grid is a child to a third grid which is a child of the same parent... I'm not sure that's relevant to what I'm trying to do here, but I thought it would be useful for you to know):
Here's what I want to do: I'd like the user to be able to click a row in Grid A and have a session variable set for one of the fields in that row. Then, I want the user to be able to double-click a field in Grid B and have the value of that session variable inserted. That seems like it would be the easiest way to move the data between the 2 grids.
In Grid A, here are 2 commands in the on-click function:
var1 = {dialog.object}.getvalue('G','TRUCKID',{grid.rowNumber});
alert(var1);
That works PERFECTLY! When I click the row, I get an alert with the TruckID of that row.
So, I tried this.
session.TruckID = {dialog.object}.getvalue('G','TRUCKID',{grid.rowNumber});
... thinking that would set a Session Variable called "TruckID" that I could recall in Grid B. But, it never worked. I don't believe the Session Variable was ever set, but since I've never used session variables, I'm not sure.
In Grid B's double-click event on a textbox, no matter what I tried, I could not insert the TruckID.
I hope this sounds easy to you and you can let me know how to get this working. I'd appreciate any help.
Thanks,
Phil
Comment