14 June, 2010
7 Comments
1 category
I wanted a GridHyperlinkColumn to have a static text
DataTextField, contains the datasource columns that can be used in the property “DataTextFormatString”
DataTextFormatString, is used to display the text of the hyperlink. Must be set, else the column would be empty!
DataNavigateUrlFields, contains the datasource columns that can be used in the property “DataNavigateUrlFormatString”
DataNavigateUrlFormatString, is used to set the href property of the link
The following column will show the text “Edit” for each row. The href of each link will by dynamically set. Example link would be <a href=”http://localhost/CustomerDetail.aspx?CustomerId=112”>Edit</a>
<telerik:GridHyperlinkColumn UniqueName="EditColumn" DataTextFormatString="Edit" DataTextField="Name" DataNavigateUrlFields="Id" DataNavigateUrlFormatString="~/CustomerDetail.aspx?CustomerId={0}" meta:resourcekey="CustomerEditColumn"> </telerik:GridHyperlinkColumn>
Category: Uncategorized
Man.. thanks heaps for this. They didnt put something like this on telerik website (or maybe they did and i just couldnt find it in a pile of information there.)
Hi,
I’m using a GridHyperlinkColumn because I wanted to have a hyper link column that I could also filter. The link part works great but any attempt to filter the column give the following error:
Microsoft JScript runtime error: ‘Sys$Enum$parse’ is undefined.
any idea what could be wrong?
Thanks
Hi,
I am using the RadGrid and to populate it I need to call a method in the business layer and I get the result in a List.
Can i directly bind the list result to my radgrid as
radgrid.DataSource()= ——;
radgrid.DataBind();
Do I need to add the columns in the design view or will it be done automatically?
I also need to add a hyperlink a column for all the rows and clicking on the takes to another page and gives the details of the products of that row. How can i do this?
You can bind you’re generic list directly to the telerik radgrid datasource and I will always add column foreach column I want to show, but if you are oke with the standard layout, you don’t have to.
There are several ways you van create a hyperlink column and when the user clicks the link, a new page or a new div will be opened with the detail information, see for more information the online demo page of the telerik radgrid.
Can I open the URL in a new window so my page containing the grid stays open?
Thanks!
Keyur
That saved me a lot of time! Thank you!
Hi,
I have a hyper link in rad grid and i need to open the link in oter tab. Eg: if i have Link column in rad grid and if you click the https://google.com link a new tab should open with google.com
in other tab. I am using below code.
NOTE: Can you please suggest me how to open the link in other tab with out using DataNavigateUrlFormatString=”=”~/CustomerDetail.aspx?CustomerId={0}” i dont require any specific page or parameter. I just need to open the link on the click of the link
Code: