locked
Add Hyperlinks inside Grid RRS feed

  • Question

  • I want to retrieve a list of links from database, and programmatically create some HyperlinkButtons from that list. These buttons should be added to a Grid. What is the best way to do this?

    Wednesday, August 3, 2011 8:09 AM

Answers

  • If you know how many links buttons are there then you can create ColumnTemplates in the datagrid and place hyperLinkButton inside the columns templates.

    else you can also add columns from the code behind like this

    http://blogs.msdn.com/b/scmorris/archive/2008/04/14/defining-silverlight-datagrid-columns-at-runtime.aspx

    Wednesday, August 3, 2011 8:15 AM