D
D
Dmitry2015-05-20 01:14:21
WPF
Dmitry, 2015-05-20 01:14:21

How to write commands to buttons for DataGrid in WPF?

Good time.
Please tell me where can I look or how to register commands on the buttons Load Insert Delete Update Exit?
The problem is that I just started learning C # right away on WPF.
I open VS 2010 I create a WPF application (4 framework) in the application I create a MainBase folder in it I create a local base.mdf in it I create a table.
I take it out by transferring it to the Grid automatically, a Datagrid is created at the bottom, I make 4 buttons written above.
I can't write them down. Although Insert came out to write but when you save, nothing happens. I close the program, open it again (I press F5 and the data appears)
Help me figure out the commands for the buttons pliz.
So that the entered data would appear without closing-opening the program and the line could be deleted both from the DataGrid and from the database at the same time.
Thank you in advance...

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Roman, 2015-05-20
@vip1987

I advise you to read about Entity Framework, DataBinding and MVVM.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question