I am very new at coding. Now I am going to tell you about my current situation and where I wanna go. Hope you will help.
I am using EF5.0 database first approach and I want to be able to use gridviews for listing and updating the database values.
Currently I am binding my data like this:
pehlivan_kabametrajEntities ctx = new pehlivan_kabametrajEntities();
var result = from k in ctx.Kolons
select k;
dataGridView1.DataSource = result.ToList();
This code lists my data perfectly. However it is wrong or not enough for my needs. Because I want to be able to edit my data right on the gridview. Please tell me what is wrong and what should I do. At least links of some documents that will reach me to the destination point I desire would be great.
Thx.
If you bind to query result you are using only one-way data binding. You need to have
IBindingListto get two way data binding. Try this:If it doesn’t work try to use
BindingSource: