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

detect when column header is clicked

1 Answer 60 Views
Grid
This is a migrated thread and some comments may be shown as answers.
appdev
Top achievements
Rank 1
appdev asked on 07 Nov 2008, 02:41 AM
how do you detect if the column header was clicked for sorting. beccause i want to capture that action so i could reload the page. i have the 

 

If Not ScriptManager1.IsInAsyncPostBack  this is why everytime i click on the column to sort it doesn't work. but then again why do i have to reload the data on every single click on the paging number. in the heirarchy grid, there was no reloading data at all. please help me thank you very much.

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 07 Nov 2008, 05:22 AM
Hi Duy,

You can check in the ItemCommand event whether the column header is clicked for sorting. Check for the CommandName as Sort which will be fired each and every time you click the column header for sorting.

CS:
 protected void RadGrid1_ItemCommand(object source, Telerik.Web.UI.GridCommandEventArgs e) 
    { 
        if (e.CommandName == "Sort") 
        {  
         
        } 
    } 



Thanks
Shinu.
Tags
Grid
Asked by
appdev
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or