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
390
Cannot filter combobox fields
posted

I've followed the sample in the Feature Browser to enable a cmobobox of items to display a text title rather than the number on a field and that is working fine.

But if I enable filtering I get an error saying cannot convert to Int32.

 

I've double checked the datatypes on both the grid field and the combofilter list and they are both integers.

 

Image below shows the filter listing the titles rather than the underlaying number, which is fine

 

But as soon as I select an item from the filter list i get the following error:

 

 

The strange thing is that if I change the FilterUIType to LabelIcons it works fine, but even when the FilterUIType is set to LabelIcons I still get the same error if I try to set the filter using the CustomFilterDialog.

 

 

Any idea what could be causing this.  Below is my xaml for the CellEditorStyle:

 

 

 

 

 

 

 

 

 

 

 

 

 

<Style x:Key="UnitTypeFieldStyle" TargetType="{x:Type igEditors:XamComboEditor}">
<Setter Property="ItemsProvider">
<Setter.Value>
<igEditors:ComboBoxItemsProvider ItemsSource="{Binding Path=LookupItems,Source={x:Static cache:GlobalCache.luUnitType}}" DisplayMemberPath="ItemTitle" ValuePath="LookupItemId"/>
</Setter.Value>
</Setter>
</Style>

And this is my code for the FieldSetting to use the style:

 

 

<igDP:Field.Settings>

 

 

<igDP:FieldSettings EditorStyle="{StaticResource UnitTypeFieldStyle}" />

 

 

</igDP:Field.Settings>

 

 

</igDP:Field>