How do I bind the navigate url for a HyperlinkColumn? I want to basically accomplish this in the cell:
<HyperlinkButton Content="Product Name" NavigateUri=http://mysite.com/product.aspx?ID=1 TargetName="_blank" />With the content bound to my product class Name field and the navigate uri coming from its Url field. I just can't find where to set the navigate uri. I tried this and the URI showed up as the text.
<
igDataGrid:HyperlinkColumn Key="Name" ContentBinding="{Binding Url}" TargetName="_blank" />
The Url showed as the text, and then clicking it gives theexception below (I assume because it's trying to navigate to "" since I haven't set it). I'm sure I'm missing something easy here, but can't see how to set the navigate uri.
Thanks,Keith
Webpage error details
User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.5.21022; .NET CLR 3.5.30729; .NET CLR 3.0.30618; MS-RTC LM 8; FDM)Timestamp: Sun, 2 Aug 2009 23:57:40 UTC
Message: Unhandled Error in Silverlight Application Code: 4004 Category: ManagedRuntimeError Message: System.NotSupportedException: Cannot navigate to locations relative to a page. at System.Windows.Controls.HyperlinkButton.GetAbsoluteUri() at System.Windows.Controls.HyperlinkButton.Navigate() 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, String eventName)
Line: 54Char: 13Code: 0URI: file:///C:/InfoMod/Silverlight%20Examples/InfragisticsGridTest/Bin/Debug/TestPage.html
hi iam usig that piece of code for this
HyperlinkColumn hlnkcol = new HyperlinkColumn(); hlnkcol.HeaderText = "CardCode"; hlnkcol.Key = propertyInfo.Name; hlnkcol.ContentBinding = new Binding("CardCode"); hlnkcol.TargetName = "_blank";
BaseXamGrid.Columns.Add(hlnkcol);
my card code is c5000 it genrate same error but my card code is 5000 it run's perfectly i am using it's latest version 10.2 please help me regarding that
HyperlinkColumn hlnkcol = new HyperlinkColumn(); hlnkcol.HeaderText = "CardCode"; hlnkcol.Key = "CardCode"; hlnkcol.ContentBinding = new Binding("CardCode"); hlnkcol.TargetName = "_blank";
Try putting putting the strings in a Hyperlink button on your page.
If they throw an exception as well, then its b/c your string doesn't map to a Uri properly.
-SteveZ
Hello,
It is not uri it is a string type column in my database
Hi,
Is "CardCode" a URI?