Hi I'm working on an aspx application.
In this I have an aspxgridview with filters applied to the gray, these in addition to having a textbox also have a button that allows the selection of the type of search.
these support a property called "FilterExpression" and so far so good, when I perform an action on my page, I keep the value of "FilterExpression" so in the event of an error I can allow the grid to remain filtered without losing the values, and it works well for all filters, except for 'doesn't contain'.
When I perform an action I have an error handled and therefore I return to my grid, the datasource of the grid remains filtered as I pass the value I have kept of FilterExpression, but despite this the typing textbox for the search becomes white, and I don't understand why it just do it for that type of filter.
Code of my grid:
<dx:ASPxGridView ID="wdtgRagPolizzaEffettiva" runat="server" CssClass="searchResultsGrid" Width="100%"
KeyFieldName="UNIV_POLIZZA;UNIV_MOVIMENTO"
OnCustomJSProperties="wdtgRagPolizzaEffettiva_CustomJSProperties"
ClientInstanceName="gvwRagPolizzaEffettiva"
OnDataBinding="wdtgRagPolizzaEffettiva_DataBinding"
OnRowCommand="wdtgRagPolizza_RowCommand" EnableCallBacks="false"
SettingsBehavior-AllowSelectByRowClick="true" SettingsBehavior-AllowSelectSingleRowOnly="false"
OnSelectionChanged="wdtgRagPolizzaEffettiva_SelectionChanged1"
SettingsBehavior-AllowFocusedRow="false"
OnBeforeGetCallbackResult="wdtgRagPolizzaEffettiva_BeforeGetCallbackResult" OnBeforeHeaderFilterFillItems="wdtgRagPolizzaEffettiva_BeforeHeaderFilterFillItems"
OnFillContextMenuItems="Grid_FillContextMenuItems" OnDetailRowExpandedChanged="wdtgRagPolizzaEffettiva_DetailRowExpandedChanged">
<ClientSideEvents SelectionChanged="OnGridSelectionChanged" />
<Columns>
<dx:GridViewCommandColumn ShowSelectCheckbox="true" Visible="true" Width="30px">
<HeaderTemplate>
<dx:ASPxCheckBox ID="cbSelectAll" runat="server" ClientInstanceName="cbSelectAll"
ToolTip="<%$Resources: GridColumns, cbAllToolTip %>" OnInit="cbSelectAll_Init">
<ClientSideEvents CheckedChanged="OnAllCheckedChanged" />
</dx:ASPxCheckBox>
</HeaderTemplate>
</dx:GridViewCommandColumn>
<dx:GridViewDataTextColumn FieldName="DEFI_NUMPOLIZZA" Visible="true" Width="80px"
Caption="<%$Resources:GridColumns, DEFI_NUM_POLIZZA%>">
<DataItemTemplate>
<asp:LinkButton ID="wlnkDett" runat="server"
CommandName="OpenUrl"
Visible="true"
CommandArgument="openNewTab"
Text='<%# Eval("DEFI_NUMPOLIZZA") %>'>
</asp:LinkButton>
</DataItemTemplate>
</dx:GridViewDataTextColumn>
<dx:GridViewDataTextColumn FieldName="DEFI_RIF_CLIENTE" Visible="true" Width="80px"
Caption="<%$Resources:GridColumns, DEFI_RIF_CLIENTE%>" />
<dx:GridViewDataTextColumn FieldName="UNIV_TIPO_POL" Visible="false" Width="80px"
Caption="<%$Resources:GridColumns, UNIV_TIPO_POL%>" />
<dx:GridViewDataTextColumn FieldName="BOOL_STORNATO" Visible="false" Width="80px"
Caption="<%$Resources:GridColumns, DEFI_RIF_CLIENTE%>" />
<dx:GridViewDataTextColumn FieldName="VALIDITA" Visible="false"
Caption="<%$Resources:GridColumns, VALIDITA%>" />
<dx:GridViewDataColumn FieldName="DATA_EFFETTO_POL" Visible="true" Width="80px"
Caption="<%$Resources:GridColumns, DATA_EFFETTO_POL%>" />
<dx:GridViewDataColumn FieldName="DATA_SCAD_POL" Visible="true" Width="80px"
Caption="<%$Resources:GridColumns, DATA_SCAD_POL%>" />
<dx:GridViewDataTextColumn FieldName="CONTRAENTE" Visible="true" Width="150px"
Caption="<%$Resources:GridColumns, CONTRAENTE%>" />
<dx:GridViewDataTextColumn FieldName="ASSICURATO" Visible="true" Width="150px"
Caption="<%$Resources:Servizi, StatistichePersonalizzate_Text_Assicurato%>" />
<dx:GridViewDataTextColumn FieldName="OGGETTO_ASSICURATO" Visible="true" Width="120px"
Caption="<%$Resources:GridColumns, DEFI_NOMINATIVO3%>" />
<dx:GridViewDataTextColumn FieldName="DEFI_MOVIMENTO" Visible="true" Width="125px"
Caption="<%$Resources:GridColumns, DEFI_MOVIMENTO%>" />
<dx:GridViewDataTextColumn FieldName="STATO_MOV" Visible="true" Width="125px"
Caption="<%$Resources:GridColumns, STATO%>" />
<dx:GridViewDataTextColumn FieldName="BOOL_PROVVISORIO" Visible="false" Width="125px"
Caption="<%$Resources:GridColumns, STATO%>" />
The problem is in the MOV STATUS column. I update the filters using a session variable 'sFilterExpressionPolizzaEffetiva' like this:
sFilterExpressionPolizzaEffettiva = wdtgRagPolizzaEffettiva.FilterExpression;
wdtgRagPolizzaEffettiva.DataSource = Session["RagPolizzaEffettiva"];