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

swap two columns from code behind

1 Answer 28 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Alyssa
Top achievements
Rank 1
Alyssa asked on 21 Dec 2013, 12:53 PM
Hi,
How to swap two columns from code behind

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 21 Dec 2013, 01:01 PM
Hi Alyssa,

Please try the following code snippet:

C#:
protected void RadGrid1_PreRender(object sender, EventArgs e)
{
  RadGrid1.MasterTableView.SwapColumns("Column1", "Column2");
}

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