protected bool MatchingFilterSubItems(T item, string property, string value) { IFilterableBindingList myItem = item as IFilterableBindingList; if (myItem == null) { return(false); } for (int i = 0; i < myItem.FullCount; i++) { if (myItem.MatchingFilter(i, property, value)) { return(true); } } return(false); }
private void GotoId(IFilterableBindingList source, FilterGridControl gridControl) { if (m_gotoIdDialog == null) { m_gotoIdDialog = new GotoIdDialog(); } int minId = int.MaxValue; int maxId = int.MinValue; int tempId; foreach (ISupportId supportId in source) { tempId = supportId.Id; if (minId > tempId) { minId = tempId; } if (maxId < tempId) { maxId = tempId; } } DialogResult dr = m_gotoIdDialog.ShowDialog(minId, maxId); if (dr != DialogResult.OK) { return; } int gotoIndex = source.GetIndexById(m_gotoIdDialog.GotoId); if (gotoIndex == -1) { Helpers.FormUtilities.ShowMessage(string.Format("Id <{0}> isn't in filter", m_gotoIdDialog.GotoId)); } else { gridControl.ScrollToRow(gotoIndex); } }