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

mailto syntax

1 Answer 107 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Molivia Sa
Top achievements
Rank 1
Molivia Sa asked on 15 Apr 2010, 04:14 AM
protected void grdContactList_PreRender(object sender, EventArgs e)  
        {  
            foreach (GridGroupHeaderItem groupHeader in grdContactList.MasterTableView.GetItems(GridItemType.GroupHeader))  
            {  
                string strtxt = groupHeader.DataCell.Text; // accessing the groupheader text     
                HyperLink link = new HyperLink();  
                LinkButton hyperlnk = new LinkButton(); // creting new link     
                hyperlnk.Text = "mailto:" + strtxt;  
                groupHeader.DataCell.Controls.Clear();  
                groupHeader.DataCell.Controls.Add(hyperlnk);  
            }  
        } 

Dear telerik,

Can you please help me in how to add mailto syntax in the groupheaderitem.
I need them to be able to click them and open the user mail default with the groupheaderitem emailaddress in mail to.

Thank you

Regards

1 Answer, 1 is accepted

Sort by
0
Maria Ilieva
Telerik team
answered on 19 Apr 2010, 01:45 PM
Hello Molivia Sa,

Try setting the HyperLink href attribute as below and see if it works:
Copy Code
link.Attributes["href"] = "mailto:<email here>";

Let me know if this helps.


Regards,
Maria Ilieva
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.
Tags
Grid
Asked by
Molivia Sa
Top achievements
Rank 1
Answers by
Maria Ilieva
Telerik team
Share this question
or