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
1024
Refresh XamDataGrid when changed DataSource
posted

Hi, I know that this question must have been asked a lot here in the forum , yes I couldn't find just the one suit for me.

 

My XamDataGrid DataSource is simply a list of objects. Each time I want to change the datasource, I simply do this:

xamDataGrid.DataSource = null;

xamDataGrid.DataSource = clients;

clients is my List as you can understand and it is the same list that was the datasource of the xamdatagrid before those lines. It's just because I have changed the objects in the list that I change the datasource as I do. But I believe that isn't the correct way.

Then what is?