This is a migrated thread and some comments may be shown as answers.

URL Routing with Telerik

6 Answers 133 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Gabrielle
Top achievements
Rank 1
Gabrielle asked on 02 Jun 2010, 08:08 AM
Hi..

I'm just wondering.. How can I implement URL Routing with Telerik using GridHyperLinkColumn?

We're kinda new to Telerik so we can't really go around it ourselves. =)

Thank you, in advance.

6 Answers, 1 is accepted

Sort by
0
Atanas Korchev
Telerik team
answered on 02 Jun 2010, 08:11 AM
Hi Gabrielle,

Which product are you using? RadGrid for ASP.NET Ajax or Telerik Grid for ASP.NET MVC?

Regards,
Atanas Korchev
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Gabrielle
Top achievements
Rank 1
answered on 02 Jun 2010, 09:38 AM
Thanks for the response, totally appreciate it. :D

Anyway, I'm using RadGrid for ASP.NET Ajax.
0
Veli
Telerik team
answered on 07 Jun 2010, 09:27 AM
Hello Gabrielle,

Do you need to use RadGrid's SEO-friendly paging feature with URL Routing? If that is the case, I am pleased to inform you that such a RadGrid feature is currently in the making and will soon be available for use off-the-shelf.

If this is not what you meant, could you, please, elaborate.

Sincerely yours,
Veli
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Gabrielle
Top achievements
Rank 1
answered on 07 Jun 2010, 09:34 AM
Hey..

We're trying to build a website using Telerik controls, one of which is the GridHyperLinkColumn in a RadGrid for ASP.NET Ajax.

We would like to implement URL Routing with the links of this GridHyperLinkColumn. I was able to successfully redirect the link to another page using DataNavigateUrlFormatString. But I would like to modify this property so it would not leave the current page but would kinda reload the page's contents? Like with a script or AJAX or something.

I'm really not sure if what I wanna achieve is possible but that's what our team has asked me to find out. Thank you so much for your help.

Abby


0
Veli
Telerik team
answered on 08 Jun 2010, 09:34 AM
Hi Gabrielle,

You can manually modify the URL that is created when the grid rows are databound. You can thus customize the link to whatever resource you need. Note, however that link navigation means HTTP GET request. No AJAX functionality can be implemented in this way. If you link to the current page. You will simply reload it.

This being said, here is how you can modify the link that are created. Supposing there is RadGrid hyperlink column with a UniqueName="HyperLinkColumn", you can use RadGrid's ItemDataBound event like this:

protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e)
{
    if (e.Item is GridDataItem)
    {
        GridDataItem item = (GridDataItem)e.Item;
        HyperLink link = (HyperLink)item["HyperLinkColumn"].Controls[0];
        //you can now modify link.NavigateUrl
    }
}


Best wishes,
Veli
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Gabrielle
Top achievements
Rank 1
answered on 09 Jun 2010, 01:37 AM
We'll try this out, thank you so much. :)
Tags
Grid
Asked by
Gabrielle
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
Gabrielle
Top achievements
Rank 1
Veli
Telerik team
Share this question
or