GridViewDynamicHyperlinkColumn compile error & not showing text

8 posts, 0 answers
  1. Gary
    Gary avatar
    14 posts
    Member since:
    Sep 2008

    Posted 30 Nov 2009 Link to this post

    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.
  2. Vlad
    Admin
    Vlad avatar
    11100 posts

    Posted 01 Dec 2009 Link to this post

    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.
  3. DevCraft banner
  4. Gary
    Gary avatar
    14 posts
    Member since:
    Sep 2008

    Posted 01 Dec 2009 Link to this post

    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.

  5. Gary
    Gary avatar
    14 posts
    Member since:
    Sep 2008

    Posted 01 Dec 2009 Link to this post

    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?
  6. Vlad
    Admin
    Vlad avatar
    11100 posts

    Posted 04 Dec 2009 Link to this post

    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.
  7. Marc Roussel
    Marc Roussel avatar
    429 posts
    Member since:
    Dec 2009

    Posted 05 Apr 2010 Link to this post

    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}";
  8. Rossen Hristov
    Admin
    Rossen Hristov avatar
    2478 posts

    Posted 05 Apr 2010 Link to this post

    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.
  9. Marc Roussel
    Marc Roussel avatar
    429 posts
    Member since:
    Dec 2009

    Posted 05 Apr 2010 Link to this post

    Done.
Back to Top
DevCraft banner