Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
175
Dropdown in XamDataGrid in Editmode
posted

Hi,

I am strugling to find a way where I can bind a list of string to a dropdown in edit mode of a column. I am using following style to create a dropdown in editmode. This works fine and creates a dropdown in editmode. What I want is that it should show a different list in the dropdown for different columns. I am crating the columns at runtime and do not kow how many columns will be there. So the following style show me the same list of values in dropdown in every dropdown. The requirement is that it should show the different values for every column.

Please help.

Style I am using currently, to show same list of values to every dropdown.

<Style TargetType="{x:Type igED:XamComboEditor}" x:Key="comboStyle2">

 <Setter Property="ItemsSource" Value="{Binding Path=G1List, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type   UserControl}},Mode=TwoWay}" />

 <Setter Property="Width" Value="90"/>

 <Style.Triggers>
    <Trigger Property="IsEnabled" Value="False">
      <Setter Property="BorderThickness" Value="0"/>
      <Setter Property="Background" Value="Transparent" />
    </Trigger>
 </Style.Triggers>
</Style>

Regards,

Shishir