none
How to retrieve the sort column name from ReportViewer.Sort event? RRS feed

  • Question

  • Hi,

    I was using the Microsoft.Reporting.WebForms.ReportViewer. I created data sources, report files, everything... I also added sorting capability to the ReportViewer. But here's my problem: When a column's header is clicked, an event called ReportViewer.Sort is fired. I need to catch that event to retrieve the sort column's name, and then use that for something else.

    Now this event takes an object parameter, and a SortEventArgs parameter. The SortEventArgs contains a property called SortId. I tried to use that property, but that property returns some random number that's unique to this sort action...

    The question is: How can I retrieve the name of the sort column at runtime in the ReportViewer.Sort event? Or is there any other way?

    Please help!

    Thanks,

    Abdul

    Monday, August 19, 2013 1:17 PM