RadGrid SEO Sorting

Thread is closed for posting
1 posts, 1 answers
  1. Answer
    63F75A2C-1F16-4AED-AFE8-B1BBD57646AD
    63F75A2C-1F16-4AED-AFE8-B1BBD57646AD avatar
    1572 posts
    Member since:
    Oct 2004

    Posted 22 Apr 2010 Link to this post

    Requirements

    RadControls for ASP .NET AJAX version

    2010.1.415 and later
    .NET version

    3.5 and later
    Visual Studio version

    2008 and later
    Programming language C#
    Browser support

    all browsers supported by RadControls for ASP .NET AJAX


    PROJECT DESCRIPTION
    This project demonstrates an implementation of SEO-friendly sorting for RadGrid, similar to the RadGrid SEO Paging functionality. SEO sorting allows search-engine crawlers to index sorted grid items by requesting them through unique URLs. Users can also use the URL for bookmarking particular sorted states of the grid. SEO sorting is implemented by the GridSEOSortPersister class and, to be able to use it, you just need to create an instance of the class specifying the RadGrid instance in the constructor. This must be done before RadGrid initializes its items and databinds. In the context of a page life cycle, Page_Init is a good candidate to use for that.

    Implementing SEO sorting for RadGrid involves 2 main tasks:

    1. Parsing any sort query strings in RadGrid's DataBinding event and building corresponding sort expressions. In this phase, any  valid sort query string passed in the URL is converted to a GridSortExpression. Doing this in DataBinding event ensures RadGrid will actually apply the SEO sort right after.
    2. Replacing the header sort buttons in RadGrid's ItemCreated event. RadGrid's default sort buttons make a page postback and are not suitable for SEO sorting. We need to replace the existing buttons with Hyperlinks that link to the same URL, but contain appropriate sort query strings. In this way, every sort combination is represented by a query string.

    SEO-friendly sorting is compatible with RadGrid's built-in SEO-friendly paging functionality.
Back to Top

This Code Library is part of the product documentation and subject to the respective product license agreement.