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
My previous posting was nicely formatted when I clicked `Post`. Now... no so much!
lol
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>
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.
Thank you for your post. I have been looking into it but there are a lot of bindings in the ContextMenu, which you haven’t shared, so if this is still an issue for you, could you please send an isolated sample project, where the issue is reproduced, so I can investigate it further for you.
Looking forward for your reply.