Click here to Skip to main content
15,880,469 members
Please Sign up or sign in to vote.
2.60/5 (3 votes)
See more:

can any one plz send me soln.
Posted
Comments
Pheonyx 19-Jun-14 6:11am    
No one is likely to help you when you have shown no attempt at doing anything yourself. You've not given a code example showing where exactly you are stuck. Try something, do some coding, do some research and when you have a real question then return here and ask for help.

You can use also below code :
C#
DataGridTextColumn txtColumn = new DataGridTextColumn(); 
txtColumn.Header = "ID"; 
txtColumn.Binding = new Binding("ID"); 
dataGrid.Columns.Add(txtColumn); 

to add a column dynamically
 
Share this answer
 
Please refer this link

it has code that add column to datgrid

how to add rows to WPF datagrids[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900