Displaying a particular row of a database in a Data Grid

Charles shared this question 6 years ago
Answered

How do you get a Data Grid to display only a particular row of a database? I have two screens - each with a single Data Grid. On the first screen the Data Grid properly displays two fields for every row in a database. The user should then be able to select any one of these rows bringing them to the second screen with a Data Grid which would display all the fields for the selected row of a database. The problem I am having is that I cannot get the proper row to display. The Data Grid keeps displaying only the first row in the database. I have tried setting variables so that on a page load of the last screen it would pull the correct row, but this does not appear to work. Any thoughts?

Comments (2)

photo
1

First you have to define an on click event on the row of the first data grid that sets that row as the value of a variable. Then, in the second data grid, define an on page load event that sets the value in the variable as the new value for the entire data grid.

photo
1

That works. Would have never thought to load an entire row into a variable. Thanks!