Custom button in record to show customer data |
11/23/2021 10:17:45 PM |
ASPRunner.NET General questions | |
E
erosolmi author
Hi, I have a grid of customer data. If I create a link field in the grid that directly open the link all is working fine If I try to add a custom button in the grid for each record to have a popup window following indications here https://xlinesoft.com/blog/2016/07/07/displaying-a-popup-in-phprunner-9-0-asprunnerpro-9-5-asprunner-net-9-0/ "SHOW 'VIEW CUSTOMER' BUTTON ON EACH ROW OF ORDERS LIST PAGE" button is OK but when I click it always shows a popup with the link contained in the first record of the grid. It seems it is not getting current record. What can I check? |
|
![]() |
Admin 11/29/2021 |
In button's Server code use getCurrentRecord function to access the data of the current record. |
E
|
erosolmi author 11/29/2021 |
Yes, I used getCurrentRecord and followed examples but no way to get the link of the current record, always of the first record. At some time I thought that the page is not working because it contains many deleted button tentative I did: when I add a new button it ask if I want to "insert or copy an existing one" listing all my previous tentative buttons. And maybe building the project is influenced by some code removed. I'm using ASPRunner.NET Enterprise 10.6 build 38243 |
![]() |
Admin 11/29/2021 |
Just in case make sure that this table has a correct key column selected. If getCurrentRecord() always points to the first record in the table this may point to the issue with the key column. Unused/deleted buttons are unlikely to be an issue. |
E
|
erosolmi author 11/30/2021 |
Maybe you got it. Table is a CustomView connected to a MSSQL View. There is a field that is an unique ID. But when I go to "Pages" in AspRunner "Choose key columns" has no fields inside it to choose from. |
![]() |
Admin 11/30/2021 |
This sounds strange and I think you need to contact support directly to resolve this. |