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
100
Issue in XamDataGrid LoadCustomizations
posted
I had a XamTabControl, binded with Collection of ParentClass to ItemSource. I then added the XamDataGrid as a DataTemplate to XamTabControl ControlTemplate. For Ex: public class ParentClass { string header; // use as a tab item name List ChildClassCollection{get;private set;} } .. .. .. .. .. .. I am using MVVM approch. My requirement is that for each tab, I had a XamDataGrid. Means if I had 10 tabs open , then 10 XamDataGrid instances will be there and each XamDataGrid is binded to ChildClassCollection . Problem Statement : Now I want to use SaveCustomization and LoadCustomization logic of XamDataGrid. I manage to get the SaveCostomization by raising "FieldPositionChanged" from xaml and send the complete XamDataGrid as a CommandParamter and in viewmodel I will call SaveCostomization. With this, I am able to get the xml generated for each XamDataGrid instance if its changed. But I am not sure how to load the Costomization back to that XamDataGrid, as the XamDataGrid is generating when the tab is created.And I don't have the XamDataGrid instance at my viewmodel(Its define in the xaml as DataTemplate) How to load the Cosomization back to XamDataGrid from the viewmodel. Important point to be noted is that the LoadCostomization only applies to the particular TabItems XamDataGrid and not all the XamDataGrids.