If you need a unbound datagrid, you have to use DataTable class.
Example
//create a new data table
DataTable dgTable = new DataTable();
//lets create one column
DataColumn dgCol = new DataColumn();
dgCol.DataType = System.Type.GetType("System.String");
dgCol.Caption = "Names";
dgCol.ColumnName = "ColName";
//add column to data table
dgTable.Columns.Add(dgCol);
//lets create a row
DataRow dgRow = new DataRow();
dgRow["Names"] = "My Name";
//add row to data table
dgTable.Rows.Add(dgRow);
//set data table as datasource in the data grid
dataGrid1.DataSource = dgTable;
Shak
(Houston)
"rawCoder" <ra******@hotmail.com> wrote in message
news:u2**************@TK2MSFTNGP11.phx.gbl...
Hi There,
I simply want a DataGrid in .NET which acts .. well like the old VB6 grid
... where you fill and access elements directly ... not being dependant on
some data source or DataSet to be more precise.
IOW need a perfectly UnBound DataGrid elements of which can be
added/accessed/modified using simple .Rows and .Columns
Thank You,
rawCoder