Multiple grids need to be updated at load time straight after the data has been created.
If the gridviews are on tabs only the first active tab is immediatly accessible
I can't seem to get access to the cells that should already be rendered on the grid the column count is 5 but the cell return is null.
Help please
please see example
// ===============================================================================
// Load the service information
//================================================================================
var mydata4 = from info in odoc.Descendants("PG").Elements("SER").Elements("PS")
select new Service
{
Servicer =
Convert.ToString(info.Element("B").Attribute("V").Value),
Reason =
Convert.ToString(info.Element("R").Attribute("V").Value),
Invoice =
Convert.ToString(info.Element("I").Attribute("V").Value),
Submitted =
DateTime.ParseExact(Convert.ToString(info.Element("D").Attribute("V").Value), "yyyyMMdd", CultureInfo.InvariantCulture),
Cost =
Convert.ToDouble(info.Element("A").Attribute("V").Value),
};
foreach (Service serv in mydata4)
{
serviceList.Add(serv);
}
radGridView3.ItemsSource = serviceList;
radGridView3.Rebind();
// Now that we've loaded the data grid we need to populate the errors if there are any found
var recs = from info in odoc.Descendants("PG").Elements("SER").Elements("PS") select info;
int count = 0;
This section is returning nulls in the GridViewCell
foreach (var record in recs)
{
GridViewCell temp = GetCellByIndecies(radGridView3, count, 0);
count++;
}
public GridViewCell GetCellByIndecies(RadGridView GridView, int rowIndex, int columnIndex)
{
return
(
from cell in GridView.ChildrenOfType<GridViewCell>()
where GridView.Columns.IndexOf(cell.Column) == columnIndex
select cell).Skip(rowIndex).FirstOrDefault();
}