data to display in the grid at run time?

Pescadore

Member
Joined
Nov 24, 2009
Messages
13
Programming Experience
5-10
I've added a datasource to my project and dragged an element from Data Sources onto my form. It automatically created a DataViewGrid and placed this statement in my form load event: Me.SortBillsTableAdapter.Fill(Me.DoBills_2009DataSet.sortBills). When I preview the data element from right clicking the element, selecting Preview Data, and click Preview in the Preview Data dialog box, the data appears. But it does not appear when I run the app. The datagridview is empty. What am I missing to get the data to display in the grid at run time?
 
Last edited:
Delete it, the bindingsource, the dataset, the bindingnavigator and the table adapter from the form and drop it on again.. THen run your project

Probably you unlinked some aspect of the databinding but it'll be faster to tell you to start over than to track it down

If you end up with 2 lines of code for Fill, remove one of them
 
Rev

Thanks for the reply, cjard. I'm getting pretty frustrated. I started over from scratch: new project, new form, etc. The only things I've done are add the database and drag/drop a query on the form. I got the same as before: the data is there when I preview it, but not when I run the app. I did notice that in the properties for the dataviewgrid the databindings property is empty. Is that right or am I supposed to do something there?
 
Pescadore

_____________________________________________________________________________________
Solution:

That's it! Thanks Arjun Paudel for the link. Here's the solution as found on XNA Creator's Club Online. It's by Stephen Styrchak.


The following erorr:

The 'Microsoft .ACE.OELDB.12.0' provider is not registered on the local machine

suggests me to believe that you are compiling for 64bit

I dont have express edition but are following steps valid in 2008 express?

AnyCPU vs x86 running on x64 - XNA Community Forums

Datagridview does not show data at run time in VB Express 2008 in Windows 7
Arjun Paudel
_____________________________________________________________________________________

In VC# Express, this property is missing, but you can still create an x86 configuration if you know where to look.

It looks like a long list of steps, but once you know where these things are it's a lot easier. Anyone who only has VC# Express will probably find this useful. Once you know about Configuration Manager, it'll be much more intuitive the next time.

1.In VC# Express 2005, go to Tools -> Options.
2.In the bottom-left corner of the Options dialog, check the box that says, "Show all settings".
3.In the tree-view on the left hand side, select "Projects and Solutions".
4.In the options on the right, check the box that says, "Show advanced build configuraions."
5.Click OK.
6.Go to Build -> Configuration Manager...
7.In the Platform column next to your project, click the combobox and select "<New...>".
8.In the "New platform" setting, choose "x86".
9.Click OK.
10.Click Close.
There, now you have an x86 configuration! Easy as pie! :)

I also recommend using Configuration Manager to delete the Any CPU platform. You really don't want that if you ever have depedencies on 32-bit native DLLs (even indirect dependencies).

Stephen Styrchak | XNA Game Studio Developer
AnyCPU vs x86 running on x64 - XNA Community Forums
_____________________________________________________________________________________
 
Back
Top