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
- ImplicitInputBrush.cs
- SqlNode.cs
- AuthenticationServiceManager.cs
- X509Chain.cs
- QilTypeChecker.cs
- XPathChildIterator.cs
- MembershipSection.cs
- DisableDpiAwarenessAttribute.cs
- WebPartHelpVerb.cs
- ToolStripRenderEventArgs.cs
- TreeNodeStyle.cs
- FactoryId.cs
- Section.cs
- ZipIOFileItemStream.cs
- EntityDesignerUtils.cs
- DrawingContextWalker.cs
- XPathQilFactory.cs
- TempFiles.cs
- KeyValuePair.cs
- Bidi.cs
- QilName.cs
- TemplateInstanceAttribute.cs
- EventPrivateKey.cs
- ObjectCloneHelper.cs
- CSharpCodeProvider.cs
- ProtectedConfigurationProviderCollection.cs
- Handle.cs
- PropertyChange.cs
- HttpProtocolReflector.cs
- XmlReader.cs
- ActionFrame.cs
- HtmlImage.cs
- OleAutBinder.cs
- CodeEventReferenceExpression.cs
- LocationSectionRecord.cs
- ConsoleTraceListener.cs
- EntityStoreSchemaGenerator.cs
- IsolatedStoragePermission.cs
- PathFigureCollectionValueSerializer.cs
- ClrProviderManifest.cs
- RIPEMD160Managed.cs
- BindingCompleteEventArgs.cs
- Geometry.cs
- ModelChangedEventArgsImpl.cs
- HttpCacheVaryByContentEncodings.cs
- clipboard.cs
- NameNode.cs
- WinFormsComponentEditor.cs
- XsltInput.cs
- ZipIOLocalFileDataDescriptor.cs
- FrameworkContentElementAutomationPeer.cs
- GroupItem.cs
- TransactionScopeDesigner.cs
- JsonServiceDocumentSerializer.cs
- DropShadowEffect.cs
- securitycriticaldataformultiplegetandset.cs
- CorrelationTokenInvalidatedHandler.cs
- Double.cs
- AutomationPropertyInfo.cs
- TextBoxView.cs
- SafeProcessHandle.cs
- NullableConverter.cs
- DataExchangeServiceBinder.cs
- TrackingRecordPreFilter.cs
- DoubleAnimationUsingPath.cs
- GetBrowserTokenRequest.cs
- CodeTypeReferenceCollection.cs
- Vector3DCollectionValueSerializer.cs
- NamedPermissionSet.cs
- VersionValidator.cs
- IntegerValidator.cs
- SourceElementsCollection.cs
- XpsSerializationException.cs
- SQLChars.cs
- FileCodeGroup.cs
- DBSchemaRow.cs
- PipeSecurity.cs
- NativeMethods.cs
- PartDesigner.cs
- CfgSemanticTag.cs
- TreeNodeEventArgs.cs
- SHA256Cng.cs
- CounterSample.cs
- SQLCharsStorage.cs
- DynamicEndpoint.cs
- UInt32Converter.cs
- WindowsGraphics2.cs
- HtmlContainerControl.cs
- Transform.cs
- AbandonedMutexException.cs
- SizeIndependentAnimationStorage.cs
- DispatcherHooks.cs
- Lasso.cs
- DataGridColumn.cs
- Parser.cs
- SEHException.cs
- WindowInteractionStateTracker.cs
- WebPartsSection.cs
- Stacktrace.cs
- NumericPagerField.cs