DataGrid won't show when i debug.

N

neocarl

Hi,

I am fairly new to VB.net and ADO.net. I am having a problem when
Connecting the database to to website i am creating with vb.net.
Basically The final step I did was create the datagrid, so the databse
would fill inside it. However, on the design time window it is
visible, but when I run it from debug mode, the datagrid dissapears.
Any suggestion?

This is the code i wrote inside the fill button to fill the datagrid:

DsThreeDees1.Clear()
OleDbDataAdapter1.Fill(DsThreeDees)

Is there a code to make the datagrid visible or somthing?

Any help appreciated.
Thanks alot
 
K

Karim

I am assuming that DsThreeDees1 is your datagrid

try this
'---------------
Dim dt as new DataTable()
OleDbDataAdapter1.Fill(dt)
DsThreeDees1.DataSource = dt
DsThreeDees1.DataBind()
'----------------
 
N

neocarl

Hi,

I am fairly new to VB.net and ADO.net. I am having a problem when
Connecting the database to to website i am creating with vb.net.
Basically The final step I did was create the datagrid, so the databse
would fill inside it. However, on the design time window it is
visible, but when I run it from debug mode, the datagrid dissapears.
Any suggestion?

This is the code i wrote inside the fill button to fill the datagrid:

DsThreeDees1.Clear()
OleDbDataAdapter1.Fill(DsThreeDees)

Is there a code to make the datagrid visible or somthing?

Any help appreciated.
Thanks alot

Hi, sorry to bother again. I tried typing in the third line of code,
but DsThreeDees1.datasource keeps getting underlined. Now in the
properties i set the datamember even the datasource just as the book
instructed. Any suggestion?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top