Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / xsp / System / Extensions / UI / WebControls / ListViewItem.cs / 1305376 / ListViewItem.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- using System; using System.Collections; using System.ComponentModel; using System.Diagnostics.CodeAnalysis; using System.Web; using System.Web.UI; namespace System.Web.UI.WebControls { [ ToolboxItem(false) ] // ListViewItem is an IDataItemContainer so that we can have controls that databind in the ListView's InsertItem. public class ListViewItem : Control, INamingContainer, IDataItemContainer { private ListViewItemType _itemType; public ListViewItem(ListViewItemType itemType) { _itemType = itemType; } public ListViewItemType ItemType { get { return _itemType; } } // DataItem in will always return null. public virtual object DataItem { get; set; } public virtual int DataItemIndex { get { return -1; } } public virtual int DisplayIndex { get { return -1; } } [SuppressMessage("Microsoft.Security", "CA2109:ReviewVisibleEventHandlers", MessageId = "1#")] protected override bool OnBubbleEvent(object source, EventArgs e) { if (e is CommandEventArgs) { ListViewCommandEventArgs args = new ListViewCommandEventArgs(this, source, (CommandEventArgs)e); RaiseBubbleEvent(this, args); return true; } return false; } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- using System; using System.Collections; using System.ComponentModel; using System.Diagnostics.CodeAnalysis; using System.Web; using System.Web.UI; namespace System.Web.UI.WebControls { [ ToolboxItem(false) ] // ListViewItem is an IDataItemContainer so that we can have controls that databind in the ListView's InsertItem. public class ListViewItem : Control, INamingContainer, IDataItemContainer { private ListViewItemType _itemType; public ListViewItem(ListViewItemType itemType) { _itemType = itemType; } public ListViewItemType ItemType { get { return _itemType; } } // DataItem in will always return null. public virtual object DataItem { get; set; } public virtual int DataItemIndex { get { return -1; } } public virtual int DisplayIndex { get { return -1; } } [SuppressMessage("Microsoft.Security", "CA2109:ReviewVisibleEventHandlers", MessageId = "1#")] protected override bool OnBubbleEvent(object source, EventArgs e) { if (e is CommandEventArgs) { ListViewCommandEventArgs args = new ListViewCommandEventArgs(this, source, (CommandEventArgs)e); RaiseBubbleEvent(this, args); return true; } return false; } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- Validator.cs
- ColorConverter.cs
- SqlDependencyListener.cs
- DynamicRendererThreadManager.cs
- ListViewUpdatedEventArgs.cs
- SafeNativeMethods.cs
- XmlSecureResolver.cs
- CroppedBitmap.cs
- TimeEnumHelper.cs
- MessageDecoder.cs
- CodeDesigner.cs
- SharedStatics.cs
- HitTestWithGeometryDrawingContextWalker.cs
- BinaryMessageFormatter.cs
- Wildcard.cs
- BasicExpressionVisitor.cs
- SettingsSavedEventArgs.cs
- ServiceModelSectionGroup.cs
- ScriptReference.cs
- TransactionInformation.cs
- BindingGroup.cs
- SecurityChannelFactory.cs
- DataGridViewComboBoxCell.cs
- TemplateBindingExtensionConverter.cs
- ColumnHeaderConverter.cs
- ImageIndexConverter.cs
- DoWorkEventArgs.cs
- DesignerActionUIStateChangeEventArgs.cs
- XmlSchemaSubstitutionGroup.cs
- PhoneCallDesigner.cs
- UIElementParaClient.cs
- EmptyWorkItem.cs
- BrushMappingModeValidation.cs
- DBConnection.cs
- HandleExceptionArgs.cs
- ADMembershipUser.cs
- SingleConverter.cs
- SEHException.cs
- FrameworkElementFactoryMarkupObject.cs
- ResourcePermissionBaseEntry.cs
- ImageDrawing.cs
- GridItemCollection.cs
- Constraint.cs
- COM2ExtendedTypeConverter.cs
- DurableDispatcherAddressingFault.cs
- ImageFormat.cs
- TraceSwitch.cs
- AttachedPropertyMethodSelector.cs
- BitConverter.cs
- MarkupObject.cs
- ServerIdentity.cs
- CodeChecksumPragma.cs
- CollectionBase.cs
- LinqMaximalSubtreeNominator.cs
- TableColumn.cs
- TextTreeFixupNode.cs
- FormViewRow.cs
- DataTableTypeConverter.cs
- XmlAnyElementAttributes.cs
- ToolBarOverflowPanel.cs
- SafeLocalAllocation.cs
- TimelineClockCollection.cs
- CommonGetThemePartSize.cs
- Overlapped.cs
- InternalConfigConfigurationFactory.cs
- SqlDataSource.cs
- DBConcurrencyException.cs
- SamlEvidence.cs
- MsmqBindingElementBase.cs
- RuleRefElement.cs
- UpdateException.cs
- MetadataProperty.cs
- StorageConditionPropertyMapping.cs
- ToolStripSplitButton.cs
- GraphicsContext.cs
- SerializationException.cs
- XmlILIndex.cs
- PropertiesTab.cs
- TransformedBitmap.cs
- XmlWriterSettings.cs
- SerTrace.cs
- LocatorManager.cs
- Panel.cs
- ScriptingWebServicesSectionGroup.cs
- MailHeaderInfo.cs
- Internal.cs
- FormView.cs
- HttpCacheVary.cs
- OverrideMode.cs
- cookie.cs
- ellipse.cs
- Win32MouseDevice.cs
- CompiledQuery.cs
- EndCreateSecurityTokenRequest.cs
- JsonStringDataContract.cs
- FacetEnabledSchemaElement.cs
- RecognizerInfo.cs
- WebPageTraceListener.cs
- NamedPipeAppDomainProtocolHandler.cs
- StaticExtension.cs