Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
705
Grid is not updated...
posted

Hello,
I set the DataSource of the grid to a Linq Table.
Then I added a new row to the Table but
this new row is not shown in the grid.

This is a very critical problem for me.

How can I fix this? 

Parents
  • 69686
    posted

    Hello,

    Can you please give us some code snippet on how you bind the XamDataGrid? Are you binding it to a query (IQueryable) or to the table of the Linq context ? Can you confirm that other controls do show the new row (like a ListView)?

Reply Children
  • 69686
    Verified Answer
    posted in reply to Stefan

    The new row is not being shown because  the EntitySet does not send notifications to be bound control (XamDataGrid or ListView). The XamDataGrid is listening to the CollectionChanged event of the underlying data source collection, which the EntitySet does not expose. What you can do is call the GetNewBindingList method of the EntitySet. This will return an IBIndingList object will will notify the XamDataGrid when new objects are added or removed.