The following enhancements were made to C1TrueDBGrid in the 2006 v2 release of ComponentOne Studio Enterprise.
The following topics have been recently added to the task-based help for C1TrueDBGrid:
The TrueDBGrid Designer can be accessed either through the C1TrueDBGrid Tasks menu, the Columns property, or the context menu. | |
To add a gradient fill to a column, set the GradientMode, BackColor, and BackColor2 properties. Also, setting the GammaCorrection property to True to apply the gradient with a more uniform intensity. These properties can be set either in the designer or in code. | |
To change the column order in the grid, use the C1TrueDBGrid Designer or set RemoveAt and Insert methods in code. | |
To disable column sorting, set the AllowSort property to False. This property can be set either in the designer or in code. | |
To expand or shrink columns during grid resizing, set the SpringMode property to True and the MinWidth property for each column. This can be done either in the designer or in code. | |
Grid data can be exported as a delimited text, Excel, HTML, PDF, or RTF file. | |
To format rows based on specific criteria, use the FetchRowStyles property and the FetchRowStyle event. In this example, rows that do not have values in the Birth or Death columns will be highlighted green and all other rows will be locked and formatted in Steel Blue, Tahoma font. | |
To freeze columns in the grid, set the Frozen property to True. Freezing columns locks them from being scrolled and also prevents all columns with a lesser index from being scrolled. This property can be set either in the designer or in code. | |
To hide the Record Selectors column, set the RecordSelectors property to False. Hiding the Record Selectors column restricts selecting rows. This property can be set either in the designer or in code. | |
To highlight the row of the selected cell, set the MarqueeStyle property to HighlightRow. This can be set either in the designer or in code. | |
To make the AddNew row the active row when the program runs, use the AllowAddNew property, and the MoveLast and Select methods. | |
To restrict editing in specific columns, set the Locked property to True. This property can be set either in the designer or in code. | |
To save the layout of the grid, use the SaveLayout method, which will save the layout in an XML file. This can be done either in the designer or at in code. | |
To search for entries in a column using an incremental search, add a Timer component to the form, then set the KeyPress and Tick events. | |
To set default values for new rows, set the column's Value property in the OnAddNew event. This is useful if adding multiple rows with similar information. | |
To set multiple height values for rows, set the AllowRowSizing property to Individual Rows then assign height values to rows. | |
To set the column's caption height, set the ColumnCaptionHeight property. This can be set either in the designer or in code. |
Send comments about this topic to ComponentOne. Copyright © ComponentOne LLC. All rights reserved. |