Hi,
I have a XamGrid which has a template column of type Combo Box. The issue is if I select any value on the cell (Combo box value) and right click on it, the context menu opens up which has cut, copy , paste and in which only paste is enabled and cut, copy are disabled. I want to disable this feature i dont want this context menu opening up when I right click on any value in any cell. I have attached the screenshot of the issue.
Thanks
Arpita
Hello Arpita,
I am just checking if you got this worked out or you still require any assistance or clarification on the matter.
Since the behavior you have is not a known issue and there is nothing specific in your XamGrid's definition, I am not able to conclude what can cause your behavior and without a sample project I cannot investigate this further for you. If you manage to built and attach such sample I will be happy to assist you further with this.
Looking forward for your reply.
I will not be able to send the sample project. But I can give you the XamGrid structure which I am using.
<ig:XamGrid x:Name="UpdateParameterGrid" Grid.Row="0" MinWidth="600" AutoGenerateColumns="False" Width="Auto" ItemsSource="{Binding AffectedRecipes, Mode=TwoWay}" ScrollViewer.VerticalScrollBarVisibility="Auto" HorizontalAlignment="Center" MaxWidth="1055" HorizontalContentAlignment="Center" FontFamily="Tahoma" FontSize="12" BorderBrush="DarkGray" BorderThickness="0.8" CellControlAttached="UpdateParameterGrid_CellControlAttached" CellEnteringEditMode="UpdateParameterGrid_CellEnteringEditMode" CellExitingEditMode="UpdateParameterGrid_CellExitingEditMode" > <!--CellEnteringEditMode="UpdateParameterGrid_CellEnteringEditMode" CellExitedEditMode="UpdateParameterGrid_CellExitedEditMode" CellExitingEditMode="UpdateParameterGrid_CellExitingEditMode" >--> <ig:XamGrid.CellStyle> <Style TargetType="ig:CellControl"> <Setter Property="BorderThickness" Value="0,0,1,1" /> </Style> </ig:XamGrid.CellStyle> <ig:XamGrid.GroupBySettings> <ig:GroupBySettings AllowGroupByArea="Hidden" GroupByOperation="MergeCells" /> </ig:XamGrid.GroupBySettings> <ig:XamGrid.Columns> <ig:TextColumn Key="Sel_Crit_Inst_Name" HeaderText="Instances" TextWrapping="Wrap" IsReadOnly="True" MinimumWidth="100" /> <ig:TextColumn Key="Sel_Crit_Inst_Id" Visibility="Collapsed" /> <ig:TextColumn Key="Recipe" HeaderText="Recipe" IsReadOnly="True" TextWrapping="Wrap" MinimumWidth="200" /> <ig:TextColumn Key="RecipeKey" Visibility="Collapsed" /> <ig:TextColumn Key="OldParameterValue" HeaderText="Old Value" TextWrapping="Wrap" IsReadOnly="True" MinimumWidth="200"/> <ig:TextColumn Key="OldParamVersion" Visibility="Collapsed" /> <ig:TemplateColumn EditorTemplate="{StaticResource ComboBoxTemplate}" ItemTemplate="{StaticResource ComboBoxTemplate}" HorizontalContentAlignment="Stretch" Key="NewParameterValue" IsReadOnly="False"/> <ig:TextColumn Key="NewParamVersion" Visibility="Collapsed" /> <ig:CheckBoxColumn Key="IsPCGAccesible" Visibility="Collapsed" /> </ig:XamGrid.Columns> <ig:XamGrid.EditingSettings> <ig:EditingSettings AllowEditing="Hover" /> <!--<ig:EditingSettings AllowEditing="Cell" IsOnCellActiveEditingEnabled="True" IsMouseActionEditingEnabled="SingleClick" />--> </ig:XamGrid.EditingSettings> </ig:XamGrid>
Could you please send an isolated sample project, where the issue is reproduced, so I can investigate it further for you?
Thanks I am able to disable it.
I have a question why the context menu opens up in some different place (please refer the image which I have attached in the beginning of the post) when I select some value and right click. The Context menu has cut, copy , paste and in which only paste is enabled and cut, copy are disabled. Why cut and copy are disabled ?
How to solve both of the problems. Can you please help.