You are here:   IndooGrid > Indoogrid URL Parameters 2
  |  Login
 Passing URL Parameters 2 Minimize

Another way to pass parameters (field variables)  from one grid to another.....
Jill Johnson, 5/16/2009

Indoogrid seems to have several ways of doing just about everything.   Here's another way of passing variables around.  It's simple once you get the hang of it.

Here's a link to this tutorial in PDF format for downloat.

Here's a way to send values entered in one grid to a second grid on another page.   This tutorial will create a hyperlink in grid 1 that, when clicked, passes several variables to a second grid as URLparameters.

The first grid has several fields.  
Some text (Click to pass) and the value of the primary key of the first grid (mySendID) will be displayed as a hyperlink to a second grid that willl display variable from the first grid and save them in a second table.

 

 By selecting one of the hyperlinks, the data in the selected record is passed to a second grid.

 


This image shows the data from the first (sending) grid that is passed and displayed in the second (receiving) grid.

 
 

This is the table structure of the sending grid.

 

 
This is the table structure of the receiving grid.

 

 

PREPARE THE SENDING GRID

1.  Set up a sending grid for  viewing and entering data.


2.  Select the table, specify the primary key and add all columns.    
3.  Under GridView, check 'insert' and 'edit'.



4.  Under the GridView list of columns, Select the column that you want to be the hyperlink.   
In this case, I'm using mySendID, which is the primary key of the sending grid.



5.  Click on the blue pencil to the right of the column name

6.  On the first screen after selelcting the hyperlink column, toward the bottom of the page, set  'Show data for more columns (custom HTML)', to '2-editor'.

 

7.  The next screen will be a text box editor where you enter whatever  you want the hyperlink to look like.  It can be text, an image or the value of the column.    In this example, I am making the link  say 'Click to pass' followed by the value of the mySendID field.   

8.  Type any text to be included  in your link.  In this case, the text 'Click to pass' was entered..


9.  To use the actual value of the column as the hyperlink, drag the field from the list on the right on to the text edit box.

 

10.  Highlight the text or field name that you want to be the hyperlink and then click the hyperlink button.


 

11.  Enter the URL link to the page where the second grid exists, and add the parameters to the end of the URL.



The right side of this URL below shows syntax for sending  mySendID, surname, dob and weight from grid one to grid two as URL parameters.

 

 You can use just text, images, or the value of the column as the visible hyperlink. You do not have to use all 3.

12.  After continuing through all the dialogs back to the table setting page, a '2'  will appear when the option for data for more columns (custom HTML)', select  '2-editor'. has been selected for a column.




PREPARE THE RECEIVING GRID


This is what you need to do to prepare the receiving grid to accept the parameters that have been passed.

1.  Set up a grid for editing (and viewing, if you want).

2.  Select the receiving table, primary key, and set the gridView to insert and edit.

 

 

3.  Set the GridEdit to 'Insert'.



There needs to be a colum with the name of the parameter that is being sent.  Each column receiving a parameter has to be set to receive parameters.   

4.  Click on the blue pencil on the right side of the column list for a column receiving a parameter.



5.  Accept the defaults on the first screen and click Next.

 

6.  On the next screen, check 'Allow URL input' and 'Use field value as default value only'.   You must do this for each variable that is passed from grid to grid.



7.  Accept the defaults on the next screen and click Next.

If you fail to check ''Allow URL input' , the parameter will not be displayed (see left)......whereas, if you do check it, the parameter will be displayed (right). 

  

That's it. 



If you have the URL parameters specified correctly, and you have the receiving column set to accept the URL parameters, the behavior you should see is..... select the hyperlink you set up in grid one and.....

 

The parameters passed will display in the receiving grid. 

 

Just one of several ways of passing parameters from page to page, grid to grid.