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

[Solved] setting the row edit buttons on the left of the grid

2 Answers 85 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Babu Mannaravalappil
Top achievements
Rank 1
Babu Mannaravalappil asked on 12 Nov 2009, 08:45 PM
Hi,

I have disabled autogenerate columns on the grid and create them declaratively and in some other cases, programmatically.   Either case, I have autogenerate edit column set to true.  When the grid is rendered on screen, the Edit link button column aslways appear as the last column in the grid.  In many cases, I would like to have it displayed as the first column of the grid.  How can I accomplish this?
I don't see (or missed) any property on the grid that I can set for this purpose.

Babu.

2 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 13 Nov 2009, 05:26 AM
Hi Babu,

One suggestion to accomplish this is swap the EditColumn with the first column in the grid as shown below.

CS:
 
    protected void RadGrid1_PreRender(object sender, EventArgs e) 
    { 
        RadGrid1.MasterTableView.SwapColumns("ColumnUniqueName1""AutoGeneratedEditColumn"); // ColumnUniqueName1 is the columnuniquename of the first column 
    } 

Regards,
Shinu.
0
Babu Mannaravalappil
Top achievements
Rank 1
answered on 16 Nov 2009, 05:38 PM
Thanks Shinu,

Your suggestion doesn't seem to be an elegant one.  What are the other suggestions.  I know, If I created the command columns in code, I can put them anywhere I want.  But when command columns are autogenerated, It would be nice to have a column index property or something along those lines for the position of this column.  Or at least either a left or right position property would be nice.  May be something like that is already available.  Could you let me know please?

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