I posted you my problem through other post and used your suggested DataTable. The Propblem is I am not able to display Data in the form rows in the Gridview after using DataTable I have attached the screenshot regarding the same. Please suggest me the change that is required. I read about DataTable from this post http://blogs.telerik.com/vladimirenchev/posts/09-04-23/lightweight_datatable_for_your_silverlight_applications.aspx.
I am first creating columns:
foreach (string time in times)
{
dataValue = new KeyValuePair(time, string.Empty);
//collection.Add(CreateColumn(dataValue));
_Table.Columns.Add(new DataColumn() { ColumnName = dataValue.Key, DataType = typeof(string) });
}
then setting Rows:
//Row row = new Row();
DataRow row = new DataRow();
//Insert data for all the columns for each row
foreach (TimeDataPoint dataPoint in dataSet._Points)
{
foreach (string time in times)
{
if (time != "-" && time == dataPoint._XValue)
{
row[time] = dataPoint._YValue.ToString();
break;
}
}
}
_Table.Rows.Add(row);
}
dg.ItemsSource = _Table.ToList(); //sortableCollectionView;
thanks
Manish