DataGridView with blank cells?

  • Thread starter Thread starter Max
  • Start date Start date
M

Max

Hello,

I have a datagridview object on my form along with some other controls. When the application runs, the datagridview is populated
with data from a database. Although the right number of records is displayed, all the cells in each record are blank. Any idea why?

Thanks,
Max.
 
Hello,

I have a datagridview object on my form along with some other controls. When the application runs, the datagridview is populated
with data from a database. Although the right number of records is displayed, all the cells in each record are blank. Any idea why?

Thanks,
Max.

Hello,

I take it you have checked the database and there is actually data
there?

Cheers,
Gary
http://www.garyshort.org
 
Yes, there is data, and I fixed the problem. What I did was, I created columns in the dgv object and when I set the datasource to a
table the table columns appended to the ones in the dgv even though they had the same name. Obviously I couldn't see these extra
columns in my workspace area but once I enlarged the dgv I realized what was wrong. Removed the extra columns and now everything is
fine.

Thanks,
Max.
 
Hi,

How do you populate your dataGridView? Sp or select statement?
Does your Query returns any results? Otherwise you get an empty view.

David
 

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

Back
Top