Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Simple Grid Databinding

Status
Not open for further replies.

hitechboy78737

Programmer
Nov 8, 2004
82
US
Perhaps I don't understand the procedure, but I can't seem to get a dataTable to bind to a datagrid.

After binding the datatable to the dataSource property of the grid, how do the cols/rows map to the data?

When I bind a table, I get no display- only the blank grid

ex.
Code:
datagrid.dataSource = dataTable

This gives me an empty grid... what am I missing here?

Thanks

Kevin Howell
Briefcase of Talent
Austin, Texas
 
What's in your data table?

-Rick

----------------------
[banghead]If you're about to post an ASP.Net question,
please don't do it in the VB.Net forum[banghead]

[monkey] I believe in killer coding ninja monkeys.[monkey]
 
Yes...I would guess you have an empty datatable too. What is the datasource you have specified?. Is it a dataset, datatable or dataview?. Passing a dataset wont work, try dataset.tables(0)
Pre-empting future grid questions take a look at thread796-1029632

Sweep
...if it works dont mess with it
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top