GrapeCity MultiRow Windows Forms Documentation
Height Property (Section)
Example 


Gets or sets the current height of the Section.
Syntax
<SRCategoryAttribute("Layout")>
<SRDescriptionAttribute("Indicates the height of the Section.")>
<LocalizableAttribute(True)>
Public Property Height As Integer
Dim instance As Section
Dim value As Integer
 
instance.Height = value
 
value = instance.Height
[SRCategory("Layout")]
[SRDescription("Indicates the height of the Section.")]
[Localizable(true)]
public int Height {get; set;}

Property Value

A System.Int32 value that represents the height, in pixels, of the Section. The default is 40.
Exceptions
ExceptionDescription
System.ArgumentOutOfRangeExceptionThe specified value is less than 1.
System.InvalidOperationExceptionThe GcMultiRow control is in run time when setting this property.
Remarks
Changing this property's value when the Template.LayoutMode property is LayoutMode.LeftToRight has no effect.
Example
The following code example shows how to use the section height. This code example is part of a larger example provided for the Section class.
void setHeightButton_Click(object sender, EventArgs e)
        {
            Template template = Template.Default;

            Section section = template.Row;

            // When changing the section height, the cell's height does not change.
            // Yow can add more cells, or adjust some cell's size to fit new template size.
            section.Height = 50;

            // Reload template.
            this.gcMultiRow1.Template = template;
        }
Private Sub setHeightButton_Click(ByVal sender As Object, ByVal e As EventArgs) Handles setHeightButton.Click
        Dim template1 As Template = Template.Default

        Dim section As Section = template1.Row

        ' When changing the section height, the cell's height does not change.
        ' Yow can add more cells, or adjust some cell's size to fit new template size.
        section.Height = 50

        ' Reload template.
        Me.gcMultiRow1.Template = template1
    End Sub
Requirements

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

See Also

Reference

Section Class
Section Members

 

 


Copyright © GrapeCity, inc. All rights reserved.