I created the widget and placed SEO Enabled RadGrid in this widget.
The widget was registered in sitefinity backend and placed on the page.
So far it works good.
But if possible the only one change is required.
When you navigate from page to page it shows the urls in the following format:
(value 2_3 in this case means page 2, show 3 records per page)
We would like to have routed urls in the following format:
Routed URL: http://mydomain.com/classifieds/ads/page/2
Routed URL: http://mydomain.com/classifieds/ads/page/2_3
After looking in RadGrid documentation we found the following information:
To enable routing support for the SEO pager, RadGrid introduces 3 new properties in RadGrid.PagerStyle:
- UseRouting - notifies RadGrid that routing is enabled for the ASP.NET application.
- SEORouteName - specifies the name of the current route that is used. If the value is empty, the first route with matching route data is used.
- SEOPageIndexRouteParameterName - specifies the URL parameter that is used to get the page index from the URL. Empty value indicates the SEOPagingQueryStringKey value will be used.
To use URL routing with RadGrid, your application must specify a route to the .aspx page and that route should define a URL parameter specifying the grid page:
Here is the link to documentation page: www.telerik.com/.../grid-seo-paging.html
Unfortunately it didn work.
We tried to register route in global.asax file
protected void Application_Start(object sender, EventArgs e)
private void RegisterRoutes(RouteCollection routes)
new RouteValueDictionary "pageNumber", "1" );
And here is PagerStyle settings for RadGrid
<PagerStyle Mode="NextPrevAndNumeric" EnableSEOPaging="true" UseRouting="true" SEORouteName="ClassifiedsPaging" SEOPageIndexRouteParameterName="pageNumber"></PagerStyle>
but received the following error:
route named 'ClassifiedsPaging' could not be found in the route collection.
As far as we know the routing is handled internally by sitefinity.
Does anybody knows if its possible to have Routed Urls for RadGrid in a widget??