I am using TreeListView.
I am adding columns dynamically at runtime
GridViewDataColumn
column;
for (int icnt = 1; icnt < ts.Days; icnt++)
{
column =
new GridViewDataColumn();
column.UniqueName =
"key" + icnt.ToString();
column.IsReadOnly =
false;
RadTreeListView1.Columns.Add(column);
}
I am populating the cell data in RadTreeListView1_RowLoaded event.
var
row = e.Row as TreeListViewRow;
foreach (GridViewCell cell in row.Cells)
{
if (cell.IsLoaded)
{
DateTime dates;
if (DateTime.TryParse(cell.Column.Header.ToString(), out dates))
{
string filter = "dates = '#" + dates.ToShortDateString().ToString() + "#'";
DataRow[] dr = lobjdt.Select(filter);
if (dr != null && dr.Length > 0)
{
cell.Content = dr[0][
"hours"].ToString();
}
}
}
}
I am facing one problem here.
Data in dynamic columns will populate only when columns are visible , data wont get populate if columns are not
visible.
I guess there is a problem with virtulisation while horizontal scrolling..
Please suggest.