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

[Solved] HyperlinkColumn in GridView - problem with CallTo: links

2 Answers 143 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Yhnavein
Top achievements
Rank 1
Yhnavein asked on 08 Nov 2010, 11:24 AM
Hi, is there any way to make values in column GridViewHyperlinkColumn clickable?
THere is no problem with standard links or mailto: links, but callto: just doesn't work at all. On click I get following error:
Webpage error details
Message: Unterminated string constant
...
Message: Unhandled Error in Silverlight 2 Application Failed to navigate to callto:+48123456789.   at MS.Internal.NavigationHelper.Navigate(Boolean checkUserInitiatedAction)
   at System.Windows.Controls.HyperlinkButton.OnClick()
   at System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonUp(MouseButtonEventArgs e)
   at System.Windows.Controls.Control.OnMouseLeftButtonUp(Control ctrl, EventArgs e)
   at MS.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr unmanagedObjArgs, Int32 argsTypeIndex, Int32 actualArgsTypeIndex, String eventName)

If I use standard HyperlinkButton somewhere on my form and set it's url to callto:+48123456789 - then it works great
Any ideas? :>

2 Answers, 1 is accepted

Sort by
0
Veselin Vasilev
Telerik team
answered on 11 Nov 2010, 10:18 AM
Hi Peter,

I tried to use the callto with a standard HyperlinkButton (outside RadGridView) but it throws exception as well.
<HyperlinkButton NavigateUri="callto:+359xxxxxx" Content="Call me" />
where the xxxxx is a valid number.

Can you tell us how exactly you made it work?


Regards,
Veselin Vasilev
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
0
Yhnavein
Top achievements
Rank 1
answered on 12 Nov 2010, 07:42 PM
Hmm... There is an issue with Silverlight and links 'callto:'. So, our workaround for this problem was creating new Control based on a HyperlinkButton and overriding OnClick method with this one:
protected override void OnClick()
{
    if (this.NavigateUri.AbsoluteUri.StartsWith("callto:"))
    {
        System.Windows.Browser.HtmlPage.Window.Navigate(this.NavigateUri);
    }
    else
        base.OnClick();
}
I really forget about it and it looks like that kind of workaround probably is also necessary for solving my problem. Unfortunately I don't have my company's notebook to check if there is possibility to do same with HyperlinkColumn or, eventually with GridViewCell.
Tags
GridView
Asked by
Yhnavein
Top achievements
Rank 1
Answers by
Veselin Vasilev
Telerik team
Yhnavein
Top achievements
Rank 1
Share this question
or