T
|
Tim 7/6/2022 |
Maybe I'm missing something, but this doesn't make much sense to me. There is no "save" button on a list page, unless you're doing an inline edit/add. Are you saying that you want to select a record, and then click a button that is at the top of the list grid and use the ID of the selected row? If so, this might help: https://xlinesoft.com/asprunnernet/docs/update_multiple_records.htm Instead of creating a button in a fake field, just use the built in checkbox to select the record. But maybe I'm not understanding what you're trying to do. Tim |
R
|
Rajesh author 7/6/2022 |
Hi Tim, I am replacing a legacy application which selects only one record out of multiple records from a table(currently only 5 records in that table) on a page which shows up as a radio button, meaning only one record can be selected out of all records. And there is a button on the bottom of the page which calls a stored procedure with the current record ID and the current user logged in. Here is what I thought could be a solution. Create a list page on runner and somehow select one record (by creating a button and a click on it), pass on the record ID to a custom button (outside of the grid) and this custom button would call the stored procedure with record ID and current sesion user. I thought of list page instead of edit because there is nothing being changed in the grid, it is the custom button outside of the grid which calls the stored procedure |
![]() |
Sergey Kornilov admin 7/6/2022 |
I'm also not sure if the list page here any better than, for instance, an Edit page, with a lookup wizard. Anyway, there is no need to use a fake field. You can simply add a button to one of the grid's cell and have an easy access to the underlying record data. See code examples in this article. |
R
|
Rajesh author 7/6/2022 |
Thanks, |
![]() |
Sergey Kornilov admin 7/6/2022 |
Yes, you can use a session variable for data exchange. This is what session variables are for. I also think that posting a screenshot of that page would be benefetial. We need to understand the relationship between the elements on that page. |
R
|
Rajesh author 7/6/2022 |
|
![]() |
Sergey Kornilov admin 7/7/2022 |
It makes more sense but I see two potential issues here
|
T
|
Tim 7/7/2022 |
How about just using an edit page. On each row there will be an edit button (which you can re-lable however you want) and the edit page could be a popup window that just said something like "Just ran the stored procedure" and would have a "return to list" button. And then in the "Before display" event of the edit page you can run the stored procedure and should be able to get the data you need to pass. Or, if you wanted to verify before you run the SP, the edit page could have a save button and you could run the SP in the "Before record updated" event and have it "return false". Or you could have the edit button run the SP and just return to the list page. The idea is that, with the edit page, you should have access to that row's data and can run the SP without actually editing the DB. Just a thought. Thanks, |