Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
3521
Custom Value in a Templated Column
posted

Let's imagine that you are using a WebHierarchicalDataGrid with a templated column that you wish to show up an envelope icon such that when you click on it, it launches the mailer with an email message to the person named in that row of the grid.

I'm picturing that I need to handle an event in the grid in the code behind to make this happen, but it is not coming to light which one that would be.

I am used to the UltraWebGrid, and the API for this new grid is totally different for some reason.

Here was an attempt to do this in markup; The title part of this markup works fine.  It is the email link I am struggling with.  Any ideas?

<ig:TemplateDataField Key="TemplateField_0">
<Header Text="TemplateField_0" />
<ItemTemplate>       
<%--	<a href="mailto:Cheryl.Amey@WestonSolutions.com">--%>                 
    <div style="text-aligncenter;"> 
	<a href='mailto:' + '<%# DataBinder.Eval(DirectCast(Container, Infragistics.Web.UI.TemplateContainer).DataItem, "Email") %>' >
	<img src="~/images/mail.gif"  title="<%# Eval("Email")%>" border="0" alt="" />
	</a>
</div>
</ItemTemplate>
</ig:TemplateDataField>