GrapeCity.Win.MultiRow Namespace > Section Class : Selectable Property |
<SRDescriptionAttribute("Indicates whether the Section is selectable.")> <DefaultValueAttribute()> <TakeCellFreezeAttribute(True)> <SRCategoryAttribute("Behavior")> Public Overridable Property Selectable As Boolean
Dim instance As Section Dim value As Boolean instance.Selectable = value value = instance.Selectable
[SRDescription("Indicates whether the Section is selectable.")] [DefaultValue()] [TakeCellFreeze(true)] [SRCategory("Behavior")] public virtual bool Selectable {get; set;}
Exception | Description |
---|---|
System.InvalidOperationException | The CurrentCell is in this Section and the CurrentCell is in edit mode, but it cannot end edit mode for some reason. |
This property influences the cell's Cell.Selectable property. If this property is false, the cell's Selectable property changes to false.
If you set this property to false, all the cells in this section are not selected through the UI or code.
void editColumnHeaderFooterButton_Click(object sender, EventArgs e) { Template template = Template.Default; ColumnHeaderSection columnHeaderSection = new ColumnHeaderSection(); columnHeaderSection.Height = 20; TextBoxCell textBoxCell = new TextBoxCell(); textBoxCell.Size = new Size(template.Width, 20); textBoxCell.Value = "The cell in header section, try to edit it"; columnHeaderSection.Cells.Add(textBoxCell); // In default, the cell in the column header section can't be select, // If you set column header section's Selectable property to true, the cell can be selected. columnHeaderSection.Selectable = true; // Event if the column header can be selected, in default, the cell in the column header section can't be edited, // If you set column header section's ReadOnly property to false, the cell can be edited. columnHeaderSection.ReadOnly = false; template.ColumnHeaders.Add(columnHeaderSection); // Reload template. gcMultiRow1.Template = template; }
Private Sub editColumnHeaderFooterButton_Click(ByVal sender As Object, ByVal e As EventArgs) Handles editColumnHeaderFooterButton.Click Dim template1 As Template = Template.Default Dim columnHeaderSection As New ColumnHeaderSection() columnHeaderSection.Height = 20 Dim textBoxCell As New TextBoxCell() textBoxCell.Size = New Size(template1.Width, 20) textBoxCell.Value = "The cell in header section, try to edit it" columnHeaderSection.Cells.Add(textBoxCell) ' In default, the cell in the column header section can't be select, ' If you set column header section's Selectable property to true, the cell can be selected. columnHeaderSection.Selectable = True ' Event if the column header can be selected, in default, the cell in the column header section can't be edited, ' If you set column header section's ReadOnly property to false, the cell can be edited. columnHeaderSection.ReadOnly = False template1.ColumnHeaders.Add(columnHeaderSection) ' Reload template. gcMultiRow1.Template = template1 End Sub
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