GridTableView Eats My Quote

2 posts, 0 answers
  1. Jeff
    Jeff avatar
    42 posts
    Member since:
    Jan 2008

    Posted 24 Apr 2013 Link to this post

    We are trying to upgrading to 2013.1.417.35 for many, many GridTableViews.  This is the source HTML for one column in a grid:

    <telerik:GridTemplateColumn UniqueName="ShowButton"  HeaderText="" 
      <INPUT type="button" value="watch" name="btnWatch" onClick="window.location='Players/player.aspx?sh=<%# Eval( "ShowNum" ) %>&se=<%# Eval( "SeriesNum" ) %>'" class="smallwatchbutton">
          <ItemStyle HorizontalAlign="Right" VerticalAlign="Middle"  ></ItemStyle>

    Here is what gets rendered:
    <input class="smallwatchbutton" type="button" onclick="window.location='Players/player.aspx?sh=233&se=52" id="btnWatch" value="watch">

    It's hard to see, but the second single quote does not come down, and therefore, clicking on the button does nothing.  Tested on previous version of RadGrid and it works fine.  Why does it want to eat my quote.
  2. Angel Petrov
    Angel Petrov avatar
    1044 posts

    Posted 29 Apr 2013 Link to this post

    Hello Jeff,

    Please try modifying your the format logic like demonstrated below:
    <telerik:GridTemplateColumn UniqueName="ShowButton" HeaderText="">
                                <input type="button" value="watch" name="btnWatch"
                                     onclick="window.location='<%# String.Format("Players/player.aspx?sh={0}&se{1}",Eval("ShowNum"),Eval("SeriesNum"))%>'" class="smallwatchbutton">
                            <ItemStyle HorizontalAlign="Right" VerticalAlign="Middle"></ItemStyle>

    Thus the single quote should be persisted.

    All the best,
    Angel Petrov
    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.
Back to Top