I use the following code to bind an arraylist to a datagrid
//fill datagrid
public DataTable configData
{
get
{
DataSet dsTemp = new DataSet();
DataTable Tables = new DataTable();
dsTemp.Tables.Add(Tables);
dsTemp.Tables[0].Columns.Add("val", System.Type.GetType(
"System.String" ) );
foreach (string str in IMDB.ML.Class.Config.getReadPaths())
{
if (str != string.Empty)
{
DataRow myRow = dsTemp.Tables[0].NewRow();
myRow[0] = str;
dsTemp.Tables[0].Rows.Add(myRow);
}
}
return dsTemp.Tables[0];
}
}
However I need to be able to refresh my data after I add some new data to the list.
datagrid.Items.Refresh() doesn't work...
thanks!