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
4040
Problem with ComboBoxColumn and ValueConverter
posted

Hello,

I need to show in a comboboxcolumn two properties of a complex object.

To achieve that I used the ValueConverter but it doesn't show me anything.

I attached a sample to show you how I do it.

Regards.

XamGrid.zip
Parents Reply
  • 12004
    posted in reply to Coso

    Hello Coso,

    The Ok button by default sets the IsEnabled property from CanFilter that is disabled when unchecking Select All checkbox. E.g.:

    <Button x:Name="AcceptButton" Margin="0,0,5,0" Width="73" Content="{TemplateBinding OKButtonText}" IsEnabled="{Binding Path=CanFilter, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}">

    The "No data available" message uses a TextBlock element setting the Opacity to 0 that is defined from VisualState:

    <VisualState x:Name="HideSelectionBoxWaterMark" >
     <Storyboard>
      <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="ItemsBoxWatermark" Storyboard.TargetProperty="(UIElement.Opacity)">
       <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
      </DoubleAnimationUsingKeyFrames>
     </Storyboard>
    </VisualState>

    In the AcceptChanges method possibly a condition to add a check for a null reference on RowsManager was missing:

    RowsManager rm = cell.Row.Manager as RowsManager;

    if (rm == null)
    {
     return;
    }

    The search textbox uses a FilterTextBoxWatermarked setting IsEnabled from the ItemSourceSet property value.

    <igPrim:FilterTextBoxWatermarked Grid.Row="2"
      Grid.Column="1"
      Margin="8,7,6,1"
      HorizontalAlignment="Stretch"
      IsEnabled="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ItemSourceSet}"
      FilterSelectionControl="{Binding RelativeSource={RelativeSource TemplatedParent}}" />

     

    Let me know if I can provide any further assistance.

Children