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

GridHyperLinkColumn sort issue

6 Answers 93 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Michael
Top achievements
Rank 1
Michael asked on 30 Jul 2012, 10:28 PM
It appears that with the latest SP1 of Q2 2012 (or maybe Q2...not sure when it started happening), the GridHyperLinkColumns are only sortable if you specify "AllowSorting='True'" on them.  Before, we were able to just put the SortExpression, like you can do with the GridBoundColumn.  It would take me awhile to actually go back to a previous version in order to verify this is really the case, but I am fairly sure that the columns in our app that are GridHyperLinkColumns did use to sort, if they had a SortExpression on them, and now they don't.  I verified that the latest version does work this way in a new web application.  I can't imagine this behavior would change on purpose.  Anyone else experience this one?

Sample code used:

<%@ Page Title="Home Page" Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="TelerikSortTest._Default" %>
 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
 
<html>
<head><title></title></head>
<body>
    <form runat="server">
    <asp:ScriptManager runat="server" ID="ScriptManager1" />
    <telerik:RadGrid ID="RadGrid1" runat="server" AutoGenerateColumns="false" OnNeedDataSource="RadGrid1_NeedDataSource" AllowSorting="true">
        <MasterTableView>
            <Columns>
                <telerik:GridHyperLinkColumn SortExpression="Name" HeaderText="Name" DataTextField="Name" DataNavigateUrlFormatString="CampaignEdit.aspx?CampaignKey={0}" DataNavigateUrlFields="PCM_CampaignKey" />
                <telerik:GridBoundColumn SortExpression="Description" HeaderText="Description" DataField="Description" />
            </Columns>
        </MasterTableView>
    </telerik:RadGrid>
    </form>
</body>
</html>

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
 
namespace TelerikSortTest
{
  public partial class _Default : Page
  {
    protected void Page_Load(object sender, EventArgs e)
    {
 
    }
 
    protected void RadGrid1_NeedDataSource(object sender, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
    {
      var data = new[] { new { PCM_CampaignKey = 1, Name = "Item ABC", Description = "Description ABC" },
        new { PCM_CampaignKey = 2, Name = "Item DEF", Description = "Description DEF"},
        new { PCM_CampaignKey = 3, Name = "Item GHI", Description = "Description GHI"}};
 
      this.RadGrid1.DataSource = data;
    }
  }
}

6 Answers, 1 is accepted

Sort by
0
Najid Hanif
Top achievements
Rank 2
answered on 31 Jul 2012, 07:51 PM
Nice catch! I can confirm that I see this behavior also. See screen shot. My code between DEV and PROD for the columns are the same.

0
Michael
Top achievements
Rank 1
answered on 31 Jul 2012, 08:53 PM
Glad to hear it's not just me!  Now to wait for an official response.  I think this is serious enough to warrant a hotfix.  I'd hate to have to search my whole app of hundreds of pages for GridHyperLinkColumns that have a SortExpression...would be a nice time waster to go fix them all.
0
Antonio Stoilkov
Telerik team
answered on 02 Aug 2012, 08:15 AM
Hi,

We have investigated the issue and already have fix for it. You could resolve your issue by downloading the next internal build which will be available next week. Sorry for the caused inconvenience .

Greetings,
Antonio Stoilkov
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Michael
Top achievements
Rank 1
answered on 02 Aug 2012, 01:57 PM
Great, thanks for fixing this issue.  We can use the internal build for now, but would like the fix in a service pack that has gone through your full QA process.  Do you have any estimated date for a Service Pack 2 on Q2 2012?
0
Accepted
Antonio Stoilkov
Telerik team
answered on 03 Aug 2012, 10:36 AM
Hi,

The 2012 Q2 Service Pack 2 should be released in the second week of September.

Greetings,
Antonio Stoilkov
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Michael
Top achievements
Rank 1
answered on 03 Aug 2012, 01:02 PM
That's great news!  Thank you for fixing this one.
Tags
Grid
Asked by
Michael
Top achievements
Rank 1
Answers by
Najid Hanif
Top achievements
Rank 2
Michael
Top achievements
Rank 1
Antonio Stoilkov
Telerik team
Share this question
or