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:
Me.C1TrueDBGrid.Splits(0).AllowColMove = True
· C#
this.C1TrueDBGrid.Splits(0).AllowColMove = true;
· Delphi
Self.C1TrueDBGrid.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.
Send comments about this topic to ComponentOne. Copyright © ComponentOne LLC. All rights reserved. |