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
50
Refresh hierarchical data in XamDataGrid binded to DataView
posted

I have read alot of questions and answers about XamDataGrid refreshing. But I haven´t found andwer for my problem with data refreshing.

I have XamDataGrid binded to DataView /*dataset*/ with hierarchical datatables. New records (added by user) are saved immediately  to the database.

If user adds new record (i.e. called X) to parrent table, records is created in dataset with temporary ID value, which is chanded to real value after saving to the database. Up to here is everythink ok. But problem comes in case the adding new child record (i.e. called Y) to parrent record (X) , becose DataRecord of parrent (X) doesn´t have refresh ID column and XamDatagrid try to add record Y with old temporary value in foreignkey column.

I know I can reset it by "reset" datasource (set to null and than set datasource again), but there is problem, becouse all collapsed datarecords in hierachy are then uncollased. :o( it is very stressful for user if he wants to continue in adding next child rows. (user has to find required row, collapses it and then can continue).

Is there some solution?

Kind regards,

  Martin