Hi ,
I have defined one XamGrid with ComboBoxColumn.
<ig:XamGrid x:Name="ManageRecipeStateGrid" AutoGenerateColumns="False" ColumnWidth="*" ItemsSource="{Binding ManageRecipeStateResults}">
<ig:XamGrid.GroupBySettings>
<ig:GroupBySettings AllowGroupByArea="Hidden" GroupByOperation="MergeCells" />
</ig:XamGrid.GroupBySettings>
<ig:XamGrid.Columns>
<ig:TextColumn Key="RecipeKey" Visibility="Collapsed" />
<ig:TextColumn Key="MandatoryCriteriaList" HeaderText="Recipe" IsReadOnly="True" >
</ig:TextColumn>
<ig:TextColumn Key="RecipeVersion" HeaderText="Version" IsReadOnly="True">
<ig:TextColumn Key="PreviousRecipeState" Visibility="Collapsed" />
<ig:ComboBoxColumn Width="120" HorizontalContentAlignment="Stretch"
ItemsSource="{Binding Source={StaticResource optionList}}" Key="CurrentRecipeState"
SelectedValuePath="State"
DisplayMemberPath="State"
AllowEditingValidation="True" HeaderText="Recipe State">
</ig:ComboBoxColumn>
<ig:CheckBoxColumn Key="IsPreserved" HeaderText="Preserve Recipe">
</ig:CheckBoxColumn>
</ig:XamGrid.Columns>
<ig:XamGrid.EditingSettings>
<ig:EditingSettings AllowEditing="Hover" />
</ig:XamGrid.EditingSettings>
</ig:XamGrid>
Now I want to handle the event whenever I change the item selection in ComboBoxColumn. How I can handle this ?
Hello Arpita,
Thank you for your reply. I am very glad that the approach I have suggested was helpful for you. Please let me know if you need any further assistance on the matter.
Sincerely,
Krasimir
Developer Support Engineer
Infragistics
www.infragistics.com/support
Hi Krasimir,
Thanks for the help. This works for me.
Thanks
Arpita
I am just checking if you require any further assistance on the matter.
Thank you for your reply. I am very glad that the approach I have suggested was helpful. I am using the SetCellValue method, since the Cell.Value property is read only and you can set the value of the cell, through the cell itself. This method is creating a CellValueObject which contains one dependency property and then creates a Binding between the property that corresponds to the current cell and the Value property of the CellValueObject, through the Data of the current row. After that, it sets the Value property of the CellValueObject, which triggers the Binding and this way the value of the property that corresponds to the cell is set, without interacting with the Data item of the current row.
Regarding the code that you have mentioned, in the CellExitingEditMode, I am de-attaching the handler, since each time the editor enters edit mode, a handler is attached to the Click event. If this code is commented, the hadnlers of the event will increase with one each time the Cell enters edit mode. This will case multiple execution of the the same function and when you enter ‘n’ times edit mode, for one cell and then click on the CheckBox, you will see that ‘n’ MessageBoxes are opened one after another.
Please let me know if you need any further assistance on the matter.
Hi,
Thsi is fine. Can you please explain this SetCellValue function and why you have used this line
(e.Editor
as CheckBox).Click -= new RoutedEventHandler
(MainWindow_Click);
in CellExitingEditMode event.