We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Empty column with hyperlink in grid

Hi.
I try to get a hyperlink in column.
When i used this:
column.Add("name").HeaderText("Details").Format("<a rel='nofollow' href=\"http://www.google.com\">test</a>");

I get empty column - there is nothing. But when i add .HtmlEncode(true) i see plain text in this column, not a hyperlink. If I edit source of html by firebug and manually type "<a rel='nofollow' href... etc." into column, it's work.

I tried to use TemplateColumn and PartiaView also but result was the same.

How to resolve this problem ? 

2 Replies

JA Jarek July 18, 2013 09:34 AM UTC

Attribute .AllowAutoWrap(true) for grid was doing this. When I cut this code from a grid then hyperlink is work (for "Format" option and for "TemplateColumn" also).

But I need AutoWrap on one column, so what I should to do ? I can't set AllowAutoWrap for single column because i get error then. ( column.Add(m=>m.description).HeaderText("header").AllowAutoWrap(true)) )


ES Eswari S Syncfusion Team July 24, 2013 04:16 AM UTC

Hi Jarek,

 

Thank you for using Syncfusion products.

 

Query # : I get empty column - there is nothing. But when i add .HtmlEncode(true) i see plain text in this

 

We were unable to reproduce the issue. We have prepared the sample for your reference and the same can be downloaded from the following link.

 

Sample Link:

 

http://www.syncfusion.com/uploads/user/directTrac/110698/MvcApplication8647542036.zip

 

Could you please try the above sample and get back to us whether you are able to reproduce the issue? If not, could you please give more information so that we could sort out the issue and provide you with solution.

 

The information provided would be of great help in resolving the issue.

 

# But I need AutoWrap on one column, so what I should to do ? I can't set AllowAutoWrap for single column because i get error then. (

 

AllowAutoWrap property has been deprecated for grid columns. We can use AllowAutoWrap property of grid only.

 

Let us know if you have any queries.

 

Regards,

Eswari S

 


Loader.
Up arrow icon