Click here to Skip to main content
15,881,559 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more: , +
I want to clone a row of DataGrid in wpf i.e: on run time I will select a row and add a button which add a new row in datagrid and will have the same values which the selected row had.

Please help me achieving this functionally. Please let me know if more clarification is required.

Thanks
Posted
Comments
[no name] 1-May-14 11:17am    
What have you tried? What problems did you encounter with your code?

1 solution

Assign the datasource of the first datagrid to the second datagrid.
This way you will have two grids displaying the same data.
 
Share this answer
 
Comments
Kschuler 1-May-14 16:12pm    
I think OP only has one datagrid.
Member 10629274 2-May-14 4:49am    
I dont want to clone the complete datagrid, I have to clone a row of datagrid.
Kschuler 2-May-14 9:13am    
Yes, but are you moving the cloned rows into a new grid? Or just to the bottom of the existing grid?

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