Get field contents on row click for custom sql grid

Use this board to ask questions or have discussions with other Rich Displays users.
Post Reply
Bryan641
Profound User
Posts: 72
Joined: Fri Oct 01, 2010 5:07 pm
First Name: Bryan
Last Name: Leaman
Company Name: InVue Security
Phone: 704-752-6513 x221
Address 1: 15015 Lancaster Hwy
City: Charlotte
State / Province: North Carolina
Zip / Postal Code: 28277
Contact:

Get field contents on row click for custom sql grid

Post by Bryan641 »

I see that I can get the row number in the grid events using the "row" variable, but is there a way to reference the data from one of the columns using this row variable when the grid is a database-driven grid? For example, the file key happens to be the first field in my custom sql, and I'd like to store that value in a hidden field so I can return to my program and know which key was selected, not which row number.

--Bryan
Bryan641
Profound User
Posts: 72
Joined: Fri Oct 01, 2010 5:07 pm
First Name: Bryan
Last Name: Leaman
Company Name: InVue Security
Phone: 704-752-6513 x221
Address 1: 15015 Lancaster Hwy
City: Charlotte
State / Province: North Carolina
Zip / Postal Code: 28277
Contact:

Re: Get field contents on row click for custom sql grid

Post by Bryan641 »

I was able to change my sql statement to include an additional column of row# using rank() over(order by ...) and then after grabbing the row# from the double-click I can store that in a hidden field and return to the program for processing, where it uses the row# to get the same record that was in the grid ... unless someone has added or deleted a record between when the grid was populated and the double-click.

A little clumsy, but still less code than the a page-at-a-time subfile logic.

--Bryan
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 4 guests