Hello,
I have a RIA domain service object model , which basically have two classes a profile and a template. A profile could contain collection of templates. And these collection are set an Itemsource of the grids.
A profileGrid ItemSource set to profile collection, and when selection changes on the profile grid. I cast the selected Item to profile and then set the TemplateGrid itemsource to profile.Templates.
Ex.
private void _gridViewProfile_SelectionChanged(object sender, SelectionChangeEventArgs e)
{
ResourcingTemplateProfile profile = _gridViewProfile.SelectedItem as ResourcingTemplateProfile;
gridViewResourcingTemplate.ItemsSource = profile.ResourcingTemplates
}
Now the issue is when Tabbing through TemplateGrid cell and changing value in cell, the values get saves fine to the database; However, if I were to changes the profile selection lets to profile1 and then change back to the profile where I had made changes lets profile2, it would show the old value. If I refresh the browser then new would show up which essentially was saved. On the other hand, if I don’t tab through and just hit enters then the value is save file, and is persisted between profile selection changes. All of the saving is happening in the CellEditEnded event of the grid.
Could this be possible that grid is caching old binding? If it is then what would be the work around? We really need a tabbing feature to work.
Grid setup:
<telerik:RadGridView x:Name="_gridViewResourcingTemplate" Grid.Row="2" CanUserFreezeColumns="True"
ShowGroupPanel="True" AutoGenerateColumns="False" SelectionChanged="_gridViewResourcingTemplate_SelectionChanged"
CellEditEnded="_gridViewResourcingTemplate_CellEditEnded"
BeginningEdit="_gridViewResourcingTemplate_BeginningEdit"
RowLoaded="_gridViewResourcingTemplate_RowLoaded"
CellValidating="_gridViewResourcingTemplate_CellValidating"
VerticalAlignment="Stretch" IsFilteringAllowed="True"
AutoExpandGroups="True" FrozenColumnCount="1" SelectionMode="Extended">