Google+ Peter Bromberg's .NET Blog | Customize Url Parameters in Telerik RadGrid Hyperlink Column

Peter Bromberg's .NET Blog All Things Programming

Customize Url Parameters in Telerik RadGrid Hyperlink Column

28. August 2015 12:36 by admin in
<telerik:RadGrid ID="grdBlah" runat="server" AllowMultiRowSelection="false" AllowPaging="true"AutoGenerateColumns="False" CellPadding="0" GridLines="Both" PageSize="15" ShowFooter="false"OnPageIndexChanged="grdBlah_OnPageIndexChanged"AllowSorting="true"OnSortCommand="grdBlah_OnSortCommand"OnNeedDataSource="grdBlah_NeedDataSource"OnItemDataBound="grdBlah_OnItemDataBound"><MasterTableView ShowFooter="false"><Columns><telerik:GridTemplateColumn UniqueName="btnViewTransactionDetails"ItemStyle-Width="100" HeaderStyle-Width="100"HeaderText="Action"ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center"><ItemTemplate><asp:HyperLink ID="HyperLink1" runat="server" Text="View Detail"NavigateUrl='<%#String.Format("~/Pages/TransactionDetails.aspx?ID={0}&accountID={1}", DataBinder.Eval(Container.DataItem,"transID")  , hfAccountID.Value) %>'></asp:HyperLink></ItemTemplate></telerik:GridTemplateColumn></Columns></MasterTableView><ClientSettings EnablePostBackOnRowClick="true"><Selecting AllowRowSelect="true" /></ClientSettings>
</telerik:RadGrid>

This example should be self-explanatory. If there are more parameters, handle them exactly as in the example code below.

 

Add comment

  Country flag


Loading