-
November 22nd, 2007, 12:31 PM
#1
Datagid binding
I bound a datagrid to a datatable from a dataset (from oleDbDataAdapter) using datasource and datamember properties but only the fields appear as headings but the data is not there. When I check the oleDataAdapter preview it appears there though. How do I fill the datagrid with the data?
-
November 22nd, 2007, 03:19 PM
#2
Re: Datagid binding
No source code here, so no idea how you did it. Please post source code if you want.
The difficulty is that you have no idea how difficult it is.
.Net 3.5/VS 2008
-
November 26th, 2007, 04:22 AM
#3
Re: Datagid binding
Do you always say "The difficulty is that you have no idea how difficult it is"? True, but I think I know how difficult it is. The reason I did not include source code is that there is none. I used data connection wizard and also set databinding properties of datagridview at design time as I explained - no code - and the reason for this is I needed to see how this ADO thing works before I jump into blind code-writing. What I need to know is just one line of code to fill my datagrid with the data - is it too much too ask?
Perhaps something like oledataAdapter.fill...... in the Form_Load event or something?
Please dont give me a link to some sample that will not work because I spend days trying to fix up bad sample code.
I'm in a tedious learning stage of a lot of things - with this OOPs thing in vb.net - new to it -too many classes and stuff when do you get to attend all of them - I think I'm cracking. Please help with this.
-
November 26th, 2007, 04:43 AM
#4
Re: Datagid binding
You need to fill the dataset before you can see the dataset. Do it in the Form Load event handler and you should be good.
It always helps to mention which version you are using.
-
November 27th, 2007, 02:46 AM
#5
Re: Datagid binding
Resolved. I was looking for the fill method of oledbdataAdapter.
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
|