How to add a new column to a grid?
I have a datagrid
with two columns and with two buttons inside the grid: edit and delete.
Wh开发者_开发知识库en I click on edit I want a new column to be added to the grid.
How do I this?
Use the method datagrid.Columns.Add()
.
As Sjoerd said, use the method but it will not have a name. You would need to add the name of the column in the method unless you edit it directly in the datagrid.
精彩评论