This project is read-only.

column value string format with 2 (or more) values

Aug 20, 2013 at 7:01 PM
I need to format a column value with 2 lambda expressions, something like this:

col.Add(m => m.ClinicURL, m.ClinicName).Format("<a href='{0}'>{1}</a>");
col.Add(m => m.ClinicURL.Concat(m => m.ClinicName)).Format("<a href='{0}'>{1}</a>");

but can't seem to come up with the correct syntax.

Any direction would be greatly appreciated.
Aug 20, 2013 at 7:03 PM
Aug 20, 2013 at 8:17 PM
Thank you Bukharin, that did help!

Is there a way to get the link to display as an HREF and not as plain text?

@helper formatClinic(Web.PatientPortal.ViewModels.Appointment a)
       string name = a.ClinicName;
       string url = a.ClinicURL;
       <a href=@url style="display:block;width:100%;height:100%;text-decoration:none;">@name</a>
Aug 21, 2013 at 7:28 AM
You need to disable enconding and sanitizing of the column content:
Aug 21, 2013 at 12:48 PM
Lovely, works a treat! Thank you for your replies and for your hard work.