Hi,
Explain more what you want is the problem with the 2-dimensional array of strings and a DataGrid. The DataGrid is very "felxible" and maybe we have an answer.
obislavu
well datagrid seems to want to be linked to one of three other classes that handle the actual data - dataset (which i think links interfaces with external databases like access and sql, datasomething, and satasomethingelse - non of which i know much about.
what i actually want to do is store and manipulate data held within the class that contains the datagrid.
public class Form1 : System.Windows.Forms.Form{
private System.ComponentModel.Container components = null;
String[,] cells;
public Form1(){
InitializeComponent();
cells = new String[10,10];
}...
...so if my code started something like this, i might want a data grid that was links to my 'cells' array.
Hi,
If you want to store an array of string as your example cell[10,10] , you could store the array in a DataGrid object but I think you should use a DataTable object with 10 columns and 10 rows to store the array and get already everything to manipulate and refresh the DataTable object and so the array if you need. A DataTable object could be used without any connection with a database or sql.
try
{
DataTable dt = new DataTable();
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.