More in this section

Forums / Developing with Sitefinity / Sitefinity URL in RadGrid

Sitefinity URL in RadGrid

2 posts, 0 answered
  1. Sparks IT Ops
    Sparks IT Ops avatar
    26 posts
    26 Oct 2010
    24 Jan 2011
    Link to this post
    Is there an example or how do I reference a sitfinity page from a radgrid hyperink field and pass it a parameter from the grid?

    e.g.  http://site/mydetailspage.aspx?parameter=2

    And what would be the best way for a usercontrol on that page to reference the parameter?
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    12 Sep 2017
    26 Jan 2011
    Link to this post
    Hello Geoff,

    You can use GridHyperLinkColum or TemplateColumn


    <telerik:RadGrid runat="server" ID="RadGrid1" PageSize="20" Skin="Vista"  >
      <SelectedItemStyle BackColor="Aqua" />
       <MasterTableView  AutoGenerateColumns="false" >
       <telerik:GridHyperLinkColumn HeaderText="PageLink"  Target="_blank"

    code behind

    protected void Page_Load(object sender, EventArgs e)
           RadGrid1.DataSource = PageSource();
           RadGrid1.ItemDataBound += new GridItemEventHandler(RadGrid1_ItemDataBound);
       protected void RadGrid1_ItemDataBound(object sender, Telerik.Web.UI.GridItemEventArgs e)
           if (e.Item is GridDataItem)
               GridDataItem dataItem = (GridDataItem)e.Item;
               HyperLink link = (HyperLink)dataItem["HyperlinkColumn"].Controls[0];
               link.NavigateUrl = ((ICmsPage)e.Item.DataItem).StaticUrl;
               link.Text = ((ICmsPage)e.Item.DataItem).Title;
       protected IList PageSource()
           var manager = new CmsManager();
           return manager.GetPages();

    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
2 posts, 0 answered