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
- BinaryQueryOperator.cs
- SpeechDetectedEventArgs.cs
- SoapEnvelopeProcessingElement.cs
- TreeNodeCollectionEditor.cs
- RefExpr.cs
- StubHelpers.cs
- MetadataUtilsSmi.cs
- Italic.cs
- RtfFormatStack.cs
- EventPrivateKey.cs
- DefaultPropertyAttribute.cs
- TypeReference.cs
- Baml6ConstructorInfo.cs
- XmlSchemaElement.cs
- ColumnClickEvent.cs
- SimpleBitVector32.cs
- SocketInformation.cs
- DataService.cs
- SevenBitStream.cs
- AssociatedControlConverter.cs
- MdiWindowListStrip.cs
- ServicePointManagerElement.cs
- SHA1.cs
- HotCommands.cs
- CommandField.cs
- MethodCallExpression.cs
- IDispatchConstantAttribute.cs
- SuppressMessageAttribute.cs
- Debug.cs
- StrongNamePublicKeyBlob.cs
- ListView.cs
- TypeLibConverter.cs
- ListControlConvertEventArgs.cs
- PreviewKeyDownEventArgs.cs
- DecodeHelper.cs
- InvalidContentTypeException.cs
- XmlDesignerDataSourceView.cs
- InputGestureCollection.cs
- UrlSyndicationContent.cs
- ClientSettings.cs
- ContentValidator.cs
- SeekableReadStream.cs
- SessionStateModule.cs
- QilNode.cs
- StateItem.cs
- PageParserFilter.cs
- InstanceDataCollectionCollection.cs
- SortDescriptionCollection.cs
- HttpListenerRequest.cs
- FamilyMap.cs
- IsolatedStorageException.cs
- ManagedWndProcTracker.cs
- ResourceExpressionBuilder.cs
- ObjectQueryState.cs
- TextServicesCompartmentContext.cs
- CombinedGeometry.cs
- SvcMapFileLoader.cs
- HttpProfileGroupBase.cs
- TypeHelper.cs
- FormsIdentity.cs
- GrammarBuilderRuleRef.cs
- TypeLibraryHelper.cs
- TypeForwardedToAttribute.cs
- Exceptions.cs
- QilValidationVisitor.cs
- AbstractSvcMapFileLoader.cs
- Util.cs
- Encoding.cs
- ExecutionEngineException.cs
- CardSpacePolicyElement.cs
- RegexRunnerFactory.cs
- FormsAuthentication.cs
- PropertyEmitterBase.cs
- Serializer.cs
- TextEffectCollection.cs
- XmlFormatWriterGenerator.cs
- XmlName.cs
- TreeBuilderBamlTranslator.cs
- PartitionResolver.cs
- AuthenticatingEventArgs.cs
- NetworkInformationPermission.cs
- AnnotationComponentChooser.cs
- UriScheme.cs
- SqlConnectionPoolProviderInfo.cs
- GenericTypeParameterBuilder.cs
- BinaryReader.cs
- datacache.cs
- FormViewCommandEventArgs.cs
- Sorting.cs
- MessageAction.cs
- LocalizationComments.cs
- ChangeBlockUndoRecord.cs
- PartialCachingAttribute.cs
- LinqDataSourceInsertEventArgs.cs
- DataGridViewCheckBoxCell.cs
- ConfigPathUtility.cs
- TryExpression.cs
- Dictionary.cs
- OdbcRowUpdatingEvent.cs
- TabControlEvent.cs