Click here to Skip to main content
16,023,124 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I want to add a new row in the datagrid when click on a button in the outside of a datagrid.
The datagrid is bound with SQL Server database, and it have some data at runtime
I want to add new data to the database through the database

I tried a lot, but it was unsuccessful

Anyone reply me it will be very helpful for me...

Advance thanks..
Posted

1 solution

The best way to do this in WPF is to make the data source an observable collection. Then you can add items to the collection and the grid will update. Of course, if you have SQL behind it all, you should add the item to the DB and refresh the data source.
 
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