Posted 21 February 2018, 7:03 am EST
Hi,
Trying to setup full text search on my grid but I get a binding error by using the out of the box sample code:
Cannot find governing FrameworkElement or FrameworkContentElement for target element. BindingExpression:Path=Text; DataItem=null; target element is ‘C1FullTextSearchBehavior’ (HashCode=25993360); target property is ‘Filter’ (type ‘String’)
Code is below:
<TextBox Name="TxtPortfolioLayerFilter" Text="" Width="200" Margin="15,10,0,0" HorizontalAlignment="Left"/>
<c1:C1DataGrid Grid.Row="1" ItemsSource="{Binding Path=(portfolioList:PortfolioListViewModel.Model).SelectedPortfolio.PortfolioLayers}" AutoGenerateColumns="False" d:DataContext="{d:DesignInstance portfolioList:PortfolioLayerDescriptorModel}" Margin="15"
SelectionMode="SingleRow" CanUserAddRows="False" CanUserFilter="True" CanUserGroup="True" CanUserRemoveRows="False" IsReadOnly="True">
<c1:C1FullTextSearchBehavior.FullTextSearchBehavior>
<c1:C1FullTextSearchBehavior Filter="{Binding ElementName=TxtPortfolioLayerFilter, Path=Text}"/>
</c1:C1FullTextSearchBehavior.FullTextSearchBehavior>
Regards,
Adrian.