What I have is a radgrid with one column we are binding a persons email to it so that someone can click on the column and open outlook and then email someone. But what happens is that it actually forwards the page and errors out, it still opens outlook but errors out the page. Tired with a hyperlink and then tried seperately with a a href, both act the same way in forwarding the page to the persons email which errors it out.
<
telerik:RadGrid
ID
=
"RadGrid1"
runat
=
"server"
AutoGenerateColumns
=
"false"
OnNeedDataSource
=
"RadGrid1_NeedDataSource"
OnUpdateCommand
=
"RadGrid1_UpdateCommand"
>
<
MasterTableView
>
<
Columns
>
<
telerik:GridTemplateColumn
>
<
ItemTemplate
>
<
asp:HyperLink
NavigateUrl='<%# Bind("Name", "mailto:{0}") %>' Text='<%# Bind("Name") %>'
runat="server" ID="hlEmail"></
asp:HyperLink
>
<
br
/>
<
a
href='<%# "mailto:" + Eval("Name") %>'><%# Eval("Name") %></
a
>
</
ItemTemplate
>
</
telerik:GridTemplateColumn
>
<
telerik:GridEditCommandColumn
>
</
telerik:GridEditCommandColumn
>
</
Columns
>
</
MasterTableView
>
</
telerik:RadGrid
>
5 Answers, 1 is accepted
0

Kevin
Top achievements
Rank 1
answered on 17 Apr 2012, 09:30 PM
HI,
Any Ideas on this functionality??
Any Ideas on this functionality??
0
Hello Kevin,
I have assembled a sample video showing the behavior working properly on my side. Additionally, I have attached the project I used for testing. Could please verify the behavior is the same if you move the links outside of RadGrid. If the problem still persists you could open a formal ticket and send us a sample running project demonstrating the unwanted behavior.
You could also try if the behavior is the same on a different machine.
Regards,
Antonio Stoilkov
the Telerik team
I have assembled a sample video showing the behavior working properly on my side. Additionally, I have attached the project I used for testing. Could please verify the behavior is the same if you move the links outside of RadGrid. If the problem still persists you could open a formal ticket and send us a sample running project demonstrating the unwanted behavior.
You could also try if the behavior is the same on a different machine.
Regards,
Antonio Stoilkov
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0

Kevin
Top achievements
Rank 1
answered on 20 Apr 2012, 02:05 PM
HI,
I have used the same thin you propose and no matter what computer i go to the same results happen, whent he link is clicked to email, outlook opens up but the page also redirects to the following url. the example emial is just that, it redirect to the person email of the link value. This is the simplest page I have for a grid and no matter it does the same on everypage and every computer in office.
mailto;exampleemail@example.com
I have used the same thin you propose and no matter what computer i go to the same results happen, whent he link is clicked to email, outlook opens up but the page also redirects to the following url. the example emial is just that, it redirect to the person email of the link value. This is the simplest page I have for a grid and no matter it does the same on everypage and every computer in office.
mailto;exampleemail@example.com
<
telerik:RadGrid
ID
=
"myRadGrid"
runat
=
"server"
Width
=
"100%"
BorderWidth
=
"1px"
CellPadding
=
"6"
GridLines
=
"None"
BorderColor
=
"#404040"
Skin
=
"Web20"
>
<
MasterTableView
AutoGenerateColumns
=
"false"
BorderColor
=
"#404040"
Font-Size
=
"9"
Font-Names
=
"Veranda,arial,sans-serif"
HeaderStyle-HorizontalAlign
=
"Center"
GridLines
=
"Both"
BorderWidth
=
"1px"
><
ItemStyle
HorizontalAlign
=
"Center"
/><
AlternatingItemStyle
BackColor
=
"#B0C4DE"
HorizontalAlign
=
"Center"
/>
<
HeaderStyle
ForeColor
=
"White"
Font-Bold
=
"true"
BorderColor
=
"#404040"
BorderWidth
=
"1px"
/>
<
Columns
>
<
telerik:GridBoundColumn
DataField
=
"strRank"
HeaderText
=
"Rank"
/>
<
telerik:GridBoundColumn
DataField
=
"strName"
HeaderText
=
"Name"
/>
<
telerik:GridBoundColumn
DataField
=
"strFTOrganization"
HeaderText
=
"Org"
/>
<
telerik:GridBoundColumn
DataField
=
"strFTPhone"
HeaderText
=
"Phone"
/>
<
telerik:GridTemplateColumn
>
<
ItemTemplate
>
<
asp:HyperLink
NavigateUrl='<%# Bind("strName", "mailto:{0}") %>' Text='<%# Bind("strName") %>'
runat="server" ID="hlEmail"></
asp:HyperLink
>
<
br
/>
<
a
href='<%# "mailto:" + Eval("strEmail") %>'>
<%# Eval("strEmail") %></
a
>
</
ItemTemplate
>
</
telerik:GridTemplateColumn
>
</
Columns
>
</
MasterTableView
>
</
telerik:RadGrid
>
Protected Sub myRadGrid_NeedDataSource(sender As Object, e As Telerik.Web.UI.GridNeedDataSourceEventArgs) Handles myRadGrid.NeedDataSource
sql = "Select mn.strRank, mn.strFullname as strname, mn.strFTOrganization, mn.strFTPhone, mn.strEmail from Drat_ADmin a INNER JOIN tblMnNatPersonnel mn on mn.intPersonnelId = a.intADminId " _
& "where bitContact = 1"
myRadGrid.DataSource = getData(sql)
End Sub
0

Kevin
Top achievements
Rank 1
answered on 20 Apr 2012, 02:25 PM
Hi,
Ok I found out what the problem is but to work around it would require me to recode all my pages. Basically it comes down to having the page as part of a masterpage. If the radgrid or even gridview sits on a page with form control, the examples work as billed and functions perfectly, but when put inside a page with a masterpage (All my pages) then it posts back and redirects the page to the mailto and puts in the email of the person you clicked upon. This si the smae for radgrids or gridviews. Is there a work around for this?
Ok I found out what the problem is but to work around it would require me to recode all my pages. Basically it comes down to having the page as part of a masterpage. If the radgrid or even gridview sits on a page with form control, the examples work as billed and functions perfectly, but when put inside a page with a masterpage (All my pages) then it posts back and redirects the page to the mailto and puts in the email of the person you clicked upon. This si the smae for radgrids or gridviews. Is there a work around for this?
0
Hello Kevin,
I have requested to try the scenario outside of RadGrid so we could understand if the source of the problem is RadControls. Other issues are outside of our scope. It is developer responsibility to handle such cases. If you have any related questions to our controls please do not hesitate to contact us.
Greetings,
Antonio Stoilkov
the Telerik team
I have requested to try the scenario outside of RadGrid so we could understand if the source of the problem is RadControls. Other issues are outside of our scope. It is developer responsibility to handle such cases. If you have any related questions to our controls please do not hesitate to contact us.
Greetings,
Antonio Stoilkov
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.