Hello,
I have an app that creates grids programmatically and then populates them (in unbound mode) with data. However I don't actually see the rows displayed in the grids until I do some other activity. For example if I add another new row manually, or reorder columns, etc. then suddenly I will see all the previously added rows. I tried putting in a call to Refresh() for each grid when I was done adding rows but that didn't seem to help.
Another consideration is that the grids are all being held in a TableLayoutPanel control (groupFactTable in the above code sample). I also tried calling the Refresh method for that parent control but that didn't help either.
I'm using the Jan 2009 version (8.2.0.0) of the RadGridView. Any thoughts would be greatly appreciated.
Thanks!
Eddie
I have an app that creates grids programmatically and then populates them (in unbound mode) with data. However I don't actually see the rows displayed in the grids until I do some other activity. For example if I add another new row manually, or reorder columns, etc. then suddenly I will see all the previously added rows. I tried putting in a call to Refresh() for each grid when I was done adding rows but that didn't seem to help.
private void populateGroupFactControls() | |
{ | |
var level2Grids = from fact in activeJob.FactSet | |
where fact.Level == 1 && fact.DataTypeDesc == p.factTypeGroup | |
select new | |
{ | |
GridName = uiUtility.CreateFactGridName(fact.FactName), | |
Rows = | |
from childFact in activeJob.FactSet | |
where childFact.Level == 2 && childFact.ParentFactID == fact.FactID | |
join factValue in activeDataElement.Values | |
on childFact.FactID equals factValue.FactID | |
group factValue by factValue.GroupInstanceID | |
into rowCells | |
select new | |
{ | |
RowID = rowCells.Key, | |
Cells = rowCells | |
} | |
}; | |
foreach(var grid in level2Grids) | |
{ | |
var gridControl = (RadGridView) groupFactTable.Controls.Find(grid.GridName, true).First(); | |
gridControl.Rows.Clear(); | |
foreach(var row in grid.Rows) | |
{ | |
GridViewRowInfo newRow = gridControl.Rows.AddNew(); | |
newRow.Cells[p.RowID].Value = row.RowID; | |
foreach(var cell in row.Cells) | |
{ | |
newRow.Cells[cell.FactID].Value = cell.InstanceValue; | |
} | |
} | |
gridControl.Refresh(); // Doesn't seem to help | |
} | |
groupFactTable.Refresh(); // Doesn't seem to help either | |
} | |
Another consideration is that the grids are all being held in a TableLayoutPanel control (groupFactTable in the above code sample). I also tried calling the Refresh method for that parent control but that didn't help either.
I'm using the Jan 2009 version (8.2.0.0) of the RadGridView. Any thoughts would be greatly appreciated.
Thanks!
Eddie