• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1121
  • Last Modified:

ASP .NET/Telerik/C# question

I am new to web development and I am attempting to use a radGrid from Telerik, and I am having trouble passing a parameter in the URL of the Telerik:Hyperlink control that I am using in my radGrid control. I was wondering g if someone knew how to do this and could help me passes a parameter through the URL so that it can be used by another page on the site. Any help would be greatly appreciated.
1 Solution
Hi, Passing the parameter in the URL is a common thing. Even it's telerik hyperlink it should be working in the same way. But telerik uses Ajax to the maximum extent. Where as if it's working fine with normal hyperlink and it's not working for telrik hyper link then you need to recheck it  again. As  we know Ajax uses the java script at this point I leave the option for you.
Here is a link for you're reference. If you need a perfect solution be specific about you're issue.
Vikram Singh SainiSoftware Engineer cum AD DeveloperCommented:
To pass parameter in url in telerik radgrid you can use following code:

<telerik:RadGrid ID="RadGrid1" runat="server" AutoGenerateColumns="False" DataSourceID="SqlDataSource1">
        <MasterTableView DataKeyNames="Files">
                <telerik:GridHyperLinkColumn HeaderText="File name"
                    DataTextField="Files" DataNavigateUrlFields="Files" DataNavigateUrlFormatString="http://somepage.aspx?qs={0}">
                    <HeaderStyle Width="170px"></HeaderStyle>

Open in new window

Noteworthy Points:
1. DataTextField is the name of the column in database from which value would be picked.
2. DataNavigateUrlFormatString="http://somepage.aspx?qs={0}" - Here {0} represents the position where DataTextField value would be placed.

Hope it helps you to understand.

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now