/// <summary> /// Gets a status string for the specified DataGridView indicating the /// number of visible rows in the bound, filtered BindingSource, or /// String.Empty if all rows are currently visible. /// </summary> /// <param name="dataGridView">The DataGridView bound to the /// BindingSource to return the filter status for.</param> /// <returns>A string in the format "x of y records found" where x is /// the number of rows currently displayed and y is the number of rows /// available, or String.Empty if all rows are currently displayed.</returns> public static String GetFilterStatus(DataGridView dataGridView) { return(DataGridViewAutoFilterColumnHeaderCell.GetFilterStatus(dataGridView)); }
/// <summary> /// Removes the filter from the BindingSource bound to the specified DataGridView. /// </summary> /// <param name="dataGridView">The DataGridView bound to the BindingSource to unfilter.</param> public static void RemoveFilter(DataGridView dataGridView) { DataGridViewAutoFilterColumnHeaderCell.RemoveFilter(dataGridView); }