PDA

View Full Version : Make the data in the gridpanel as a hyperlink to another page



StutiAwasthi
9 Nov 2011, 12:56 AM
Hi all...

I need to make the data present in the gridpanel of a particular column as hyperlink. Example, if the name of the column is REPORT_NO. If you click on any of the report numbers present in this column, its respective report should open. Any ideas? Its kinda URGENT.

netemp
9 Nov 2011, 1:02 AM
You can achieve this by defining a renderer for that column and returning the following from the renderer:



var str = '<a href="url">'+val+'</a>';
return str;


This should resolve the issue.

mitchellsimoens
9 Nov 2011, 5:48 AM
May want to add a target to that a tag to open in a new window/tab

StutiAwasthi
9 Nov 2011, 9:17 PM
Thanks a lot, netemp and Mitchell Simoens! :D