DataGrid Tutorial for dummies?

Joel Stoner

Member
Joined
May 5, 2012
Messages
7
Programming Experience
5-10
Is there a DataGrid tutorial for people who have never used DataGrid before? Everything i see involves a database. There has to be a simple way to add items to a DataGrid, right?
 
Are you really using .NET 1.1 and do you really mean DataGrid? If so, is there a specific reason that you cannot upgrade to a newer version?

I'm using VB.NET 2003, which i believe is version 7.1, and i do mean DataGrid. It is what i have, and until i can make and sell this program i can not afford to buy a newer version. Most of the stuff i find is for DataGridView, and nothing seems to show adding things to either one without using a database. I just recently decided to move from VB6 to VB.NET
 
You would be better developing using an express version than using a paid for 2003.

If you don't want to use a database, how do you intend to populate it? I am thinking a simple table may better suit your needs.

Sent from my XT910 using Tapatalk 2
 
These are the version numbers of VB.NET and the versions of the .NET Framework they can target:

VB.NET 2002 (7.0) : .NET 1.0
VB.NET 2003 (7.1) : .NET 1.0, 1.1
VB 2005 (8.0) : .NET 2.0
VB 2008 (9.0) : .NET 2.0, 3.0, 3.5
VB 2010 (10.0) : .NET 2.0, 3.0, 3.5, 4.0

From 2005, Microsoft have offered a free Express edition of the VB IDE, plus separate versions for C#, C++ and ASP.NET (with VB and C#). The Express editions don't provide as many features as the paid-for editions, so there are certain things that your VS.NET 2003 can do that VB Express 2010 can't, but if you're not using those features specifically then you really should upgrade. The VB IDE, the VB language and the .NET Framework all have lots of significant new features. If that's not an option, let us know and we can concentrate on what you do have. Otherwise, you can start looking at all that information about the DataGridView.
 
Lotok
I was going to populate it using an XML file of my own creation. Since i know almost nothing about database files, and VB.NET does not work with OpenOffice database files.

jmcilhinney
I have downloaded and installed vb.net 2010 express, but was under the impression that it would not be legal to sell applications made with it, as it is trial ware.
If vb.net 2010 express can be used to develop and sell software, then by all means i will use it instead of 2003 standard.
 
You could use linq to query your xml data and use the results as your data source.

The express editions aren't trial versions, perfectly legal to use.

Sent from my XT910 using Tapatalk 2
 
Yes, Express editions are totally free to use, although you must register, and there are no restrictions on what you can do with the software they create.

There are lots of real database options available without resorting to using an XML file. VB Express has fully integrated support for SQL Server Express and SQL Server CE, which are also both free, as well as support for other free options like MySQL and SQLite.
 
Which Database option would you recommend? Will MySQL work on windows 2000 through 7?

There are plenty of reasons to choose other options but I would generally go for SQL Server as a first choice. The Express edition is free and can support up 10GB per database. I've never actually used MySQL myself but I'm fairly sure that it will run on all those Windows versions.
 
There isn't really a good reason to use 2005. 2012 has just been released and the version before that was 2008 R2. I haven't upgraded to 2012 myself yet but I wouldn't recommend using any older than 2008 R2. If you have the option, you should download and install the version with all the tools. You can then create and manage databases in SQL Server Management Studio. You can then connect to those databases in various ways, e.g. with a System.Data.SqlClient.SqlConnection with the appropriate connection string. Even without Management Studio, you can add a Server-based Database item to your project in VB Express to add an MDF data file directly. That option is generally only for single-user databases where SQL Server Express will be installed on the same machine.
 
Had to go with MS SQL 2008 Express, now trying to get the database setup. Will i have to distribute the MS SQL 2008 express with the program?
 
It depends on the program. If its a business app then usually the database is on a central server and the application talks to it. If its a single user database then it could be packaged with the application if you wanted. It depends on what you are doing.
 
Back
Top