Make a table
ASP.NET
2
Posts
2
Posters
0
Views
1
Watching
-
My first question:How do I make a (10*10) table? Second Question:When I make a table, how do I give Id to tables fields? Thank you...
DataTable tb = new DataTable("TableName"); for( int i=0; i<10; i++ ) { tb.Columns.Add( new DataColumn("ColumnName") ); // ColumnName is also the ID of this column, case-sensitive } for( int j=0; j<10; j++ ) { tb.Rows.Add( tb.NewRow() ); }
how to access to the cell:tb.Rows[rowIndex][columnName]