This is a migrated thread and some comments may be shown as answers.
GridTableView Eats My Quote
1 Answer 7 Views
This is a migrated thread and some comments may be shown as answers.
Jeff
Top achievements
Rank 1
Jeff asked on 24 Apr 2013, 10:14 PM
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="" 
      <ItemTemplate>  
  <INPUT type="button" value="watch" name="btnWatch" onClick="window.location='Players/player.aspx?sh=<%# Eval( "ShowNum" ) %>&se=<%# Eval( "SeriesNum" ) %>'" class="smallwatchbutton">
      </ItemTemplate
      <ItemStyle HorizontalAlign="Right" VerticalAlign="Middle"  ></ItemStyle>
</telerik:GridTemplateColumn>

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.

1 Answer, 1 is accepted

Sort by
0
Angel Petrov
Telerik team
answered on 29 Apr 2013, 04:09 PM
Hello Jeff,

Please try modifying your the format logic like demonstrated below:
<telerik:GridTemplateColumn UniqueName="ShowButton" HeaderText="">
                        <ItemTemplate>
                            <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">
                        </ItemTemplate>
                        <ItemStyle HorizontalAlign="Right" VerticalAlign="Middle"></ItemStyle>
                    </telerik:GridTemplateColumn>

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.
Tags
Grid
Asked by
Jeff
Top achievements
Rank 1
Answers by
Angel Petrov
Telerik team
Share this question
or