|
-
Apr 30th, 2018, 12:26 PM
#1
Thread Starter
Frenzied Member
Bind a DataGridView to a table in Entity Framework
I am using Entity Framework to work with a simple table. How do I bind a DataGridView to a table?
-
Apr 30th, 2018, 07:42 PM
#2
Re: Bind a DataGridView to a table in Entity Framework
You don't. You bind to a list of some sort. You query your EF context in an appropriate manner and then call ToList or ToArray on the result to get a generic List or an array, then you bind that to your DataGridView, preferably via a BindingSource. If you want to be able to add and remove items, a List would be the better option.
-
Apr 30th, 2018, 09:33 PM
#3
Thread Starter
Frenzied Member
Re: Bind a DataGridView to a table in Entity Framework
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|