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

GridViewDynamicHyperlinkColumn compile error & not showing text

7 Answers 84 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Gary
Top achievements
Rank 2
Gary asked on 30 Nov 2009, 10:01 PM
I have the following column within a RadGridView:

 

 

<telerik:GridViewDynamicHyperlinkColumn Header="Name"

 

 

DataFormatString="{0}"

 

 

DataMemberBinding="{Binding PartyName}"

 

 

NavigateUrlMemberPaths="ShortName, PartyId"

 

 

NavigateUrlFormatString="http://Party/{0}/{1}"/>

 


When I compile, I'm getting the following error:

Error 77 The tag '0' does not exist in XML namespace 'http://schemas.microsoft.com/winfx/2006/xaml/presentation'. D:\Projects\AppName\AppName\AppName\Views\ContactManagement\PartySearchPage.xaml 57 62 AppName

What am I missing?  If I change DataFormatString="{0}" to DataFormatString=" {0}", (put a space in front), it compiles, however, no text is shown.  If I remove the DataFormatString property, nothing shows in the grid as well.

I'm using Q3 2009 for Silverlight.

Gary.

7 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 01 Dec 2009, 06:50 AM
Hi Gary,

String format in XAML should be "{}{0}" - you can check this demo for more info.

All the best,
Vlad
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Gary
Top achievements
Rank 2
answered on 01 Dec 2009, 07:39 AM

Thanks.  That resolved the compilation error.   However, the PartyName still does not show.   Markup now looks like this:

<
telerik:GridViewDynamicHyperlinkColumn Header="Name"

 

 

DataMemberBinding="{Binding PartyName}"

 

 

DataFormatString="{}{0}"

 

 

NavigateUrlMemberPaths="ShortName, PartyId"

 

 

NavigateUrlFormatString="http://Party/{0}/{1}" />

The following does display the PartyName (next column in RadGridView), but doesn't support 2 or more format strings in the URL:

<telerik:GridViewDataColumn Header="Name" UniqueName="PartyName" Width="200">

 

 

 

<telerik:GridViewDataColumn.CellTemplate>

 

 

 

<DataTemplate>

 

 

 

<HyperlinkButton x:Name="btnEditParty" Click="btnEditParty_Click" Content="{Binding PartyName}" />

 

 

 

</DataTemplate>

 

 

 

</telerik:GridViewDataColumn.CellTemplate>

 

 

 

</telerik:GridViewDataColumn>

 

 

 

Is this column in any way conflicting with the previous?  Or am I missing something to get the PartyName to display.

0
Gary
Top achievements
Rank 2
answered on 01 Dec 2009, 06:41 PM
I removed all other columns, so no other column is affecting the display of the PartyName for the GridViewDynamicHyperlinkColumn.  At this point, I'm at a loss as to why the bound column is not displaying it's value.  Does anyone have any suggestions?
0
Vlad
Telerik team
answered on 04 Dec 2009, 09:03 AM
Hello Gary,

Can you send us small example (via support ticket) where we can reproduce and debug your scenario?

Sincerely yours,
Vlad
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Marc Roussel
Top achievements
Rank 2
answered on 05 Apr 2010, 01:56 PM
I'm also trying to figure out what to I have to put in DataFormatString because anything I'm trying makes the application crashes

MY last attempt was DataFormatString = "mailto:{0}";
0
Rossen Hristov
Telerik team
answered on 05 Apr 2010, 02:52 PM
Hello Marc Roussel,

Can you send us small example (via support ticket) where we can reproduce and debug your scenario?

This will save both you and us a lot of time.

Thanks in advance.

Greetings,
Ross
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
Marc Roussel
Top achievements
Rank 2
answered on 05 Apr 2010, 03:31 PM
Done.
Tags
GridView
Asked by
Gary
Top achievements
Rank 2
Answers by
Vlad
Telerik team
Gary
Top achievements
Rank 2
Marc Roussel
Top achievements
Rank 2
Rossen Hristov
Telerik team
Share this question
or