Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

display html anchor tag in htmldatatable

 
Kunjal Shah
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am populating the HtmlDataTable dynamically through an ArrayList of String[] objects(rowData) where rowData is populated from database.

rowData[0] = { "11/10/2007", "<a href=http://www.yahoo.com>yahoo</a>", "some input text" }
rowData[1] = { "11/11/2007", "<a href=http://www.msn.com>msn</a>", "some text"}

Now I need to display the anchor tag in the Datatable column as HTML but is getting displayed as plain Text. This is the relevant portion of the code which populates the Datatable column



Normally I would place the html anchor tag within verbatim tag of my UIColumn of HtmlDataTable.. but here i am generating the datatable dynamically and am not aware how to generate the verbatim text..

Any help/suggestions ?
 
Kunjal Shah
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Got it working...

Had to set the Escape property of HtmlOutputText to false.. this displays html inside the datatable column..
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic