How to bind selected columns to datagridview at runtime.
I have written select * from tableName. And result i have stored in DataTable dt. Now i want only selected columns to be displayed in datagridview at runtime. I dont want to bound gridview at designtime.
Thanks hericles its working.
All i have done is instead of writing DataGridViewTextBoxColumn i have written DataGridViewColumn. And DataGridViewColumn's obj.CellTemplate = new DataGridViewTextBoxCell(); because DataGridViewTextBoxColumn do not have DataPropertyName property.
Thank you your link was helpfull