Filtering in hyperlinks

6 posts, 0 answers
  1. Debashis Pyne
    Debashis Pyne avatar
    66 posts
    Member since:
    Apr 2010

    Posted 01 Nov 2010 Link to this post


    We have a hyperlink in the radgrid and unfortunately the filtering doesn't work.
    The following ASPX code have been used:

    <telerik:GridHyperLinkColumn HeaderText = "Discussion Name" DataTextField="Discussion_Name"
    ItemStyle-HorizontalAlign="Left" UniqueName="Discussion_Name"
    DataNavigateUrlFields="Discussion_Id" SortExpression="Discussion_Name" ItemStyle-Width="320"

    Any ideas why is this?

  2. Iana Tsolova
    Iana Tsolova avatar
    3388 posts

    Posted 01 Nov 2010 Link to this post

    Hello Debashis,

    In order the GridHyperLinkColumn filtering to work properly, you need to set the DataTextField as you already did. Can you elaborate on what happens when you try to filter it? You can add a GridBoundColumn with DataField the same you are using for the DataTextField for the GridHyperLinkColumn and see if it gives you the desired results upon filtering and if they are different.

    Kind regards,
    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
  3. Jay Leffue
    Jay Leffue avatar
    22 posts
    Member since:
    Nov 2009

    Posted 16 Dec 2010 Link to this post

    Same issue:

    <telerik:GridHyperLinkColumn SortExpression="Title" DataTextField="Title" DataNavigateUrlFields="ID" UniqueName="Title" DataNavigateUrlFormatString="~/Page.aspx?id={0}" HeaderText="Title"
            CurrentFilterFunction="Contains" ShowFilterIcon="false" AutoPostBackOnFilter="true" >

    I can filter on all the other columns fine.  They all work where I type a search parameter and hit enter.  This then filters.  When I hit enter on the HyperLinkColumn I get nothing.

    Watching the Error Console I get this when I hit enter on a Hyper Link Column:

    Error: Sys.WebForms.PageRequestManagerParserErrorException: The message received from the server could not be parsed. Common causes for this error are when the response is modified by calls to Response.Write(), response filters, HttpModules, or server trace is enabled.
    Details: Error parsing near '

    <!DOCTYPE html P'.
    Source File: http://localhost:1583/Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=ctl00_RadScriptManager1_TSM&compress=1&_TSM_CombinedScripts_=%3b%3bSystem.Web.Extensions%2c+Version%3d3.5.0.0%2c+Culture%3dneutral%2c+PublicKeyToken%3d31bf3856ad364e35%3aen-US%3a3de828f0-5e0d-4c7d-a36b-56a9773c0def%3aea597d4b%3ab25378d2%3bTelerik.Web.UI%2c+Version%3d2010.3.1109.35%2c+Culture%3dneutral%2c+PublicKeyToken%3d121fae78165ba3d4%3aen-US%3a62e881c6-518e-447d-b6e7-1af83cb2d164%3ae330518b%3a16e4e7cd%3af7645509%3a24ee1bba%3a1e771326%3ac8618e41%3af46195d3%3aaa288e2d%3a58366029%3ae4f8f289%3a874f8ea2%3a19620875%3a490a9d4e%3abd8f85e4%3aed16cbdc
    Line: 15
  4. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 17 Dec 2010 Link to this post

    Hello Jay,

    GridHyperLinkColumn filter on it's DataTextField and you should also have to set DataType in order to have correct filter working.

    <telerik:GridHyperLinkColumn SortExpression="Title" DataTextField="Title"
       DataNavigateUrlFields="ID" UniqueName="Title"
       DataNavigateUrlFormatString="~/Page.aspx?id={0}" HeaderText="Title"
       CurrentFilterFunction="Contains" ShowFilterIcon="false" AutoPostBackOnFilter="true"

  5. Jay Leffue
    Jay Leffue avatar
    22 posts
    Member since:
    Nov 2009

    Posted 17 Dec 2010 Link to this post

    Super, worked.
  6. Nathan
    Nathan avatar
    2 posts
    Member since:
    Aug 2008

    Posted 13 Apr 2012 Link to this post

    I'm having the same problem, and setting the Datatype hasn't fixed it for me.  I can make a normal GridBound column pointing to the same data field, and it will work fine.  Any other ideas? :)

    <telerik:GridHyperLinkColumn DataTextField="RequestDisplayID" DataType="System.String"
        HeaderText="P. Requisition" UniqueName="RequestDisplayID" AutoPostBackOnFilter="true" ShowFilterIcon="false" CurrentFilterFunction="Contains"
        DataNavigateUrlFields="RequestID" DataNavigateUrlFormatString="Requests.aspx?ID={0}" SortExpression="RequestDisplayID" >
Back to Top