Click here to Skip to main content
15,886,137 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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.
C#
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);
       }

}
Posted
v2

1 solution

Hi Vikas,

You need to bind the grid again after the update.
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900