Dynamically add Columns to DataGrid in wpf
问题 I am currently working on a custom canvas and in that i have to add a table,So i thought dataGrid would be fine. SO i Want to create a " Table" from "Datagrid" by which user can add a table to the canvas at runtime. Till now, I have tried to Populate DataGrid With a list and succeded. How Can I add Columns to a Datagrid at runtime,such that the number of columns and header value Would be taken from the user at runtime using a textbox and based on the value of the textbox the datagrid should