I'm using the asp.net radgrid in a project and I'm using the autogenerate columns feature. Now, I'd like to add a column to the autogenerated ones, and it needs to be the last column in the grid.
I can add a first column declaratively, but is there any way to add a last column?
Thanks.
Stefan
3 Answers, 1 is accepted
0
Martin
Telerik team
answered on 26 Sep 2009, 12:56 PM
Hello Stefan,
An autogenerated column is created for every field of the data source to which the table view is bound. Hence adding another autogenerated column would require to create a new data field in the data source and then bind the TableView (or rebind the TableView if it was bound before the new data filed was created). You can read more about the different column types here.
Thanks for your answer, but I need to add a commandcolumn, actually, not an autogenerated column. I guess my question wasn't really clear at this point, sorry.
So in addition to the autogenrated data columns, I need to add a buttoncolumn as last (rightmost) column.
Any more ideas?
Thanks,
Stefan
0
Martin
Telerik team
answered on 28 Sep 2009, 03:24 PM
Hello Stefan,
Here is a small quote of our documentation about explicitly created columns:
Explicitly-created columns (columns created in the Property Builder or at runtime) are added to the Columns
property collection. They appear
in the table view in the order in which they are declared and before
any automatically-generated columns (unless you order the columns
programmatically).
For more details about the different column types please view Column types.