Click here to Skip to main content
15,905,563 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Quote:
how to add new row in datagrid(Visual Studio 2013 -wpf ) when click on a button outside datagrid
Posted
Comments
Karuppasamy P 18-Mar-14 8:30am    
would be better if you give some more info, using MVVM pattern?
Namasivayam Raja 19-Mar-14 2:48am    
Problem Scenario
develop a inventory control system.For that need to a add multiple data at run time for billing. i am using visual studio 2013 and WPF application for development.

1 solution

To add rows via code, try DataGrid.Items.Add(new DataItem());
 
Share this answer
 
Comments
Namasivayam Raja 18-Mar-14 6:28am    
exception raised for DataGrid.Items.Add(new DataItem());
"EditItem is not allowed for this view"

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