I have a grid column field that receives a text string from the backend RPG program which I have formatted as a URL. The URL displays as text in the grid field, but I would like this to be a clickable link.
How do I show a URL like "http://mywebapp.mycompany.local/receipts/receipt?p=107225289&d=20170510&rt=y" as a clickable link (with text like "Click for Receipt") in the grid column field?
EDIT: Ok, I have the link working, using the following controller action:
Yay, works great! HOWEVER, I'd still like to show the text "Click for Receipt" instead of the URL... can I show Click for Receipt but still have the contents of the grid column field contain the URL as I currently have?
Or, maybe I need to make a dummy field that just contains "Click for Receipt" and show that in the grid, but then use the actual link field SLIP if they click on the dummy field...? Or something like that?
How do I show a URL like "http://mywebapp.mycompany.local/receipts/receipt?p=107225289&d=20170510&rt=y" as a clickable link (with text like "Click for Receipt") in the grid column field?
EDIT: Ok, I have the link working, using the following controller action:
Code:
onFileGridCellClick: function(tableview, td, cellIndex, record, tr, rowIndex, e, eOpts) { //-- When user clicks SLIP field, open the associated link in a new browser window var grid = tableview.up('grid'), headerCt = grid.down('headercontainer'), colName = headerCt.items.getAt(cellIndex).dataIndex; if (colName == 'SLIP') { window.open(record.get('SLIP'), '_blank'); }
Or, maybe I need to make a dummy field that just contains "Click for Receipt" and show that in the grid, but then use the actual link field SLIP if they click on the dummy field...? Or something like that?
Comment