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

How to capture the event on CloumnHeader...

1 Answer 63 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Nikhil Jain
Top achievements
Rank 1
Nikhil Jain asked on 13 Jan 2011, 08:01 AM
Hi

I want to know, How can capture the Event and the ColumnHeader Name while clicking on ColumnHeader.  I am trying to achieving multicolumn sorting through programming in which server interaction also their.

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 28 Jan 2011, 06:43 AM
Hello,


Attach Sorting event to get the column clicked and to perform your logic to sort grid.

Code:
public Window1()
{
    InitializeComponent();
    radGridView1.Sorting += new EventHandler<GridViewSortingEventArgs>(radGridView1_Sorting);
}
 
void radGridView1_Sorting(object sender, GridViewSortingEventArgs e)
 {
     // e.Column.UniqueName gives the column clicked
 }


More information you can find here:
Custom Sorting
Programmatic Sorting


-Shinu.
Tags
GridView
Asked by
Nikhil Jain
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or