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
180
Clear FIlter Event on Server Side Infragistics WebDataGrid 12.2
posted

I am using Infragistics webDataGrid 12.2 and row style filter. I am using the OnDataFiltered Event to do some background processing on the filtered columns and store them to a database.

Similarly, Id there any Server Side event that we can leverage when the user clears the filters? I want to delete those removed filter columns from Database. I am not sure if any such event exists or can we use FIltered Event for that? Please let me know.

Also, how can I limit the filtering options to only Equals, contains, instead of so many different default options.

Please find the Web Datagrid mark up

<ig:WebDataGrid ID="UltraWebGrid" runat="server" oninitializerow="UltraWebGrid_InitializeRow"
EnableRelativeLayout="false" HeaderCaptionCssClass="GridHeaderCaption"
OnInit="UltraWebGrid_Init" onrowupdated="UltraWebGrid_RowUpdated" OnRowUpdating="UltraWebGrid_RowUpdating" OnColumnMoved="UltraWebGrid_ColumnMoved"
EnableAjax="true" EnableAjaxViewState="true" EnableDataViewState="True" OnColumnResized="UltraWebGrid_ColumnResized" OnColumnSorted="UltraWebGrid_ColumnSorted"
OnDataFiltered="UltraWebGrid_DataFiltered">
<Behaviors>
<ig:Sorting >
</ig:Sorting>
<ig:ColumnMoving EnableInheritance="True">
</ig:ColumnMoving>

<ig:Filtering FilterType="RowFilter">
</ig:Filtering>
<ig:ColumnResizing EnableInheritance="True" >
</ig:ColumnResizing>

<ig:EditingCore AutoCRUD="false">
<EditingClientEvents CellValueChanged="UltraWebGrid_Editing_CellValueChanged" />
<Behaviors>
<ig:CellEditing>
<CellEditingClientEvents />
<EditModeActions EnableOnActive="True" MouseClick="Single" />
</ig:CellEditing>
</Behaviors>
</ig:EditingCore>
</Behaviors>
</ig:WebDataGrid>

The Code Behind

protected void UltraWebGrid_DataFiltered(object sender, FilteredEventArgs e)
{
foreach (ColumnFilter column in e.ColumnFilters)
{
SetFilterInfo(column.Condition.GetFilterRuleString(column.ColumnKey, false));
}
}

Thanks,

Pakodi

Parents Reply Children
No Data