ComponentOne True DBGrid for WinForms
Design-Time Support / Using the Split Collection Editor
In This Topic
    Using the Split Collection Editor
    In This Topic

    The SplitCollection is a collection of Split objects which provides access to most of the grid's display properties and properties specific to a Split. Accessing these properties in code is done through the C1TrueDBGrid object and is demonstrated by the following:

    To write code in Visual Basic

    Visual Basic
    Copy Code
    Me.C1TrueDBGrid1.Splits(0).AllowColMove = True
    

    To write code in C#

    C#
    Copy Code
    this.c1TrueDBGrid1.Splits[0].AllowColMove = true;
    

    .NET contains useful collection editors which make the altering of a collection much easier. The SplitCollection can be modified at design-time through a .NET collection editor. The collection editor for the SplitCollection can be accessed by clicking on the ellipsis button (...) next to the Splits property in the Properties window. Notice that clicking on the ellipsis button next to the DisplayColumns property in the SplitCollection Collection Editor will bring up the C1DisplayColumnCollection editor.


    Notice that the editor does not contain buttons to add and delete Splits. Even though the collection editor cannot be used to create and delete splits, this can still be accomplished at design-time. Right-clicking the grid will bring up the grid's context menu. From the context menu, choose Design and use the C1TrueDBGrid Designer to add or remove splits.

    See Also