Q:

Show HyperLinks in Gridview

I have an XML file and it contains data about products,and the most interesting data is a url that takes user to the page of thah product.I have successfully extracted urls from that XML file into XmlNodeList and then I put them into DataTable so these urls can be displayed in ASPxGridview.But these urls are shown as text and are not clickable.How to convert the text into HyperLinks?Thanks in advance!

A:

You are looking for a HyperLinkField: http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.hyperlinkfield.aspx
You'd bind the url to the DataNagivateUrlFields property.
Edit with code example:
<asp:gridview id="gv1" 
    autogeneratecolumns="true"
    runat="server">
    <columns>          
      <asp:hyperlinkfield text="View Product"
        DataNavigateUrlFields="url"
        />
    </columns>
  </asp:gridview>

