Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / xsp / System / DynamicData / DynamicData / DynamicFilterExpression.cs / 1305376 / DynamicFilterExpression.cs
using System.Linq.Expressions; using System.Web.UI; using System.Globalization; using System.Diagnostics.CodeAnalysis; using System.Linq; #if ORYX_VNEXT using Microsoft.Web.Data.UI.WebControls.Expressions; using Microsoft.Web.Data.UI.WebControls; #else using System.Web.UI.WebControls.Expressions; using System.Web.UI.WebControls; #endif namespace System.Web.DynamicData { ////// This is a Dynamic Data-specific extension of DataSourceExpression that works by forwarding the processing of an IQueryable to /// a specialized control such as QueryableFilterRepeater or DynamicFilter. /// public class DynamicFilterExpression : DataSourceExpression { ////// References the ID of a QueryableFilterRepeater or DynamicFilter control on the page. /// [SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly", MessageId = "ID", Justification = "This refers to a Control ID")] public string ControlID { get; set; } private IFilterExpressionProvider FilterExpressionProvider { get; set; } public override void SetContext(Control owner, HttpContext context, IQueryableDataSource dataSource) { base.SetContext(owner, context, dataSource); FilterExpressionProvider = FindControl(Owner); FilterExpressionProvider.Initialize(dataSource); } private IFilterExpressionProvider FindControl(Control control) { var result = Misc.FindControl(control, ControlID) as IFilterExpressionProvider; if (result == null) { throw new InvalidOperationException(String.Format(CultureInfo.CurrentCulture, "The control '{0}' could not be found.", ControlID)); } return result; } ////// Delegates the processing of the source queryable to the control referenced by ControlID. /// /// ///public override IQueryable GetQueryable(IQueryable source) { IQueryable result = FilterExpressionProvider.GetQueryable(source); return result; } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- TypedReference.cs
- ParseChildrenAsPropertiesAttribute.cs
- OdbcInfoMessageEvent.cs
- XmlSchemaChoice.cs
- HitTestParameters3D.cs
- TagPrefixInfo.cs
- _ListenerAsyncResult.cs
- SqlDataSourceCommandEventArgs.cs
- DataGridViewAccessibleObject.cs
- DataList.cs
- TypeElement.cs
- XmlLinkedNode.cs
- DefinitionBase.cs
- ResetableIterator.cs
- TraceListener.cs
- DbFunctionCommandTree.cs
- ReferentialConstraint.cs
- ProfileBuildProvider.cs
- StackOverflowException.cs
- FlowDocumentPageViewerAutomationPeer.cs
- XsltContext.cs
- TypeSystem.cs
- Part.cs
- XmlSchemaDatatype.cs
- TraceFilter.cs
- HtmlHistory.cs
- UInt16Converter.cs
- UrlPath.cs
- CallInfo.cs
- TaskbarItemInfo.cs
- XPathSelectionIterator.cs
- NativeMethods.cs
- CodeTryCatchFinallyStatement.cs
- HttpContext.cs
- SecurityPolicySection.cs
- SpAudioStreamWrapper.cs
- DurationConverter.cs
- assemblycache.cs
- XamlFilter.cs
- ObsoleteAttribute.cs
- GeneralTransform3D.cs
- AsymmetricAlgorithm.cs
- AttributeAction.cs
- ActivationServices.cs
- RelationshipConstraintValidator.cs
- X509Utils.cs
- TransactionFormatter.cs
- ProxyHwnd.cs
- InlineCollection.cs
- StringFreezingAttribute.cs
- RectValueSerializer.cs
- ConfigurationElementCollection.cs
- PeerName.cs
- controlskin.cs
- WebPartEditorApplyVerb.cs
- WorkflowControlClient.cs
- FormParameter.cs
- VerificationAttribute.cs
- FormsAuthenticationConfiguration.cs
- TimeEnumHelper.cs
- ClientTarget.cs
- DetailsViewInsertedEventArgs.cs
- TableAutomationPeer.cs
- XhtmlBasicPageAdapter.cs
- CaseExpr.cs
- CompositeCollectionView.cs
- DataGridViewRowCancelEventArgs.cs
- WindowsListViewItemCheckBox.cs
- TagPrefixAttribute.cs
- ImpersonateTokenRef.cs
- ChineseLunisolarCalendar.cs
- WsatServiceAddress.cs
- WebBrowser.cs
- MasterPageBuildProvider.cs
- CustomWebEventKey.cs
- PropertyPathConverter.cs
- DrawingGroup.cs
- ImageSource.cs
- LicFileLicenseProvider.cs
- SaveLedgerEntryRequest.cs
- EdmItemCollection.OcAssemblyCache.cs
- ApplicationServicesHostFactory.cs
- ChangeToolStripParentVerb.cs
- MsmqBindingElementBase.cs
- _LocalDataStore.cs
- LassoHelper.cs
- ColorTransformHelper.cs
- FixedSOMFixedBlock.cs
- CellQuery.cs
- GiveFeedbackEventArgs.cs
- RewritingPass.cs
- PropertySourceInfo.cs
- DockAndAnchorLayout.cs
- SystemResourceHost.cs
- CodeExporter.cs
- ToolStripDropDownItem.cs
- Memoizer.cs
- EntityRecordInfo.cs
- CreatingCookieEventArgs.cs
- SecurityException.cs