RSS Forums RSS
Please support our C# advertiser: Programming Forums

From database to a datagrid

Join Date: Jun 2007
Posts: 321
Reputation: Hamrick will become famous soon enough Hamrick will become famous soon enough 
Rep Power: 3
Solved Threads: 33
Hamrick's Avatar
Hamrick Hamrick is offline Offline
Posting Whiz

Re: From database to a datagrid

  #2  
Jul 31st, 2007
This is a DataGrid and not a DataGridView, right? DataGrids are weird in that you have to make a table style to the grid and add columns to the table style to get what you want. DataGrids aren't a storage medium, they're a presentation tool so you can't store rows in the grid itself. What you probably want is a DataView on your table that you can use as the data source for the grid. That gives you more control over what's presented.

If possible I recommend that you move to a DataGridView for .NET 2.0. It's a lot easier to figure out and you can do more with it with less work. If it's not possible to switch, this is a good FAQ for Windows Forms in .NET 1.1 and this is an article that addresses how to use table styles and columns. It should get you started.

If you have any questions about the specifics, I'll be happy to help.
The truth does not change according to our ability to stomach it.
Reply With Quote  
Forums | Blogs | Tutorials | Code Snippets | Whitepapers | RSS Feeds | Advertising
All times are GMT -4. The time now is 6:52 am.
Newsletter Archive - Sitemap - Privacy Statement - Acceptable Use Policy - Contact Us
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC