private void DefaultFindAction() { if (string.IsNullOrEmpty(txtFind.Text)) { _availableRefs.RemoveFilter(); } else { _availableRefs.ApplyFilter(r => (r.KeyedName ?? "").IndexOf(txtFind.Text, StringComparison.OrdinalIgnoreCase) >= 0); ApplyDefaultSort(); } }
private void txtFilter_TextChanged(object sender, EventArgs e) { try { _filterable.ApplyFilter(v => GetDisplayText(v).IndexOf(txtFilter.Text, StringComparison.OrdinalIgnoreCase) >= 0); SortDefault(); if (_filterable.Count > 0) { listValues.SelectedIndex = 0; } } catch (Exception ex) { Utils.HandleError(ex); } }
private void txtFilter_TextChanged(object sender, EventArgs e) { try { if (string.IsNullOrEmpty(txtFilter.Text)) { _items.RemoveFilter(); } else { _items.ApplyFilter(i => i.Name.IndexOf(txtFilter.Text, StringComparison.OrdinalIgnoreCase) >= 0); } } catch (Exception ex) { Utils.HandleError(ex); } }