Hi,
I am binding a datagrid from
pagecollectionview with grouping. Its working fine, but when I am updating a record in datagrid then datagrid UI is not getting refreshed.
But when I am checking, the updated record exist in
consoleCollection.
Please help.
if (grdConsole.ItemsSource == null)
{
ConsoleCollection = e.Result.Response;
grdConsole.ItemsSource = GetGroupedCollection(ConsoleCollection, CurrentGroupByColumn);
}
else
{
foreach (Task data in e.Result.Response.OrderBy(item =>item.TaskID))
{
var existingData = (from con in this.ConsoleCollection
where con.TaskID == data.TaskID
select con).FirstOrDefault();
if (existingData != null)
{
this.ConsoleCollection.Remove(existingData);
}
this.ConsoleCollection.Add(data);
}
}