0

I have a problem with ComboboxEdittSetting DevExpress control, as it has no associated SelectedChanged event. But I found another way to use

    <dxg:GridControl x:Name="GridView">
                <dxg:GridControl.Columns>
                    <dxg:GridColumn Header="Persona" Width="50" DisplayMemberBinding="{Binding Path=PersonaId, Mode=TwoWay}" >
                        <dxg:GridColumn.EditSettings >
                            <dxe:ComboBoxEditSettings x:Name="if_Persona"  ItemsSource="{Binding PersonaFind, Source={StaticResource DataSource}}" DisplayMember="Nombre" ValueMember="PersonaId">
                                <dxe:ComboBoxEditSettings.ItemTemplate>
                                    <DataTemplate>
                                        <Grid x:Name="if_PersonaCell" Tag="{Binding Path=PersonaId}" MouseLeftButtonDown="if_PersonaCell_MouseLeftDown">
                                            <Label  Content="{Binding Path=Nombre}"/>
                                        </Grid>
                                    </DataTemplate>
                                </dxe:ComboBoxEditSettings.ItemTemplate>
                            </dxe:ComboBoxEditSettings>
                        </dxg:GridColumn.EditSettings>
                    </dxg:GridColumn>
</dxg:GridControl.Columns>
</dxg:GridControl>



private void if_PersonaCell_MouseLeftDown(object sender, MouseButtonEventArgs e)
        {
            Grid cell = (Grid)sender;
            Int32 Id = Convert.ToInt32(cell.Tag);
}

This works partly because, not always the event is called MouseLeftDown

Someone can help me solve this problem?, Since I need to run a search by pressing event an item from combobox

Sorry for my bad English.

Thank you.

1 Answers1

0
<Grid x:Name="if_PersonaCell" Tag="{Binding Path=PersonaId}" Background="#03FFFFFF" MouseLeftButtonDown="if_PersonaCell_MouseLeftDown">
    <Label  Content="{Binding Path=Nombre}"/>
</Grid>
Federico Berasategui
  • 43,562
  • 11
  • 100
  • 154