Hi,
i am using InfragisticsWPF4.v11.2 in my application.
i have use xamgrid in my application. i have use PersistenceManger to save the user preferences. After i loading my xamgrid from persistenceManager contextmenu click is not working. i have use MVVM pattern in my application
xaml Code
<ContextMenu x:Key="DataGridRoiSummaryContextMenu"> <MenuItem Header="Update Prediction For Selection" Command="{Binding MenuCommand, Converter={StaticResource NotConverter}}" CommandParameter="UpdatePredictionForSelection" IsEnabled="{Binding HasUpdatePredictionRights}" > </MenuItem> <MenuItem Header="Clear Prediction For Selection" Command="{Binding MenuCommand}" CommandParameter="ClearPredictionForSelection" IsEnabled="{Binding HasUpdatePredictionRights}"> </MenuItem> <Separator/> <MenuItem Header="Reset Column Order to Default" Command="{Binding MenuCommand}" CommandParameter="ResetColumnOrdertoDefault"> </MenuItem> </ContextMenu>
Code Behind
MemoryStream memoryStream;
memoryStream = PersistenceManager.Save(DataGridRoiSummary);
PersistenceManager.Load(DataGridRoiSummary, memorystreamobject);
can you please help me
Hello Ripal,
I am just checking the progress of this issue and was wondering if you managed to achieve your goal or if you need any further assistance on the matter.
I too have experienced the same problem.
If I deserialize a XamGrid's configuration... the ContextMenu does not load properly.
I suspect that the issue is related to:
PERSISTENCE MANAGER
<ig:PersistenceManager.Settings> <ig:PersistenceSettings SavePersistenceOptions="OnlySpecified" LoadPersistenceOptions="OnlySpecified"> <ig:PersistenceSettings.PropertySettings> <ig:PropertyNamePersistenceInfo PropertyName="Width"/> <!-- save any `width` property... anywhere in the XamGrid object graph... including the menu --> <ig:PropertyNamePersistenceInfo PropertyName="Visibility"/> <ig:PropertyNamePersistenceInfo PropertyName="SortingSettings"/> </ig:PersistenceSettings.PropertySettings> <ig:PersistenceSettings.Events> <ig:PersistenceEvents PersistenceLoaded="XamGrid_PersistenceLoaded"/> </ig:PersistenceSettings.Events> </ig:PersistenceSettings> </ig:PersistenceManager.Settings>
CONTEXT MENU
<ig:XamGrid.ContextMenu> <ContextMenu> <MenuItem Header="Copy" Command="{x:Static IgCommands:XamGridCommands.CopySelectedRowsToClipboard}" CommandParameter="{Binding Path=PlacementTarget, RelativeSource={RelativeSource AncestorType=ContextMenu}}"> <MenuItem.Icon> <Image Width="16" Source="/Resources/Images/Ribbon/Copy.png"/> </MenuItem.Icon> </MenuItem> <MenuItem Header="Copy All" Command="{x:Static IgCommands:XamGridCommands.CopyAllRowsToClipboard}" CommandParameter="{Binding Path=PlacementTarget, RelativeSource={RelativeSource AncestorType=ContextMenu}}"> <MenuItem.Icon> <Image Width="16" Source="/Resources/Images/Ribbon/CopyAll.png"/> </MenuItem.Icon> </MenuItem> </ContextMenu> </ig:XamGrid.ContextMenu>