This is a migrated thread and some comments may be shown as answers.

Dynamically added Hyperlink control does not work with New dll

1 Answer 67 Views
Grid
This is a migrated thread and some comments may be shown as answers.
kranthi kiran pusala
Top achievements
Rank 1
kranthi kiran pusala asked on 08 May 2014, 06:45 PM
I am using Telerik Grid which adds hyperlink controls on ItemDataBound. Below code used to work with Telerik.Web.UI(2012.2.912.35).
When I upgraded it to 2014.1.225.35 or  2014.1.403.35 the links lose hyperlink url.

 
protected void RadGrid_ItemDataBound(object sender, GridItemEventArgs e)
        {         
            try
            {
                if (e.Item is GridDataItem)
                {
                    GridDataItem item = (GridDataItem)e.Item;
                    foreach (string hlc in hyperlinksColumns)
                    {
                        HyperLink link = new HyperLink();
                        link.Text = item[hlc].Text;
                        link.NavigateUrl = item[hlc + "_URL"].Text; //This Does not work
                        link.NavigateUrl = "javascript:callFunctionA('parameter1','parameter2');"; //This works. Same text is present in item[hlc + "_URL"].Text
                        item[hlc].Controls.Add(link);                                         
                    }
}
    }                       
    catch (Exception ex)
             {                  
                    Utils.WriteLog(ex);
             }
         }

1 Answer, 1 is accepted

Sort by
0
Kostadin
Telerik team
answered on 13 May 2014, 12:05 PM
Hello kranthi,

I have already answered your other forum thread, so I would suggest you to continue our conversation there.

Regards,
Kostadin
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
Grid
Asked by
kranthi kiran pusala
Top achievements
Rank 1
Answers by
Kostadin
Telerik team
Share this question
or