Insert data into a Data Grid View using Visual Studio 2005/C#
Posted on 2007-04-10
I have a Windows program that I wrote in Visual Studio 2005 using C#. It loops through a list of machine names and tries to contact them. I would like to display the results in a grid format, but I can't figure out how to use a grid without a datasource. I want a blank grid (except for headers), with a known number of columns that I can programmatically add rows to. The data will not be retained when the program exits. I've tried setting up a Data Grid View with no data source and I can add columns in the designer, but I can't find a method that will allow me to create a new row.