Intersoft ClientUI Documentation
ColumnSpan Property



Gets or sets the number of columns that will be spanned.
Syntax
Public Property ColumnSpan As Integer
Dim instance As TableCell
Dim value As Integer
 
instance.ColumnSpan = value
 
value = instance.ColumnSpan
public int ColumnSpan {get; set;}
public:
property int ColumnSpan {
   int get();
   void set (    int value);
}
Remarks

Similar to HTML table, you can specify row and column span in Table element. However, unlike HTML table where row span is specified in row level, the RowSpan and ColumnSpan properties in Table element must be specified in TableCell level.

When the text content in spanned cell is long, the height of the last spanned row will automatically be enlarged if the height-related properties of that row are not specified. The last spanned row refers to the last row in the RowSpan definition. For example, if you specify RowSpan property to 2 in the first row, the last spanned row refers to the second row. Thus, if RowSpan property is set to 2 in the first row and height-related properties are not specified the last spanned row (the second row), that row will be enlarged according to the content of the spanned cell. See the following code and screenshot.

XAML
Copy Code
<Intersoft:FlowDocument>
    <Intersoft:Table Width="550" CellSpacing="0" Margin="20" CellPadding="5" Borders="1,Single,#FFcf7b79">
        <Intersoft:Table.Columns>
            <Intersoft:TableColumn Width="*"/>
            <Intersoft:TableColumn Width="*" />
            <Intersoft:TableColumn Width="2*"/>
        </Intersoft:Table.Columns>
        <Intersoft:TableRowGroup Background="#FFc0504d" Foreground="White">
            <Intersoft:TableRow>
                <Intersoft:TableCell>
                    <Intersoft:Paragraph>
                        <Intersoft:Run>
                            Employee Name
                        </Intersoft:Run>
                    </Intersoft:Paragraph>
                </Intersoft:TableCell>
                <Intersoft:TableCell>
                    <Intersoft:Paragraph>
                        <Intersoft:Run>
                            Title
                        </Intersoft:Run>
                    </Intersoft:Paragraph>
                </Intersoft:TableCell>
                <Intersoft:TableCell>
                    <Intersoft:Paragraph>
                        <Intersoft:Run>
                            Notes
                        </Intersoft:Run>
                    </Intersoft:Paragraph>
                </Intersoft:TableCell>
            </Intersoft:TableRow>
        </Intersoft:TableRowGroup>
        <Intersoft:TableRowGroup>
            <Intersoft:TableRow>
                <Intersoft:TableCell>
                    <Intersoft:Paragraph>
                        <Intersoft:Run>
                            Johanna Woods
                        </Intersoft:Run>
                    </Intersoft:Paragraph>
                </Intersoft:TableCell>
                <Intersoft:TableCell>
                    <Intersoft:Paragraph>
                        <Intersoft:Run>
                            Sales Member
                        </Intersoft:Run>
                    </Intersoft:Paragraph>
                </Intersoft:TableCell>
                <Intersoft:TableCell RowSpan="2">
                    <Intersoft:Paragraph>
                        <Intersoft:Run>
                            Both employees joined on April 2011, and both are placed in our branch office in Virginia, United States.
                            Yearly review is scheduled on April 2012.
                        </Intersoft:Run>
                    </Intersoft:Paragraph>
                </Intersoft:TableCell>
            </Intersoft:TableRow>
            <Intersoft:TableRow>
                <Intersoft:TableCell>
                    <Intersoft:Paragraph>
                        <Intersoft:Run>
                            Andrew Smith
                        </Intersoft:Run>
                    </Intersoft:Paragraph>
                </Intersoft:TableCell>
                <Intersoft:TableCell>
                    <Intersoft:Paragraph>
                        <Intersoft:Run>
                            Technical Support
                        </Intersoft:Run>
                    </Intersoft:Paragraph>
                </Intersoft:TableCell>                            
            </Intersoft:TableRow>
        </Intersoft:TableRowGroup>
    </Intersoft:Table>
</Intersoft:FlowDocument>

If height-related properties are specified in the last spanned row, the content of the spanned cell will be clipped, should it exceed the specified height.

XAML
Copy Code
<Intersoft:FlowDocument>
    <Intersoft:Table Width="550" CellSpacing="0" Margin="20" CellPadding="5" Borders="1,Single,#FFcf7b79">
        <Intersoft:Table.Columns>
            <Intersoft:TableColumn Width="*"/>
            <Intersoft:TableColumn Width="*" />
            <Intersoft:TableColumn Width="2*"/>
        </Intersoft:Table.Columns>
        <Intersoft:TableRowGroup Background="#FFc0504d" Foreground="White">
            <Intersoft:TableRow>
                <Intersoft:TableCell>
                    <Intersoft:Paragraph>
                        <Intersoft:Run>
                            Employee Name
                        </Intersoft:Run>
                    </Intersoft:Paragraph>
                </Intersoft:TableCell>
                <Intersoft:TableCell>
                    <Intersoft:Paragraph>
                        <Intersoft:Run>
                            Title
                        </Intersoft:Run>
                    </Intersoft:Paragraph>
                </Intersoft:TableCell>
                <Intersoft:TableCell>
                    <Intersoft:Paragraph>
                        <Intersoft:Run>
                            Notes
                        </Intersoft:Run>
                    </Intersoft:Paragraph>
                </Intersoft:TableCell>
            </Intersoft:TableRow>
        </Intersoft:TableRowGroup>
        <Intersoft:TableRowGroup>
            <Intersoft:TableRow>
                <Intersoft:TableCell>
                    <Intersoft:Paragraph>
                        <Intersoft:Run>
                            Johanna Woods
                        </Intersoft:Run>
                    </Intersoft:Paragraph>
                </Intersoft:TableCell>
                <Intersoft:TableCell>
                    <Intersoft:Paragraph>
                        <Intersoft:Run>
                            Sales Member
                        </Intersoft:Run>
                    </Intersoft:Paragraph>
                </Intersoft:TableCell>
                <Intersoft:TableCell RowSpan="2">
                    <Intersoft:Paragraph>
                        <Intersoft:Run>
                            Both employees joined on April 2011, and both are placed in our branch office in Virginia, United States.
                            Yearly review is scheduled on April 2012.
                        </Intersoft:Run>
                    </Intersoft:Paragraph>
                </Intersoft:TableCell>
            </Intersoft:TableRow>
            <Intersoft:TableRow Height="50">
                <Intersoft:TableCell>
                    <Intersoft:Paragraph>
                        <Intersoft:Run>
                            Andrew Smith
                        </Intersoft:Run>
                    </Intersoft:Paragraph>
                </Intersoft:TableCell>
                <Intersoft:TableCell>
                    <Intersoft:Paragraph>
                        <Intersoft:Run>
                            Technical Support
                        </Intersoft:Run>
                    </Intersoft:Paragraph>
                </Intersoft:TableCell>                            
            </Intersoft:TableRow>
        </Intersoft:TableRowGroup>
    </Intersoft:Table>
</Intersoft:FlowDocument>

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

TableCell Class
TableCell Members

Send Feedback