1

Resolved

RadGrid and GridHyperLinkColumn Parameter Substitution Problem

description

Appears that substitution of DataNavigateUrlFields is not working for GridHyperLinkColumn. I'm executing a sp and returning userID and Name for all users. The userID returned is to be substituted via DataNavigateURL to deliver a custom URL. However for every row returned, the userID parameter substituted is 0 and the resulting hyperlink is ProfilePage.aspx?playerID=0. Note: I"m using DNN 05.05.01 (22) and Xsltdb v2.0.20.
 
CREATE PROCEDURE {databaseOwner}
[{objectQualifier}PlayerList_GetAll]
AS
SELECT
u.UserID,
u.FirstName + ' ' + u.LastName AS FullName
FROM
dbo.Users
RETURN
END
 
<mdo:asp xmlns:asp="asp" xmlns:telerik="telerik">
  <asp:SqlDataSource
      id="dsModules"
      runat="server"
      ConnectionString="&lt;%$ ConnectionStrings:SiteSqlServer %&gt;"
      DataSourceMode="DataReader"
      SelectCommand="PlayerList_GetAll" SelectCommandType="StoredProcedure">
  </asp:SqlDataSource>
  <telerik:RadGrid
      ID="RadGrid1"
      DataSourceID="dsModules"
      AllowPaging="False"
      AllowSorting="False"
      runat="server"
      AutoGenerateColumns="False">
      <MasterTableView Width="100%" DataKeyNames="UserID" DataSourceID="dsModules" AutoGenerateColumns="False" AllowSorting="False">
        <Columns>
            <telerik:GridHyperLinkColumn HeaderText="Name" DataTextField="FullName" DataNavigateUrlFields="UserID" DataNavigateUrlFormatString="~/ProfilePage.aspx?playerID={0}"></telerik:GridHyperLinkColumn>
        </Columns>
  </MasterTableView>
  </telerik:RadGrid>      
</mdo:asp>

comments

findy wrote Jan 10, 2011 at 8:26 AM

First of all you must remember that you creating XSL, not a markup itself. XSL assumes that curly braces setup template being used inside attribute definition. So you must use double braces to insert single one.

DataNavigateUrlFormatString="~/ProfilePage.aspx?playerID={{0}}"

However, you need fresh 02.00.33 to process that correctly.

See also http://xsltdb.codeplex.com/wikipage?title=xsl:value-of%20replacer

wrote Feb 14, 2013 at 1:55 AM

wrote May 16, 2013 at 7:41 AM

wrote May 16, 2013 at 7:41 AM

wrote Jun 14, 2013 at 7:58 AM