GrapeCity.Win.MultiRow Namespace : PopupCell Class |
<DefaultPropertyAttribute("Popup")> <ToolboxItemFilterAttribute(FilterString="GrapeCity.Win.MultiRow.Template7", FilterType=ToolboxItemFilterType.Custom Or _ ToolboxItemFilterType.Prevent Or _ ToolboxItemFilterType.Require)> <DesignerAttribute(DesignerBaseTypeName="System.ComponentModel.Design.IDesigner", DesignerTypeName="GrapeCity.Win.MultiRow.Design.PopupCellDesigner,GrapeCity.Win.MultiRow.Design, Version=7.20.20141.0, Culture=neutral, PublicKeyToken=0f7a722ee3c2bdd9")> <ToolboxBitmapAttribute()> <SRDescriptionAttribute("Enables the user to enter text or edit a value with a normal form pop up of a common dialog form.")> Public Class PopupCell Inherits Cell
Dim instance As PopupCell
[DefaultProperty("Popup")] [ToolboxItemFilter(FilterString="GrapeCity.Win.MultiRow.Template7", FilterType=ToolboxItemFilterType.Custom | ToolboxItemFilterType.Prevent | ToolboxItemFilterType.Require)] [Designer(DesignerBaseTypeName="System.ComponentModel.Design.IDesigner", DesignerTypeName="GrapeCity.Win.MultiRow.Design.PopupCellDesigner,GrapeCity.Win.MultiRow.Design, Version=7.20.20141.0, Culture=neutral, PublicKeyToken=0f7a722ee3c2bdd9")] [ToolboxBitmap()] [SRDescription("Enables the user to enter text or edit a value with a normal form pop up of a common dialog form.")] public class PopupCell : Cell
The PopupCell class is a special type of Cell used to display and edit special type values. The PopupCellEditingControl implements the IEditingControl interface, so it can edit the value. The user can also pop up the dialog or form to edit the value of the cell.
Notes to Inheritors:
When you derive from PopupCell and add new properties to the derived class, be sure to override the Clone method to copy the new properties during cloning operations. You should also call the base class's Clone method so that the properties of the base class are copied to the new cell.
using System; using System.Drawing; using System.Windows.Forms; namespace GrapeCity.Win.MultiRow.SampleCode { public class PopupCellDemo : Form { private GcMultiRow gcMultiRow1 = new GcMultiRow(); public PopupCellDemo() { this.Text = "PopupCell Demo"; this.Size = new Size(560, 300); // Add MultiRow to form this.gcMultiRow1.Dock = DockStyle.Fill; this.Controls.Add(this.gcMultiRow1); this.Load += new EventHandler(Form1_Load); } private void Form1_Load(object sender, EventArgs e) { // create a template with PopupCells. PopupCell colorPopupCell = this.CreateColorPopupCell(); PopupCell customTypePopupCell = this.CreateCustomTypePopupCell(); PopupCell customButtonAppearancePopupCell = this.CreateCustomButtonAppearancePopupCell(); PopupCell hiddenButtonPopupCell = this.CreateHiddenButtonPopupCell(); Cell[] popupCells = new Cell[] { colorPopupCell, customTypePopupCell, customButtonAppearancePopupCell, hiddenButtonPopupCell }; this.gcMultiRow1.Template = Template.CreateGridTemplate(popupCells); this.gcMultiRow1.ColumnHeaders[0][0].Value = "Color"; this.gcMultiRow1.ColumnHeaders[0][1].Value = "Custom Type"; this.gcMultiRow1.ColumnHeaders[0][2].Value = "Custom Button Appearance"; this.gcMultiRow1.ColumnHeaders[0][3].Value = "Hidden button"; FillData(); this.gcMultiRow1.CellFormatting += new EventHandler<CellFormattingEventArgs>(gcMultiRow1_CellFormatting); }
Imports System Imports System.Drawing Imports System.Windows.Forms Imports GrapeCity.Win.MultiRow Public Class PopupCellDemo Inherits Form Friend WithEvents gcMultiRow1 As New GcMultiRow() Public Sub New() Me.Text = "PopupCell Demo" Me.Size = New Size(560, 300) ' Add MultiRow to form Me.gcMultiRow1.Dock = DockStyle.Fill Me.Controls.Add(Me.gcMultiRow1) End Sub Private Sub Form1_Load(ByVal sender As Object, ByVal e As EventArgs) Handles Me.Load ' create a template with PopupCells. Dim colorPopupCell As PopupCell = Me.CreateColorPopupCell() Dim customTypePopupCell As PopupCell = Me.CreateCustomTypePopupCell() Dim customButtonAppearancePopupCell As PopupCell = Me.CreateCustomButtonAppearancePopupCell() Dim hiddenButtonPopupCell As PopupCell = Me.CreateHiddenButtonPopupCell() Dim popupCells As Cell() = New Cell() {colorPopupCell, customTypePopupCell, customButtonAppearancePopupCell, hiddenButtonPopupCell} Me.gcMultiRow1.Template = Template.CreateGridTemplate(popupCells) Me.gcMultiRow1.ColumnHeaders(0)(0).Value = "Color" Me.gcMultiRow1.ColumnHeaders(0)(1).Value = "Custom Type" Me.gcMultiRow1.ColumnHeaders(0)(2).Value = "Custom Button Appearance" Me.gcMultiRow1.ColumnHeaders(0)(3).Value = "Hidden button" FillData() End Sub
System.Object
System.MarshalByRefObject
System.ComponentModel.Component
GrapeCity.Win.MultiRow.Cell
GrapeCity.Win.MultiRow.PopupCell
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2