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

Change the position of the columns

1 Answer 58 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Syed
Top achievements
Rank 1
Syed asked on 09 May 2009, 10:29 AM
Hi,

I want to change the positions of the columns on the RadGrid.

I have a selectcommand="Select RNO,Rname,MonJan,MonFeb,MonMar,MonApril..........".

sometime i need my selectedcommand in different ways.


selectcommand="Select RNO,Rname,MonApril,MonMar,MonFeb,MonJan..........".
selectcommand="Select RNO,Rname,MonMar,MonFeb,MonJan,MonApril,..........".


I just a sample from the above one.

I tried but fails all the time.

Thanks.

Regards




1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 11 May 2009, 08:32 AM
 Hi Syed,

Try changing the positions of the Grid columns using the Swap method as shown below.

CS:
 
protected void RadGrid1_PreRender(object sender, EventArgs e) 
    { 
 
        RadGrid1.MasterTableView.SwapColumns("MonMar","MonApril"); 
    } 


Thanks
Princy.

 
Tags
Grid
Asked by
Syed
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or