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

[Solved] Place column after auto generated columns

1 Answer 122 Views
Grid
This is a migrated thread and some comments may be shown as answers.
IT Support
Top achievements
Rank 1
IT Support asked on 14 Jan 2010, 11:14 AM
Hi,

In my radgrid, I have AutoGenerateColumns == true.
I also have one column defined myself in the aspx file in the <Columns> section.

This column I have defined, will always appear BEFORE the auto generated columns, how can I get it to appear as the LAST column? So after the auto generated columns?

I already tried to use SwapColumns() function in the OnColumnCreated event, but that did not work.

Kind Regards,
Raymond

1 Answer, 1 is accepted

Sort by
0
Accepted
Princy
Top achievements
Rank 2
answered on 14 Jan 2010, 11:29 AM
Hi Raymond,

Try Swapping columns in the PreRender event of the grid as shown below:
c#:
protected void RadGrid1_PreRender(object sender, EventArgs e) 
    { 
        RadGrid1.MasterTableView.SwapColumns("LastColumnUniqueName""Column1UniqueName"); 
    } 

Thanks
Princy.
Tags
Grid
Asked by
IT Support
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or