I have a DevExpress GridControl
defined in XAML like this:
xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
<dxg:GridControl Grid.Row="0" x:Name="clientGrid" DataSource="{Binding ClientsDatasetTable1, UpdateSourceTrigger=PropertyChanged}" AutoExpandAllGroups="True" >
<dxg:GridControl.TotalSummary>
<dxg:GridSummaryItem FieldName="TaxpayerName" SummaryType="Count" DisplayFormat="Clients: {0}" />
</dxg:GridControl.TotalSummary>
<!-- Set the TableView properties -->
<dxg:GridControl.View>
<dxg:TableView x:Name="tableView" AllowBestFit="True"
FocusedRow="{Binding CurrentReturnItem, Mode=TwoWay}"
EditorButtonShowMode="ShowOnlyInEditor" NavigationStyle="Row" AllowEditing="False"
MouseDoubleClick="tableView_MouseDoubleClick"
c:KeyDownHandler.TheCommandToRun="{Binding Path=OpenCommand}" c:KeyDownHandler.Key="Enter" AllowGrouping="False" ShowGroupPanel="False" ShowAutoFilterRow="True" AutoWidth="True" ShowTotalSummary="True"/>
</dxg:GridControl.View>
<!-- Create the Column collection -->
<dxg:GridControl.Columns>
<dxg:GridColumn FieldName="TaxpayerName" Header="Name" ReadOnly="True" Width="150" />
<dxg:GridColumn FieldName="TaxpayerSsn" Header="SSN" ReadOnly="True" Width="150" />
<dxg:GridColumn FieldName="ReturnTypeDescription" Header="Return Type" />
<dxg:GridColumn FieldName="ReturnStatus" Header="Return Status" AutoFilterValue={Binding PageFilterValue} />
</dxg:GridControl.Columns>
</dxg:GridControl>
The last column is the one i’m intending to Filter on, using the PageFilterValue
custom property of my custom page. the property is defined as follows:
public string PageFilterValue
{
get { return filter_value;}
set
{
filter_value = value;
OnPropertyChanged("PageFilterValue");
}
}
The problem now, is the code above works perfect at first time, but once user changes the filter on the GridControl
manually the Binding somehow is not working anymore even if the the PageFilterValue
is changed.