Welcome to ComponentOne True DBGrid for .NET

ComponentOne True DBGrid for .NET E-mail sent to documentation@componentone.com is for documentation feedback only. We welcome any suggestions to help improve our documentation.

Welcome to ComponentOne True DBGrid for .NET

Previous Next

Welcome to ComponentOne True DBGrid for .NET, a grid control for Microsoft Visual Studio.NET developed by ComponentOne LLC, was designed to allow end users to browse, edit, add, and delete data in a tabular format. Using the latest data-binding technologies built into Visual Studio.NET, including ADO.NET, True DBGrid completely manages the database interface, allowing developers to concentrate on important application-specific tasks.

True DBGrid was designed to be a powerful, versatile, and easy-to-use data presentation tool. Novice programmers can use True DBGrid to create a fully functional database browser with only writing a few lines of code. Professional developers can use the grid control's many properties and events to create sophisticated and user-friendly database front-end applications.

If you like True DBGrid for .NET, you can check out our other products by visiting our web site at http://www.componentone.com.

ComponentOne has a user-friendly distribution policy. We want every programmer to obtain a copy of True DBGrid for .NET to try for as long as they wish. Those who like the product and find it useful may buy a license for a reasonable price. The only restriction is that unlicensed copies of True DBGrid for .NET will display a ComponentOne banner every time they are loaded to remind developers to license the product.

We are confident that you'll like True DBGrid for .NET. If you have any suggestions or ideas for new features or tools that you'd like to see included in a future version please call us or write:

Corporate Headquarters

ComponentOne LLC
201 South Highland Avenue
3rd Floor
Pittsburgh, PA 15206 USA
412.681.4343
412.681.4384 (Fax)

http://www.componentone.com

Product Profile

What's New in True DBGrid for .NET

Installation

END-USER LICENSE AGREEMENT FOR COMPONENTONE SOFTWARE

Licensing FAQs

Technical Support

Redistributable Files

Namespaces

Creating a .NET Project

Adding the C1TrueDBGrid Component to the Toolbox

Migrating a C1TrueDBGrid Project to Visual Studio 2005

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Product Profile

Product Profile

True DBGrid includes dozens of advanced data access, data presentation, and user interface features that enable developers to build intuitive, professional-looking applications:

Excel and Word-like styles | Hierarchical style objects encapsulate font, color, picture, and formatting information, facilitating easy customization of grid components at design time and run time.
Excel-like splits | Developers and end users can divide the grid into separate vertical and horizontal panes to provide multiple views of the data. The splits can scroll independently or simultaneously.
Fixed, nonscrolling columns | Splits can also be used to create nonscrolling columns anywhere in the grid (at the left or right edges, or in the middle).
In-cell objects | The grid supports a variety of in-cell objects for data display and editing, including bitmaps, command buttons, check boxes, and radio buttons.
Drop-down objects | The grid supports a variety of drop-down objects for data entry, including a multicolumn control (C1TrueDBDropDown), a combo box, and a multiline text editor. Third-party drop-down controls also supported.
Automatic data translation | Database values can be automatically translated into alternate text or graphics without coding. For example, numeric codes can be rendered as words or even bitmaps.
Data-sensitive display | A powerful regular expression facility can be used to apply different styles to individual cells depending upon their contents. For example, negative numbers can be shown in red, or fields containing a particular substring can be shown in bold.
Unbound columns | The grid supports unbound columns while other columns are bound to a data control.
Input masking | Input templates can be assigned to columns in order to reduce end-user data entry errors.
Run-time CellTips | Provides context-sensitive help for end users.
Alternating row colors | Enhances the readability of the grid's display.
Excellent documentation | True DBGrid includes an extensive manual and online help with plenty of tutorials and examples.
Free run-time distribution | No royalty fees required.
New Vertical Splits | Like Microsoft Excel, the grid now has the ability to split both horizontally and vertically allowing for a grid matrix as well as singular horizontal and vertical views. In addition, a user-friendly matrix dereferencing notation makes splits quite accessible even with multiple horizontal and vertical splits.
New column objects | The True DBGrid now has two separate column objects to help simplify the sometimes daunting object model. The C1DataColumn object contains all of the properties related to data and data processing, while the C1DisplayColumn object contains all of the properties related to the column’s display.
Expanded data views | True DBGrid for .NET now has three alternate display formats. Form view presents data in a standard “form” that can be modified as needed. Inverted view transposes rows and columns, providing a more convenient “read down” format. While, the MultipleLines view displays all of the columns on multiple lines in the viewable grid.
Style border properties | The expanded style object now includes properties that let you customize the appearance, size, color, and type of cell borders.
Scroll tracking and ScrollTips | The vertical scroll bar thumb can now scroll records as it is moved. You can also use the ScrollTips feature to provide an informational pop-up during scrolling.
Filter bar | A special data entry row below the column headers, the filter bar lets you implement custom end-user operations such as incremental search and recordset filtering.
And much more… | Auto completion for drop-downs, cell range selection, customizable ENTER key behavior, drop-down hierarchical grid, tag property for column objects, right to left support, and a wide variety of print enhancements.


What's New in True DBGrid for .NET

What's New in True DBGrid for .NET

This documentation was last revised for 2006 v1 on December 28, 2005.

Overview of What's New in ComponentOne True DBGrid for .NET

There have been enhancements to True DBGrid for .NET that allow the user more flexibility. TrueDBGrid for .NET has enhanced the TrueDBGrid Designer, ValueItems Editor, and ValueItems Collection Editor interfaces.


Feature Overview

Feature Overview

Enhanced TrueDBGrid Designer Editor

The design-time column editor now has a new look and gives you greater control over the appearance of columns with just the click of a button.

Enhanced ValueItems Editor

The design-time ValueItems Editor allows you to control the presentation and behavior of ValueItems properties, as well as the ValueItem Collection Editor in one interface.

Enhanced ValueItem Collection Editor

The design-time ValueItem Collection Editor has a new look and can now be accessed through the ValueItems Editor.

Support for Unbound Mode

True DBGrid can now display data without being bound to a DataSource. Creating an unbound grid can be done in a few steps. To create an unbound grid, see Display Data without Binding to a DataSource.


Class Members

Class Members

Below are the most recent properties, methods, and enumerations added to the C1TrueDBGrid component:

C1DataColumn Class Members | Description
DataType | Gets or sets the DataType for a column.
FilterDropdown | Gets or sets a value indicating whether a drop-down list is displayed in the filter cell that lists all the values of the field.
C1DisplayColumn Class Members | Description
Frozen | Locks the columns from being scrolled.
C1TrueDBGrid Class Members | Description
FocusedSplit | Gets the Split that has focus.
UnboundColumnUpdated | Raised when an unbound column has been updated.
Frame Class Members | Description
AddRow (String) | Adds data to an unbound grid.
AddRow (String, Char) | Adds data to an unbound grid.
AddRows | Adds count empty rows to the grid.
Delete (Int32) | Removes the given row from the grid.
Delete (Int32, Int32) | Removes count rows from the grid starting at the given index.
SplitDividerSize | Controls the height and width of split dividers.
GroupInfo Class Members | Description
ColumnVisible | Determines the visibility of a column when it is dragged into the grouping area.
Interval | Sets or retrieves the way rows are grouped.
Split Class Member | Description
FilterBorderStyle | Gets or sets the Style object that controls the appearance of the FilterBar .
Style Class Members | Description
Alpha | Controls the opacity of the background brush when rendering.
BackColor2 | Controls the rendering of the style using a LinearGradient when used with the BackColor and GradientMode properties.
GammaCorrection | Gets or sets a value indicating whether gamma correction is enabled for the style when using LinearGradient rendering.
GradientMode | Controls the rendering of the style using a LinearGradient when used with the BackColor and BackColor2 properties.
View Class Member | Description
BorderStyle | Controls the appearance of the border rendered for a split.
Enumerations | Description
ColumnMergeEnum | Controls how columns are merged.
GradientModeEnum | Controls the rendering of the style using a LinearGradient.
GroupIntervalEnum | Specifies the grouping and rendering of group rows.
GroupIntervalEventArgs | Provides data for grouping.


Installation

Installation

The installation program will create a directory called "ComponentOne Studio.NET" under "Program Files". This directory will contain the following subdirectories:

bin | Contains copies of all binaries (DLLs, EXEs) in the ComponentOne Visual Studio.NET package.
Common | Contains support and data files that are used by many of the demo programs.
Help | Contains online documentation for all Studio components.
C1TrueDBGrid | Contains samples and tutorials for the C1TrueDBGrid component.


System Requirements

System Requirements

· Operating Systems:

Windows 2000

Windows 2003 Server

Windows NT 4

Windows XP, SP1, SP2

· Environments:

.NET Framework 1.0

.NET Framework1.1

C# .NET

Delphi

Visual Basic .NET

· Environments (Visual Studio 2005):

.NET Framework 2.0

C# .NET

Visual Basic .NET

· Hard Disk Space: 27 MB of hard disk space for storage of the software

· Disc Drive: CD or DVD-ROM drive if installing from CD


Installing Demonstration Versions

Installing Demonstration Versions

If you wish to try True DBGrid for .NET and do not have a registration key, install the product as usual but do not provide a registration key.

The only difference between unregistered (demonstration) and registered (purchased) versions of our products is that registered versions will stamp every application you compile so a ComponentOne banner will not appear when your users run the applications.


Uninstalling True DBGrid for .NET

Uninstalling True DBGrid for .NET

To uninstall True DBGrid for .NET, open the Control Panel application, and select the Add or Remove Programs option. Select True DBGrid for .NET and click the Remove button.


END-USER LICENSE AGREEMENT FOR COMPONENTONE SOFTWARE

END-USER LICENSE AGREEMENT FOR COMPONENTONE SOFTWARE

IMPORTANT-READ CAREFULLY: This End User License Agreement (this "EULA") contains the terms and conditions that govern your use of the SOFTWARE (as defined below) and imposes material limitations to your rights. You should read this EULA carefully and treat it as valuable property.

I. THIS EULA.

1. Software Covered by this EULA. This EULA governs your use of the ComponentOne, LLC ("C1") software product(s) enclosed or otherwise accompanied herewith (individually and collectively, the "SOFTWARE"). The term "SOFTWARE" includes, to the extent provided by C1: 1) any revisions, updates and/or upgrades thereto; 2) any data, image or executable files, databases, data engines, computer software, or similar items customarily used or distributed with computer software products; 3) anything in any form whatsoever intended to be used with or in conjunction with the SOFTWARE; and 4) any associated media, documentation (including physical, electronic and online) and printed materials (the "Documentation").

2. This EULA is a Legally Binding Agreement Between You and C1. If you are acting as an agent of a company or another legal person, such as an officer or other employee acting for your employer, then "you" and "your" mean your principal, the entity or other legal person for whom you are acting. However, importantly, even if you are acting as an agent for another, you may still be personally liable for violation of federal and State laws, such as copyright infringement.

By signifying your acceptance of the terms of this EULA, you intend to be, and hereby are, legally bound to this EULA to the same extent as if C1 and you physically signed this EULA. By installing, copying, or otherwise using the SOFTWARE, you agree to be bound by all the terms and conditions of this EULA. If you do not agree to all of such terms and conditions, you may not install or use the SOFTWARE. If you do not agree with any of the terms herewith and, for whatever reason, installation has begun or has been completed, you should cancel installation or un-install the SOFTWARE, as the case may be. Furthermore, you should promptly return the SOFTWARE to the place of business from which you obtained it in accordance with any return policies of such place of business. Return policies may vary among resellers; therefore you must comply with the return policies of your supplier as you agreed at the point of purchase. If the place of business from which you purchased the SOFTWARE does not honor a full refund for a period of thirty (30) days from the date of purchase, you may then return the SOFTWARE directly to C1 for a refund provided that such returns is authorized within the same thirty (30) days time period. To return the product directly to C1, you must first obtain a Return Authorization Number by contacting C1, and you must forward to C1 all items purchased, including the proof of purchase. The return must be postage-prepaid, and post-marked within thirty (30) days from the proof of purchase, time being of the essence. The return option to C1 is only available to the original purchaser of an unopened factory packaged item.

II. YOUR LICENSE TO DEVELOP AND TO DISTRIBUTE.

As provided in more detail below, this EULA grants you two licenses: 1) a license to use the SOFTWARE to develop other software products (the "Development License"); and 2) a license to use and/or distribute the Developed Software (the "Distribution License"). These licenses (individually and collectively, the "Licenses") are explained and defined in more detail below.

1. Definitions. The following terms have the respective meanings as used in this EULA:

"Network Server" means a computer with one or more computer central processing units (CPU's) that operates for the purpose of serving other computers logically or physically connected to it, including, but not limited to, other computers connected to it on an internal network, intranet or the Internet.

"Web Server" means a type of Network Server that serves other computers which, are specifically connected to it through either an intranet or the Internet.

"Developed Software" means those computer software products that are developed by or through the use of the SOFTWARE.

"Developed Web Server Software" means those Developed Software products that reside logically or physically on at least one Web Server and are operated (meaning the computer software instruction set is carried out) by the Web Server's central processing unit(s) (CPU).

"Redistributable Files" means the SOFTWARE files or other portions of the SOFTWARE that are provided by C1 and are identified as such in the Documentation for distribution by you with the Developed Software.

"Developer" means a human being or any other automated device using the SOFTWARE in accordance with the terms and conditions of this EULA.

"Developer Seat License" means that each Developer using or otherwise accessing the programmatic interface or the SOFTWARE must obtain the right to do so by purchasing a separate End User License.

"Source Code" shall mean computer software code or programs in human readable format, such as a printed listing of such a program written in a high-level computer language. The term "Source Code" includes, but is not limited to, documents and materials in support of the development effort of the SOFTWARE, such as flow charts, pseudo code and program notes.

2. Your Development License. You are hereby granted a limited, royalty-free, non-exclusive right to use the SOFTWARE to design, develop, and test Developed Software, on the express condition that, and only for so long as, you fully comply with all terms and conditions of this EULA.

The SOFTWARE is licensed to you on a Developer Seat License basis.

Developer Seat License basis means that you may perform an installation of the SOFTWARE for use in designing, testing and creating Developed Software by a single Developer on one or more computers, each with a single set of input devices, so long as 1) such computer/computers is/are used only by one single Developer at any given time and not concurrently and, 2) the user is the primary User to whom the license has been granted. Conversely, you may not install or use the SOFTWARE on a computer that is a network server or a computer at which the SOFTWARE is used by more than one Developer. You may not network the SOFTWARE or any component part of it, where it is or may be used by more than one Developer unless you purchase an additional Development License for each Developer. You must purchase another separate license to the SOFTWARE in order to add additional developer seats, whether the additional developers are accessing the SOFTWARE in a stand-alone environment or on a computer network.

The license rights granted under this Agreement may be limited to a specified number of days after you first install the SOFTWARE unless you supply information required to license or verify your licensed copy, as the case may be, within the time and the manner described during the SOFTWARE setup sequence and/or in the dialog boxes appearing during use of the SOFTWARE. You may need to verify the SOFTWARE through the use of the Internet, email or telephone; toll charges may apply. You may need to re-verify the SOFTWARE if you modify your computer hardware. Product verification is based on the exchange of information between your computer and C1. None of this information contains personally identifiable information nor can they be used to identify any personal information about you or any information you store in your computer. YOU ACKNOWLEDGE AND UNDERSTAND THAT THERE ARE TECHNOLOGICAL MEASURES IN THE SOFTWARE THAT ARE DESIGNED TO PREVENT UNLICENSED OR ILLEGAL USE OF THE SOFTWARE. YOU AGREE THAT C1 MAY USE SUCH MEASURES AND YOU AGREE TO FOLLOW ANY REQUIREMENTS REGARDING SUCH TECHNOLOGICAL MEASURES. YOU ACKNOWLEDGE AND AGREE THAT THE SOFTWARE WILL CEASE TO FUNCTION UNLESS AND UNTIL YOU VERIFY THE APPLICABLE SOFTWARE SERIAL KEY.

You agree that C1 may audit your use of the SOFTWARE for compliance with these terms at any time, upon reasonable notice. In the event that such audit reveals any use of the SOFTWARE other than in full compliance with the terms of this EULA, you shall reimburse C1 for all reasonable expenses related to such audit in addition to any other liabilities you may incur as a result of such non-compliance.

In all cases, (a) you may not use C1's name, logo, or trademarks to market your Developed Software without the express written consent of C1; (b) you must include the following C1 copyright notice in your Developed Software documentation and/or in the "About Box" of your Developed Software, and wherever the copyright/rights notice is located in the Developed Software (“Portions Copyright © ComponentOne, LLC 1991-2005. All Rights Reserved.”); (c) you agree to indemnify, hold harmless, and defend C1, its suppliers and resellers, from and against any claims or lawsuits, including attorney's fees that may arise from the use or distribution of your Developed Software; (d) you may use the SOFTWARE only to create Developed Software that is significantly different than the SOFTWARE.

3. Your Distribution License.

License to Distribute Developed Software. Subject to the terms and conditions in this EULA, you are granted the license to use and to distribute Developed Software on a royalty-free basis, provided that the Developed Software incorporates the SOFTWARE as an integral part of the Developed Software in machine-language compiled format (customarily an ".exe", or ".dll", etc.). You may not distribute, bundle, wrap or subclass the SOFTWARE as Developed Software which, when used in a "designtime" development environment, exposes the programmatic interface of the SOFTWARE. You may distribute, on a royalty-free basis, Redistributable Files with Developed Software only. You may not add or transfer the SOFTWARE license key to the computer where the Developed Software is installed. Users of the Developed Software may not use the SOFTWARE or the Redistributable Files, directly or indirectly, for development purposes. In particular, if you create a control (or user control) using the SOFTWARE as a constituent control, you are not licensed to distribute the control you created with the SOFTWARE to users for development purposes.

4. Specific Product Limitations. Notwithstanding anything in this EULA to the contrary, if the license you have purchased is for any of the following products, then the following additional limitations will apply:

a. ComponentOne Reports for .NET Designer Edition. ComponentOne Reports for .NET Designer Edition includes at least: 1) one dynamic link library file (c1.win.c1reportdesigner.dll) known as C1ReportDesigner Component, 2) one executable file (ReportDesigner.exe) known as C1ReportDesigner Application and, 3) the Source Code of the C1ReportDesigner Application. The C1ReportDesigner Component is subject to the general terms and restrictions set forth in this EULA. The C1ReportDesigner Application is an executable file used to design and prepare reports; the C1ReportDesigner Application may be distributed, free of royalties, only in conjunction with the Developed Software.

C1 hereby also grants you the right to use and to modify the C1ReportDesigner Application Source Code to create derivative works that are based on the licensed Source Code. You may distribute such derivative works, solely in object code format and exclusively in conjunction with and/or as a part of the Developed Software. You are expressly not granted the right to distribute, disclose or otherwise make available to any third party the licensed Source Code, any portion, modified version or derivative work thereof, in source code format.

C1 shall retain all right, title and interest in and to the licensed Source Code, and all C1 updates, modifications or enhancements thereof. Nothing herein shall be deemed to transfer any ownership or title rights in and to the licensed Source Code from C1 to you.

SOURCE CODE IS LICENSED TO YOU AS IS. C1 DOES NOT AND SHALL NOT PROVIDE YOU WITH ANY TECHNICAL SUPPORT FOR YOUR SOURCE CODE LICENSE.

b. VSView Reporting Edition (ActiveX). VSView Reporting Edition includes at least one executable file listed as “VSRptX.exe” (where X indicates the version number i.e.7,8, etc.), known as “Designer.” The file "VSRptX.exe”, or any upgrade or future versions of the Designer, are subject to the restrictions set forth in this EULA and may not be distributed with your Developed Software or in any other way.

c. Studio Products. You may not share the component parts of the Studio Products licensed to you with other Developers, nor may you allow the use and/or installation of such components by other Developers.

5. Updates/Upgrades; Studio Subscription. Subject to the terms and conditions of this EULA, the Licenses are perpetual. Updates and upgrades to the SOFTWARE may be provided by C1 from time-to-time, and, if so provided by C1, are provided upon the terms and conditions offered at that time by C1 in its sole discretion. C1 may provide updates and upgrades to the SOFTWARE for free or for any charge, at any time or never, and through its chosen manner of access and distribution, all in C1's sole discretion.

C1 licenses certain of its separately-licensed products bundled together in a product suite, called the C1 "Studio" product line (the "Studio Products"). The exact separately-licensed products that are bundled into the Studio Products may change from time-to-time in C1's sole discretion. If the SOFTWARE is identified as a C1 "Studio" product, then the SOFTWARE is one of the Studio Products. The SOFTWARE and the Studio Products are revised from time-to-time (meaning, for example, revised with updates, upgrades and, in the case of Studio products, some times changes to the mix of products included in the bundle). To receive any such revisions to the SOFTWARE or the Studio Products, as the case may be, you must have a valid SOFTWARE license or a valid Studio subscription. Together with the Licenses, the original purchaser is granted a one-year subscription from the date of purchase. Upon expiration, you must renew your license subscription to continue to be entitled to receive SOFTWARE and/or the Studio Products revisions as the case may be.

6. Serial Number. With your license, you will be issued a unique serial number (the "Serial Number") used for the activation of the SOFTWARE. The Serial Number is subject to the restrictions set forth in this EULA and may not be disclosed or distributed either with your Developed Software or in any other way. The disclosure or distribution of the Serial Number constitutes a breach of this EULA, the effect of which shall be the immediate termination and revocation of all the rights granted herein.

7. Evaluation Copy. If you are using an "evaluation copy", specifically designated as such by C1 on its website or elsewhere, then the Licenses are limited as follows: a) you are granted a license to use the SOFTWARE for a period of thirty (30) days counted from the day of installation (the "Evaluation Period"); b) upon completion of the Evaluation Period, you shall either i) delete the SOFTWARE from the computer containing the installation, or you may ii) obtain a paid license of the SOFTWARE from C1 or any of its resellers; and c) any Developed Software developed with the Evaluation Copy may not be distributed or used for any commercial purpose.

III. INTELLECTUAL PROPERTY.

1. Copyright. You agree that all right, title, and interest in and to the SOFTWARE (including, but not limited to, any images, photographs, animations, video, audio, music, text, and “applets” incorporated into the SOFTWARE), and any copies of the SOFTWARE, and any copyrights and other intellectual properties therein or related thereto are owned exclusively by C1, except to the limited extent that C1 may be the rightful license holder of certain third-party technologies incorporated into the SOFTWARE. The SOFTWARE is protected by copyright laws and international treaty provisions. The SOFTWARE is licensed to you, not sold to you. C1 reserves all rights not otherwise expressly and specifically granted to you in this EULA.

2. Backups. You may make a copy of the SOFTWARE solely for backup or archival purposes. Notwithstanding the foregoing, you may not copy the printed Documentation.

3. General Limitations. You may not reverse engineer, decompile, or disassemble the SOFTWARE, except and only to the extent that applicable law expressly permits such activity notwithstanding this limitation.

4. Software Transfers. You may not rent or lease the SOFTWARE. You may permanently transfer all of your rights under the EULA, provided that you retain no copies, that you transfer all the SOFTWARE (including all component parts, the media and printed materials, any updates, upgrades, this EULA and, if applicable, the Certificate of Authenticity), and that the transferee agrees to be bound by the terms of this EULA. If the SOFTWARE is an update or upgrade, any transfer must include all prior versions of the SOFTWARE.

5. Termination. Without prejudice to any other rights it may have, C1 may terminate this EULA and the Licenses if you fail to comply with the terms and conditions contained herein. In such an event, you must destroy all copies of the SOFTWARE and all of its component parts.

6. Export Restrictions. You acknowledge that the SOFTWARE is of U.S. origin. You acknowledge that the license and distribution of the SOFTWARE is subject to the export control laws and regulations of the United States of America, and any amendments thereof, which restrict exports and re-exports of software, technical data, and direct products of technical data, including services and Developed Software. You agree that you will not export or re-export the SOFTWARE or any Developed Software, or any information, documentation and/or printed materials related thereto, directly or indirectly, without first obtaining permission to do so as required from the United States of America Department of Commerce's Bureau of Export Administration ("BXA"), or other appropriate governmental agencies, to any countries, end-users, or for any end-uses that are restricted by U.S. export laws and regulations, and any amendments thereof, which include, but are not limited to: Restricted Countries, Restricted End-Users, and Restricted End-Uses.

These restrictions change from time to time. You represent and warrant that neither the BXA nor any other United States federal agency has suspended, revoked or denied your export privileges. C1 acknowledges that it shall use reasonable efforts to supply you with all reasonably necessary information regarding the SOFTWARE and its business to enable you to fully comply with the provisions of this Section. If you have any questions regarding your obligations under United States of America export regulations, you should contact the Bureau of Export Administration, United States Department of Commerce, Exporter Counseling Division, Washington DC. U.S.A. (202) 482-4811, http://www.bxa.doc.gov.

7. U.S. Government Restricted Rights. The SOFTWARE and documentation are provided with RESTRICTED RIGHTS. You will comply with any requirements of the Government to obtain such RESTRICTED RIGHTS protection, including without limitation, the placement of any restrictive legends on the SOFTWARE, and any license agreement used in connection with the distribution of the SOFTWARE. Manufacturer is ComponentOne, LLC, 201 South Highland Avenue , 3rd Floor, Pittsburgh, Pennsylvania 15206 USA. For solicitations issued by the Government on or after December 1, 1995 and the Department of Defense on or after September 29, 1995, the only rights provided in the software and documentation provided herein shall be those contained in this EULA. Under no circumstances shall C1 be obligated to comply with any Governmental requirements regarding the submission of or the request for exemption from submission of cost or pricing data or cost accounting requirements. For any distribution of the SOFTWARE that would require compliance by C1 with the Government's requirements relating to cost or pricing data or cost accounting requirements, you must obtain an appropriate waiver or exemption from such requirements for the benefit of C1 from the appropriate Government authority before the distribution and/or license of the SOFTWARE to the Government.

IV. WARRANTIES AND REMEDIES.

1. Limited Warranty. C1 warrants that the original media, if any, are free from defects for ninety (90) days from the date of delivery of the SOFTWARE. C1 also warrants that: (i) it has the full power to enter into this Agreement and grant the license rights set forth herein; (ii) it has not granted and will not grant any rights in the Software to any third party which grant is inconsistent with the rights granted to you in this Agreement; and (iii) the Software does not and will not infringe any trade secret, copyright, trademark or other proprietary right held by any third party and does not infringe any patent held by any third party. EXCEPT AS OTHERWISE PROVIDED IN THE PRECEDING SENTENCE, AND TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, C1 EXPRESSLY DISCLAIMS ANY WARRANTY FOR THE SOFTWARE, DOCUMENTATION AND ANYTHING ELSE PROVIDED BY C1 HEREBY AND C1 PROVIDES THE SAME IN “AS IS” CONDITION WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK ARISING OUT OF USE OR PERFORMANCE OF THE SOFTWARE AND DOCUMENTATION REMAINS WITH YOU. THIS LIMITED WARRANTY GIVES YOU SPECIFIC LEGAL RIGHTS. YOU MAY HAVE OTHERS WHICH VARY FROM STATE TO STATE.

2. Limited Remedy. C1 PROVIDES NO REMEDIES OR WARRANTIES, WHETHER EXPRESS OR IMPLIED, FOR ANY SAMPLE APPLICATION CODE, REDISTRIBUTABLE FILES, TRIAL VERSION AND THE NOT FOR RESALE VERSION OF THE SOFTWARE. ANY SAMPLE APPLICATION CODE, TRIAL VERSION AND THE NOT FOR RESALE VERSION OF THE SOFTWARE ARE PROVIDED “AS IS”.

C1's entire liability and your exclusive remedy under this EULA shall be, at C1's sole option, either (a) return of the price paid for the SOFTWARE; (b) repair the SOFTWARE through updates distributed online or otherwise in C1's discretion; or (c) replace the SOFTWARE with SOFTWARE that substantially performs as described in the SOFTWARE documentation, provided that you return the SOFTWARE in the same manner as provided in Section I.2 for return of the SOFTWARE for non-acceptance of this EULA. Any media for any repaired or replacement SOFTWARE will be warranted for the remainder of the original warranty period or thirty (30) days, whichever is longer. THESE REMEDIES ARE NOT AVAILABLE OUTSIDE OF THE UNITED STATES OF AMERICA. TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, IN NO EVENT SHALL C1 BE LIABLE FOR ANY DAMAGES WHATSOEVER (INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF BUSINESS PROFIT, BUSINESS INTERRUPTION, LOSS OF BUSINESS INFORMATION, OR ANY OTHER PECUNIARY LOSS) ARISING OUT OF THE USE OR INABILITY TO USE THE SOFTWARE, EVEN IF C1 HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. BECAUSE SOME STATES/JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES IN CERTAIN CASES, THE ABOVE LIMITATION MAY NOT APPLY TO YOU.

V. MISCELLANEOUS.

1. This is the Entire Agreement. This EULA (including any addendum to this EULA included with the SOFTWARE) is the final, complete and exclusive statement of the entire agreement between you and C1 relating to the SOFTWARE. This EULA supersedes any prior and contemporaneous proposals, purchase orders, advertisements, and all other communications in relation to the subject matter of this EULA, whether oral or written. No terms or conditions, other than those contained herein, and no other understanding or agreement which in any way modifies these terms and conditions, shall be binding upon the parties unless entered into in writing executed between the parties, or by other non-oral manner of agreement whereby the parties objectively and definitively act in a manner to be bound (such as by continuing with an installation of the SOFTWARE, etc.). Employees, agents and other representatives of C1 are not permitted to orally modify this EULA.

2. You Indemnify C1. You agree to indemnify, hold harmless, and defend C1 and its suppliers and resellers from and against any and all claims or lawsuits, including attorney's fees, which arise out of or result from your distribution of your Developed Software, your Developed Web Server Software or from your breach of any of the terms and conditions of this EULA.

3. Interpretation of this EULA. If for any reason a court of competent jurisdiction finds any provision of this EULA, or any portion thereof, to be unenforceable, that provision of this EULA will be enforced to the maximum extent permissible so as to effect the intent of the parties, and the remainder of this EULA will continue in full force and effect. Formatives of defined terms shall have the same meaning of the defined term. Failure by either party to enforce any provision of this EULA will not be deemed a waiver of future enforcement of that or any other provision. Except as otherwise required or superseded by law, this EULA is governed by the laws of the Commonwealth of Pennsylvania, without regard to its conflict of laws principles. The parties consent to the personal jurisdiction and venue of the Commonwealth of Pennsylvania, in the County of Allegheny, and agree that any legal proceedings arising out of this EULA shall be conducted solely in such Commonwealth. If the SOFTWARE was acquired outside the United States, then local law may apply.


Licensing FAQs

Licensing FAQs

This section describes the main technical aspects of licensing. It may help the user to understand and resolve licensing problems he may experience when using ComponentOne .NET and ASP.NET products.

What is Licensing?

How does Licensing Work?

Common Scenarios

Troubleshooting

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


What is Licensing?

What is Licensing?

Previous Next

Licensing is a mechanism used to protect intellectual property by ensuring that users are authorized to use software products.

Licensing is not only used to prevent illegal distribution of software products. Many software vendors, including ComponentOne, use licensing to allow potential users to test products before they decide to purchase them.

Without licensing, this type of distribution would not be practical for the vendor or convenient for the user. Vendors would either have to distribute evaluation software with limited functionality, or shift the burden of managing software licenses to customers, who could easily forget that the software being used is an evaluation version and has not been purchased.


How does Licensing Work?

How does Licensing Work?

Previous Next

ComponentOne uses a licensing model based on the standard set by Microsoft, which works with all types of components.

Note: The Compact Framework components use a slightly different mechanism for licensing than the other ComponentOne components due to platform differences.

When a user decides to purchase a product, he receives an installation program and a Serial Number. During the installation process, the user is prompted for the serial number that is saved on the system. (Users can also enter the serial number by clicking the "License" button on the About Box of any ComponentOne product.)

When a licensed component is added to a form or web page, Visual Studio asks the newly created component for licensing information. The component looks for licensing information stored in the system and generates a key, which Visual Studio saves in two files:

1. a "<projectName>.licenses" resource file which contains the actual key and

2. a "licenses.licx" file that contains references to those resources.

These files are automatically added to the project.

Note that the licenses.licx file is usually not shown in the Solution Explorer; it appears if you press the "Show All Files" button in the Solution Explorer's toolbox, or select "Project | Show All Files" from Visual Studio's main menu.

Later, when the component is created at run time, it gets passed the key that was created at design time and can decide whether to simply accept the key, to throw an exception and fail altogether, or to display some information reminding the user that the software has not been licensed.

All ComponentOne products are designed to display licensing information if the product is not licensed. None will throw licensing exceptions and prevent applications from running.


Common Scenarios

Common Scenarios

Creating components at design time

Creating components at run time

Inheriting from licensed components

Using licensed components in console applications

Using licensed components in Visual C++ applications


Creating components at design time

Creating components at design time

This is the most common scenario and also the simplest: the user adds one or more controls to the form, the licensing information is stored in the licenses.licx file, and the component works.

Note that the mechanism is exactly the same for Windows Forms and Web Forms (ASP.NET) projects.


Creating components at run time

Creating components at run time

This is also a fairly common scenario. You do not need an instance of the component on the form, but would like to create one or more instances at run time.

In this case, the project will not contain a licenses.licx file (or the file will not contain an appropriate key for the component) and therefore licensing will fail.

To fix this problem, add an instance of the component to a form in the project. This will create the licenses.licx file and things will then work as expected. (The component can be removed from the form after the licenses.licx file has been created).


Inheriting from licensed components

Inheriting from licensed components

If a component that inherits from a licensed component is created, the licensing information to be stored in the form is still needed. This can be done in two ways:

1. Add a LicenseProvider attribute to the component.

This will mark the component as licensed. When a component is added to a form, Visual Studio will create and manage the licenses.licx file, and the base class will handle the licensing process as usual. No additional work is needed. For example:

[LicenseProvider(typeof(LicenseProvider))]

class MyGrid: C1.Win.C1FlexGrid.C1FlexGrid

{

// ...

}

2. Add an instance of the base component to the form.

This will embed the licensing information into the licenses.licx file as in the previous scenario, and the base component will find it and use it. As before, the extra instance can be deleted after the licenses.licx file has been created.


Using licensed components in console applications

Using licensed components in console applications

When building console applications, there are no forms to add components to, and therefore Visual Studio won't create a licenses.licx file.

In these cases, create a temporary Windows Forms application and add all the desired licensed components to a form. Then close the Windows Forms application and copy the licenses.licx file into the console application project.

Make sure the licensex.licx file is configured as an embedded resource. To do this, right-click the licenses.licx file in the Solution Explorer window and select Properties. In the property window, set the "Build Action" property to "Embedded Resource".


Using licensed components in Visual C++ applications

Using licensed components in Visual C++ applications

There is an issue in VC++ 2003 where the licenses.licx is ignored during the build process; therefore, the licensing information is not included in VC++ applications.

To fix this problem, extra steps must be taken to compile the licensing resources and link them to the project. Note the following:

1. Build the C++ project as usual. This should create an exe file and also a licenses.licx file with licensing information in it.

2. Copy the licenses.licx file from the app directory to the target folder (Debug or Release).

3. Copy the C1Lc.exe utility and the licensed dlls to the target folder. (Don't use the standard lc.exe, it has bugs.)

4. Use C1Lc.exe to compile the licenses.licx file. The command line should look like this:

c1lc /target:MyApp.exe /complist:licenses.licx /i:C1.Win.C1FlexGrid.dll

5. Link the licenses into the project. To do this, go back to Visual Studio, right-click the project, select properties, and go to the Linker/Command Line option. Enter the following:

/ASSEMBLYRESOURCE:Debug\MyApp.exe.licenses

6. Rebuild the executable to include the licensing information in the application.


Troubleshooting

Troubleshooting

We try very hard to make the licensing mechanism as unobtrusive as possible, but problems may occur for a number of reasons.

Below is a description of the most common problems and their solutions.


I have a licensed version of a ComponentOne product but I still get the splash screen when I run my project.

I have a licensed version of a ComponentOne product but I still get the splash screen when I run my project.

Previous Next

If this happens, there must be a problem with the licenses.licx file in the project. It either doesn't exist, contains wrong information, or is not configured correctly.

First, try a full rebuild ("Rebuild All" from the Visual Studio Build menu). This will usually rebuild the correct licensing resources.

If that fails, follow these steps:

1. Open the project and go to the Solution Explorer window.

2. Click the "Show All Files" button on the top of the window.

3. Find the licenses.licx file and delete it.

4. Close the project and reopen it.

5. Open the main form and add an instance of each licensed control.

6. Check the Solution Explorer window, there should be a licenses.licx file there.

7. Rebuild the project using the "Rebuild All" option (not just "Rebuild").


I have a licensed version of a ComponentOne product on my web server but the components still behave as unlicensed.

I have a licensed version of a ComponentOne product on my web server but the components still behave as unlicensed.

Previous Next

There is no need to install any licenses on machines used as servers and not used for development.

The components must be licensed on the development machine, therefore the licensing information will be saved into the executable (exe or dll) when the project is built. After that, the application can be deployed on any machine, including web servers.


I downloaded a new build of a component that I have purchased, and now I'm getting the splash screen when I build my projects.

I downloaded a new build of a component that I have purchased, and now I'm getting the splash screen when I build my projects.

Previous Next

Make sure that the license key is still valid. If you licensed the component over a year ago, your subscription may have expired. In this case, you have two options:

Option 1 - Renew your subscription to get a new license key.

If you choose this option, you will receive a new key that you can use to license the new components (from the installation utility or directly from the About Box).

The new subscription will entitle you to a full year of upgrades and to download the latest maintenance builds directly from http://prerelease.componentone.com/.

Option 2 – Continue to use the components you have.

Subscriptions expire, products do not. You can continue to use the components you received or downloaded while your subscription was valid.


Technical Support

Technical Support

True DBGrid for .NET is developed and supported by ComponentOne LLC, a company formed by the merger of APEX Software Corporation and VideoSoft. Technical support can be obtained using any of the following methods:

ComponentOne Web site

ComponentOne HelpCentral

Internet E-mail

Peer-to-Peer Newsgroup

Documentation

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ComponentOne Web site

ComponentOne Web site

The ComponentOne Web site at www.componentone.com provides a wealth of information and software downloads for True DBGrid users:

· Descriptions of the various support options available through the ComponentOne Service Team.

· Answers to frequently asked questions (FAQ's) about True DBGrid, organized by functionality. Please consult the FAQ's before contacting us directly, as this can save time and also provide an introduction to other useful information pertaining to True DBGrid.

· Free product updates, which provide bug fixes and new features.


ComponentOne HelpCentral

ComponentOne HelpCentral

ComponentOne HelpCentral is the new online resource for Visual Studio developers and Help authors. Visit HelpCentral to get information on ComponentOne products, view online demos, get Tech Tips and answers to frequently asked questions (FAQ's), search the ComponentOne knowledgebase and more!


Internet E-mail

Internet E-mail

For technical support through the Internet, e-mail us at:

support.tdbgrid.net@componentone.com

To help us provide you with the best support, please include the following information when contacting ComponentOne:

· Your ComponentOne product serial number.

· The version and name of your operating system.

· Your development environment and its version.

For more information on technical support, go to:

www.componentone.com/support


Peer-to-Peer Newsgroup

Peer-to-Peer Newsgroup

ComponentOne also sponsors a peer-to-peer newsgroup for True DBGrid users. ComponentOne does not offer formal technical support in this newsgroup, but instead sponsors it as a forum for users to post and answer each other's questions regarding True DBGrid. However, ComponentOne may monitor the newsgroup to ensure accuracy of information and provide comments when necessary. You can access the newsgroup from the ComponentOne Web site at http://helpcentral.componentone.com/Newsgroups.aspx.


Documentation

Documentation

ComponentOne documentation is available with each of our products in HTML Help, Microsoft Help 2.0 (.NET, ASP.NET and Mobile Device products only), and PDF format. All of the PDFs are also available on ComponentOne HelpCentral, as well as online help that is directly viewable in your web browser. If you have suggestions on how we can improve our documentation, please email the Documentation team. Please note that e-mail sent to the Documentation team is for documentation feedback only. Technical Support and Sales issues should be sent directly to their respective departments.


Redistributable Files

Redistributable Files

ComponentOne True DBGrid for .NET is developed and published by ComponentOne LLC. You may use it to develop applications in conjunction with Microsoft Visual Studio or any other programming environment that enables the user to use and integrate the control(s). You may also distribute, free of royalties, the following Redistributable Files with any such application you develop to the extent that they are used separately on a single CPU on the client/workstation side of the network:

· C1.Win.C1TrueDBGrid.dll

· C1.Common.dll

· C1.Win.C1TrueDBGrid.2.dll (if using Visual Studio 2005)

If using the print, preview, or export features, you may also distribute:

· C1.PrintUtil.dll

· C1.C1PrintDocument.dll

· C1.Win.C1PrintPreview.dll

Site licenses are available for groups of multiple developers. Please contact Sales@ComponentOne.com for details.


Namespaces

Namespaces

Namespaces organize the objects defined in an assembly. Assemblies can contain multiple namespaces, which can in turn contain other namespaces. Namespaces prevent ambiguity and simplify references when using large groups of objects such as class libraries.

The general namespace for ComponentOne Windows products is C1.Win. The namespace for the True DBGrid control is C1.Win.C1TrueDBGrid. The following code fragment shows how to declare a C1FlexGrid control using the fully qualified name for this class:

· Visual Basic

· C#

· Delphi

Namespaces address a problem sometimes known as namespace pollution, in which the developer of a class library is hampered by the use of similar names in another library. These conflicts with existing components are sometimes called name collisions.

For example, if you create a new class named Split, you can use it inside the project without qualification. However, the C1TrueDBGrid assembly also implements a class called Split. So, to use the C1TrueDBGrid class in the same project, a fully qualified reference must be used to make the reference unique. If the reference is not unique, Visual Studio .NET produces an error stating that the name is ambiguous.

Fully qualified names are object references that are prefixed with the name of the namespace where the object is defined. Objects defined in other projects can be used if a reference to the class is created (by choosing Add Reference from the Project menu) and then the fully qualified name for the object can be used in the code.

Fully qualified names prevent naming conflicts because the compiler can always determine which object is being used. However, the names themselves can get long and cumbersome. To get around this, use the Imports statement (using in C#) to define an alias — an abbreviated name that can be used in place of a fully qualified name. For example, the following code snippet creates aliases for two fully qualified names, and uses these aliases to define two objects:

· Visual Basic

· C#

· Delphi

If the Imports statement is used without an alias, all the names in that namespace can be used without qualification provided they are unique to the project.

As a warning, unless specified explicitly in the code, it is taken for granted that the Imports statement has been specified.

· Visual Basic

· C#

· Delphi

This applies only to small code samples. Tutorials and other longer samples will specify complete qualifiers.


Creating a .NET Project

Creating a .NET Project

This topic demonstrates how to create a new .NET project.

1. From the File menu in Microsoft Visual Studio .NET, select New and click Project. The New Project dialog box opens.

2. Under Project Types, choose either Visual Basic or Visual C#, and select Windows Application from the list of Templates in the right pane.

3. Enter a name for your application in the Name field and click OK.

A new Microsoft Visual Studio .NET project is created and a new Form1 is displayed in the Designer view.

4. Double-click the C1TrueDBGrid components from the Toolbox to add them to Form1. For information on adding a component to the toolbox, see Adding the C1TrueDBGrid Component to the Toolbox.


Adding the C1TrueDBGrid Component to the Toolbox

Adding the C1TrueDBGrid Component to the Toolbox

When you install C1TrueDBGrid, the following C1TrueDBGrid component will appear in the Visual Studio Toolbox customization dialog box:

· C1TrueDBGrid

In order to use this component, you must add it to the Visual Studio Toolbox:

1. Open the Visual Studio IDE (Microsoft Development Environment). Make sure the Toolbox is visible (select Toolbox in the View menu if necessary) and right-click it to open the context menu.

2. To make C1TrueDBGrid component appear on its own tab in the Toolbox, select Add Tab from the context menu and type in the tab name, C1TrueDBGrid, for example.

3. Right-click the tab where the component is to appear and select Choose Items from the context menu.

Note: In Visual Studio 2002, select Customize Toolbox, or in Visual Studio 2003, select Add/Remove Items from the context menu. The Customize Toolbox dialog box opens and you can select the desired components as described in the next step.

The Choose Toolbox Items dialog box opens.

4. In the dialog box, select the .NET Framework Components tab. Sort the list by Namespace (click the Namespace column header) and check the check boxes for all components belonging to namespace C1.Win.C1TrueDBGrid. Note that there may be more than one component for each namespace.


Migrating a C1TrueDBGrid Project to Visual Studio 2005

Migrating a C1TrueDBGrid Project to Visual Studio 2005

To migrate a project using ComponentOne components to Visual Studio 2005, there are two main steps that must be performed. First, you must convert your project to Visual Studio 2005, which includes removing any references to a previous assembly and adding a reference to the new assembly. Secondly, the .licx file, or licensing file, must be updated in order for the project to run correctly.

To convert the project:

1. Open Visual Studio 2005 and select File, Open Project.

2. Locate the .sln file for the project that you wish to convert to Visual Studio 2005. Select it and click Open. The Visual Studio Conversion Wizard appears.

3. Click Next.

4. Select Yes, create a backup before converting to create a backup of your current project and click Next.

5. Click Finish to convert your project to Visual Studio 2005. The Conversion Complete window appears.

6. Click Show the conversion log when the wizard is closed if you want to view the conversion log.

7. Click Close. The project opens. Now you must remove references to any of the previous ComponentOne .dlls and add references to the new ones.

8. Go to the Solution Explorer (View | Solution Explorer) and click the Show All Files button.

Note: The Show All Files button does not appear in the Solution Explorer toolbar if the Solution project node is selected.

9. Expand the References node, right-click C1.Common and select Remove. Also remove C1.Win.C1TrueDBGrid the same way.

10. Right-click the References node and select Add Reference.

11. Locate and select C1.Win.C1TrueDBGrid.2.dll. Click OK to add it to the project.

To update the .licx file:

1. In the Solution Explorer, right-click the licenses.licx file and select Delete.

2. Click OK to permanently delete licenses.licx. The project must be rebuilt to create a new, updated version of the .licx file.

3. Click the Start Debugging button to compile and run the project. The new .licx file may not be visible in the Solution Explorer.

4. Select File, Close to close the form and then double-click the Form.vb or Form.cs file in the Solution Explorer to reopen it. The new licenses.licx file appears in the list of files.

The migration process is complete.


Object Model

Object Model

True DBGrid for .NET was developed using the latest .NET technologies. The True DBGrid control and its programmable components are all .NET objects designed according to Microsoft specifications. If you are already familiar with the Microsoft .NET object and collection models, you will have no problem using True DBGrid.

If you are new to Visual Basic, please read Working with Objects and Collections, which illustrates how to manipulate True DBGrid objects in code. Although individual objects are designed to perform different tasks, the techniques used to manipulate them are the same. Once you have mastered these common programming constructs, using Visual Basic and .NET controls will be quite easy and intuitive.

Regardless of your experience level, please read the following section, as it provides a thumbnail sketch of all True DBGrid objects and collections.

True DBGrid Objects and Collections

C1TrueDBGrid Class

C1TrueDBDropDown Class

C1DataColumnCollection Class

C1DisplayColumnCollection Class

GroupedColumnCollection Class

SplitCollection Class

GridStyleCollection Class

ValueItems Class

PrintInfo Class

PrintPreviewWinSettings Class

HBar Class

VBar Class

GridLines Class

GridBorders Class

SelectedRowCollection Class

SelectedColumnCollection Class

Working with Objects and Collections

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


True DBGrid Objects and Collections

True DBGrid Objects and Collections

True DBGrid for .NET has a rich object model with the following elements:

True DBGrid for .NET provides a rich set of properties, methods, and events that enable you to develop sophisticated database applications. The organization imposed by True DBGrid's object model makes it easier to work with such a large feature set.

Objects and collections that refer to visual entities, such as columns, can be customized at design time or run time. Objects and collections that refer to abstract entities, such as arrays and bookmarks, are only available in code at run time.

Two controls are available in the .NET toolbox for addition into a project:

C1TrueDBGrid | True DBGrid .NET control.
C1TrueDBDropDown | True DBDropDown .NET control.

The namespace for True DBGrid also contains definitions for the following objects:

C1DataColumn | Represents a column of data within a grid.
C1DisplayColumn | Represents a column of data relative to a split.
GridLines | Represents the gridlines which separate items in the grid.
HBar | Represents the horizontal scroll bar and its properties.
PrintPreviewWinSettings | Encapsulates the print preview window and its properties.
PrintInfo | Encapsulates page setup and print job settings.
Split | Represents a group of adjacent columns that scroll as a unit.
Style | Encapsulates font, color, picture, and formatting information.
ValueItems | Encapsulates both the Values collection and valueitem properties.
ValueItem | Allowable column input values, with optional translation.
VBar | Represents the vertical scroll bar and its properties.

A collection is an object used to group similar data items, such as grid columns or styles. In general, a group of similar items in True DBGrid is implemented as a collection. Since a collection is an object, it can be manipulated in code just like any other object. True DBGrid exposes the following collections:

C1DataColumnCollection | Contains zero or more C1DataColumn objects in a grid.
C1DisplayColumnCollection | Contains zero or more C1DisplayColumn objects in a grid.
GroupedColumnCollection | Contains zero or more C1DataColumn objects in the grouping area.
SelectedRowCollection | Contains zero or more selected row indexes.
SelectedColumnCollection | Contains zero or more C1DataColumn objects that represent selected columns.
SplitCollection | Contains one or more Split objects in a grid.
GridStyleCollection | Contains built-in and user-defined Style objects for a grid.
ValueItemCollection | Contains zero or more ValueItem objects for a column.

The following sections provide a brief overview of True DBGrid's objects and collections.


C1TrueDBGrid Class

C1TrueDBGrid Class

The C1TrueDBGrid control is the primary object of True DBGrid for .NET. Use its C1DataColumnCollection and C1DisplayColumnCollection objects to create, access, and modify the column objects that define the mappings between the grid's physical columns and the underlying database fields. Using its SplitCollection object, the grid can be divided into multiple horizontal or vertical panes to provide different views of the same data source.

See Also

Design Time Interaction

Run Time Interaction

Reference Topics

C1TrueDBGrid Properties

C1TrueDBGrid Methods

C1TrueDBGrid Events

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBDropDown Class

C1TrueDBDropDown Class

The C1TrueDBDropDown control, which is a subset of the C1TrueDBGrid control, is used as a multicolumn drop-down list box for a grid column. The C1TrueDBDropDown control cannot be used as a standalone control.

At design time, place a C1TrueDBDropDown control on a Visual Basic form just as you would a C1TrueDBGrid control. However, the drop-down control will be invisible at run time unless it is attached to a C1DataColumn object of a C1TrueDBGrid control.

To use the drop-down control, set the DropDown property of a grid column to the name of a C1TrueDBDropDown control at either design time or run time. At run time, when the user clicks the in-cell button for that column, the C1TrueDBDropDown control will appear below the grid's current cell. If the user selects an item from the drop-down control, the grid's current cell is updated. The C1TrueDBDropDown control also supports incremental search.

See Also

Using the C1TrueDBDropDown Control

Reference Topics

C1TrueDBDropDown Properties

C1TrueDBDropDown Methods

C1TrueDBDropDown Events

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1DataColumnCollection Class

C1DataColumnCollection Class

The C1TrueDBGrid control and the C1TrueDBDropDown control both maintain a C1DataColumnCollection object to hold and manipulate C1DataColumn objects. This collection is contained under the C1TrueDBGrid object, and can be modified through the C1TrueDBGrid Designer. It can be accessed through the Columns property of the True DBGrid.


C1DataColumn Object

C1DataColumn Object

Each column within a C1TrueDBGrid or C1TrueDBDropDown control is represented by two column objects, one global and one split-specific. All of the properties related to data access and formatting are contained under the C1DataColumn object. The properties of the C1DataColumn object are global in scope; changing a C1DataColumn property changes that value for all columns, even across splits. The DataColumn object can be accessed as follows:

· Visual Basic

· C#

· Delphi

See Also

Using the C1TrueDBGrid Designer

Reference Topics

C1DataColumn Properties

C1DataColumn Methods

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1DisplayColumnCollection Class

C1DisplayColumnCollection Class

The C1TrueDBGrid control and the C1TrueDBDropDown control both maintain a C1DisplayColumnCollection object to hold and manipulate C1DisplayColumn objects. This collection is contained under the Split object, and is available through the Split’s DisplayColumns property. In addition, this collection can be modified in .NET through the C1DisplayColumnCollection Editor.


C1DisplayColumn Class

C1DisplayColumn Class

Each split within the grid contains at least one C1DisplayColumn object. All of the properties related to a column’s display are contained under this object. Unlike the C1DataColumn properties, the properties of the C1DisplayColumn object are split-specific. Changing a C1DisplayColumn property will change that value for only the specified column inside the specified split. The object can be accessed as follows:

· Visual Basic

· C#

· Delphi

See Also

Using the C1DisplayColumnCollection Editor

Reference Topics

C1DisplayColumn Properties

C1DisplayColumn Methods

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


GroupedColumnCollection Class

GroupedColumnCollection Class

When the DataView property is set to DataViewEnum.GroupBy, a grouping area is created above the grid. This collection object represents the columns (C1DataColumn object) in the grouping area. As columns are dragged into or dragged out of the grouping area, the corresponding column in the collection will be added or deleted.

See Also

Column Grouping

Reference Topics

GroupedColumnCollection Methods

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


SplitCollection Class

SplitCollection Class

The C1TrueDBGrid control maintains a SplitCollection collection to hold and manipulate Split objects. A grid has one split by default, but may contain multiple splits. This collection is accessed using the Splits property of the C1TrueDBGrid. In addition this collection can be modified in .NET through the SplitCollection editor.


Split Object

Split Object

True DBGrid for .NET supports Excel-like splits that divide the grid into vertical and horizontal panes to provide users with different views of the data source. Each split is represented by a Split object and contains a group of adjacent columns that scroll as a unit.

When a C1TrueDBGrid control is created, it contains one Split object by default. Many of the properties of the Split object also apply to the C1TrueDBGrid control as a whole, so there is no need to be concerned with splits until needed such as when creating fixed, nonscrolling columns. The object can be accessed as follows:

· Visual Basic

· C#

· Delphi

See Also

How to Use Splits

Using the Split Collection Editor

Reference Topics

Split Properties

Split Methods

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


GridStyleCollection Class

GridStyleCollection Class

The C1TrueDBGrid and C1TrueDBDropDown controls store all built-in and user-defined Style objects in the GridStyleCollection object. Access the members of this collection by name at run time, and then apply them to a grid, column, or split in order to control the appearance of the object in question. This collection is accessed using the Styles property in the TrueDBGrid. In addition, this collection and its members can be modified in .NET through the StyleCollection editor.


Style Object

Style Object

Style objects encapsulate font, color, picture, and formatting information for a C1TrueDBGrid, C1TrueDBDropDown, Split, or C1DisplayColumn object. The Style object is a very flexible and powerful tool that provides Excel- and Word-like formatting capabilities for controlling the appearance of the grid's display.

When a C1TrueDBGrid or C1TrueDBDropDown control is created, it contains ten built-in styles. Modify the built-in styles or add custom styles at either design time or run time. Both controls also support several optional events that use Style objects to convey formatting information on a per-cell or per-row basis. The object can be accessed as follows:

· Visual Basic

· C#

· Delphi

See Also

How to Use Styles

Using the GridStyleCollection Editor

Reference Topics

C1.Win.C1TrueDBGrid.Style Properties

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ValueItems Class

ValueItems Class

The ValueItems object contains a collection and a couple of properties that can create alternate display values for database values in the grid. It can specify an allowable input value for a given C1DataColumn object, or it can also be used to translate raw data values into alternate text or graphics for display (for example, to display Balance Due and Paid in Full instead of the numeric data values 0 and 1). The ValueItems object contains display properties and a collection of ValueItem objects, the ValueItemCollection. This object can be accessed as follows:

· Visual Basic

· C#

· Delphi

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ValueItemCollection Class

ValueItemCollection Class

Each C1DataColumn object within a C1TrueDBGrid or C1TrueDBDropDown control stores its set of display value/value pairs in objects called ValueItem objects. The ValueItemCollection object is a collection of these pairs. This collection can be accessed through the Values property of the ValueItems object. For instance, in order to alter the first ValueItem in the collection, the code would look like:

· Visual Basic

· C#

· Delphi

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ValueItem Class

ValueItem Class

The ValueItem object consists of two properties: DisplayValue and Value. The Value property specifies the underlying value in the database and the DisplayValue property specifies the value to be displayed in the grid. These objects are contained in the ValueItemCollection object, and can be edited in .NET’s ValueItemCollection Editor. This editor is available in the C1TrueDBGrid Designer under the ValueItems object.

See Also

Automatic Data Translation with ValueItems

Automatic Data Translation with C1TrueDBDropdown

Using the ValueItemCollection Editor

Reference Topics

ValueItems Properties

ValueItem Properties

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


PrintInfo Class

PrintInfo Class

The PrintInfo object is used to specify page layout and print job characteristics such as the name of the output device, margin settings, page headers and footers, and the number of copies to print.

The PrintInfo property of a C1TrueDBGrid control returns the object that modifies the print job.

The PrintInfo object is persistent, which means that a print layout can be defined at design time, and then recalled in code at run time.

Reference Topics

PrintInfo Properties

PrintInfo Methods

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


PrintPreviewWinSettings Class

PrintPreviewWinSettings Class

The PrintPreviewWinSettings object provides access to properties of the Print Preview window of the grid. Through this object, page headers, page footers, and other visual aspects can be set to the preview window. This object is accessed through the PreviewInfo property of the C1TrueDBGrid.

Reference Topics

PrintPreviewWinSettings Properties

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


HBar Class

HBar Class

The HBar object is used to specify properties of the horizontal scrollbar. Through the use of the HScrollBar property, the developer can specify the height of the scroll bar, and whether is shows up automatically or not at all.

Reference Topics

HBar Properties

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


VBar Class

VBar Class

The VBar object is used to specify properties of the vertical scrollbar. Through the use of the VScrollBar property, the developer can specify the width of the scroll bar, and whether is shows up automatically or not at all.

Reference Topics

HBar Properties

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


GridLines Class

GridLines Class

The GridLines object is used to specify characteristics of the ColumnDivider and RowDivider properties. Both the color and style of the column and row lines can be manipulated at run-time or design-time through the use of the GridLines object.

Reference Topics

C1.Win.C1TrueDBGrid.Util.GridLines Properties


GridBorders Class

GridBorders Class

The GridBorders object is used to specify the characteristics of the Borders property of a Style. This property sets the column borders for the cell. Through the use of this object, the developer can specify the width of each border around a cell, and the color of the cell border.

Reference Topics

GridBorders Properties

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


SelectedRowCollection Class

SelectedRowCollection Class

When the user selects and highlights one or more rows of a C1TrueDBGrid control at run time, the row index of the selected rows are stored in the SelectedRowCollection object. In code, the Count property and Item method of the collection can be used to determine which rows are selected. Also select and deselect records programmatically using its Add and RemoveAt methods.

See Also

Selection and Movement

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


SelectedColumnCollection Class

SelectedColumnCollection Class

When the user selects and highlights one or more columns of a C1TrueDBGrid control at run time, the C1DataColumn objects for those rows are stored in the SelectedColumnCollection object. In code, use the Count property and Item method of the collection to determine which rows are selected. Also select and deselect records programmatically using its Add and RemoveAt methods.

See Also

Selection and Movement

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Working with Objects and Collections

Working with Objects and Collections

This section describes how to work with objects and collections in Visual Basic code, with an emphasis on efficiency. Although the concepts are illustrated with True DBGrid objects and collections, the same fundamentals can be applied to all Visual Basic objects and collections.

A C1TrueDBGrid object is created when a True DBGrid control is placed on a Visual Basic.NET form. C1TrueDBGrid objects created in Visual Basic will have default names of C1TrueDBGrid1, C1TrueDBGrid2, and so forth. Change the control name in the Properties window at design time.


Working with Collections

Working with Collections

A C1TrueDBGrid object has eight separate collections that govern its diverse objects. Each of these collections has an associated property within the C1TrueDBGrid object that returns the collection object. This prevents the need for the developer to enter the entire collection name when using the grid in code. The following table outlines these mappings:

C1DataColumnCollection
C1DisplayColumnCollection
GridStyleCollection
SelectedColumnCollection
SelectedRowCollection
SplitCollection
ValueItemCollection

Columns property
DisplayColumns property
Styles property
SelectedCols property
SelectedRows property
Splits property
Values property

By default, the SplitCollection object contains one Split object. The GridStyleCollection object contains ten default Style objects: Normal, Heading, Footing, Selected, Caption, HighlightRow, EvenRow, OddRow, RecordSelector, and FilterBar.

Reference an object in a collection using its zero-based index. Read or set the Split object's properties as follows:

· Visual Basic

· C#

· Delphi

Create a reference to an object in a collection using the collection's Item method. The following code creates a reference to a grid's default Split object:

· Visual Basic

· C#

· Delphi

Note the use of the namespace qualifier in the preceding example. Using the namespace qualifier is recommended in order to resolve potential naming conflicts with other controls. For example, if another control is used in the same project that also defines an object named Split, the C1TrueDBGrid namespace qualifier is required, as is the namespace qualifier for the other control.

Since the Item method is implicit for collections, it can be omitted:

· Visual Basic

· C#

· Delphi

Use Split0 to read or set the Split object's properties or to execute its methods:

· Visual Basic

· C#

· Delphi

Very often, you need to read and set more than one of an object's properties. For example:

· Visual Basic

· C#

· Delphi

This code is very inefficient because the amount of times the object Me.C1TrueDBGrid1.Splits(0,0) is accessed. It is more efficient to create a single reference to the object up front and use it repeatedly:

· Visual Basic

· C#

· Delphi

This code is much more efficient and also easier to read. If the Visual Basic application accesses collection objects frequently, the performance of your code can be improved significantly by adhering to these guidelines.

Similarly, this technique can be applied to other objects and collections of True DBGrid, and of Visual Basic in general. Of particular importance to the grid are the C1DataColumn and C1DataColumnCollection objects (also applies to C1DisplayColumn object):

· Visual Basic

· C#

· Delphi

Visual Basic also provides an efficient With...End With statement for setting multiple properties of an object without explicitly assigning it to a variable. For example, the following code sets multiple properties of the first column of a grid (recall that collections are zero-based):

· Visual Basic

· C#

· Delphi

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Adding Members

Adding Members

To create and add an object to a collection, use the collection's Add method. The method takes an object as its only argument. For example, create more valueitems for a column by adding new ValueItem objects to the ValueItemCollection object:

· Visual Basic

· C#

· Delphi

This code adds a ValueItem object to the ValueItemCollection of C1TrueDBGrid1. Alternatively, create a ValueItem object with index 1 with the Insert method:

· Visual Basic

· C#

· Delphi

The only object that is unable to add or remove members using the Add or RemoveAt methods is the Split object. InsertHorizontalSplit / RemoveHorizontalSplit and InsertVerticalSplit / RemoveVerticalSplit methods of the split object must be used to correctly add or remove Splits. These methods are also available in the grid’s right-click context menu at design-time


Removing Members

Removing Members

Regardless of how a collection implements the Add or Insert methods, the syntax for removing items is the same. To remove an existing item from a collection, use the RemoveAt method:

· Visual Basic

· C#

· Delphi

After this statement is executed, all splits with collection indexes greater than 1 will be shifted down by 1 to fill the place of the removed split. Note that the RemoveAt method’s parameter is the location of the member to be removed.


Working with the Count Property

Working with the Count Property

Determine the number of objects in a collection using the collection's Count property:

· Visual Basic

· C#

· Delphi

Iterate through all objects in a collection using the Count property as in the following example, which prints the Caption string of each C1DataColumn object in a grid:

· Visual Basic

· C#

· Delphi

The Count property is also useful for appending and removing columns:

· Visual Basic

· C#

· Delphi

Visual Basic also provides an efficient For Each...Next statement that can be used iterate through the objects in a collection without using the Count property:

· Visual Basic

· C#

· Delphi

In fact, using the For Each...Next statement is the easiest way to iterate through the objects in a collection.


Design Time Interaction

Design Time Interaction

You can easily configure True DBGrid for.NET at design time using the property grid in Visual Studio. The following sections describe how to use True DBGrid's design-time environment to configure the C1TrueDBGrid control. Most of the following material also applies to the C1TrueDBDropDown control since it is a subset of C1TrueDBGrid. Specific differences between the two controls are discussed at the end of this chapter.

Understanding the Object Model and Property Access

Using the Split Collection Editor

Using the C1DisplayColumnCollection Editor

Using the ValueItemCollection Editor

Using the GridStyleCollection Editor

Using the C1TrueDBGrid Designer

Context Menu

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Understanding the Object Model and Property Access

Understanding the Object Model and Property Access

True DBGrid for .NET supports a rich object model that reflects the organization of its visual components. Therefore, in order to customize a grid's appearance and behavior, you need to know how the Properties window and collection editors reflect the grid’s object model.

A split is similar to the split window features of products such as Microsoft Excel and Word. Splits can be used to present data in multiple vertical or horizontal panes. These panes, or splits, can display data in different colors and fonts. The panes can scroll as a unit or individually, and they can display different sets of columns or the same set. Splits can also be used to prevent one or more columns or rows from scrolling. By default, a grid contains a single split comprising all of its columns. Note that most of the split properties are not present in the main Properties window. For example, the AlternatingRows property cannot be set without opening up the Split Collection editor and modifying the Split object, because the value of this property can vary from split to split. The term split-specific is used to describe such properties, since they apply to individual splits rather than the grid as a whole.

Conversely, the term global is used to describe properties that apply to the grid as a whole, such as DataView and BorderStyle. Global properties are accessible through the Properties window, which is initially located in the lower right of the .NET IDE. The latter also shows extender properties specific to the Visual Basic environment, such as Align and Tag.

The distinction between split-specific and global properties also extends to the two column objects which represent the columns of data within the grid. Both of these objects govern a column’s properties. The C1DataColumn object contains all of the column properties related to data access and formatting. The C1DisplayColumn object contains all column properties related to the column’s visual display. The C1DataColumn properties are global column properties. These are properties that apply to all of the columns in the grid, no matter their placement among the splits. For instance, when a column is added or removed, the associated C1DataColumn would be added or removed. On the other hand, the C1DisplayColumn properties are split-specific properties. Setting one of these properties in one split does not mean that the properties are then set in all splits.


Accessing Global Grid Properties

Accessing Global Grid Properties

Properties which apply to the entire grid object are considered global properties. Once set these properties will remain set no matter what split-specific or column properties are set. These properties can be accessed through the Properties window. It enables easy access to all of the grid’s properties and allows you to set their values at design-time. The Properties window orders the properties either categorically or alphabetically. In order to allow the user access to objects and collections, the property page supports a tree view structure where objects can be expanded to show their constituent properties.


Accessing Split-Specific Properties

Accessing Split-Specific Properties

In the Properties window, split properties are accessed through the Splits property. By clicking on the ellipsis button (…) next to the Splits node, the editor for the Split Collection will appear. This editor can be used to access all of the split-specific properties as well as the C1DisplayColumnCollection properties for the current split. For more information on using the collection editor see Using the Split Collection Editor.

In addition, split-specific properties are available in the C1TrueDBGrid Designer. For more information see Using the C1TrueDBGrid Designer.


Accessing Column Properties

Accessing Column Properties

In the Properties window, global column properties, also known as C1DataColumn properties, are accessed through the C1DataColumnCollection object property. By clicking on the ellipsis button (…) next to the Columns node in the Visual Studio Properties window, the C1TrueDBGrid Designer will appear. For more information on using the collection editor see Using the C1TrueDBGrid Designer.

In the Visual Studio Properties window, each member of the SplitCollection exposes a DisplayColumns property, also known as the C1DisplayColumnCollection object. These C1DisplayColumn properties are split-specific properties. By clicking on the ellipsis button next to the Splits node in the Properties window, then clicking on the ellipsis button next to the DisplayColumns node in the editor for the Split Collection, the editor for the C1DisplayColumnCollection will be brought up. For more information on using this editor, see Using the C1DisplayColumnCollection Editor.


Using the Split Collection Editor

Using the Split Collection Editor

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:

· Visual Basic

· C#

· Delphi

.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.


Splits Properties

Splits Properties

The following SplitCollection object properties are available in the Split Collection Editor through the Properties window:

AllowColMove | Enables Column Movement.
AllowColSelect | Enables interactive row selection.
AllowFocus | Enables interactive column selection.
AllowRowSelect | Enables interactive row selection.
AllowRowSizing | Controls whether rows can be sized.
AlternatingRowStyle | Sets whether even/odd styles are applied to a split.
Caption | Sets split caption.
CaptionStyle | Controls the caption style for a grid.
ColumnCaptionHeight | Sets caption height for column.
ColumnFooterHeight | Sets the height of the footer captions.
DisplayColumns | Returns a collection of C1DisplayColumn objects.
EditorStyle | Returns the Style object that controls the appearance of the cell editor within a grid.
EvenRowStyle | Sets or returns the Style object that controls the appearance of an even-numbered row.
ExtendRightColumn | Sets whether the last column will extend to fill the dead area of the grid.
FetchRowStyles | Specifies whether the FetchRowStyle event will be fired.
FilterBar | Specifies whether the FilterBar is active.
FilterBarStyle | Returns the FilterBarStyle Style object.
FooterStyle | Returns the Style object that controls the appearance of column footers.
HeadingStyle | Returns the HeadingStyle Style object.
HighlightRowStyle | Returns the HighlightRowStyle Style object.
HorizontalScrollGroup | Synchronizes horizontal scrolling between splits.
HScrollBar | Returns the HBar object that controls the appearance of the horizontal scrollbar.
InactiveStyle | Returns the InactiveStyle Style object.
Locked | Sets or returns a value indicating whether an object can be edited.
MarqueeStyle | Returns or sets the MarqueeStyle for a grid.
OddRowStyle | Returns the OddRowStyle Style object.
RecordSelectors | Returns or sets a value indicating if record selectors are displayed in a grid or split.
RecordSelectorStyle | Returns the RecordSelector Style object.
RecordSelectorWidth | Returns or sets the width of the RecordSelectors.
SelectedStyle | Returns the SelectedStyle Style object.
SplitSize | Returns or sets the size of a split.
SplitSizeMode | Determines how the SplitSize property is used to determine the actual size of a split.
SpringMode | Specifies whether the columns will resize when the grid is resized.
VerticalScrollGroup | Synchronizes vertical scrolling between splits.
VScrollBar | Sets or returns the VBar object that controls the appearance of the vertical scrollbar.


Using the C1DisplayColumnCollection Editor

Using the C1DisplayColumnCollection Editor

The C1DisplayColumnCollection is a collection of the column properties which relate to display, color, font, etc. These properties are contained under the Columns identifier under the SplitCollection. These properties are also split-specific; each C1DisplayColumn property can have a different value in different splits. Accessing these properties in code is done through this SplitCollection, and is demonstrated by the following:

· Visual Basic

· C#

· Delphi

Given the True DBGrid’s object model with its split-specific column properties and diverse collections, many of its properties might be tough to find and set efficiently. Luckily, .NET contains collection editors which help in categorizing and setting the C1TrueDBGrid’s collection properties. This editor is accessible through the Split Collection Editor, which can be accessed by clicking on the ellipsis button (…) next to the Splits property of the grid in the Properties window. In the Split Collection Editor, clicking on the ellipsis button next to the DisplayColumns property will bring up the editor.

The editor has two panes. The left pane contains the current columns in the grid under the Members heading. By clicking on the Add or Remove buttons the columns in the left pane can be created or deleted accordingly. The right pane contains the display-related properties for the specific column highlighted in the left pane.

Notice that there are not any add or remove buttons in the C1DisplayColumnCollection Editor. Due to the fact that there can be multiple DisplayColumns for each split in the grid, the addition or deletion of columns must occur in the C1TrueDBGrid Designer. This ensures that a column is added to all splits, or removed from all splits.


DisplayColumns Properties

DisplayColumns Properties

The following C1DisplayColumnCollection object properties are available in the C1DisplayColumnCollection Editor in the Properties window:

AllowFocus | Controls whether a column can receive focus.
AllowSizing | Specifies whether the user has the ability to size a column.
AutoComplete | Specifies if the data entry is completed automatically.
AutoDropDown | Determines if the drop-down opens in response to input.
Button | Controls whether a button appears within the current cell.
ButtonAlways | Controls when an in-cell button is displayed.
ButtonFooter | Specifies whether the column footer is also a button.
ButtonText | Controls whether a cell is rendered as a button.
ColumnDivider | Controls the divider between columns.
DataColumn | Returns the associated C1DataColumn object.
DropDownList | Determines if drop-down control acts like a list box.
EditorStyle | Controls the editor style for a column.
FetchStyle | Specifies whether the FetchCellStyle event will be fired.
FilterButton | Specifies whether a button will be displayed in the filter cell.
FooterStyle | Controls the footing style for a column.
HeaderDivider | Specifies whether the right edge of the column's header is drawn with a vertical dividing line.
HeadingStyle | Controls the heading style for a column in Inverted or Form Data Views.
Height | Controls the height of the column.
Locked | Determines if the column is locked to editing.
Merge | True if a column merges adjacent rows of like-valued cells.
MinWidth | Specifies the minimum width of the column.
OwnerDraw | Specifies whether the OwnerDrawCell event will be fired.
Style | Controls the normal style for a column.
Visible | Shows/hides a column.
Width | Sets/returns column width in container coordinates.


Using the ValueItemCollection Editor

Using the ValueItemCollection Editor

The ValueItemCollection is a collection of values and display values which allows for translated data within a column. This collection object can be accessed through C1DataColumn.ValueItems.Values property. Accessing these properties in code is done through this collection, and is demonstrated by the following:

· Visual Basic

· C#

· Delphi

In order to make these properties more easily modifiable, there is a ValueItem Collection Editor which enables the user to add ValueItems, remove ValueItems, and alter their Value and DisplayValue properties. This editor is accessible through the Properties window. Clicking on the ellipsis button (…) next to the Columns item in the Properties window will bring up the C1TrueDBGrid Designer, then expanding the ValueItems node will expose the ValueItems collection items. Clicking on the ellipsis button next to the ValuesItems node will bring up the ValueItems Editor.


Using the GridStyleCollection Editor

Using the GridStyleCollection Editor

The Style collection is a collection of Microsoft Word-like styles which can associate certain sections for the grid with a style. The Styles collection is located under the C1TrueDBGrid object, and contains individual Style objects as its members. Accessing the individual Style objects and their properties in code is done through this collection, and is demonstrated by the following:

· Visual Basic

· C#

· Delphi

In order to make these properties more easily modifiable, there is a Style Collection Editor which enables the user to add styles and modify the properties of existing styles. The Style Collection Editor is available in the Properties window. Clicking on the ellipsis button (…) next to the Styles node in the Properties window will bring up the editor.


Using the C1TrueDBGrid Designer

Using the C1TrueDBGrid Designer

The normal method of modifying the properties of DisplayColumns, DataColumns, and Splits through the property editor may seem like a complex and probably more than a bit confusing process. Keeping track of DataColumns and DisplayColumns is a task in and of itself. But to make this whole process much easier the C1TrueDBGrid contains a Designer which has been constructed for ease of use.

This designer allows grid columns to be set up easily at design time instead of having to write code. Just select the grid, then right-click to bring up the context menu, then click on the Design menu item. This will bring up the C1TrueDBGrid Designer shown below:

The editor displays the grid columns in a window on the right and the properties for these columns on the left. The first button on the toolbar above defines which set of properties, DataColumn, DisplayColumn, or Split, are displayed in the properties grid.

The editor performs the following actions:

1. Reorder Columns: Move columns to new positions by dragging them by the header cells with the mouse.

2. Adjust Column Widths: Adjust column widths with the mouse, by dragging the right edge of the header cells with the mouse. You can also select multiple columns by shift-clicking the header cells, and then set all column widths at once using the property window. Setting the column width to -1 restores the default width.

3. Set Column Properties: Whenever one or more columns are selected, their properties can be viewed and edited in the property grid on the left of the editor.

4. Insert or Remove Columns: Use the toolbar to insert columns before or after the selection (useful mostly in unbound mode), or to remove columns.

5. Use the Toolbar to Perform Common Tasks: The table below describes the function of the buttons on the toolbar:

This tabs above the properties determine which set of properties are available for modification in the designer. The drop-down allows you to choose between the DataColumns property set that contains data-related column properties, the DisplayColumns property set that contains display-related column properties, and the Split property set that contains split-related properties.

These buttons are toggles that control the property grid. The first one determines whether the properties for the selected columns should be displayed in alphabetical or categorized order. The second determines whether the property grid should displays description for the properties selected.

These buttons set the column widths for the grid. Selecting the first button will set all the column’s to have the same width. Selecting the second button will increase the width of all the columns in the grid, and selecting the third will decrease the width of all the columns in the grid.

These buttons either add or delete columns from the grid. By clicking on the first button you can add columns to the grid, and by clicking on the second button you can delete columns from the grid.

The drop-down box allows the programmer to set which column receives focus. By choosing a column from the drop-down list, the associated properties for this column will appear in the property grid to the left.

These buttons set the Vertical Alignment of the selected column. The first button sets all of the column contents to be aligned to the top. The second button sets all of the column contents to be aligned to the center, and the third button sets all of the column contents to be aligned to the bottom.

Alignment: Align column content to the left, center, or right. These buttons only affect the scrollable area of the grid. To set the alignment for the header columns, select the columns and set the TextAlignFixed property.

These buttons add or remove vertical or horizontal splits. The first button adds a vertical split to the grid, while the second one adds a horizontal split. The third button removes a vertical split, while the fourth one removes a horizontal split.

These buttons set the DataView property of the table. The buttons set the DataView property to Normal, GroupBy, Hierarchial, Inverted, Form, MultipleLines, and MultipleLinesFixed, respectively.


C1DataColumn Properties

C1DataColumn Properties

The following C1DataColumnCollection object properties are available in the C1TrueDBGrid Designer in the Properties window:

ButtonPicture | Sets/returns the bitmap used for the in-cell button.
Caption | Sets/returns column heading text.
DataField | Data table field name for a column
DataWidth | Maximum number of characters available for column input.
DefaultValue | Default value for new column data.
DropDown | Sets/returns the C1TrueDBDropDown for the column.
EditMask | Input mask string for a column.
EditMaskUpdate | Controls whether masked data is used for updates.
FilterButtonPicture | Sets/returns the bitmap for the in-cell button in the current filter.
FilterText | Sets/returns the data associated with the value of the filter.
FooterText | Column footing text.
NumberFormat | Data formatting string for a column.
ValueItems | Exposes the ValueItems object.


Context Menu

Context Menu

Right-click anywhere on the grid to display the True DBGrid for .NET context menu, which is a context menu that Visual Basic provides for all .NET controls. Although the True DBGrid’s context menu has a few extra features.

The context menu commands operate as follows.

About ComponentOne C1TrueDBGrid

This command displays the grid’s About box, which is helpful in finding the build number of the grid.

Add Absent Fields

This option adds fields from the datasource that are not currently in the Columns collection.

Retrieve Fields/Clear Fields

These commands initiate the RetrieveFields and ClearFields methods of the grid. RetrieveFields goes back to the data source and retrieves all of the formatting information and base data for the column. ClearFields clears out any existing column formatting.

Design

This command brings up the C1TrueDBGrid Designer. This designer will enable the developer to: add or delete columns; set DataColumn, DisplayColumn, and Split properties; configure column order and many other aspects of the grid’s design. For more information see Using the C1TrueDBGrid Designer.

Save Layout/Load Layout

These commands save the current layout of the grid (style properties, column widths, etc) to an XML file, or retrieve the XML files, loading a new grid setup.

Cut, Copy, Paste, Delete

These commands are identical to those on the Visual Basic Edit menu. Cut (CTRL+X) moves the grid from the Visual Basic form to the Clipboard. Copy (CTRL+C) moves a copy of the grid to the Clipboard while leaving the grid on the form intact. Paste (CTRL+V) copies the grid from the Clipboard to the form. Delete (the DEL key) removes the grid but does not move it to the Clipboard. You can undo the Delete command by selecting Undo (CTRL+Z) from the Visual Basic Edit menu.

Bring To Front, Send To Back

These commands control the z-order of the grid relative to the other objects on the Visual Basic form. Bring To Front places the grid in front of other objects; Send To Back places it behind other objects.

View Code

This command displays the grid's code window, which enables the viewing and editing of the grid's event handling code.

Align to Grid

This command automatically aligns the outer edges of the grid control to the design-time grid lines on the form.


Run Time Interaction

Run Time Interaction

This chapter describes how users of your application interact with True DBGrid for .NET at run time. You can give users the ability to perform any or all of the following:

· Navigate within the grid using the mouse or keyboard.

· Select rows or columns.

· Add, update, and delete records.

· Configure the grid's layout.

In the following sections, the properties and events associated with a particular user action are noted where applicable.

Navigation and Scrolling

Selection and Movement

Sizing and Splitting

Database Operations

Customized Grid Editors

Additional User Interaction Features

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Navigation and Scrolling

Navigation and Scrolling

The following sections describe the grid's default navigation and scrolling behavior. You always have complete control over the behavior of the TAB and arrow keys as well as the position of the current cell when a row or split boundary is reached.

Mouse Navigation

Clicking the Rightmost Column

Keyboard Navigation

Navigation at Row Boundaries

Navigation at Split Boundaries

Restricting Cell Navigation

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Mouse Navigation

Mouse Navigation

When the user clicks a non-current cell, the grid fires the BeforeRowColChange event. Unless this event is cancelled, the clicked cell becomes current and the grid subsequently fires the RowColChange event after any pending update operations have completed. The only exceptions to this are:

· If the user clicks a cell in a column or split that has the AllowFocus property set to False, and the cell belongs to the current row, then the current cell does not change.

· If the user clicks a cell in a column or split that has the AllowFocus property set to False, and the cell does not belong to the current row, then the current row changes, but the column with the focus retains it.

· If the current cell has been modified, and the BeforeColUpdate event is canceled, then the current cell does not change.

· If the current row has been modified, and the user clicks a cell in a different row, and the BeforeUpdate event is canceled, then the current cell does not change.

The user can also use the mouse to manipulate the grid's scroll bars, bringing cells that lie outside the grid's display area into view. The vertical scroll bar governs rows; the horizontal scroll bar governs columns. The HScrollBar property controls whether the horizontal scroll bars are displayed, while the VscrollBar property controls the vertical scroll bar.

Scrolling always occurs in discrete cell units; the user cannot scroll on a per-pixel basis in either direction.

Note that the scroll bars do not change the current cell. Therefore, the current cell may not always be visible.

To respond to vertical scrolling operations in code, use the FirstRowChange event. To respond to horizontal scrolling operations in code, use the LeftColChange event.


Clicking the Rightmost Column

Clicking the Rightmost Column

The grid always displays the leftmost column (the first visible column) in its entirety. The rightmost column, however, is usually clipped. The behavior of the last partially visible column when clicked by the user is controlled by the grid's ExposeCellMode property.

The default value for the ExposeCellMode property is ExposeCellModeEnum.ScrollOnSelect. If the user clicks the rightmost column when it is partially visible, the grid will scroll to the left to display this column in its entirety. This may be less desirable for users who commonly click on the grid to begin editing, as the grid will always shift to the left when the user clicks on a partially visible rightmost column.

If ExposeCellMode is set to ExposeCellModeEnum.ScrollOnEdit, the grid will not scroll when the rightmost visible column is clicked. However, if the user attempts to edit the cell, then the grid will scroll to the left to display the column in its entirety. This is how Microsoft Excel works and is probably the most familiar setting to users.

If ExposeCellMode is set to ExposeCellModeEnum.ScrollNever, the grid will not scroll to make the rightmost column visible, even if the user subsequently attempts to edit the cell. Note that editing may be difficult if only a small portion of the column is visible. The chief reason to use this setting is to ensure enough space is available for editing (or if editing is disallowed) and to prevent the grid from shifting accidentally.

Note that the ExposeCellMode property controls the behavior of the rightmost visible column only when the user clicks it with the mouse. If the rightmost column becomes visible by code (setting the grid's Col property) or by keyboard navigation, then the grid will always scroll to make it totally visible.


Keyboard Navigation

Keyboard Navigation

By default, the user can navigate the grid with the arrow keys, the ENTER key, the TAB key, the Page Up and Page DOwn keys, and the HOME and END keys.

Up/Down Arrows | These keys move the current cell to adjacent rows.
Left/Right Arrows | If the AllowArrows property is True (the default), these keys move the current cell to adjacent columns.
 | If the AllowArrows property is False, then these keys move focus from control to control and cannot be used to move between cells.
ENTER | By default, the ENTER key behaves in the same manner as the RIGHT ARROW key, by moving the current cell from left to right along the adjacent columns. The behavior for the ENTER key can be modified by using the DirectionAfterEnter property.
TAB | If the TabAction property is 0 - Control Navigation (the default), the TAB key moves focus to the next control on the form, as determined by the tab order.
 | If the TabAction property is ColumnNavigation or GridNavigation, the TAB key moves the current cell to the next column, while SHIFT+TAB moves to the previous column. The differences between column and grid navigation are discussed in the next section.
PAgE Up, PAgE DOWn | These keys scroll the grid up or down an entire page at a time. Unlike the vertical scroll bar, the PAgE Up and PAgE DOWn keys change the current row by the number of visible rows in the grid's display. When paging up, the current row becomes the first row in the display area. When paging down, the current row becomes the last row in the display area, including the AddNew row. The current column does not change.
HOME, END | These keys move the current cell to the first or last column. If necessary, the grid will scroll horizontally so that the current cell becomes visible. The current row does not change. If the current cell is being edited, HOME and END move the insertion point to the beginning or end of the cell's text.


Navigation at Row Boundaries

Navigation at Row Boundaries

At row boundaries, namely the first and last column, grid navigation depends on the WrapCellPointer property. The following explanation assumes that the AllowArrows property is True, and that the TabAction property is set to either TabActionEnum.ColumnNavigation or TabActionEnum.GridNavigation.

Left/Right Arrows | If the WrapCellPointer property is True, the current cell wraps across row boundaries. If the current cell is in the last column, the RIGHT ARROW key moves it to the first column of the next row. If the current cell is in the first column, the LEFT ARROW key moves it to the last column of the previous row.
 | If the WrapCellPointer property is False (the default), these keys cannot move the current cell at row boundaries.
TAB | If the TabAction property is ColumnNavigation, the cell pointer does not wrap to an adjacent row, and the WrapCellPointer property is ignored. If the current cell is in the last column, TAB moves focus to the next control in the tab order. If the current cell is in the first column, SHIFT+TAB moves focus to the previous control in the tab order.
 | If the TabAction property is GridNavigation and WrapCellPointer is True, TAB and SHIFT+TAB move the current cell to the next or previous row. The current cell will not cross row boundaries if WrapCellPointer is False.


Navigation at Split Boundaries

Navigation at Split Boundaries

At split boundaries, grid navigation depends on the TabAcrossSplits property as follows:

Left/Right Arrows | If the TabAcrossSplits property is True, these keys move the current cell across split boundaries to the next or previous split.
 | If the TabAcrossSplits property is False (the default), the behavior of these keys at split boundaries will be the same as their behavior at row boundaries. Note that a split's AllowFocus property must be True in order for these keys to move the current cell to that split.
TAB | The TAB and SHIFT+TAB keys honor TabAcrossSplits as previously described for the arrow keys.


Restricting Cell Navigation

Restricting Cell Navigation

The BeforeRowColChange event can be used to prevent the user from moving to a different cell, regardless of whether the current cell is modified. Set the Cancel argument to True to keep another cell from becoming current.

If the current cell has been modified, use the BeforeColUpdate event to examine its value before moving to another grid cell. If the value entered is invalid, set the Cancel argument to True to prevent the current cell from changing, and optionally beep or display an error message for the user. The BeforeColUpdate event provides a flexible way to validate user input and restrict cell navigation.

· Visual Basic

· C#

· Delphi

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Selection and Movement

Selection and Movement

The following sections describe how users can select columns, move selected columns, and select rows. Restrict any or all of these operations at design time or in code.

Selecting Columns

Moving Columns

Selecting Rows

Selecting a Range of Cells

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Selecting Columns

Selecting Columns

If the AllowColSelect property is True, the user can select an individual column or a range of columns with the mouse. Nonadjacent column selections are not supported.

When the user points to the header of an unselected column, the mouse pointer changes to a down arrow to indicate that the column can be selected.

When the user clicks a column header, that column is selected and highlighted, and any columns or rows that were previously selected are deselected.

There are two ways for the user to select a range of columns:

1. After selecting the first column in the range by clicking its header, the user can select the last column in the range by holding down the SHIFT key and clicking another column header. If necessary, the horizontal scroll bar can be used to bring additional columns into view.

2. Alternatively, the user can hold and drag the mouse pointer within the column headers to select multiple columns.

In order to manipulate the columns that have been selected at run-time, query the SelectedColumnCollection. This is a collection of all the C1DataColumn objects for the selected columns. For instance, if columns 5 through 10 are selected, the SelectedColumnCollection will have six members, each a C1DataColumn object. This feature enables the display properties of the column to be altered directly. Using the Item property to access the C1DisplayColumn properties, the code to change the forecolor to red for the first column selected would be:

· Visual Basic

· C#

· Delphi

Prevent a column selection from occurring at run time by setting the Cancel argument to True in the grid's SelChange event.


Moving Columns

Moving Columns

If the AllowColMove property is True, the user can move previously selected columns as a unit to a different location by pressing the mouse button within the header area of any selected column. The pointer will change to an arrow with a column header box on its tip, a small box at its lower right corner, and a position marker consisting of two red triangles will appear at the left edge of the column being pointed to and highlighted.

The user specifies the desired location of the selected columns by dragging position marker, which changes position as the mouse pointer crosses the right edge of a column.

The user completes the operation by releasing the mouse button, which moves the selected columns immediately to the left of the position marker. The moved columns remain selected.

If the user drags the marker to a position within the currently selected range, no movement occurs. Columns that are not selected cannot be moved interactively.

When a move occurs, the index in the Columns Collection is adjusted for all affected columns.

Prevent interactive column movement from occurring at run time by setting the Cancel argument to True in the ColMove event.


Moving Columns at Run-Time

If the AllowColMove property is True, the user can move columns at run-time also. Since there is no order property for a C1DisplayColumn the C1DisplayColumnCollection needs to be manipulated to move a column at run-time. The C1DisplayColumnCollection holds all of the columns in a split. So to move a column, the user needs to remove the DisplayColumn from the collection, and then replace the column in the new position. The commonplace collection methods of RemoveAt and Add help accomplish this quite easily. The code which would transpose the first two columns in the default split would look as follows:

· Visual Basic

· C#

· Delphi


Selecting Rows

Selecting Rows

Row selection is also very easy to master with the True DBGrid. When the cursor hovers over the recordselector to the left of a row, a small arrow will indicate that this row is about to be selected. Then by clicking on this recordselector, the row then becomes selected. To select a contiguous range of rows, manipulate the arrow keys while holding down the shift button. This will select the cells in every field for the range of rows that the user has selected. To select a non-contiguous range of rows, click on the rows to be selected while holding down the CTRL button. This will select the cells in every field for the set of non-contiguous rows that the user has selected.

In order to find out which rows have been selected at run-time, query the SelectedRowCollection. This is a collection of all the row indices for the selected rows. For instance, if rows 5 through 10 are selected, the SelectedRowCollection will have six members. Each member will be an integer value and will be an integer that corresponds to the absolute row position of the selected row.


Selecting a Range of Cells

Selecting a Range of Cells

When it comes to cell selection, the True DBGrid has a very similar to Microsoft Excel, a multi-select capability enabled at all times. By clicking on a cell and dragging the mouse, or by using the arrow keys, a range of cells can be selected. In turn, by clicking on a recordselector and manipulating the mouse a set of rows can be selected. This range is not restricted to the row or column of the initial cells origin, although non-contiguous cell selection is not supported.

When a range of cells is selected the grid’s SelRange property becomes True. This will indicate that neither just the SelectedRowCollection nor just the SelectedColumnCollection collections will tell which cells are selected. By evaluating both collections, though, and taking the intersection of the two collections, the selected cell range can be discovered at run-time. For instance, if the user clicked on the second row, second column, and dragged the mouse to the fourth row, fourth column, the SelectedRowCollection collection would contain the integers 2, 3, and 4, while the SelectedColumnCollection collection would contain the C1DataColumn objects for columns 2, 3, and 4. From this, it can be discerned at run-time that there is a nine-cell range selected from column 2, row 2, to column 4, row 4.


Sizing and Splitting

Sizing and Splitting

The following sections describe how users can resize rows, columns, and splits. Restrict any or all of these operations at design time or in code.


Sizing Rows

Sizing Rows

If the AllowRowSizing property is set to either RowSizingEnum.AllRows or RowSizingEnum.IndividualRows, the user can change the row height at run time. When the user points to a row divider in the record selector column, the pointer changes to a vertical double arrow that the user can drag to adjust the height of all rows.

Dragging the pointer upward makes the rows smaller; dragging it downward makes the rows larger. If the property is set to AllRows, then all rows in the grid will be resized to the same height; it is not possible to resize individual rows. If the property is set to IndividualRows, then each row can be sized independently.

In addition, if the grid does not display the record selector column (that is, the RecordSelectors property is False), users cannot interactively change the row height.

The RowHeight property of the grid will be adjusted when the user completes the resize operation.

Prevent row resizing from occurring at run time by setting the Cancel argument to True in the RowResize event. Change the RowHeight of the grid in code, even if AllowRowSizing is RowSizingEnum.None or the RowResize event is cancelled.


Sizing Columns

Sizing Columns

If the AllowSizing property is True for a column, the user can adjust the width of the column individually at run time. When the user points to the divider at the right edge of a column's header, the pointer changes to a horizontal double arrow that the user can drag to resize the column in question.

Dragging the pointer to the left makes the column smaller; dragging it to the right makes the column larger. The column's Width property will be adjusted when the user completes the resize operation.

If the grid does not display column headers (that is, the ColumnHeaders property is False), the horizontal double arrow will appear when the pointer is over the column divider within the grid's data area.

If the user drags the pointer all the way to the left, the column retains its original Width property setting, but its Visible property is set to False. To make the column visible again, the user can point to the right side of the divider of the column that preceded it. The pointer turns into a vertical bar with a right arrow.

Dragging the pointer to the right establishes a new column width and sets the column's Visible property back to True.

Another way to resize columns is to use the AutoSize method to specify auto-sizing for a specific Column object in code. When a column is auto-sized, its width is adjusted to fit the longest visible field in that column. Longer records that are not displayed in a visible row when AutoSize is invoked do not participate in the width calculations. Furthermore, if the specified column is either hidden or scrolled out of view, a trappable error occurs.

Prevent column resizing from occurring at run time by setting the Cancel argument to True in the ColResize event. Change the width of a column in code, even if AllowSizing is False for that column.


Database Operations

Database Operations

The editing, deleting, and adding permissions granted to the user at run time are controlled by the AllowUpdate, AllowDelete, and AllowAddNew properties. The default values of these properties are:

· Visual Basic

· C#

· Delphi

Note that these properties only control user interaction with the grid at run time. They do not control whether database operations can be performed by the DataSet or other bound controls, or by the application code.


Editing Data

Editing Data

True DBGrid's AllowUpdate property must be True in order for the user to edit data in the grid. The default value is True.

If the user moves to a cell and starts typing, the cell's data will be replaced by what is typed. Alternatively, clicking within the current cell will put the grid into edit mode (its EditActive property becomes True), enabling the user to modify the cell's data.

While editing, the LEFT ARROW and RIGHT ARROW keys move the insertion point within the cell. If the insertion point is at the beginning or end of the cell's text, the LEFT ARROW and RIGHT ARROW keys will terminate editing by moving to the adjacent cell. The UP ARROW and DOWN ARROW keys terminate editing by moving the current cell to the row above or below the current one. The user can also end editing without moving the current cell by pressing the ENTER key.

When one or more cells in a row have been modified, a pencil icon will appear in the record selector column to indicate that data in the row has been changed. The pencil icon does not mean that the grid's EditActive property is True; it means that the grid's DataChanged property is True. To cancel the changes made to the current cell, the user can press the ESC key. In fact, before moving to another row, the user can revisit any column within the current row and press the ESC key to restore the cell to its original value. If the user repeats this procedure for all modified cells in the row, the pencil icon in the record selector will disappear.

Moving to another row by clicking it, using the UP ARROW or DOWN ARROW keys, or by clicking the navigation buttons of the Data control will update the modified record to the database. If the update is successful, the pencil icon will disappear. If no grid columns have been modified, no update will occur when changing rows.


Adding a New Record

Adding a New Record

True DBGrid's AllowAddNew property must be True in order for the user to add new records to the grid interactively. The default value is False.

If the AllowAddNew property is True, an empty AddNew row, marked by an asterisk in the record selector column, will be displayed after the last record. The user can initiate an add operation by navigating to the AddNew row, either by clicking it or by using the DOWN ARROW key, then typing new data. The first character typed will cause the grid to insert a blank row before the AddNew row. The newly inserted blank row becomes the current row, and the grid fires the OnAddNew event.

At this point, the new row exists only in the grid—it does not have a bookmark, and it does not yet represent a physical database record. The new row is added to the underlying data source when the user navigates to another data row or the AddNew row.


Deleting a Record

Deleting a Record

True DBGrid's AllowDelete property must be True in order for the user to delete records through the grid. The default value is False.

To delete a record, the user selects the row to be deleted by clicking its record selector, then pressing the DEL key. Only one record can be deleted at a time. The user cannot select multiple records and press the DEL key to delete them all.

Note: In order for the record to be deleted, the grid must have focus so it can receive the DEL key. Clicking the grid's record selector column does not set focus to the grid. However, if you always want the grid to receive focus when the user clicks the record selector column, set focus to the grid in the grid's SelChange event:

· Visual Basic

· C#

· Delphi

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Customized Grid Editors

Customized Grid Editors

The following sections describe how to use and create custom grid editors.


Using Custom Editors

Using Custom Editors

The built-in editors provide a lot of flexibility and power, but in some cases you may want to use external controls as specialized editors. For example, you may want to use the C1NumericEdit control that provides a drop-down calculator for entering numbers, or an editor for selecting from multi-column lists, or a specialized control that you wrote to edit your business objects.

Any control that derives from the base Control class can be used as a basic grid editor. Controls that implement the IC1EmbeddedEditor interface (defined in C1.Common.dll) can provide better integration with the grid and more advanced features. For details on the IC1EmbeddedEditor interface, see the Editor property.

To use a control as a custom editor, all you have to do is associate an instance of the control with a grid column using the Editor property. You can do this at run time using theEditor property. After that, the control will be automatically used by the grid.

For example, to use a C1NumericEdit control as a grid editor, follow these steps:

1. Add a C1TrueDBGrid control to the form.

2. Add a C1NumericInput control to the form and set its BorderStyle property to None.

3. In the From_Load event assign the custom editor to the grid column.

· Visual Basic

· C#

· Delphi

Run the project and edit some values in the first column. Notice how the grid positions and initializes the C1NumericEdit control so you can edit cell values. When you are done editing a cell, click a different cell, or press the TAB key to move to the next one. Notice how the new value is applied to the cell.


Creating Custom Editors

Creating Custom Editors

Any control that derives from the Control base class can be used as a grid editor. This is possible because the grid knows enough about the base class to access properties such as Text and Bounds, and events such as Leave and TextChanged. In many cases this level of support is adequate.

In some cases, however, you may want to use controls that do not follow the base class that closely. For example, a DateTimePicker control has a Value property that should be used to retrieve the edited value instead of Text. In these cases, you can implement one or more methods in the IC1EmbeddedEditor interface to override the default behavior. For example, all controls in the C1Input library support IC1EmbeddedEditor and therefore integrate closely with C1TrueDBGrid (and also C1FlexGrid).

The IC1EmbeddedEditor interface is fairly simple, and because the grid binds to it using late binding, you do not even have to implement all its members. Only implement the ones that make sense to your editor control.

The interface does provide enough flexibility to allow virtually any control to be used as a grid editor. You can even use UITypeEditor classes as grid editors. To do this, you need a wrapper class that:

1. Derives from Control (UITypeEditor does not).

2. Implements the IC1EmbeddedEditor interface.

3. Encapsulates the appropriate UITypeEditor.

We provide source code for this wrapper class in the CustomEditors sample.

Using the UITypeEditor wrapper class, you can use any UITypeEditors with the C1TrueDBGrid. .NET provides several UITypeEditors for editing colors, fonts, file names, etc. You can also write your own UITypeEditors, in some cases that is easier than writing a control.

For an example of using built-in, custom, and UITypeEditor editors with the C1TrueDBGrid, see the CustomEditors sample in our on-line sample library.


Additional User Interaction Features

Additional User Interaction Features

True DBGrid for .NET provides additional data presentation and manipulation functionality that can be exposed to users at run time. For more information, please see the following topics:

Context-sensitive Help with CellTips

Scroll Tracking and ScrollTips

Hierarchical Data Display

Drop-down Hierarchical Data Display

Column Grouping

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Data Binding

Data Binding

Binding True DBGrid to a Data Source

Unbound Columns

Display Data without Binding to a DataSource


Binding True DBGrid to a Data Source

Binding True DBGrid to a Data Source

With an amazing ease of use, C1TrueDBGrid for .NET can universally bind to any .NET data source. Requiring little or no code at all, the C1TrueDBGrid can create a fully-navigational database browser in mere seconds.

C1TrueDBGrid for .NET fully supports data binding to ADO.NET objects such as DataTable, DataView and DataSet. You also have an even easier option of binding to ComponentOne DataObjects Express data sources, C1ExpressTable and C1ExpressConnection. C1TrueDBGrid also fully supports the powerful ComponentOne DataObjects Enterprise framework included in ComponentOne Studio for .NET.

To associate a True DBGrid control (C1TrueDBGrid) with an ADO.NET or C1DataObjects data source, set the DataSource property of the grid to a DataSet on the same form. If the DataSet contains multiple tables, you can select a table name in the DataMember property combo box. The DataSource and DataMember properties can be set both through code, and through Visual Studio’s Properties window. This is all that is required to make True DBGrid fully aware of the database or DataTable in your application.

Once such a link exists, True DBGrid and the DataSet automatically notify and respond to operations performed by the other, simplifying your application development.


Unbound Columns

Unbound Columns

Normally, True DBGrid automatically displays data from bound database fields. However, you may need to augment the set of fields present in your layouts with columns derived from database fields, or columns that are unrelated (or only loosely related) to database information. For example, if your database contains a Balance field, you may instead want to display two columns, Credit and Debit, to show positive and negative numbers separately. Or, you may want to look up data in another database, or convert field data to some other form, such as mapping numeric codes to textual descriptions.

To accomplish such tasks you can use unbound columns. The term unbound column refers to a column that is part of a bound grid, but is not tied directly to a database field.

Columns that do not have the DataField property set (that is, the DataField property is equal to an empty string), but do have the column Caption property set are considered unbound columns. The grid will request data for these columns through the UnboundColumnFetch event.

Columns with their DataField property set will be bound, if the DataField property is the same as one of the fields of the Data Source.

Columns with their DataField property set to a value that is not in the DataSet are ignored for the purposes of fetching data. Similarly, columns that have no value for both the DataField and Caption properties set are also ignored.

Creating Unbound Columns

Implementing Multiple Unbound Columns

Updating Unbound Columns

Editing Unbound Columns

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Creating Unbound Columns

Creating Unbound Columns

The first step in using an unbound column is creating the column itself. This may be done at design time by adding a column through the C1TrueDBGrid Designer. At run time, unbound columns may be added using the Insert method of the C1DataColumnCollection. The column must be given a name by setting its Caption property. At design time, this is done using the C1TrueDBGrid Designer. At run time, the Caption property of the appropriate C1DataColumn object is set. C1DataColumn objects that are added to the C1DataColumnCollection cause a corresponding C1DisplayColumn to be added to the C1DisplayColumnCollection for all splits. The default visible property of the newly added C1DisplayColumn will be False.

Note: When attempting to insert an unbound column in code, use the Rebind method to ensure that the column appears at the desired position within the grid:

· Visual Basic

· C#

· Delphi

When the grid needs to display the value of an unbound column, it fires the UnboundColumnFetch event. This event supplies the user with a row and column index as the means of identifying the grid cell being requested. The Value argument to the event is of type Object that by default is Null, but can be changed to any desired value, and will be used to fill the contents of the cell specified by the given row and column index.

· Visual Basic

· C#

· Delphi

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Implementing Multiple Unbound Columns

Implementing Multiple Unbound Columns

So far, our examples have demonstrated the UnboundColumnFetch event using only a single unbound column but more than one unbound column can be used. Since the UnboundColumnFetch is fired for each unbound column of each row, only one column value may be set at a time, and each column must be identified for the value to be properly determined. The second UnboundColumnFetch argument, Column, is used to identify the column of the grid for which the value is required.

· Visual Basic

· C#

· Delphi

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Updating Unbound Columns

Updating Unbound Columns

In most cases, unbound columns will be read-only, as the values are derived from other data in the grid. In these cases, set the Locked property of the column’s style to True.

If Locked is False and updates are allowed, the user can edit the values of an unbound column. If editing of an unbound column occurs, the row will be marked as dirty (a pencil icon will be shown in the record selector column) and the update sequence will be performed as usual. However, the grid does not know what to do with the modified data, since there is no database field in which to store it. In this situation the UnboundColumnUpdated event will be raised.

BeforeUpdate can be used to cancel the update operation. Therefore, if the unbound column is to be used in cooperation with another database, the update of the unbound column should be performed in BeforeUpdate. If the operation fails, then the event should be canceled. However, if the operation succeeds, then the bound update should be allowed to proceed. The bound update may then fail, hence any database actions associated with unbound columns would best be handled on a transactional basis.

If the bound update succeeds, the AfterUpdate event is fired, and the unbound column transaction should be committed. If the bound update fails, the unbound column transaction should be rolled back within .NET’s trappable error handler, depending on how the update was initiated. If transactions are not available, then store the original unbound column values prior to the update, then perform another update to restore these values should the bound update fail.


Editing Unbound Columns

Editing Unbound Columns

Another technique for updating an unbound column is to use the AfterColUpdate event to adjust the value of other (bound) columns. For example, imagine a pair of columns for Debit and Credit, as shown in this portion of a grid display:

Assume that there is no database field for these, but that they are unbound columns that derive their value from a single Balance column, which is either positive or negative. From the user's perspective, it would be desirable to edit these values directly. From you’re the developer’s perspective, it would be desirable to have the grid update the dependent Balance column automatically.

True DBGrid makes such tasks easy. The following code would be put in the grid's AfterColUpdate event to cause either column to change the Balance column when updated:

· Visual Basic

· C#

· Delphi

Notice that, when updating these columns, the code actually changes the value of the Balance column, which is both bound and invisible.


Display Data without Binding to a DataSource

Display Data without Binding to a DataSource

True DBGrid can now display data without being bound to a DataSource. Creating an unbound grid can be done in a few steps. To create an unbound grid:

1. Begin by creating your columns. This can be done either at run time or design time. For more information on creating columns, see Creating Unbound Columns.

· Visual Basic

· C#

· Delphi

2. Call the SetDataBinding method with no arguments.

· Visual Basic

· C#

· Delphi

3. Use the AddRow or AddRows method to populate the grid.

· Visual Basic

· C#

· Delphi

You have now successfully created an unbound grid.


Customizing the Grid's Appearance

Customizing the Grid's Appearance

This chapter explains how to configure the non-interactive elements of True DBGrid's display, such as captions, headers, footers, record selectors, and dividing lines.

Captions, Headers, and Footers

Three-dimensional Versus Flat Display

Borders and Dividing Lines

Unpopulated Regions

Highlighting the Current Row or Cell

Row Height and Word Wrap

Alternating Row Colors

Horizontal and Vertical Alignment

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Captions, Headers, and Footers

Captions, Headers, and Footers

Affix a title to a grid, column, or split by setting the Caption property of the appropriate object.

· Visual Basic

· C#

· Delphi

Column and Grid Captions

Column Footers

Multiple-line Headers and Footers

Split Captions

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Column and Grid Captions

Column and Grid Captions

For C1DataColumn objects, the Caption property specifies the text that appears in each column's header area.

If using True DBGrid bound to a DataSet, the column captions are set automatically at run time.

Column captions can also be set at design time using the C1TrueDBGrid Designer, or at run time by manipulating the C1DataColumnCollection in code.

The Caption property also applies to the C1TrueDBGrid control itself, which provides a descriptive header for the entire grid.

By default, True DBGrid displays headings for each column, even the Caption property of an individual column is never set explicitly. However, all column headings can be hidden by setting the ColumnHeaders property to False.


Column Footers

Column Footers

Just as the ColumnHeaders property controls the display of column captions, the ColumnFooters property controls the display of the column footer row. Column footers, which are similar in appearance to column headers, are always displayed at the bottom of the grid, even if it is under populated.

For each C1DataColumn object, the FooterText property determines the text that is displayed within the footer row. Set the footer text at design time using the C1TrueDBGrid Designer, or at run time by manipulating the C1DataColumnCollection collection in code, as in the following example:

· Visual Basic

· C#

· Delphi

Unlike the Caption property, the FooterText property is not set automatically from a bound data source, so you will have to set it yourself.


Multiple-line Headers and Footers

Multiple-line Headers and Footers

The split specific property ColumnCaptionHeight property controls the height of the column headers. By default, it is based upon the font setting of the HeadingStyle. To display more than one line of text in a column header, increase the ColumnCaptionHeight property to accommodate additional lines, as in the following example:

· Visual Basic

· C#

· Delphi

Note the use of the Visual Basic constant vbCrLf to specify a line break within the caption text. After this code executes, the first column's caption will contain two lines of text, and the second column's caption will be centered vertically.

Similarly, set the ColumnFooterHeight property to control the height of column footers, and use the vbCrLf constant to specify a line break when setting the FooterText property of a column.


Split Captions

Split Captions

Split objects can also have their own captions. For a grid with one split, a split caption can serve as a second grid caption.

However, split captions are best used in grids with at least two splits, as they are ideal for categorizing groups of columns for end users.


Three-dimensional Versus Flat Display

Three-dimensional Versus Flat Display

True DBGrid for .NET supports a standard, "flat" control appearance, the more attractive three-dimensional appearance used by many controls, and a third that combines the flat appearance with the 3D. By default, the grid's FlatStyle property is set to FlatModeEnum.Standard so that the 3-D look is used. However, this property only controls whether 3D effects are used to draw the grid's border, caption bars, column headings and footings, and the record selector column. It does not affect the grid's data cells or row and column dividers.

When FlatStyle is set to FlatModeEnum.Standard, the grid looks like this.

When FlatStyle is set to FlatModeEnum.PopUp, the grid looks like this.

Note that the initial grid has the same in appearance as FlatModeEnum.Flat. As the mouse moves over any control element, the appearance of that element takes on a 3D look.

When FlatStyle is set to FlatModeEnum.Flat, the grid looks like this.

To achieve a 3D appearance for the entire grid, including its interior, set the following properties at either design time or run time:

In the Properties window, set the RowDivider style property to Inset. Or, in code:

· Visual Basic

· C#

· Delphi

In the Splits Collection editor, set the Style property to LineStyleEnum.Inset for all ColumnDivider style objects for each split. Or, in code:

· Visual Basic

· C#

· Delphi

In the Properties window, set the BackColor property of the Normal Style to gray. Or, in code:

· Visual Basic

· C#

· Delphi

The resulting grid will look something like this.

Note that changing the Style property of the RowDivider object to Inset consumes an extra vertical pixel in each data row, resulting in fewer visible rows.

Try experimenting with other color combinations and divider styles to achieve different 3D effects, as explained in the Borders and Dividing Lines section.


Borders and Dividing Lines

Borders and Dividing Lines

The RowDivider and ColumnDivider properties enable different horizontal and vertical lines to be selected and also enable the color of the lines to be set. The properties return an underlying GridLines object that has two properties. These two properties, Style and Color define how the grid’s cell borders will look. The allowable values for the Style property are as follows:

LineStyleEnum.Double

LineStyleEnum.Inset

LineStyleEnum.Raised

LineStyleEnum.None

LineStyleEnum.Single

For example, setting the style property of RowDivider to LineStyleEnum.None eliminates the dividing lines between rows and enables you to cram a bit more data into the available area.

For ColumnDivider properties, you can set the Style property to LineStyleEnum.No dividers, and the HeaderDivider property to False. This enables you to visually group related columns, as shown in the following figure.


Unpopulated Regions

Unpopulated Regions

Depending upon the number of rows and columns in the data source, a portion of the grid's interior may not contain data cells. However, these "dead zones" can be eliminated using the ExtendRightColumn and EmptyRows properties. Change the color of the dead areas by using the BackColor property.


The Rightmost Column

The Rightmost Column

As the grid scrolls horizontally until the last column is totally visible, there is usually a blank area between the last column and the right border of the grid.

The color of this blank area depends on the setting of your system's 3D Objects color (or Button Face color), which is usually gray. Eliminate this blank area with the ExtendRightColumn property. The default value of this property is False, but if set it True, the last column will extend its width to the right edge of the grid.


Unused Data Rows

Unused Data Rows

If the data source contains fewer rows than the grid can display, the area below the AddNew row (or the last data row, if AllowAddNew is False) is left blank.

The color of this blank area depends on the setting of your system's 3D Objects color (or Button Face color), which is usually gray. Eliminate this blank area with the EmptyRows property. The default value of this property is False, but if set to True, the grid will display empty rows below the last usable data row.

Note that the empty rows cannot receive focus.

Both the EmptyRows and ExtendRightColumn properties can be set to True to ensure that no blank areas appear within the interior of the grid.


Highlighting the Current Row or Cell

Highlighting the Current Row or Cell

The term marquee refers to the highlighted area that represents the current grid cell or row. The MarqueeStyle property can be set to seven possible presentations, all enumerations of the MarqueeEnum object, illustrated as follows.

MarqueeEnum.DottedCellBorder

MarqueeEnum.SolidCellBorder

MarqueeEnum.HighlightCell

MarqueeEnum.HighlightRow

MarqueeEnum.HighlightRowRaiseCell

MarqueeEnum.NoMarquee

MarqueeEnum.FloatingEditor

MarqueeStyleEnum.DottedRowBorder

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


MarqueeEnum.DottedCellBorder

MarqueeEnum.DottedCellBorder

The current cell is highlighted by a dotted border.


MarqueeEnum.SolidCellBorder

MarqueeEnum.SolidCellBorder

This is a more distinctive form of cell highlighting, often useful when a different background color is used (since the dotted rectangle is often difficult to spot).


MarqueeEnum.HighlightCell

MarqueeEnum.HighlightCell

This style inverts the current cell completely, making it very visible. Values of the BackColor and ForeColor properties of the Edit Style should be chosen carefully to make a pleasing effect if the grid is editable.


MarqueeEnum.HighlightRow

MarqueeEnum.HighlightRow

The entire row will be highlighted, but it will not be possible to tell which cell is the current cell in the row. To change highlight colors, edit the built-in HighlightRow style on the GridStyle Collection editor. This style is most useful when the grid is not editable and users would view the data one record at a time.


MarqueeEnum.HighlightRowRaiseCell

MarqueeEnum.HighlightRowRaiseCell

This value should only be used if 3D lines are used in the grid, since cell highlighting is accomplished using a "raised" appearance for the current cell.


MarqueeEnum.NoMarquee

MarqueeEnum.NoMarquee

This setting will make the marquee disappear completely. Often this setting is useful for cases where the current row is irrelevant, or where you do not want to draw the user's attention to the grid until necessary.


MarqueeEnum.FloatingEditor

MarqueeEnum.FloatingEditor

This is the default marquee style of the grid. The cell text (the actual text only, not the entire cell) is highlighted and there is a blinking text cursor (caret) at the end of the text.

The color of the highlight is your system's highlight color. The floating editor style simulates the look and feel of the Microsoft Access datasheet. The blinking text cursor indicates that the cell is edit-ready, hence the name floating editor for this marquee style. Since no other marquee style places the cell in a similar edit-ready mode, the behavior of the grid with the floating editor is sometimes different from the other marquee styles. The following list summarizes the differences when the MarqueeStyle property is set to MarqueeEnum.Floating Editor:

1. The following properties are ignored by the floating editor: EditDropDown and EditorStyle.

2. When using the AddCellStyle and AddRegexCellStyle methods with the floating editor, the grid ignores the current cell bit (CellStyleFlag.CurrentCell) and highlighted row bit (MarqueeRow) of the Condition argument. For more details, see Applying Styles to Cells.

3. The floating editor will not be displayed in a cell with radio buttons or a picture, as described in Automatic Data Translation with ValueItems. A dotted cell marquee will be used instead. The floating editor highlight will return when the current cell is changed to one with normal text display.

4. The CycleOnClickproperty (applies to ValueItemCollection ) has no effect when the MarqueeStyle property is set to MarqueeEnum.Floating Editor.

5. The DoubleClick event of the C1TrueDBGrid control does not fire when the user double-clicks a non-current cell within the grid. This is because the first click is used by the floating editor to begin editing, placing the cell into edit mode at the character on which the click occurred. Double-clicking the current cell of the grid fires the DoubleClick event normally, however.


MarqueeStyleEnum.DottedRowBorder

MarqueeStyleEnum.DottedRowBorder

This setting highlights the entire row with a dotted rectangle. Use this setting instead of Highlight Row if a more subdued highlight is preferred.


Row Height and Word Wrap

ComponentOne True DBGrid for .NET E-mail sent to documentation@componentone.com is for documentation feedback only. We welcome any suggestions to help improve our documentation.

Row Height and Word Wrap

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Adjusting the Height of All Grid Rows

Adjusting the Height of All Grid Rows

Configure the row height interactively at design time by placing the grid in its visual editing mode or by changing the grid's RowHeight property in the Properties window. At run time, the user can adjust the row height interactively if AllowRowSizing is set to RowSizingEnum.AllRows or RowSizingEnum.IndividualRows. For more information, see Run Time Interaction.

The RowHeight property is expressed as pixels. However, a setting of 0 causes the grid to readjust its display so that each row occupies a single line of text in the current font. Therefore, use the following code to adjust the row height to display exactly three lines of text:

· Visual Basic

· C#

· Delphi

This technique is particularly effective when displaying multiple-line memo fields, as in this example.

Note that the Description column’s Style object must have its WrapText property set to True; otherwise, the memo field display will be truncated after the first line.


Enabling Wordwrap in Cells

Enabling Wordwrap in Cells

By default, a grid cell displays a single line of text, truncated at the cell's right boundary. Display multiple lines of text in a cell by increasing the grid's RowHeight property and setting the WrapText property of the desired column’s Style object to True. If WrapText is True (the default is False), a line break occurs before words that would otherwise be partially displayed in a cell. The cell contents will continue to display on the next line, assuming that the grid's row height accommodates multiple lines.

Use the following loop to enable wordwrap for all grid columns:

· Visual Basic

· C#

· Delphi

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Alternating Row Colors

Alternating Row Colors

The readability of the display can often be improved by alternating the background colors of adjacent rows. When the AlternatingRows property to True is set, the grid displays odd-numbered rows (the first displayed row is 1) using the built-in style OddRow, and even-numbered rows using the built-in style EvenRow.


Horizontal and Vertical Alignment

Horizontal and Vertical Alignment

Use the HorizontalAlignment property of the column’s Style object to control the horizontal placement of cell text within a column. The allowable values for this property are as follows:

AlignHorzEnum.General

AlignHorzEnum.Near

AlignHorzEnum.Center

AlignHorzEnum.Far

AlignHorzEnum.Justify

The setting General, which is the default for data cells, indicates that the alignment should be based upon the underlying data type. For example, strings are left-aligned, while numbers are right-aligned.

Use the VerticalAlignment member of the Style object to control the vertical placement of text within the cells of a grid, split, or column. The allowable values for this property are as follows:

AlignVertEnum.Top

AlignVertEnum.Center

AlignVertEnum.Bottom

For data cells, the default value is Top. For static grid elements such as caption bars, column headers, and column footers, the default value is Center. See the section Named style defaults to learn how the default values are derived.

The following grid depicts all possible combinations of the HorizontalAlignment and VerticalAlignment properties (the general setting is omitted because it is ultimately rendered as left, right, or center).

The HorizontalAlignment and VerticalAlignment properties are tightly integrated with the concept of styles. For more information, see How to Use Styles.


Data Presentation Techniques

Data Presentation Techniques

This chapter explains how to display cell data in a variety of textual and graphical formats. To learn how to customize the behavior of cell editing in True DBGrid for .NET, see Cell Editing Techniques.

Text Formatting

Automatic Data Translation with ValueItems

Context-Sensitive Help with CellTips

Scroll Tracking and ScrollTips

Data-Sensitive Cell Merging

Column Grouping

Hierarchical Data Display

Drop-down Hierarchical Data Display

Form Data Display

Inverted Data Display

Multiple Line Data Display

Owner-Drawn Cells

Filtering Data in DataSets

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Text Formatting

Text Formatting

In many cases, the raw numeric data that True DBGrid for .NET receives from its data source is not suitable for end-user display. For example, date fields may need to be converted to a specific international format; currency fields may contain too many insignificant digits after the decimal point. Therefore, True DBGrid for .NET provides a method with which you can alter the format of numerical fields, the NumberFormat property.

In addition, for situations where universal formatting of the database information is inadequate, True DBGrid provides an event, FormatText, that enables your application to override the default formatting on a per-column basis. By writing a simple handler for this event, you can customize the display of your column data in a myriad of ways.

Numeric Field Formatting

Input Validation with Built-in Formatting

Formatting with an Input Mask

Formatting with a Custom Event Handler

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Numeric Field Formatting

Numeric Field Formatting

True DBGrid supports a variety of data formatting options through the C1DataColumn object's NumberFormat property. NumberFormat reconfigures the data format that is handed to the grid from the database. It can alter most types of numeric values for a particular column. For example, to display all date values within a column according to the form 26-Apr-01, use the Medium Date setting:

· Visual Basic

· C#

· Delphi

Note that if the NumberFormat property of a column is changed at run time, the display does not need to refresh since True DBGrid handles this automatically.

For numeric data, the following predefined options are available:

Standard | Display number with thousands separator, at least one digit to the left and two digits to the right of the decimal separator.
General Number | Display number as is, with no thousand separators.
Currency | Display number with thousand separator, if appropriate; display two digits to the right of the decimal separator. Note that output is based on system locale settings.
Percent | Display number multiplied by 100 with a percent sign (%) appended to the right; always display two digits to the right of the decimal separator.
Fixed | Display at least one digit to the left and two digits to the right of the decimal separator.
Scientific | Use standard scientific notation.
Yes/No | Display No if number is 0; otherwise, display Yes.
True/False | Display False if number is 0; otherwise, display True.
On/Off | Display Off if number is 0; otherwise, display On.
0% | Display number multiplied by 100, rounded to the nearest integer, with a percent sign (%) appended to the right.
0.00% | Same as Percent.

For date and time data, the following predefined options are available:

General Date | Display a date and/or time. For real numbers, display a date and time (for example, 4/3/93 05:34 PM); if there is no fractional part, display only a date (for example, 4/3/93); if there is no integer part, display only a time (for example, 05:34 PM). Date display is determined by your system settings.
Long Date | Display a date using your system's long date format.
Medium Date | Display a date using the medium date format appropriate for the language version of Visual Basic.
Short Date | Display a date using your system's short date format.
Long Time | Display a time using your system's long time format: includes hours, minutes, and seconds.
Medium Time | Display a time in 12-hour format using hours and minutes and the AM/PM designator.
Short Time | Display a time using the 24-hour format (for example, 17:45).


Input Validation with Built-in Formatting

Input Validation with Built-in Formatting

It is important to note that the NumberFormat property affects only the display of data in the grid. Unless you also specify a value for the EditMask property, True DBGrid does not enforce an input template, and the user is free to type anything into the formatted cell. When moving to another cell, the grid will reasonably interprets the user's input value and redisplay the data according to the NumberFormat setting.

For example, if Medium Date formatting is in effect for a column, a date of Saturday, April 25, 1998, 12:00:00 AM will be displayed as 25-Apr-98 with the day of the week and time ignored. If a user enters July and moves to another row, the grid cannot reasonably interpret the input date value and a trappable error will occur. If the user enters oct 5 or 10/5, the grid will interpret the entered date as October 5, 1998 (that is, the current year is assumed). If the database update is successful, the entered date will be redisplayed as 05-Oct-98, since Medium Date formatting is in effect.


Formatting with an Input Mask

Formatting with an Input Mask

Since it is common for the input and display formats to be the same, the NumberFormat property has an Edit Mask option (note the space between words). If this option is selected, then the EditMask property setting will be used for both data input and display. However, the input and display formats need not be the same, so you are free to select a NumberFormat option that differs from the EditMask property.

For example, the following code applies a phone number template to a column for both display and editing:

· Visual Basic

· C#

· Delphi

For more information on how to specify a data input mask, see Input Masking.


Formatting with a Custom Event Handler

Formatting with a Custom Event Handler

On occasion, you may find that your current formatting options do not suit your particular needs. Furthermore, you may be restricted in the type of formatting that you can use or need a custom formatting option. In these cases, the FormatText Event option can be specified for the NumberFormat property. Choosing this option for a column will cause the FormatText event to fire each time data is about to be displayed in that column. The event allows you to reformat, translate, indent, or do anything you want to the data just prior to display:

· Visual Basic

· C#

· Delphi

A member of the FormatTextEventArgs object, ColIndex is the column number of the grid to be reformatted. While the Value member contains the current value of the data and also serves as a placeholder for the formatted display value. For example, suppose the first column contains numeric values from 1 to 30, and you wish to display the data as Roman numerals:

· Visual Basic

· C#

· Delphi

Since the FormatText event has fewer restrictions than other formatting techniques, you can always use it to gain full control over the textual content of any value displayed in the grid.


Automatic Data Translation with ValueItems

Automatic Data Translation with ValueItems

Although the FormatText event can be used to map data values into more descriptive display values, True DBGrid for .NET also provides a mechanism for performing such data translations automatically without code. Through the use of the ValueItem object, alternate text or even pictures can be specified to be displayed in place of the underlying data values.

This feature is ideally suited for displaying numeric codes or cryptic abbreviations in a form that makes sense to end-users. For example, country codes can be rendered as proper names or even as pictures of their respective flags. Or, the numbers 0, 1, and 2 may be displayed as Yes, No, and Maybe. Either the actual values (0, 1, 2) or the translated values (Yes, No, Maybe) may be displayed as radio buttons in a cell or in a drop-down combo box.

What are ValueItems?

Specifying Text-to-Text Translations

Specifying Text-to-Picture Translations

Displaying Both Text and Pictures in a Cell

Displaying Boolean Values as Check Boxes

Displaying Allowable Values as Radio Buttons


What are ValueItems?

What are ValueItems?

Previous Next

The ValueItems object contains a collection and properties that define the association between an underlying data value and its visual representation within the grid. The ValueItems object contains a ValueItemsCollection of zero or more ValueItem objects. Each ValueItem supports two main properties: Value, the underlying data value, and DisplayValue, its visual representation. Both properties are of type Object.

Each C1DataColumn object contains ValueItems object.

At run time, manipulate the collection of ValueItem pairs as you would any other True DBGrid or Visual Basic collection. ValueItems can be added, removed, or manipulated through the ValueItemCollection object.

At design time a ValueItemCollection Editor is available through the C1TrueDBGrid Designer. For more information see Using the ValueItemCollection Editor.


Specifying Text-to-Text Translations

Specifying Text-to-Text Translations

Consider the following example, in which the Country field is represented by a short character code.

To display the character codes as proper names, use the column's ValueItemCollection object to specify automatic data translations. At design time, this is done with .NET’s ValueItemCollection editor.

Altering the ValueItemCollection object through the collection editor enables you to specify data translations on a per-column basis in a simple window. To construct a list of data translations for an individual column, do the following:

1. Open up the C1TrueDBGrid Designer by clicking on the ellipsis button (…) next to the Columns collection in the Properties window.

2. Select the column whose contents you would like translated. In the left pane expand the ValueItems Node. Clicking on the ellipsis button next to the Values Node will bring up the ValueItemCollection editor.

3. In the right pane under the ValueItems node, set the Translate property to True.

4. Clicking on the Add button in the left pane will add ValueItem objects. In the right pane specify a Value and DisplayValue for each ValueItem. When entering the ValueItem text, disregard the drop-down button. This is used for entering a bitmap as a DisplayValue.

5. Select OK or Apply to commit the changes.

When the program is run, Country field values that match an item in the Value column appear as the corresponding DisplayValue entry. For example, CAN becomes Canada, UK becomes United Kingdom, and so forth.

Note that the underlying database is not affected; only the presentation of the data value is different. The same effect can be achieved in code as follows:

· Visual Basic

· C#

· Delphi

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Specifying Text-to-Picture Translations

Specifying Text-to-Picture Translations

The same techniques used to specify text-to-text translations can also be used for text-to-picture translations. Within the ValueItem Collection Editor, instead of typing a string into the DisplayValue column, use the ellipsis button (…) to select a bitmap to be used for data translations. To delete your bitmap selection, simply delete the text in the DisplayValue property box and either select another bitmap or type in text.

Note that the Translate property for the ValueItems object must be set to True. Depending upon the height of the bitmaps, it may be necessary to increase the value of the RowHeight property. If that is done, change the VerticalAlignment member of the grid's Style property to Center to ensure that the bitmaps (as well as textual data in other columns) are centered vertically within grid cells instead of being anchored at the top.

When the program is run, Country field values that match an item in the Value column appear as the corresponding DisplayValue picture.

As with textual translations, the underlying database is not affected; only the presentation of the data value is different. The same effect can be achieved in code as follows:

· Visual Basic

· C#

· Delphi

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Displaying Both Text and Pictures in a Cell

Displaying Both Text and Pictures in a Cell

Once the ValueItems object is configured to perform text-to-picture translations for a column, you can display both the Value string and the DisplayValue bitmap to appear within the same cell by selecting the AnnotatePicture property. Or, in code:

· Visual Basic

· C#

· Delphi

The horizontal placement of the bitmap with respect to the cell text is determined by the HorizontalAlignment and ForegroundPicturePosition properties of the column's Style object. The enumeration objects for these two properties are the AlignHorzEnum and ForegroundPicturePositionEnum objects respectively. In the following example, HorizontalAlignment is set to AlignHorzEnum.General. Since the Country column represents a string field, the cell text is left-aligned. However, since the ForegroundPicturePosition property is set to the default value of ForegroundPicturePosition.Near, the bitmap is placed at the left edge of the cell, and the cell text is left-aligned in the remaining space.

However, if you change the ForegroundPicturePosition property to ForegroundPicturePositionEnum.Far, then the cell text is left-aligned as usual, but the bitmap is right-aligned.

To place the cell text below the bitmap while centering both items, set the HorizontalAlignment property to AlignHorzEnum.Center and the ForegroundPicturePosition property to ForegroundPicturePositionEnum.Top of Text.

Note: For an illustration of all possible combinations of the HorizontalAlignment and ForegroundPicturePosition properties, see Displaying foreground pictures.

When editing, the editor uses all space available in the text portion of the cell. When the Presentation property of the ValueItemCollection object is set to one of the combo box options, the bitmap will not change until editing is completed.

Note that in the preceding examples, the text is displayed as it is stored in the database without formatting. Since the ValueItem object can only accommodate one translation, displaying both a picture and formatted text cannot be accomplished with ValueItems alone. Therefore, use the FormatText event to translate the text, and then use the ValueItems to associate the translated text (not the underlying data value) with a picture:

· Visual Basic

· C#

· Delphi

In this example, the NumberFormat property is set to a special value that causes the FormatText event to fire:

· Visual Basic

· C#

· Delphi

Since the FormatText event now translates the country codes stored in the database into actual names for display, the Value property of each ValueItem in the ValueItemCollection object must be changed accordingly.

Assuming that the HorizontalAlignment and ForegroundPicturePosition properties are set as in the previous example, the end result is that the underlying data is displayed as both descriptive text and a picture.

Note: DisplayValue pictures are ideally suited for translating status codes or other fields where the number of allowable values is relatively small. To get a more generalized picture display mechanism than the ValueItemCollection object offers, use the ForegroundPicturePosition property in conjunction with the FetchCellStyle event to display arbitrary pictures on a per-cell basis. For more information, see Displaying foreground pictures.


Displaying Boolean Values as Check Boxes

Displaying Boolean Values as Check Boxes

Use the ValueItems object to represent Boolean values as in-cell checkboxes. The effect of a working Boolean checkbox can be achieved without defining any ValueItem objects—just set the Presentation property to PresentationEnum.Check Box.

Note that the Translate checkbox does not need to be selected to enable automatic data translation, nor does the CycleOnClick checkbox need to be selected to enable end users to toggle the value of a cell by clicking it. The following figure shows a typical checkbox display.

Note: To use different check box bitmaps, define a two-state collection of ValueItem objects through the Values property of the C1DataColumn. Set the Presentation property to PresentationEnum.Normal, and set the Translate and CycleOnClick properties to True.


Displaying Allowable Values as Radio Buttons

Displaying Allowable Values as Radio Buttons

If the number of allowable values for a column is relatively small, consider a radio button presentation. At design time, go to the C1TrueDBGrid Designer, then to the Valueitems node for the column and set the Presentation property to PresentationEnum.RadioButton. Or, in code:

· Visual Basic

· C#

· Delphi

If necessary, adjust the Width property of the column style and the RowHeight property of the grid to accommodate all of the items.

For a given cell, if the underlying data does not match any of the available values, none of the radio buttons will be selected for that cell. However, a default ValueItem object can be provided that will be selected instead.

In this example, the last ValueItem has an empty Value property, but the DisplayValue is set to Other. This means that when Country fields that do not match any of the items are displayed their value in the grid will be displayed as Other.

· Visual Basic

· C#

· Delphi

In this example, 5 is the zero-based index of the default item.


Context-Sensitive Help with CellTips

Context-Sensitive Help with CellTips

In many Windows applications, when the user points to a toolbar button and leaves the mouse at rest for a short time, a ToolTip window appears with the name of the associated command. Provide similar context-sensitive help for users with the CellTips property of True DBGrid for .NET.

The CellTips property determines whether the grid displays a pop-up text window when the cursor is idle. By default, this property is set to CellTipsEnum.NoCellTips, and cell tips are not displayed.

If the CellTips property is set to either CellTipsEnum.Anchored or CellTipsEnum. Floating, the FetchCellTips event will be fired whenever the grid has focus and the cursor is idle over a grid cell, record selector, column header, column footer, split header, or grid caption. The event will not fire if the cursor is over the scroll bars.

The setting CellTipsEnum.Anchored aligns the cell tip window with either the left or right edge of the cell. The left edge is favored, but the right edge will be used if necessary in order to display as much text as possible.

The setting CellTipsEnum.Floating displays the cell tip window below the cursor, if possible.

If a handler is not provided for the FetchCellTips event, and the cursor is over a grid cell, the default behavior is to display a text box containing the cell's contents (up to 256 characters). This enables the user to peruse the contents of a cell even if it is not big enough to be displayed in its entirety. The FetchCellTips event can be programmed to override the default cell text display in order to provide users with context-sensitive help.

A common application of the FetchCellTips event is to display the contents of an invisible column that provides additional information about the row being pointed to, as in the following example:

· Visual Basic

· C#

· Delphi

Use the CellTipsDelay property to control the amount of time that must elapse before the cell tip window is displayed.

Use the CellTipsWidth property to control the width of the cell tip window.


Scroll Tracking and ScrollTips

Scroll Tracking and ScrollTips

If the ScrollTrack property is set to True, moving the scrollbar thumb causes vertical scrolling of the grid's display. By default, this property is False, and no scrolling occurs until the thumb is released.

If the ScrollTips property is set to True, moving the scrollbar thumb causes the FetchScrollTips event to fire. Use this event to track the position of the scroll bar on a record-by-record basis. Also use this event to present the user with useful information relating to the current record or recordset. When used in tandem, the ScrollTrack and ScrollTips properties provide users with visual feedback when scrolling through large DataSets.


Data-Sensitive Cell Merging

Data-Sensitive Cell Merging

If the underlying grid data is sorted, the readability of the display may be improved by grouping adjacent like-valued cells within the sorted column(s). The Merge property of the C1DisplayColumn object controls whether its data cells are grouped in this manner to form a single non-editable cell, using the ColumnMergeEnum. By default, this property is set to None, and each physical row within a column displays a data value, if any.

Consider the following grid, which is sorted on the Country field.

If data-sensitive cell merging is enabled for the Country column at run time, then its cells are grouped according to their contents:

· Visual Basic

· C#

· Delphi

Executing this statement produces the following display. Note that when the current cell is in the Country column, the marquee spans all like-valued rows and takes on the appearance of a dotted rectangle, regardless of the setting of the MarqueeStyle property. The behavior of the marquee in other columns is not affected, however.

If a design-time layout is specified, the same effect can be achieved by setting the Merge property of the desired C1DisplayColumn object within the C1DisplayColumn Collection Editor, which can be accessed by clicking on the ellipsis button (…) after the DisplayColumns property in the Split Collection Editor.

The Merge property can also be set to Free, which combines like values in adjacent rows, or Restricted, which combines like values in adjacent rows in the same row span as the previous column. The difference between Free and Restricted settings is whether cells within the same contents should always be merged (Free) or only when adjacent cells to the left or top are also merged. The examples below illustrate the difference.

No Merge (Regular Spreadsheet View)

· Visual Basic

· C#

· Delphi

Free Merge

· Visual Basic

· C#

· Delphi

Restricted Merge

· Visual Basic

· C#

· Delphi

If the Merge property is set to Free or Restricted for a column, then none of the data cells can be edited, even if all rows contain unique values. The only exception to this is the AddNew row. However, once the new row is added to the underlying database, then its data will also be uneditable within the merged column(s).

Use the HorizontalAlignment and VerticalAlignment properties of the column's Style object to center the data within the merged cell, as in the following figure.

In the Splits Collection Editor, access these properties by expanding the Style property node at the same level of the tree as the Merge property. Or, in code:

· Visual Basic

· C#

· Delphi

Note: Merged cells are not limited to displaying text. Display bitmaps within merged cells by populating the ValueItems object as described earlier in Specifying text-to-picture translations. The section Applying Pictures to Grid Elements describes a more flexible method for displaying in-cell graphics using Style objects.


Column Grouping

Column Grouping

The purpose of this feature is to allow users to dynamically configure a tree view type structure. When in Group mode, a "grouping area" is added to the top of the grid, providing an intuitive interface for specifying column groups. In code, this collection is accessed through the GroupedColumns collection and consists of C1DataColumn objects that have been moved to the grouping area; it is similar to the C1DataColumnCollection class.

The grouping area is created when DataView is set to DataViewEnum.GroupBy. When AllowColMove is set to True, the grid will support the ability to move one or more columns into this area. Users can do this by selecting a single column and dragging its header into the grouping area. This action can also be performed in code at run time by invoking the Add method of the GroupedColumnCollection. When a column is first added to the grouping area, nodes are added to the grid. Each node represents the unique value of the grouped column. Similarly when the last grouped column is removed from the area, the nodes are removed and the display will be similar to a normal grid.

When the expand icon is clicked the grid expands and the next set of grouping column data appears. If there is another grouped column, then this column has an expand icon next to it also. With the addition of each grouped column, another level of sorted information gets added to the tree view. When the expand icon on the final column in the GroupedColumns collection is clicked the data in the remaining columns is displayed in the grid’s Normal style, as shown below:

To manipulate the grouping area in code, use the GroupedColumn identifiers to access the collection of grouped columns. Like the Columns property, the GroupedColumns supports Add, and RemoveAt methods. However, since the GroupedColumns serves as a placeholder for existing grid columns, the semantics of its Add and RemoveAt methods are different.

The Add method moves an existing column to the grouping area; it does not create a new column in the grid. Similarly, the RemoveAt method removes a column from the grouping area and returns it to its original position within the grid; it does not delete the column altogether.

Use the GroupByCaption property to add descriptive or directional text to the grouping area, which will be displayed when no columns are present there.

See Tutorial 17 - Grouping Display for more information.


Column Grouping with the GroupIntervalEnum Enumeration

Column Grouping with the GroupIntervalEnum Enumeration

The GroupIntervalEnum enumeration allows you to group data rows according to date, month, year, alphabet, date values (Outlook-style grouping), or you can customize how you would like to sort your data. The default setting is Default, which groups rows by their values. The following samples explain how to group using a few of these settings.

Group Rows by Year

Group Rows by the First Character of the Value

Group Rows by Date Value (Outlook-Style)

Group Rows by Custom Setting

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Group Rows by Year

Group Rows by Year

This topic demonstrates how to use the GroupIntervalEnum.Year in C1TrueDBGrid.

1. Start a new .NET project.

2. Open the toolbox, which is initially located on the left side of the IDE and has a hammer and a wrench as its icon. From the Toolbox, select the Windows Forms tab and then find the C1TrueDBGrid control on this form.

3. Go to the DataSource property and select Add Project Data Source from the drop-down. In the adapter’s Data Source Configuration Wizard, either select a connection to NWind.mdb or create a new connection to this database. On the Choose your database objects page of the wizard, select all fields in the Employees table and type "Employees" into the DataSet name box, and then finish out the wizard.

4. Visual Studio adds the following code to the Form_Load event:

· Visual Basic

· C#

· Delphi

5. Set the Interval of the HireDate column to Year in the C1TrueDBGrid Designer. Open the designer by clicking on the ellipsis button (…) after the Columns property in the Properties window. Select the HireDate column, and change the Interval property to Year.

This can also be accomplished through code by adding the following to the Form_Load event.

· Visual Basic

· C#

· Delphi

6. Finally, to keep the HireDate column visible after grouping by it, set the ColumnVisible property to True.

This can also be accomplished through code by adding the following to the Form_Load event.

· Visual Basic

· C#

· Delphi

In this example, the HireDate column is grouped by year.


Group Rows by the First Character of the Value

Group Rows by the First Character of the Value

This topic demonstrates how to use the GroupIntervalEnum.Alphabetical in C1TrueDBGrid.

1. Start a new .NET project.

2. Open the toolbox, which is initially located on the left side of the IDE and has a hammer and a wrench as its icon. From the Toolbox, select the Windows Forms tab and then find the C1TrueDBGrid control on this form.

3. Go to the DataSource property and select Add Project Data Source from the drop-down. In the adapter’s Data Source Configuration Wizard, either select a connection to NWind.mdb or create a new connection to this database. On the Choose your database objects page of the wizard, select all fields in the Products table and type "Products" into the DataSet name box, and then finish out the wizard.

4. Visual Studio adds the following code to the Form_Load event:

· Visual Basic

· C#

· Delphi

5. Set the Interval of the ProductName column to Alphabetical in the C1TrueDBGrid Designer. Open the designer by clicking on the ellipsis button (…) after the Columns property in the Properties window. Select the ProductName column, and change the Interval property to Alphabetical.

This can also be accomplished through code by adding the following to the Form_Load event.

· Visual Basic

· C#

· Delphi

6. Finally, to keep the ProductName column visible after grouping by it, set the ColumnVisible property to True.

This can also be accomplished through code by adding the following to the Form_Load event.

· Visual Basic

· C#

· Delphi

In this example, the ProductName column is grouped by the first letter of the product name.


Group Rows by Date Value (Outlook-Style)

Group Rows by Date Value (Outlook-Style)

Previous Next

This topic demonstrates how to use the GroupIntervalEnum.DateSpan in C1TrueDBGrid.

Note: The Nwind.mdb database was modified for this example. A field “NextMeeting” was added to the employees table and filled in with more current dates.

1. Start a new .NET project.

2. Open the toolbox, which is initially located on the left side of the IDE and has a hammer and a wrench as its icon. From the Toolbox, select the Windows Forms tab and then find the C1TrueDBGrid control on this form.

3. Go to the DataSource property and select Add Project Data Source from the drop-down. In the adapter’s Data Source Configuration Wizard, either select a connection to NWind.mdb or create a new connection to this database. On the Choose your database objects page of the wizard, select all fields in the Employees table and type "Employees" into the DataSet name box, and then finish out the wizard.

4. Visual Studio adds the following code to the Form_Load event:

· Visual Basic

· C#

· Delphi

5. Set the Interval of the NextMeeting column to DateSpan in the C1TrueDBGrid Designer. Open the designer by clicking on the ellipsis button (…) after the Columns property in the Properties window. Select the NextMeeting column, and change the Interval property to DateSpan.

This can also be accomplished through code by adding the following to the Form_Load event.

· Visual Basic

· C#

· Delphi

6. Finally, to keep the NextMeeting column visible after grouping by it, set the ColumnVisible property to True.

This can also be accomplished through code by adding the following to the Form_Load event.

· Visual Basic

· C#

· Delphi

In this example, the NextMeeting column is sorted by date values.


Group Rows by Custom Setting

Group Rows by Custom Setting

This topic demonstrates how to use the GroupIntervalEnum.Custom in C1TrueDBGrid.

1. Start a new .NET project.

2. Open the toolbox, which is initially located on the left side of the IDE and has a hammer and a wrench as its icon. From the Toolbox, select the Windows Forms tab and then find the C1TrueDBGrid control on this form.

3. Go to the DataSource property and select Add Project Data Source from the drop-down. In the adapter’s Data Source Configuration Wizard, either select a connection to NWind.mdb or create a new connection to this database. On the Choose your database objects page of the wizard, select all fields in the Products table and type "Products" into the DataSet name box, and then finish out the wizard.

4. Add the following code to the Form_Load event:

· Visual Basic

· C#

· Delphi

5. Set the Interval of the UnitPrice column to Custom in the C1TrueDBGrid Designer. Open the designer by clicking on the ellipsis button (…) after the Columns property in the Properties window. Select the UnitPrice column, and change the Interval property to Custom.

6. In the C1TrueDBGrid Designer, set the NumberFormat property of the UnitPrice column to Currency.

This can also be accomplished through code by adding the following to the Form_Load event.

· Visual Basic

· C#

· Delphi

7. To keep the UnitPrice column visible after grouping by it, set the ColumnVisible property to True.

This can also be accomplished through code by adding the following to the Form_Load event.

· Visual Basic

· C#

· Delphi

8. Add the following code to the GroupInterval event:

· Visual Basic

· C#

· Delphi

In this example, the UnitPrice column is grouped according to a customized range of values.


Hierarchical Data Display

Hierarchical Data Display

True DBGrid for .NET supports the ability to display hierarchical data. Hierarchical data generally refers to data that is stored in multiple relational tables, where a master (or "parent") table is linked by keyed fields to detail (or "child") tables. The hierarchical display provides the ability to present the master data to users, such that the related detail data can be viewed in the same grid with a single mouse click.

When the grid is bound to a master-detail data source, display related groups of hierarchical data by using bands. A band is a virtual representation of a hierarchical DataSet, not the data itself. A band is created for each level in a hierarchical recordset, and may consist of entire tables or a just a few selected fields. At run time, users can expand and collapse bands using a TreeView-like interface.

To use this feature, the DataView property must be set to DataViewEnum.Hierarchical. The grid control must be bound to a hierarchical DataSet. One way to do this is to use the DataSource property.

The following bitmap illustrates a relation between two tables. This screenshot is taken from the .NET xsd file editor. In this example there is a relation between the Composer and Opus tables. Both tables have a Last field, which happens to be the primary key for the table. The Last field of both Composer and Opus are identical. Thus when joined together on this field these two tables create a hierarchical DataSet.

This hierarchical DataSet can be display in the grid through the use of Bands and the grid’s hierarchical display. With only three steps this above DataSet can be displayed in the True DBGrid. Let's go through the three steps:

1. First the DataSource property of the grid needs to be set to the hierarchical DataSet. In this case that DataSet is called dsMasterDetail1.

2. Secondly, the DataMember property of the grid needs to be set to the parent table in the DataSet. This will tell the grid which table must be displayed initially. In this example, the parent table is Composer.

3. Finally, the grid needs to know to switch to the hierarchical display. By setting the DataView property to DataViewEnum.Hierarchical, the grid will display the above dataset with its bands structure.

At run time, the grid displays read-only data. The next figure illustrates the initial display of the grid. The data from the master recordset (Composer) is displayed first, and the fields from the detail recordset bands appear to the right. The detail recordset fields initially contain no data, however. An expand icon ("+") at the left edge of a record indicates the presence of hierarchical data.

When the user clicks an expand icon, it changes to a collapse icon ("–") and the next band (Orders) expands to show the detail records for the clicked row.

Note: If the DataView property is set to its default value of Normal, the grid will only display flat files; it will not support a hierarchical view. Even if the data source is a hierarchical DataSet, the grid will only display data from the master table.

The DataView property must be set at design time; it cannot be changed at run time.

The following methods are provided for manipulating hierarchical grid displays:

GetBand | Returns the band for a specified column index.
CollapseBand | Collapses all rows for the specified band.
ExpandBand | Expands all rows for the specified band.
RowExpanded | Returns True if the current row is expanded within the specified band.

If the number of recordset levels in a master-detail data source is not known in advance, examine the Bands property in code. Allowable band numbers range from 0 to Bands-1.

The following events enable the application to respond to hierarchical view operation initiated by the user:

Collapse | Fired when a band is collapsed by a user.
Expand | Fired when a band is expanded by a user.


Drop-down Hierarchical Data Display

Drop-down Hierarchical Data Display

True DBGrid for .NET allows you to display a master/child relationship between data sources in such a way that the child data records are available from within the master table in a completely new True DBGrid. By simply setting the ChildGrid property to connect two grid controls and a few lines of code, you can create a fully editable drop-down child that appears within the master table with a simple click.

Assuming that your hierarchical dataset is already configured, you can create the master/child relationship by entering C1TrueDBGrid2 into the ChildGrid property textbox of C1TrueDBGrid1.

Notice that C1TrueDBGrid2 is rendered invisible and there is an expand icon (“+”) beside the left most cell in each row. The master table contains a list of composers including vital statistics. Note, that as you scroll right, the expand icon remains in the left most cell at all times.

By left clicking on any of the expand icons, our child table appears in a drop-down. In this case, the drop-down lists the written works of the specific composer that you expanded.

This demonstrates how very simple it is to attach a child grid to its master grid and display hierarchical data in a convenient display.


Form Data Display

Form Data Display

In situations where you would like to display data one record at a time, you can set the DataView property to 3 - Form. You can set this property at either design time or run time to display data in an editable form similar to the one in the following illustration.

To adjust the width of the data column area or the caption column area, change the ViewColumnWidth and ViewCaptionWidth properties to create the appropriate column spacing.


Inverted Data Display

Inverted Data Display

The inverted option of the DataView property inverts each row in your data into columns. In effect, the leftmost column becomes the top row, the second column becomes the second row, and so forth. Use this display to maximize screen real estate for tables that have many columns. Set the DataView property to DataViewEnum.Inverted to display an inverted grid as depicted in the following illustration.

To adjust the width of the data column area or the caption column area, you can change the ViewColumnWidth and ViewCaptionWidth properties to create the appropriate column spacing.


Multiple Line Data Display

Multiple Line Data Display

Normally, a record is displayed in a single row in the grid. If the grid is not wide enough to display all of the columns in the record, a horizontal scroll bar automatically appears to enable users to scroll columns in and out of view. For discussion purposes, the following will be distinguished:

· A line in a grid is a single physical row of cells displayed in the grid. Do not confuse this with a line of text inside a grid cell; depending upon the settings of the RowHeight and WrapText properties, data in a grid cell may be displayed in multiple lines of text.

· A row in a grid is used to display a single record. A row may contain multiple lines or multiple physical rows.

Setting the DataView property to DataViewEnum.MultipleLines will display every field of data in the dataset in the available grid area. Ultimately, if the dataset contains more fields than can fit in the grid area, then a single record will span multiple lines. This feature enables the end user to view simultaneously all of the columns (fields) of a record within the width of the grid without scrolling horizontally, as in the following figure:

If the resulting column layout is not appropriate, adjust it at either design time or run time by changing the widths and orders of the columns. When changing the width of a column, the grid will only increase the size of the column at the expense of the other columns in the line. Unlike previous versions of the grid, the columns will not wrap to another line if a column is resized.

To change the order of the columns while in Multiple Line view, click and drag the column header to the new position. A red arrow should indicate where the column is to be placed. After the column has been dropped, the grid will reposition the columns accordingly.

Note: At design time, if the HScrollBar and VScrollBar style property is set to ScrollBarStyleEnum.Automatic, and the DataView property is set to Multiple Lines, a vertical scroll bar appears even though no data is displayed. This is done so the width of the scroll bar can be taken into account when adjusting columns at design time.


Implications of Multiple-Line Mode

Implications of Multiple-Line Mode

Existing row-related properties, methods, and events fit well with the earlier definitions of records, rows, and lines (with two exceptions to be described later). For example:

· The VisibleRows property returns the number of visible rows or records displayed on the grid—not the number of visible lines. If a row spans 2 lines, and the VisibleRows property is 5, then there are 10 visible lines displayed on the grid.

· The RowTop method accepts a row number argument ranging from 0 to VisibleRows - 1. If a row spans 2 lines, then RowTop returns the position of the top of the third displayed row (that is, the fifth displayed line).

· The RowResize event will be fired whenever a row is resized by the user at run time. In fact, at the record selector column, only row divider boundaries are displayed; thus, the user can only resize rows, not lines.

Other row-related properties, methods, and events can be interpreted similarly. There are two exceptions:

1. The first is the RowHeight property. The RowHeight property returns the height of a cell or a line, not the height of a row. Changing this property would break users' existing code.

2. The second is more of a limitation than an exception. Currently the dividers between rows and lines are the same. When the RowDivider object’s style property is changed, all dividers between rows and lines change to the same style. That is, different dividers cannot exist for rows and for lines.


Owner-Drawn Cells

Owner-Drawn Cells

For cases where complex per-cell customizations need to be performed you can render the contents of the cell by writing a handler for the OwnerDrawCell event. This event is raised as needed to display the contents of cells that have their OwnerDraw property set to True.

· Visual Basic

· C#

· Delphi

Implement the OwnerDrawCell event as follows:

· Visual Basic

· C#

· Delphi

There are a couple key points worth noting in this example:

· If the e.Handled argument is set to True, the grid will not fill in the cell's background, nor will it display cell text or graphics. Therefore, you are responsible for filling in the entire cell, even if there is no data to display.

· Even a relatively simple example such as the one illustrated here requires a fair amount of coding, so consider using background bitmaps instead of owner-drawn cells if possible.


Filtering Data in DataSets

Filtering Data in DataSets

In some cases, you might want to filter the underlying recordset by limiting the number of items in a given field or fields. With the True DBGrid, this is a very simple two-step process. By using the FilterBar and AllowFilter properties, and entering the filter text appropriately, the number of field entries can be reduced almost effortlessly. When the FilterBar property of a C1TrueDBGrid control is set, a blank row with a gray separator line appears directly above the uppermost data row in the grid.

Next, in order to implement the filter in the grid, set the AllowFilter property to be set to True, which will tell the grid to implement the filtering process. If the FilterBar and AllowFilter properties are both set to True, the Filter Bar will appear in the grid and the grid will also handle automatically the handling of the DataSet.

In the event that you would prefer to handle the filtering process yourself, leaving the AllowFilter property as False will not implement the grid’s automatic filter. In order to create a filter, the FilterChange event, must be used to manually sort the data. This event fires whenever there the user changes the state of the Filter Bar.

In this event a handler would have to be created which filters the dataset for each character the user enters. For example, if the user would happen to type a "B" into the filter bar cell, the underlying dataset would have to be limited to just those column items whose values start with the letter B. If the user then extended the filter to "BR", then the list would have to be reduced to only those whose values that start with BR.


How to Use Splits

How to Use Splits

In True DBGrid for .NET, a split is similar to the split window features of products such as Microsoft Excel and Word. Use splits to present data in multiple horizontal or vertical panes. These panes, or splits, can display data in different colors and fonts. The splits can scroll as a unit or individually and can display different sets of columns or the same set. Also use splits to prevent one or more columns or a set of rows from scrolling. Unlike other grid products, fixed (nonscrolling) columns or rows in True DBGrid for .NET do not have to be at the left edge of the grid, but can be at the right edge or anywhere in the middle. Multiple groups of fixed columns or rows can exist within a grid. Splits open up an endless variety of possibilities for presenting data to users of your applications.

Whenever you use True DBGrid for .NET, you are always using a split. A grid always contains at least one horizontal split, and the default values for the split properties are set so splits can be ignored until needed. Therefore, skip this chapter if you do not need to create and manipulate more than one split within a grid.

Create and manipulate splits by working with Split objects and the SplitCollection object. Since an individual column can be visible in one split but hidden in another, each Split object maintains its own collection of columns, known as C1DisplayColumnCollection. This collection provides complete control over the appearance of each split and the columns it contains.

Referencing Splits and their Properties

Split Matrix Notation

Creating and Removing Splits

Working with Columns in Splits

Sizing and Scaling Splits

Creating and Resizing Splits through User Interaction

Vertical Scrolling and Split Groups

Horizontal Scrolling and Fixed Columns

Navigation across Splits

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Referencing Splits and their Properties

Referencing Splits and their Properties

A C1TrueDBGrid object initially contains a single horizontal split. If additional splits are created, you can determine or set the current split (that is, the split that has received focus) using the grid's SplitIndex property:

· Visual Basic

· C#

· Delphi

Each split in a grid is a different view of the same data source, and behaves just like an independent grid. If additional splits are created without customizing any of the split properties, all splits will be identical and each will behave very much like the original grid with one split.

Note that some properties, such as RecordSelectors and MarqueeStyle, are supported by both the C1TrueDBGrid and Split objects. Three rules of thumb apply to properties that are common to a grid and its splits:

1. When you set or get the property of a Split object, you are accessing a specific split, and other splits in the same grid are not affected.

2. When you get the property of a C1TrueDBGrid object, you are accessing the same property within the current split.

3. When you set the property of a C1TrueDBGrid object, you are setting the same property within all splits.

To understand how these rules work in code, consider a grid with two horizontal splits, and assume that the current split index is 1. To determine which marquee style is in use, the following statements are equivalent:

· Visual Basic

· C#

· Delphi

To change the marquee style to a solid cell border for all of the splits in the grid, use:

· Visual Basic

· C#

· Delphi

Note that this statement is equivalent to:

· Visual Basic

· C#

· Delphi

Likewise, to set the marquee style of each split to a different value:

· Visual Basic

· C#

· Delphi

These rules apply only to a C1TrueDBGrid object and its associated Split objects. No other object pairs possess similar relationships.


Split Properties Common to C1TrueDBGrid

Split Properties Common to C1TrueDBGrid

The following properties, which are supported by both Split and C1TrueDBGrid objects, adhere to the rules described in the preceding section:

AllowColMove | Enables interactive column movement.
AllowColSelect | Enables interactive column selection.
AllowRowSelect | Enables interactive row selection.
AllowRowSizing | Enables interactive row resizing.
AlternatingRowStyle | Controls whether even/odd row styles are applied to a split.
CaptionStyle | Controls the caption style for a split.
CurrentCellVisible | Sets/returns modification status of the current cell.
ExtendRightColumn | Sets/returns extended right column for a split.
FetchRowStyles | Controls whether the FetchRowStyle event will be fired.
FirstRow | Bookmark of row occupying first display line.
LeftCol | Returns the leftmost visible column.
MarqueeStyle | Sets/returns marquee style for a split.
RecordSelectors | Shows/hides selection panel at left border.

Note: The Caption property is not included in this list, even though it is supported by both objects. Since grids and splits maintain separate caption bars, setting the Caption property of the grid does not apply the same string to each split caption.


Split-Only Properties Not Supported by TDBGrid

Split-Only Properties Not Supported by TDBGrid

The following properties are supported by Split objects but not by C1TrueDBGrid. Therefore, to apply a value to the entire grid, set the value for each split individually.

AllowFocus | Allows cells within a split to receive focus.
HorizontalScrollGroup | Controls the HorizontalScrollBar.
Locked | True if data entry is prohibited for a split.
SplitSize | Sets/returns split width according to SizeMode.
SplitSizeMode | Controls whether a split is scalable or fixed size.
VerticalScrollGroup | Controls the Vertical Scroll Bar.


Split Matrix Notation

Split Matrix Notation

When the grid contains both horizontal and vertical splits, it is said to be organized in a two-dimensional split matrix. Reference and access to the properties of the split objects in the matrix is accomplished with a two-dimensional matrix notation. The index for a particular split in a split matrix is the split row, then the column delimited by a comma. For instance, accessing the second vertical split (column) in the third horizontal split (row) would look like the following:

· Visual Basic

· C#

· Delphi

Note: Notice that the Item property is used in the previous example. When accessing a split through split matrix notation, the Item property must be explicitly specified. When accessing a split in a grid with a one-dimensional structure, the Item property is taken as implicit and can be omitted. For instance, accessing the second split in a grid with only horizontal splits would look like the following

· Visual Basic

· C#

· Delphi

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Creating and Removing Splits

Creating and Removing Splits

At run time, you must create and remove splits using the RemoveHorizontalSplit, InsertHorizontalSplit, RemoveVerticalSplit, and RemoveHorizontalSplit methods. Each method takes a zero-based split index:

· Visual Basic

· C#

· Delphi

You can determine the number of splits in a grid using the SplitCollection Count property:

· Visual Basic

· C#

· Delphi

You can iterate through all splits using the Count property, for example:

· Visual Basic

· C#

· Delphi

Of course, a more efficient way to code this would be to use a For Each...Next loop:

· Visual Basic

· C#

· Delphi

The new Split object will inherit all of its properties from the last object in the collection.


Working with Columns in Splits

Working with Columns in Splits

Each split in a True DBGrid for .NET control maintains its own collection of columns. The C1DisplayColumnCollection object provides access to both split-specific display properties for columns inside a split. The split-specific properties of the C1DisplayColumnCollection allow for tremendous flexibility in controlling the look and behavior of individual splits. The grid is connected to a single data source, so the splits just present different views of the same data. Therefore, the C1DisplayColumnCollection in each split contains the same number of columns and the columns are bound to the same data fields.

However, the values of other C1DisplayColumn object properties, such as Visible, may vary from split to split. These properties are said to be split-specific. For example, a column created at run time is not visible by default. Thus, the LastName column created in the preceding example is invisible in all splits. The following code makes it visible in the second split:

· Visual Basic

· C#

· Delphi

Since Visible is a split-specific property, the LastName column remains invisible in other splits.


Sizing and Scaling Splits

Sizing and Scaling Splits

True DBGrid for .NET provides full control over the size and scaling of individual splits. Configure a split to occupy an exact width or height, hold a fixed number of columns or rows, or adjust its size proportionally in relation to other splits. When initially starting out with True DBGrid, splits can still be used in a variety of ways without having to master all of the details.

At run time, the actual size of a Split object depends upon its SplitSize and SplitSizeMode properties. The SplitSizeMode property specifies the unit of measurement; the SplitSize property specifies the number of units. True DBGrid supports three different sizing modes for splits, as determined by the setting of the SplitSizeMode property:

SizeModeEnum.Scalable | Denotes relative width in relation to other splits.
SizeModeEnum.Exact | Specifies a fixed width in container coordinates.
SizeModeEnum.NumberofColumns | Specifies a fixed number of columns.

A scalable split uses the value of its SplitSize property to determine the percentage of space the split will occupy. For any scalable split, the percentage is determined by dividing its SplitSize value by the sum of the SplitSize values of all other scalable splits. Thus, consider the SplitSize property of a scalable split to be the numerator of a fraction, the denominator of which is the sum of the scalable split sizes. Scalable splits compete for the space remaining after nonscalable splits have been allocated. By default, all splits are scalable, so they compete for the entire grid display region. SplitSizeMode is always Scalable when a grid contains only one split.

An exact split uses the value of its SplitSize property as its fixed width in container coordinates. Exact splits will be truncated if they will not fit within the horizontal grid boundaries. This mode is not applicable when a grid contains only one split.

A fixed-column split uses the SplitSize property to indicate the exact number of columns that should always be displayed within the split. These splits automatically reconfigure the entire grid if the size of the displayed columns changes (either by code or user interaction), or if columns in the split are scrolled horizontally so that the widths of the displayed columns are different. This mode is primarily used to create fixed columns that do not scroll horizontally. However, it can be used for a variety of other purposes as well. This mode is not applicable when a grid contains only one split.

Note that when there is only one split (the grid's default behavior), the split spans the entire width of the grid, the SplitSizeMode property is always Scalable, and the SplitSize property is always 1. Setting either of these properties has no effect when there is only one split. If there are multiple splits, and then remove all but one so the SplitSizeMode and SplitSize properties of the remaining split automatically revert to 0 and 1, respectively.

By default, the SplitSizeMode property for a newly created split is Scalable, and the SplitSize property is set to 1. For example, two additional splits can be created with the following code:

· Visual Basic

· C#

· Delphi

The resulting grid display will appear as follows:

Notice that each split occupies 1/3 of the total grid space. This is because there are three scalable splits, and each split has a SplitSize of 1. If the sizes of the splits are changed to 1, 2, and 3, respectively:

· Visual Basic

· C#

· Delphi

The resulting grid display will appear as follows:

Notice the sum of the split sizes (1+2+3) is 6, so the size of each split is a fraction with the numerator being the value of its SplitSize property and a denominator of 6.

When a split's SplitSizeMode is set to Exact, that split receives space before the other splits. This behavior is somewhat more complex, but understanding how scalable splits work is helpful. For example, assume that splits are set in the following way:

· Visual Basic

· C#

· Delphi

After configuring the splits in this way, the resulting grid display will look like this.

The fixed-size split in the middle (Split1) is configured to exactly 250 pixels, and the remaining splits compete for the space remaining in the grid. Since the remaining splits are both scalable splits, they divide the remaining space among themselves according to the percentages calculated using their SplitSize property values. So, the leftmost split occupies 1/3 of the remaining space, and the rightmost split occupies 2/3.

Splits with SplitSizeMode set to Number of Columns behave almost identically to exact splits, except their size is determined by the width of an integral number of columns. The width, however, is dynamic, so resizing the columns or scrolling so that different columns are in view will cause the entire grid to reconfigure itself.

Avoid creating a grid with no scalable splits. Although True DBGrid handles this situation, it is difficult to work with a grid configured in this way. For example, if no splits are scalable, all splits will have an exact size, which may not fill the entire horizontal width of the grid. If the total width of the splits is too short, True DBGrid displays a "null-zone" where there are no splits. If the total width of the splits is wider than the grid, then True DBGrid will show only the separator lines for the splits that cannot be shown.


Creating and Resizing Splits through User Interaction

Creating and Resizing Splits through User Interaction

Create and resize splits in code. However, users can also create and resize splits interactively by setting the AllowHorizontalSplit or AllowVerticalSplit property of a split to True. By default, both properties are set to False, and users are prevented from creating and resizing splits.

A typical grid with these properties set to False is shown in the following figure. Notice that there is no split box at the left edge of the horizontal scroll bar or at the top of the vertical scroll bar.

If the split's AllowVerticalSplit property is set to True:

· Visual Basic

· C#

· Delphi

A split box will appear at the top edge of the vertical scroll bar, and the user will be able to create new splits at run time.

If the split's AllowHorizontalSplit property is set to True:

· Visual Basic

· C#

· Delphi

A split box will appear at the left edge of the horizontal scroll bar, and the user will be able to create new splits at run time.

The new split will inherit its properties from the original split. The SplitSizeMode properties of both splits will be automatically set to 0 - Scalable, regardless of the SplitSizeMode of the original split. The SplitSize properties of both splits will be set to the correct ratio of the splits' sizes. The values of the SplitSize properties may end up being rather large. This is because True DBGrid needs to choose the least common denominator for the total split size, and the user may drag the pointer to an arbitrary position.

If the user points to the split box between the two splits, the pointer will turn into a double vertical bar with horizontal arrows. The user can drag this pointer to the left or right to adjust the relative sizes of the splits.

To summarize:

· Splits can always be created or resized in code, but the AllowHorizontalSplit and AllowVerticalSplit property control whether users can create or resize splits interactively at run time.

· The user can resize the relative sizes of two splits only if both splits' AllowSizing properties are True. When the user completes a resize operation, the total size of the two splits remains unchanged, but the SplitSizeMode properties of both splits will automatically be set to Scalable regardless of their previous settings. The SplitSize properties of the two splits will be set to reflect the ratio of their new sizes.


Vertical Scrolling and Split Groups

Vertical Scrolling and Split Groups

By default, the grid has only one horizontal split, with split index 0, and its HScrollBar and VScrollBar style property is set to ScrollBarStyleEnum.Automatic. That is, the horizontal or vertical scroll bar will appear as necessary depending upon the column widths and the number of data rows available. The default split's HorizontalScrollGroup and VerticalScrollGroup properties are set to 1. Splits having the same scrollgroup property setting will scroll vertically or horizontally together. When a new split is created, it will inherit both the state of the scroll bars and the Scroll Group properties from the parent split. If all of the splits belonging to the same HorizontalScrollGroup or VerticalScrollGroup have their HScrollBar and VScrollBar style property is set to ScrollBarStyleEnum.Automatic, then True DBGrid will display the vertical scroll bar or horizontal scroll bar only at the rightmost or bottommost split of the scroll group. Manipulating this single scroll bar will cause all splits in the same scroll group to scroll simultaneously.

For example, two additional splits can be created with the following code:

· Visual Basic

· C#

· Delphi

The resulting grid display will display as follows:

All three splits will have the same HScrollBar and VScrollBar settings and VerticalScrollGroup setting of 1. However, only one vertical scroll bar will be displayed, within the rightmost split. When the user operates this scroll bar, all three splits will scroll simultaneously.

Vertical splits react in the same manner. After adding two vertical splits to the grid, all of the splits have the same HorizontalScrollGroup value of 1. Thus there is only one horizontal scroll bar at the bottom of the grid, and if this scroll bar is scrolled all three splits will scroll simultaneously.

Change one of the scroll group properties of the splits to create split groups that scroll independently. In the preceding example, setting the HorizontalScrollGroup property of the middle split to 2 creates a new scroll group:

· Visual Basic

· C#

· Delphi

After this statement executes, scrolling the middle split will not disturb the others, as shown in the following figure.

Note that the middle split now contains a horizontal scroll bar. This scroll bar operates only on the middle split, since it is the only one with its HorizontalScrollGroup property equal to 2. The horizontal scroll bar in the bottommost split now controls the bottom and top splits only. It no longer affects the middle split.

A common application of this feature is to create two independent split groups so that users can compare field values from different records by scrolling each split to view a different set of rows.


Horizontal Scrolling and Fixed Columns

Horizontal Scrolling and Fixed Columns

Scrolling is independent for each split. Often, one or more columns need to be prevented from scrolling horizontally or vertically so that the columns will always be in view. True DBGrid provides an easy way to keep any number of columns from scrolling at any location within the grid (even in the middle!) by setting a few split properties.

As an example, with a grid with three horizontal splits, the following code will "fix" columns 0 and 1 in the middle split:

· Visual Basic

· C#

· Delphi

Usually, if columns 0 and 1 are kept from scrolling in one split, it will be desirable to have them invisible in the other splits:

· Visual Basic

· C#

· Delphi

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Navigation across Splits

Navigation across Splits

Navigation across splits is controlled by the grid's TabAcrossSplits property and each split's AllowFocus property. Navigation across splits is best discussed with grid navigation as a whole. For more information, please refer to Run Time Interaction.


How to Use Styles

How to Use Styles

True DBGrid for .NET uses a style model similar to that of Microsoft Word and Excel to simplify the task of customizing a grid's appearance. A Style object is a combination of font, color, picture, and formatting information comprising the following properties:

BackColor | Controls the background color.
BackgroundImage | Sets/returns a style's background picture.
BackgroundPictureDrawMode | Controls how a style's background picture is displayed.
Font | Specifies typeface, size, and other text characteristics.
ForeColor | Controls the foreground color.
ForeGroundImage | Sets/returns a style's foreground picture.
ForegroundPicturePosition | Controls how a style's foreground picture is positioned.
HorizontalAlignment | Specifies cell text alignment.
Locked | Disallows in-cell editing when True.
Trimming | Determines how a string is trimmed.
VerticalAlignment | Specifies vertical text alignment.
WrapText | Word wraps cell text when True.

Built-in Named Styles

Working with Style Properties

Applying Styles to Cells

Applying Pictures to Grid Elements

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Built-in Named Styles

Built-in Named Styles

When a grid is first created, it has a collection of built-in named styles that control various aspects of its display. For example, the Heading style determines the attributes used to display column headers. At design time, change the appearance of the grid as a whole by modifying the built-in named styles in the GridStyle Collection Editor. At run time, the GridStyleCollection provides access to the same set of named styles. Initially, all grids contain ten built-in styles, which control the display of the following grid elements:

Caption | Grid and split caption bars.
Editor | Cell editor within grid.
EvenRow | Data cells in even numbered rows.
Filter Bar | Data in the filter bar columns.
Footer | Column footers.
Group | Group columns in grid grouping area.
Heading | Column headers.
HighlightRow | Data cells in highlighted rows.
Inactive | Column headings when another column has focus.
Normal | Data cells in unselected, unhighlighted rows.
OddRow | Data cells in odd numbered rows.
Record Selector | Data in the record selector column.
Selected | Data cells in selected rows.

A selected row is one whose bookmark has been added to the SelectedRowCollection , either in code or through user interaction. The term highlighted row refers to the current row when the MarqueeStyle property is set to MarqueeEnum.HighlightRow or MarqueeEnum.HighlightRowRaiseCell.

The EvenRow and OddRow styles are used only when the AlternatingRows property is set to True.


Named Style Defaults

Named Style Defaults

As in Microsoft Word, a Style object in True DBGrid can inherit its characteristics from another style, referred to as the parent style. For a newly created grid, the Normal style is the parent (or grandparent) of all named styles. Its default properties are as follows:

BackColor | System.Drawing.Color.White
BackgroundImage | None
BackgroundPictureDrawMode | BackgroundPictureDrawModeEnum.Stretch
Font | Microsoft Sans Serif, 8.25pt
ForeColor | System.Drawing.Color.Black
ForeGroundImage | None
ForegroundPicturePosition | ForegroundPicturePositionEnum.LeftOfText
HorizontalAlignment | AlignHorzEnum.General
Locked | False
Trimming | Character
VerticalAlignment | AlignVertEnum.Top
WrapText | False

The Heading and Footing styles are defined similarly. Each inherits from Normal, and each overrides the following properties:

BackColor | System.Drawing.SystemColors.Control
ForeColor | System.Drawing.Color.Black
VerticalAlignment | AlignVertEnum.Center

The Heading style overrides one additional property that the Footing style does not:

WrapText

True

The Selected style also inherits from Normal and overrides two color properties:

BackColor | System.Drawing.SystemColors.Highlight
ForeColor | System.Drawing.SystemColors.HighlightText

The same is True of the HighlightRow style, which uses the inverse of the color settings for the default Normal style:

BackColor | System.Drawing.SystemColors.Text
ForeColor | System.Drawing.SystemColors.HighlightText

The EvenRow, OddRow, and FilterBar styles inherit from Normal, but only EvenRow overrides any properties:

BackColor

System.Drawing.Color.Aqua

The only styles that do not inherit directly from Normal are Caption and RecordSelector, which inherit from Heading. The reason that grid and split captions are centered by default is that the Caption style specializes the following property:

HorizontalAlignment

AlignHorzEnum.Center

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Named Style Inheritance

Named Style Inheritance

To see how named style inheritance works, place a grid on a form and set the Caption property of the grid and its default columns. Set the FooterText property of the default columns and set the ColumnFooters property of the grid to True. The grid should look something like this.

In the GridStyleCollection Editor, expand the Normal node, select its Font property, and check the Bold box. Note that the column headers, column footers, and grid caption are all bold, since all built-in styles inherit from the Normal style or one of its children.

Next, expand the Heading node and select its ForeColor property. Choose Web from the color tabs, and then select White. Note that the text color of both the column headers and the grid's caption bar is now white, since the Caption style inherits its color properties from the Heading style. The column footers remain the same because the Footer style inherits from Normal, not Heading.

Finally, expand the Caption node and select its BackColor property. Choose Web from the color tabs, and then select Gray. Note that the background color of the column headers is not changed, and that the Caption style continues to inherit its text color from its parent style, Heading.


Modifying Named Styles

Modifying Named Styles

Change the appearance of the overall grid at design time by using .NET’s collection editors to modify the GridStyleCollection. For example, to force all column headers to center their caption text, change the HorizontalAlignment property of the built-in Heading style to AlignHorzEnum.Center.

The following statement accomplishes the same result in code:

· Visual Basic

· C#

· Delphi

However, it is not necessary to use the GridStyleCollection Editor or manipulate named members of the GridStyleCollection in code, as the grid and its component objects expose several properties that return Style objects. As the next section describes, the appearance of the grid can be fine-tuned by manipulating these objects directly. For more information see Using the GridStyleCollection Editor.


Working with Style Properties

Working with Style Properties

Just as a document template in Microsoft Word specifies the overall appearance of individual paragraphs in a document, the named members of the GridStyleCollection object provide an overall display template for a C1TrueDBGrid or C1TrueDBDropDown control. However, to customize the appearance of individual Split or C1DisplayColumn objects, modify the appropriate Style object property:

CaptionStyle | Controls the caption style for an object.
EditorStyle | Controls the editor style for an object.
EvenRowStyle | Controls the row style for even-numbered rows.
FilterBarStyle | Controls the style of the columns in the filter bar.
FooterStyle | Controls the footing style for an object.
HeadingStyle | Controls the heading style for an object.
HighlightRowStyle | Controls the marquee style when set to Highlight Row.
InactiveStyle | Controls the inactive heading style for an object.
OddRowStyle | Controls the row style for odd-numbered rows.
RecordSelectorStyle | Controls the record selector style for an object.
SelectedStyle | Controls the selected row/column style for an object.
Style | Controls the normal style for an object.


Modifying a Style Property Directly

Modifying a Style Property Directly

Customize the appearance of a grid component by modifying one or more members of an appropriate style property. For example, to make the grid's caption text bold, change the Font object associated with the CaptionStyle property. At design time, this is done by expanding the CaptionStyle tree node on the Properties window, expanding the Font node, and checking the Bold box. The change is committed to the grid when you click out of this particular property.

Note when switching to the GridStyle collection editor, it will be seen that the built-in Caption style has not changed.

This means that the following statements are not equivalent:

· Visual Basic

· C#

· Delphi

The first statement specializes the font of the grid's caption bar; because this is a root style, the named Caption style also changed.


Named Styles Versus Anonymous Styles

Named Styles Versus Anonymous Styles

When setting style properties at design time, it is important to understand the distinction between named styles and the anonymous styles exposed by grid properties.

Named styles provide templates that govern the appearance of the grid, its splits, and its columns. At design time, create, modify, and delete named styles using the GridStyleCollection Editor. At run time, the GridStyleCollection is used to represent the same set of named Style objects.

Anonymous styles are not members of the GridStyleCollection. However, anonymous styles are provided so that the appearance of an individual split or column can be easily and directly customized without having to define a separate named style.

The following analogy should help to clarify the distinction between named and anonymous styles. Consider a Microsoft Word document that consists of several paragraphs based on the default normal style. Suppose that one of the paragraphs is a quotation that needs to be indented and displayed in italics. If the document is part of a larger work that contains several quotations, it makes sense to define a special style for that purpose and apply it to all paragraphs that contain quotations. If the document is an early draft or is not likely to be updated, defining a style for one paragraph is overkill, and it would be more convenient to apply indentation and italics to the quotation itself.

In this analogy, specifying paragraph attributes directly is akin to setting the members of a property that returns an anonymous style. For example, to vertically center cell data within a particular grid column, modify the VerticalAlignment member of the column's Style property in the C1DisplayColumnCollection Editor.

Note that modifying an anonymous style is just like modifying a named style. Expand the desired Style object node in a property tree, and then select and edit one or more of its member properties.


Anonymous Style Inheritance

Anonymous Style Inheritance

Just as one named style can inherit font, color, and formatting characteristics from another, an anonymous style in a Split object can inherit from its counterpart in the containing C1TrueDBGrid control. Similarly, an anonymous style in a C1DisplayColumn object can inherit from its counterpart in the containing Split object. Since the C1TrueDBDropDown control does not have a Splits collection, the anonymous styles of its C1DisplayColumn objects can inherit values from the control itself.

When a grid is first created, its Style property inherits all of its attributes from the built-in Normal style, which controls the appearance of all data cells. Any changes to the Normal style are propagated to all splits, and in turn to the columns within each split. However, change the appearance of all data cells within a Split or C1DisplayColumn object by modifying the members of its anonymous Style property.

Consider the following grid layout, which uses the default values of all built-in styles and contains two identical splits.

All of the subsequent examples use this layout as a starting point. For clarity, the examples use code to illustrate the relationships between style properties and the grid's display; however, you can perform the same operations at design time using the grid's collection editors.

Example 1 - Inheriting from Containing Splits

Example 2 - Affecting Data Cells Only in the First Split

Example 3 - Affecting All Elements Only in the First Split

Example 4 - Affecting Data Cells Only in the First Column of the First Split

Example 5 - Affecting All Elements Only in the First Column of the First Split

Example 6 - Changing the Font Member of the Style Property

Example 7 - Changing the Data Cells in Only the First Split

Example 8 - Changing the Data Cells in Only the First Column of the First Split

Example 9 - Setting the Alignment Property of C1DisplayColumn objects

Example 10 - Setting the Alignment for Column Headers


Example 1 - Inheriting from Containing Splits

Example 1 - Inheriting from Containing Splits

Since the default values of all built-in styles are in effect, columns inherit from their containing splits, which in turn inherit from the grid as a whole. Therefore, this statement affects not only data cells, but also all headers, footers, and caption bars. This statement has the same visual effect as changing the Normal style directly using the GridStyle Collection Editor; however, the built-in Normal style itself is not changed.

· Visual Basic

· C#

· Delphi

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Example 2 - Affecting Data Cells Only in the First Split

Example 2 - Affecting Data Cells Only in the First Split

In this example, only the data cells of the first split are affected. This is because the split caption, column headers, and column footers inherit their fonts from the built-in styles Caption, Heading, and Footing, respectively.

· Visual Basic

· C#

· Delphi

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Example 3 - Affecting All Elements Only in the First Split

Example 3 - Affecting All Elements Only in the First Split

This example extends the previous one to render all elements of the first split in bold. In addition to the Style property, it is necessary to set the CaptionStyle, HeadingStyle, and FooterStyle properties.

· Visual Basic

· C#

· Delphi

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Example 4 - Affecting Data Cells Only in the First Column of the First Split

Example 4 - Affecting Data Cells Only in the First Column of the First Split

Previous Next

In this example, only the data cells of the first column of the first split are affected. This is because the column headers and column footers inherit their fonts from the built-in styles Heading and Footing, respectively.

· Visual Basic

· C#

· Delphi

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Example 5 - Affecting All Elements Only in the First Column of the First Split

Example 5 - Affecting All Elements Only in the First Column of the First Split

Previous Next

This example extends the previous one to render all elements of the first column of the first split in bold. In addition to the Style property, it is necessary to set the HeadingStyle and FooterStyle properties.

· Visual Basic

· C#

· Delphi

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Example 6 - Changing the Font Member of the Style Property

Example 6 - Changing the Font Member of the Style Property

In the first example, setting the Font member of the grid's Style property affected the entire grid, including each caption bar, column header, and column footer. However, the same is not true of the BackColor and ForeColor properties. Since the built-in Caption, Heading, and Footing styles override both of these properties, only the data cells of the grid are displayed with a dark gray background.

· Visual Basic

· C#

· Delphi

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Example 7 - Changing the Data Cells in Only the First Split

Example 7 - Changing the Data Cells in Only the First Split

In this example, only the data cells of the first split are affected. This is because the split caption, column headers, and column footers inherit their background colors from the built-in styles Caption, Heading, and Footing, respectively.

· Visual Basic

· C#

· Delphi

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Example 8 - Changing the Data Cells in Only the First Column of the First Split

Example 8 - Changing the Data Cells in Only the First Column of the First Split

Previous Next

In this example, only the data cells of the first column of the first split are affected. This is because the column headers and column footers inherit their background colors from the built-in styles Heading and Footing, respectively.

· Visual Basic

· C#

· Delphi

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Example 9 - Setting the Alignment Property of C1DisplayColumn objects

Example 9 - Setting the Alignment Property of C1DisplayColumn objects

Previous Next

Setting the HorizontalAlignment property of a C1DisplayColumn object affects not only its data cells, but also its header and footer. The reason for this is that the default setting of the HorizontalAlignment property for the built-in Heading and Footing styles, which is inherited from Normal, is set to AlignHorzEnum.General. For data cells, the general setting means that the underlying data type determines whether the cell text is left, center, or right aligned; for column headers and footers, the general setting means that the column's data cell alignment should be followed.

· Visual Basic

· C#

· Delphi

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Example 10 - Setting the Alignment for Column Headers

Example 10 - Setting the Alignment for Column Headers

This example illustrates the distinction between general and specific alignment for column headers and footers. If the HorizontalAlignment member of the HeadingStyle (or FooterStyle) property is not set to AlignHorzEnum.General, then the header (or footer) is aligned independently of the data cells.

· Visual Basic

· C#

· Delphi

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Applying Styles to Cells

Applying Styles to Cells

True DBGrid for .NET provides three ways to control the display characteristics of individual cells:

By Status | Each grid cell has a cell status that identifies its disposition (any combination of current, modified, part of a selected row, or part of a highlighted row). Using the AddCellStyle method, set style attributes that apply to any possible combination of cell status values.
By Contents | Specify a pattern (called a regular expression) that is used to perform pattern matching on cell contents. When the contents match the pattern supplied in the AddRegexCellStyle method, True DBGrid will automatically apply pre-selected style attributes to the cell.
By Custom Criteria | Using the FetchCellStyle (or FetchRowStyle) event, make decisions about cell colors and fonts each time a cell (or row) is displayed.

Use Style objects defined at design time as arguments to the AddCellStyle and AddRegexCellStyle methods. Or, create a temporary style in code and use it to specialize one or more attributes.

The FetchCellStyle and FetchRowStyle events pass a temporary Style object as the final parameter. By setting its properties, control the appearance of the cell specified by the other event parameters.

In this version of True DBGrid, per-cell font and color control can only be achieved by writing code. However, by creating styles at design time, this code is kept to a minimum. To learn how to create named styles at design time, see Using the GridStyleCollection Editor.

Specifying Cell Status Values

Applying Cell Styles by Status

Applying Cell Styles by Contents

Applying Cell Styles by Custom Criteria

Cell Style Evaluation Order

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Specifying Cell Status Values

Specifying Cell Status Values

True DBGrid recognizes 16 distinct cell status values that are used in code to indicate the disposition of a cell. A cell status value is a combination of four separate conditions. These conditions are enumerations which have the flag attribute, which means that they can be combined with the Or operator:

Current Cell | The cell is the current cell as specified by the Bookmark, Col, and SplitIndex properties. At any given time, only one cell can have this status. When the floating editor MarqueeStyle property setting is in effect, this condition is ignored.
Marquee Row | The cell is part of a highlighted row marquee. When the MarqueeStyle property indicates that the entire current row is to be highlighted, all visible cells in the current row have this additional condition set.
Updated Cell | The cell contents have been modified by the user but not yet written to the database. This condition is also set when cell contents have been modified in code with the Text or Value properties.
Selected Row | The cell is part of a row selected by the user or in code. The SelectedRowCollection contains a bookmark for each selected row.

True DBGrid defines the following constants corresponding to these cell conditions:

CellStyleFlag.CurrentCell | Applies to the current cell.
CellStyleFlag.MarqueeRow | Applies to cells in a highlighted row marquee.
CellStyleFlag.UpdatedCell | Applies to cells that have been modified.
CellStyleFlag.SelectedRow | Applies to cells in a selected row.

True DBGrid also defines the following constants, which are not meant to be combined with those listed earlier:

CellStyleFlag.AllCells | Applies to all cells.
CellStyleFlag.NormalCell | Applies to cells without status conditions.

Use AllCells to refer to all cells regardless of status. Use NormalCell to refer to only those cells without any of the four basic cell conditions described earlier.


Applying Cell Styles by Status

Applying Cell Styles by Status

Each cell in the True DBGrid display has a status value which identifies its disposition (any combination of current, modified, part of a selected row, or part of a highlighted row). Using the AddCellStyle method, set style attributes that apply to any possible combination of cell status values. The AddCellStyle method is supported by the C1TrueDBGrid, C1TrueDBDropDown, Split, and C1DisplayColumn objects, enabling the range of cells for which certain conditions apply to be controlled.

For each unique status combination, you can set the color, font, and picture attributes to be used for cells of that status. When a cell's status changes, True DBGrid checks to see if any style property overrides are defined for that cell, and applies those attributes to the cell when it is displayed. Style objects are used to specify the color and font for a cell, as in the following example:

· Visual Basic

· C#

· Delphi

Here, a new temporary style object is created to specify the color and font overrides (red text, bold) to be applied to the current cell throughout the entire grid. Since the style object's BackColor property is not set explicitly, the background color of the current cell is not changed.

Also use styles defined at design time as arguments to the AddCellStyle method:

· Visual Basic

· C#

· Delphi

The preceding example can be simplified since the AddCellStyle method accepts a style name as well as an actual style object:

· Visual Basic

· C#

· Delphi

All of the preceding examples cause the text of the current cell to appear in red and bold. However, it is important to note that the status CurrentCell applies only to cells that have only this status. Thus, cells that are current but also updated (CurrentCell + UpdatedCell) will not be displayed in red and bold unless the following statement is executed:

· Visual Basic

· C#

· Delphi

Note: The current cell status is only honored when the MarqueeStyle property is not set to MarqueeEnum.Floating Editor. The floating editor marquee always uses the system highlight colors as determined by Control Panel settings.

Although this method of specifying cell conditions offers more control and flexibility, it also requires that additional code be written for some common cases.

Calls to AddCellStyle take effect immediately, and can be used for interactive effects as well as overall grid characteristics.


Applying Cell Styles by Contents

Applying Cell Styles by Contents

True DBGrid can automatically apply colors and fonts to particular cells, based upon their displayed contents. To do so, provide a pattern, called a regular expression that the grid tests against the displayed value of each cell. Using the AddRegexCellStyle method, associate a regular expression with a set of style attributes, and then apply them to any possible combination of cell status values. The AddRegexCellStyle method is supported by the C1TrueDBGrid, C1TrueDBDropDown, Split, and C1DisplayColumn objects, allowing the range of cells for which certain conditions apply to be controlled.

The AddRegexCellStyle method is similar to the AddCellStyle method, but it requires an additional argument for the regular expression string. As with AddCellStyle, use either temporary or named styles. The following example uses a temporary style to display all cells in the first column that contain the string "Windows" in bold:

· Visual Basic

· C#

· Delphi

This feature allows the implementation of "visual queries" that attach distinctive font or color attributes to cells that match a certain pattern.


Applying Cell Styles by Custom Criteria

Applying Cell Styles by Custom Criteria

For cases where regular expressions are insufficient to express formatting requirements, use the FetchCellStyle event to customize fonts and colors on a per-cell basis. This event will only be fired for columns that have the FetchStyle property set to True.

For example, provide color coding for values that fall within a certain range. The following code assumes that the FetchStyle property is True for a single column of numeric data, and handles the FetchCellStyle event to display values greater than 1000 in blue:

· Visual Basic

· C#

· Delphi

The Split, Row, and Col arguments identify which cell the grid is displaying. The CellStyle argument conveys formatting information from the application to the grid. Since the CellStyle argument is a Style object, a cell's font characteristics can also be changed in the FetchCellStyle event:

· Visual Basic

· C#

· Delphi

The FetchCellStyle event can also be used to apply formatting to one cell based upon the values of other cells, or even other controls. For example, suppose that you want to:

· Make the cell text red in column 4 if column 1 minus column 2 is negative.

· Make the cell text bold in column 7 if it matches the contents of a text box.

In this case, set the FetchStyle property to True for columns 4 and 7, and handle the FetchCellStyle event as follows:

· Visual Basic

· C#

· Delphi

For efficiency reasons, only set FetchStyle to True for columns that you plan to handle in the FetchCellStyle event.

Note: The preceding examples use the CellText method for simplicity. However, the CellText and CellValue methods always create and destroy an internal clone of the dataset each time they are called, which may make them too inefficient to use in the FetchCellStyle event. To improve the performance of the grid's display cycle, try an unbound application. Unbound applications can access the underlying data source directly, which is generally faster than calling CellText or CellValue.

To customize fonts and colors on a per-row instead of a per-cell basis, use the FetchRowStyle event, which will only be fired once per row for grids that have the FetchRowStyles property set to True. The syntax for this event is as follows:

· Visual Basic

· C#

· Delphi

Although the FetchRowStyle event can be used to implement an alternating row color scheme, an easier and more efficient way to accomplish the same task would be to use the AlternatingRows property, together with the built-in EvenRow and OddRow styles.


Cell Style Evaluation Order

Cell Style Evaluation Order

The following list defines the order in which cell styles are applied relative to the anonymous styles of a grid, split, or column.

1. Style property, C1TrueDBGrid control. The default named parent of this anonymous style is Normal.

2. Style property, Split object. By default, this anonymous style inherits from its C1TrueDBGrid control counterpart.

3. EvenRowStyle and OddRowStyle properties, Split object. By default, these anonymous styles inherit from their C1TrueDBGrid control counterparts, which in turn have default named parents of EvenRow and OddRow. These properties apply only if the AlternatingRows property is True.

4. Style property, C1DisplayColumn object. By default, this anonymous style inherits from its Split object counterpart.

5. FetchRowStyle event. This event fires only if the FetchRowStyles property is True for a grid or split.

6. SelectedStyle property, Split object. By default, this anonymous style inherits from its C1TrueDBGrid control counterpart, which in turn has a default named parent of Selected. This property applies only to selected rows; that is, rows whose bookmarks have been added to the SelectedRowCollection through code or user interaction.

7. HighlightRowStyle property, Split object. By default, this anonymous style inherits from its C1TrueDBGrid control counterpart, which in turn has a default named parent of HighlightRow. This property applies only to highlighted rows,, the current row in a grid or split whose MarqueeStyle property is set to MarqueeEnum.HighlightRow or MarqueeEnum.HighlightRowRaiseCell.

8. AddCellStyle and AddRegexCellStyle methods, if called. Cell styles specified at the C1DisplayColumn object level have the highest priority, followed by those specified at the Split object and C1TrueDBGrid control levels. Within an object level, cell styles are tested in the order in which they were added in code. Cell styles do not inherit from one another; as soon as a match is found, testing stops.

9. FetchCellStyle event. This event fires only if the FetchStyle property is True for a C1DisplayColumn object.

Thus, you always have final control over the rendering of a cell via the FetchCellStyle event.


Applying Pictures to Grid Elements

Applying Pictures to Grid Elements

In earlier versions of True DBGrid, styles were used to specify font, color, and alignment attributes. This version extends the concept of styles to include background and foreground pictures, enabling adornments to be added to headers, footers, and caption bars, specify a background pattern for data cells, and render picture data in cells without having to populate a ValueItems object. The following properties of the Style object determine how pictures are displayed:

BackgroundImage | Sets/returns a style's background picture.
BackgroundPictureDrawMode | Controls how a style's background picture is displayed.
ForeGroundImage | Sets/returns a style's foreground picture.
ForegroundPicturePosition | Controls how a style's foreground picture is positioned.

Since picture properties follow the same inheritance rules as other style attributes, any technique described earlier in this chapter also works with pictures. This means that pictures can be attached to a grid element using any of the following methods:

· Setting the BackgroundImage or ForeGroundImage property of a built-in named style at design time or run time.

· Setting the BackgroundImage or ForeGroundImage property of an anonymous style at design time or run time.

· Calling the AddCellStyle or AddRegexCellStyle method.

· Writing a handler for the FetchCellStyle or FetchRowStyle event.


Displaying Background Pictures

Displaying Background Pictures

Use background pictures to customize static grid elements such as caption bars, column headers, and column footers. For example, the following code applies a colored gradient bitmap to the BackgroundImage member of the Style object returned by the grid's CaptionStyle property:

· Visual Basic

· C#

· Delphi

This code also adjusts the color of the caption text and makes it bold, producing the following display.

Achieve the same effect at design time by editing either the built-in Caption style on the GridStyleCollection Editor, or the members of the CaptionStyle property in the Properties window.

By default, background pictures are centered within the associated grid element. Depending upon the height of the background bitmap, adjust the value of the BackgroundPictureDrawMode property to ensure that the entire area is filled. This property determines whether the picture is centered, tiled, or stretched to fit the entire area, as shown in the following figure.

Also use background pictures within data cells to produce interesting visual effects. For example, the following patterns were designed to be replicated in adjacent rows.

By eliminating the record selector column, the dividing lines between data rows, and the column header dividers, these patterns can be used to produce the following display.

The trick is to insert an empty unbound column on the left to display the binder rings, as the following code sample demonstrates:

· Visual Basic

· C#

· Delphi

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Displaying Foreground Pictures

Displaying Foreground Pictures

Use foreground pictures to add visual cues to static grid elements such as caption bars, column headers, and column footers. Foreground Pictures are specified by the ForeGroundImage property of the Style. Foreground pictures can be displayed beside some text or in place of it, but cannot be displayed over text. For an example of Foreground picture positions, see below.

Foreground pictures have the ForegroundPicturePosition property, which specifies where a foreground picture is situated in comparison to the cell text. The values and their representations are displayed below:


Cell Editing Techniques

Cell Editing Techniques

This chapter explains how to customize the behavior of cell editing in True DBGrid for .NET. For text entry fields, write code in the grid's editing events, specify an input mask template, or display a drop-down text editor for long strings. To provide a list of choices for the user, use the ValueItemCollection object, the C1TrueDBDropDown control, or even an arbitrary intrinsic or third-party control.

How Cell Editing Works

Handling Editing Events

Working with Text

Input Masking

In-Cell Buttons

Drop-down Controls

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


How Cell Editing Works

How Cell Editing Works

True DBGrid for .NET provides many features for customizing and controlling in-cell editing. The grid's default editing behavior depends on the setting of the MarqueeStyle property. If the floating editor marquee style is used, the editing behavior differs from that of other marquee styles. The following sections summarize True DBGrid's editing behavior and state any exceptions that arise when using the floating editor.

For more information on the MarqueeStyle property, see Highlighting the Current Row or Cell.

Initiating Cell Editing

Color and Wordwrap

Determining Modification Status

Determining Cell Contents

Terminating Cell Editing

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Initiating Cell Editing

Initiating Cell Editing

A cell is either in display or edit mode. The EditActive property sets and returns the desired mode. Place the current cell in edit mode by setting EditActive to True, or end editing by setting it to False. The user may enter edit mode by clicking once on the current cell or by pressing the F2 key. A blinking text cursor (caret) will appear in the cell—at the beginning of the text when the cell is clicked and at the end when the F2 key is used. The BeforeColEdit event will be triggered when the cell enters edit mode. The EditActive property is True when the cell is in edit mode.

Floating Editor Differences: A blinking caret already exists at the beginning of the cell highlight even when in display mode. To enter edit mode, the user can click on any character location within the cell text to specify the text insertion point. The BeforeColEdit event is not triggered and the EditActive property is False until the user has made changes to the cell text.


Color and Wordwrap

Color and Wordwrap

In edit mode, the cell color is determined by the ForeColor and BackColor properties of the EditorStyle style object. The text being edited will wordwrap, regardless of the setting of the column style’s WrapText property. If the text is too big to fit into the cell, a built-in drop-down edit control will automatically appear. For more information, see Working with Text.

Floating Editor Differences: In edit mode, the text highlight disappears, and the cell color is the same as the normal cell color. The text being edited is wordwrapped only if the column style’s WrapText property is True. The built-in drop-down edit control is not available.


Determining Modification Status

Determining Modification Status

While editing is in progress, inspect the DataChanged property of the grid to determine whether the user has made any changes to the current row.

Set the grid's DataChanged property to False to exit editing, discard all changes to the current row, and refresh the current row display from the data source.

The icon in the record selector column of the current row reflects the status of the grid's DataChanged property. If DataChanged is False, a triangle-shaped arrow will be shown in the record selector column. If DataChanged is True, a pencil icon will appear instead.


Determining Cell Contents

Determining Cell Contents

While editing is in progress, the column's Text and Value properties contain the text the user currently sees in the modified row. Whenever the user presses a key, the Change event fires to notify the application that the user has just modified the current cell. However, the Change event does not mean the user is finished with the process, only that a single change has been made and the grid is still in edit mode.

The Change event does not fire when the grid is not in edit mode, such as when the contents of a cell are changed through code or when the user clicks a cell to cycle through ValueItem objects.


Terminating Cell Editing

Terminating Cell Editing

The user completes the editing process by performing any of the following:

· Pressing the ENTER key.

· Pressing the ESC key.

· Moving to another cell with the arrow keys, the TAB key, or the mouse.

· Setting focus to another control on the form.


Handling Editing Events

Handling Editing Events

The following sections describe the default editing behavior of True DBGrid for .NET can be altered by responding to its events.


Standard Keystroke Events

Standard Keystroke Events

True DBGrid supports the standard keystroke events contained in the .NET environment:

KeyDown | Fired when the user presses a key.
KeyPress | Fired when the user presses an ANSI key.
KeyUp | Fired when the user releases a key.

The KeyDown and KeyUp events trap all keys, including function keys, ALT and SHIFT keys, and numeric keypad keys. The KeyPress event only traps letters and numbers, punctuation marks and symbols, and editing keys such as TAB, ENTER, and BACKSPACE.

Use these events to restrict and modify user input as you would be done for any other intrinsic .NET control. For example, the following KeyDown event handler prevents the user from entering non-alphanumeric characters:

· Visual Basic

· C#

· Delphi

For more information on these or any other native .NET events see MSDN or .NET help.


Column Editing Events

Column Editing Events

True DBGrid provides full control over the cell editing process with the following events, listed in the order in which they occur during a successful editing attempt:

BeforeColEdit | Fired upon an attempt to edit column data.
ColEdit | Fired when the current cell enters edit mode.
AfterColEdit | Fired after column data is edited.

Use the BeforeColEdit event to control the editability of cells on a per-cell basis, or to translate the initial keystroke into a default value.

The ColEdit event signals that the current cell has entered edit mode; the AfterColEdit event signals that edit mode was terminated. Use these two events to provide additional feedback while editing is in progress:

· Visual Basic

· C#

· Delphi

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Changing Cell Contents with a Single Keystroke

Changing Cell Contents with a Single Keystroke

The BeforeColEdit event is an extremely versatile way to customize the behavior of True DBGrid editing. BeforeColEdit is fired before any other editing events occur, which provides the opportunity to do virtually anything desired before editing begins. For example, cancel the edit request and override the built-in text editor with your own drop-down list box.

A True DBGrid control can enter edit mode in one of four ways:

1. If the user clicks on the current cell with the mouse, editing begins with the current cell contents.

2. If the user presses the F2 key, editing also begins using the current cell contents.

3. If the user begins typing, the typed character replaces the contents of the cell and editing begins.

4. You can set the EditActive property in your code to force editing to begin.

The BeforeColEdit event fires in cases 1, 2, and 3, but not in case 4, since True DBGrid assumes you will never want to cancel a request made from code.

To differentiate a user's edit request based upon whether he or she used the mouse or the keyboard to start editing, set BeforeColEdit to KeyChar, which will be zero if the user clicked on the cell with the mouse, and will be an ASCII character if the user typed a character to begin editing.

When BeforeColEdit is fired, the ASCII character has not yet been placed into the current cell, so if editing in BeforeColEdit is cancelled, the ASCII key is discarded. This leads to an interesting technique.

Assume a Boolean field called Done exists, and its NumberFormat property is set to specify Yes/No as the display format. Further assume that, when the user presses Y or N, the cell contents change immediately instead of entering edit mode. This process is accomplished in BeforeColEdit as follows:

· Visual Basic

· C#

· Delphi

Note that the event handler terminates when KeyAscii is zero, so mouse editing is still permitted.


Working with Text

Working with Text

This section briefly describes the properties related to text editing.


Limiting the Size of Data Entry Fields

Limiting the Size of Data Entry Fields

Use the DataWidth property of a C1DataColumn object to restrict the number of characters the user can enter. Setting this property to zero imposes no limits.


Providing a Drop-down Edit Control for Long Fields

Providing a Drop-down Edit Control for Long Fields

Whenever the user attempts to edit cell text that is too big to fit within the cell, the grid will automatically activate a multiple-line drop-down text editor. While editing, text in the drop-down edit control will be wordwrapped regardless of the setting of the column style’s WrapText property. The drop-down text editor can be turned off and editing can be forced to occur within cell boundaries by setting the grid's EditDropDown property to False (the default is True). The drop-down text editor is not available if the grid's MarqueeStyle property is set to 6 - Floating Editor. The following code uses the grid's built-in column button feature to activate the drop-down edit control to modify the cell data in the Comments column:

· Visual Basic

· C#

· Delphi

If the current cell is in the Comments column, initiate editing either by clicking on the current cell or by clicking the built-in button.


Selecting and Replacing Text

Selecting and Replacing Text

True DBGrid for .NET supports the standard text selection properties found in many TextBox type controls:

SelectionLength | Sets/returns the length of the selected text.
SelectionStart | Sets/returns the start position of the selected text.
SelectedText | Sets/returns the selected text.

Note: These properties are only effective when the grid is in edit mode, that is, when its EditActive property is True.


Input Masking

Input Masking

Use the NumberFormat property to control the display format of column data. If users need to edit a formatted column, it is desirable to maintain a consistent format during the editing process. True DBGrid for .NET provides an EditMask property that optionally works in concert with the NumberFormat property to ensure consistent data entry.


Specifying an Input Mask for a Column

Specifying an Input Mask for a Column

The EditMask property of the C1DataColumn object is used to specify an input mask template for end-user data entry. The input mask string is composed of special characters that represent either an input character that the user must enter, or a literal character that will be skipped over on input. Valid template characters are as follows:

The EditMask must be a string composed of the following symbols:

1. Wildcards

0 digit

9 digit or space

# digit or sign

L letter

? letter or space

A letter or digit

a letter, digit, or space

& any character

2. Localized characters

. localized decimal separator

, localized thousand separator

: localized time separator

/ localized date separator

3. Command characters

\ next character is taken as a literal

> translate letters to uppercase

< translate letters to lowercase

For example:

· Visual Basic

· C#

· Delphi

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Using an Input Mask for Formatting

Using an Input Mask for Formatting

Whereas the EditMask property is used to specify an input mask for data entry, the NumberFormat property is used to specify the display format of data in a grid cell. If the NumberFormat property of the column is not specified, the grid simply displays the cached text (stripped of literals) as is; if the NumberFormat property is specified, the grid sends the cached text to the display formatter.

Since it is common for the input and display formats to be the same, the NumberFormat property has an Edit Mask option. If this option is selected, then the EditMask property setting will be used for both data input and display. However, the input and display formats need not be the same, so a NumberFormat option that differs from the EditMask property can be selected.


Controlling How Masked Input is Updated

Controlling How Masked Input is Updated

Normally, after the user finishes editing a cell in a column which has its EditMask property set, True DBGrid caches the modified cell text, but any literal characters in the input mask template will be stripped from the modified cell text beforehand. However, this behavior can be overridden with the EditMaskUpdate property.

By default, the EditMaskUpdate property is False. This means that when the modified cell text is updated to the database, the grid sends the cached text (stripped of literals), not the formatted text displayed in the cell. Override this default behavior by setting the EditMaskUpdate property to True, which causes the cached text to be formatted according to the EditMask property before being updated to the database.

Therefore, it is important to set EditMaskUpdate properly to ensure that the correct data is sent to the database for update.


In-Cell Buttons

In-Cell Buttons

True DBGrid for .NET supports a variety of in-cell button options for the current cell or for all cells within specified columns. Use in-cell buttons to indicate that a list of choices is available, to perform a command associated with the contents of the cell, or to display an arbitrary control or form for editing.

Enabling the In-Cell Button

Rendering Cells as Command Buttons

Detecting In-Cell Button Clicks

Customizing the In-Cell Button Bitmap

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Enabling the In-Cell Button

Enabling the In-Cell Button

To enable the in-cell button for a C1DisplayColumn object, set its Button property to True in code:

· Visual Basic

· C#

· Delphi

The Button property is also enabled when the column's DropDown property is set to the name of a C1TrueDBDropDown control, or when the Presentation property of the associated ValueItemCollection object is set to one of the combo box options.

By default, the in-cell button displays only for the current cell, as shown in the following figure.

However, by setting the column's ButtonAlways property to True, force the in-cell button to be displayed in every row.


Rendering Cells as Command Buttons

Rendering Cells as Command Buttons

To render the current cell as a non-editable command button within a C1DisplayColumn object, set its ButtonText property to True in code:

· Visual Basic

· C#

· Delphi

When a cell within the column receives focus, it is rendered as a standard Windows command button using the cell text as the caption. The cell text is not centered automatically, but respects the column's horizontal and vertical alignment settings.

If both the Button and ButtonText properties are True, the ButtonText property takes precedence.

As with the default in-cell button, set the column's ButtonAlways property to True to force all of its cells to be displayed as command buttons. Only the current cell is drawn with a focus rectangle, however.


Detecting In-Cell Button Clicks

Detecting In-Cell Button Clicks

The ButtonClick event is provided so that code can respond when the user clicks the in-cell button. Its syntax is as follows:

· Visual Basic

· C#

· Delphi

In-cell buttons always fire this event when clicked, regardless of whether they were enabled by the Button or ButtonText properties. An example of the ButtonClick event was presented earlier in the section Working with Text.


Customizing the In-Cell Button Bitmap

Customizing the In-Cell Button Bitmap

By default, True DBGrid uses a down arrow for the in-cell button.

However, the button bitmap can be changed for a C1DisplayColumn object at design time by setting the ButtonPicture property in code:

· Visual Basic

· C#

· Delphi

The grid automatically draws the edges corresponding to the button's up/down states as appropriate, so only the interior image of the button needs to be provided. A light gray background is recommended.


Drop-down Controls

Drop-down Controls

True DBGrid for .NET offers a wide variety of built-in controls and programming constructs that enable you to implement virtually any kind of drop-down cell editing interface. Use the ValueItems object and its collection of ValueItem objects to provide a simple pick list, or the C1TrueDBDropDown control to implement a data-aware multicolumn combo box. Arbitrary Visual Basic or third-party controls can be used to perform specialized editing functions.

Using the Built-in Combo Box

Detecting Built-in Combo Box Selections

Using the C1TrueDBDropDown Control

Automatic Data Translation with C1TrueDBDropDown

Using an Arbitrary Drop-down Control

Using the Built-in Column Button

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Using the Built-in Combo Box

Using the Built-in Combo Box

The C1DataColumn object's ValueItems object optionally provides a built-in combo box interface that works in concert with its automatic data translation features. By default, the Presentation property is set to 0 - Normal, and the usual cell editing behavior is in effect for textual data. However, if the Presentation property is set to either PresentationEnum.ComboBox or PresentationEnum.SortedComboBox, then cells in the affected column display the in-cell button upon receiving focus. When the user clicks the in-cell button, a drop-down combo box appears.

The drop-down combo box contains one item for each member of the ValueItemCollection object. If the collection's Translate property is True, then the DisplayValue text is used for the combo box items; if it is False, then the Value text is used.

True DBGrid automatically sizes the drop-down combo box to fit the width of the column in which it is displayed. The height of the combo box is determined by the number of items in the collection and the MaxComboItems property. If the number of items is less than or equal to MaxComboItems, which has a default value of 5, then all value items will be shown. If the number of items exceeds MaxComboItems, only MaxComboItems will be shown, but a scroll bar will appear at the right edge of the combo box to allow users to bring the other items into view.


Detecting Built-in Combo Box Selections

Detecting Built-in Combo Box Selections

The ComboSelect event is fired when the user selects an item from the built-in combo box. This event is useful for determining the contents of the cell before the user exits edit mode.

Since the items displayed in the built-in combo box are often the only allowable values for the underlying data source, you may need to prevent your users from typing in the cell after making a selection. By setting the C1DisplayColumn property DropDownList equal to True, the attached C1TrueDBDropDown control will now be limited to use only as a listbox. No new values or changes will be allowed in the drop-down and so the underlying database cannot be updated with false information.


Using the C1TrueDBDropDown Control

Using the C1TrueDBDropDown Control

The built-in drop-down combo box described in the preceding example is most useful when the allowable values are both known in advance and relatively few in number. A large collection of ValueItem objects can be unwieldy to maintain at design time, and requires substantial coding to set up at run time. Moreover, the built-in combo box cannot be bound to a data control and be populated automatically.

Using the techniques outlined later in this chapter, set up a secondary C1TrueDBGrid control to be used as a drop-down. However, to display a list of values from another data source, the C1TrueDBDropDown control offers a more elegant solution, as it was designed explicitly for that purpose and can be set up entirely at design time.

To use the drop-down control, set the DropDown property of a grid column to the C1TrueDBDropDown control at either design time or run time. At run time, when the user clicks the in-cell button for that column, the C1TrueDBDropDown control will appear below the grid's current cell. If the user selects an item from the drop-down control, the grid's current cell is updated.

Since the C1TrueDBDropDown control is a subset of C1TrueDBGrid, it shares many of the same properties, methods, and events. However, the following two properties are specific to the C1TrueDBDropDown control:

DataField | Not to be confused with the DataField property of a C1DataColumn object, this property specifies the drop-down column used to update the associated grid column when a selection is made.
ListField | This property specifies the name of the drop-down column to be used for incremental search.

When a C1TrueDBDropDown control becomes visible, its DropDownOpen event fires. Similarly, when the user makes a selection or the control loses focus, its DropDownClose event fires.


Automatic Data Translation with C1TrueDBDropDown

Automatic Data Translation with C1TrueDBDropDown

Suppose a grid drop-down is needed using data that contains a value and a corresponding text representation, as in the following figure:

In this situation, you may not want the user to see the somewhat ambiguous TypeId, but instead want the more understandable TypeDesc to show in the drop-down. The ValueTranslate property automatically maps the TypeId value to the TypeDesc representation. In this way, when the user accesses the drop-down, it will display the TypeDesc text.


Using an Arbitrary Drop-down Control

Using an Arbitrary Drop-down Control

Normally, True DBGrid's default editing behavior is sufficient for most applications. In some cases, however, you may want to customize this behavior. One valuable technique is to use a drop-down list or combo box, or even another True DBGrid control, to allow selection from a list of possible values. This is easy to do with True DBGrid using virtually any Visual Basic or third-party control. The general approach follows, and a working example is given in Tutorial 9.

In general, displaying a drop-down list or combo instead of the standard True DBGrid editor involves the following steps:

1. True DBGrid fires the BeforeColEdit event each time the user wants to edit a cell. To override the default editing process, cancel True DBGrid's default editor by setting the Cancel argument to True. Put code in BeforeColEdit to display the editing control you wish to show instead. Typically, you place the substitute editing control or drop-down on the same form as the grid, but make it invisible until you need it.

2. When BeforeColEdit is triggered, there are five properties and one method that can be used to determine the exact coordinates of the cell that is to be edited. The properties are Left (applies to grid and column), Top (grid and column), CellTop (column only, used with multiple line displays), Width (column only), and RowHeight (grid only). The method is RowTop (grid only). Use these properties and method to position the custom editing control or drop-down relative to a grid cell. For example, place a ListBox control at the right edge of a cell and align its top border with that of the cell using the following code:

· Visual Basic

· C#

· Delphi

3. Put code in the drop-down or combo which completes the editing process by assigning the selected value to the Text or Value property of the column being edited.

This method does not work, however, when the grid's MarqueeStyle property is set to the value of 6 - Floating Editor. When the floating editor marquee is used, the BeforeColEdit event does not fire until the cell has been changed by the user. However, use the built-in column button feature to activate the drop-down as described in the next section.

For illustrations of other MarqueeStyle settings, see Highlighting the Current Row or Cell. An example of dropping down a Visual Basic ListBox control from a grid cell is given in Tutorial 9.


Using the Built-in Column Button

Using the Built-in Column Button

An alternative way to drop-down a control from a cell is to use True DBGrid's built-in column button feature. If a column's Button property is set to True, a button will be displayed at the right edge of the current cell when it is in that column. Clicking the button fires the grid's ButtonClick event. Drop-down a control from the cell using code inside the ButtonClick event. Also use this event to trigger any action or calculation inside the cell.

For more information, see In-Cell Buttons.


True DBGrid Samples

True DBGrid Samples

Please be advised that this ComponentOne software title is accompanied by various sample projects and/or demos, which may or not make use of other ComponentOne development tools. While the sample projects and/or demos included with the software are used to demonstrate and highlight the product’s features, and how the control may be integrated with the rest of the ComponentOne product line, some of the controls used in the demo/sample project may not be included with the purchase of certain individual products.

The ComponentOne Samples are also available at http://helpcentral.componentone.com/ProductResources.aspx?View=Samples.


Visual Basic and C# Samples

Visual Basic and C# Samples

AggreGateFooter | Using notifications to customize the grids footer. This sample uses the C1TrueDBGrid control.
AutoFilter | Using C1TrueDBDropdown in the filterbar. This sample uses the C1TrueDBGrid and C1TrueDBDropdown controls.
CustomFiltering | Roll your own filtering for the grid. This sample uses the C1TrueDBGrid control.
CustomSorting | Roll your own sorting. This sample uses the C1TrueDBGrid control.
DataTimePicker | How to use a datetimepicker control in the grid for date columns. This sample uses the C1TrueDBGrid control.
FindRow | How to find a row in the underlying datasource. This sample uses the C1TrueDBGrid control.
HyperLink | Add hyperlinks to cells. This sample uses the C1TrueDBGrid control.
IncrementalSearch | Add incremental search to the grid. This sample uses the C1TrueDBGrid control.
MultipleLayouts | How to store multiple layout files. This sample uses the C1TrueDBGrid control.
SettingCellToNull | How to set the underlying datasource value to null. This sample uses the C1TrueDBGrid control.
ToggleGroupRows | Programmatically expand/collapse rows in a grouped grid. This sample uses the C1TrueDBGrid control.
TriStateCheckBox | How to add a tristate checkbox to the grid. This sample uses the C1TrueDBGrid control.
UsingC1TDBDropdown | How to use C1TrueDBDropdown to map IDs to Names. This sample uses the C1TrueDBGrid and C1TrueDBDropdown controls.
Zoom | Change the size of the grid. This sample uses the C1TrueDBDropdown control.


Borland Samples

Borland Samples

AutoFilter | Using C1TrueDBDropdown in the filterbar. This sample uses the C1TrueDBGrid and C1TrueDBDropdown controls.
CustomFiltering | Roll your own filtering for the grid. This sample uses the C1TrueDBGrid control.
CustomSorting | Roll your own sorting. This sample uses the C1TrueDBGrid control.
FindRow | How to find a row in the underlying datasource. This sample uses the C1TrueDBGrid control.
SettingCellToNull | How to set the underlying datasource value to null. This sample uses the C1TrueDBGrid control.
ToggleGroupRows | Programmatically expand/collapse rows in a grouped grid. This sample uses the C1TrueDBGrid control.
TriStateCheckBox | How to add a tristate checkbox to the grid. This sample uses the C1TrueDBGrid control.
Zoom | Change the size of the grid. This sample uses the C1TrueDBDropdown control.


Task-Based Help

Task-Based Help

The task-based help assumes that you are familiar with programming in Visual Studio .NET, and know how to use bound controls in general. By following the steps outlined in the help, you will be able to create projects demonstrating a variety of C1TrueDBGrid features and get a good sense of what C1TrueDBGrid can do.

Each task-based help topic also assumes that you have created a new .NET project. For additional information on this topic, see Creating a .NET Project.

Some of the examples reference the TDBGDemo.mdb which is installed in C:\Program Files\ComponentOne Studio.NET\C1TrueDBGrid\common by default.

Setting the Font Style of a Grid Cell to Bold

Setting the Background Color of a Row

Placing an Image in a Column Header

How to get the DataRow for a given row number in the grid after sorting or filtering

Adding Custom Error Checking to C1TrueDBGrid

Disabling Editing in a Specified TrueDBGrid Cell

Adding a New Row to C1TrueDBGrid

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Setting the Font Style of a Grid Cell to Bold

Setting the Font Style of a Grid Cell to Bold

1. Declare a new font variable:

· Visual Basic

· C#

· Delphi

2. Set the desired column's font to the new font variable:

· Visual Basic

· C#

· Delphi

In this example, the rows of the Country column are now Times New Roman font and bold.

For more information on specifying cell styles, see Applying Styles to Cells.


Setting the Background Color of a Row

Setting the Background Color of a Row

1. Set the FetchRowStyles property to True in the Form_Load event:

· Visual Basic

· C#

· Delphi

2. Specify the background color of the desired rows using the FetchRowStyle event:

· Visual Basic

· C#

· Delphi

In this example, each row that does not contain the word Germany has a background color of lemon chiffon.


Placing an Image in a Column Header

Placing an Image in a Column Header

At Design Time

An image can also be placed in the column header at design time using the C1DisplayColumn Collection Editor.

1. Click the ellipsis button (…) next to the Splits property of the grid in the Visual Studio Properties window. The Split Collection Editor appears.

2. Click the ellipsis button next to the DisplayColumns property to bring up the C1DisplayColumn Collection Editor.

3. Select the column header from the list of Members on the left-hand side.

4. Expand the HeadingStyle property on the right-hand side.

5. Click the ellipsis button next to the ForegroundImage property.

6. Browse for a graphic and click Open.

7. Specify the position of the graphic using the ForeGroundPicturePosition property.

At Run Time

1. Specify the image to appear in the header:

· Visual Basic

· C#

· Delphi

2. Specify where the image should appear:

· Visual Basic

· C#

· Delphi

In this example, the image appears to the left of the text in the header of the second column.


How to get the DataRow for a given row number in the grid after sorting or filtering

How to get the DataRow for a given row number in the grid after sorting or filtering

Previous Next

When sorting or filtering is applied to the grid, it uses the underlying DataView of the DataSource and DataMember. To get the Data Row for a row index after the sort or filter, you need to access the same underlying list as accessed by the grid. You can do this with the following code snippet:

· Visual Basic

· C#

· Delphi

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Adding Custom Error Checking to C1TrueDBGrid

Adding Custom Error Checking to C1TrueDBGrid

C1TrueDBGrid displays a message for any errors that occur when building a project. You must switch off the internal error handling.

1. To do this, set the Handled property to True in the Error event of the grid. It will switch off the grid's built-in error checking.

· Visual Basic

· C#

· Delphi

2. You can then add your own error-handling code. For example:

· Visual Basic

· C#

· Delphi

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Disabling Editing in a Specified TrueDBGrid Cell

Disabling Editing in a Specified TrueDBGrid Cell

You can lock individual grid cells by using the FetchCellStyle event.

1. Set the FetchStyle property of the column containing the cell to True:

· Visual Basic

· C#

· Delphi

2. Set the Locked property of the CellStyle object to True:

· Visual Basic

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Adding a New Row to C1TrueDBGrid

Adding a New Row to C1TrueDBGrid

Use the following code to add a new row to the grid programmatically:

· Visual Basic

· C#

· Delphi

In this example, a new row has been added to the TDBGDemo.mdb:

There is also a SelectedRows property which points to a collection which contains a reference to all the selected rows in the Grid.


Selecting a Row

Selecting a Row

Highlighting a row does not select the row. In order for the row to be selected, it must be added to the SelectedRowCollection. This can be done using the Add method:

· Visual Basic

· C#

· Delphi

Using this example, the current row is selected.

See Tutorial 5 for an example of the Add method being used.


Accessing the Values of the Selected Rows in the Grid

Accessing the Values of the Selected Rows in the Grid

To access the values of the selected rows in a grid, you must access the SelectedRows collection.

Use the following code to write each of the selected rows to the Debug window:

· Visual Basic

· C#

· Delphi

You can also use the grid's index to access the rows. Use the following code:

· Visual Basic

· C#

· Delphi

For this example, the following code was added to the Button1_Click event in Tutorial 5 - Selecting Multiple Rows Using Bookmarks:

· Visual Basic

· C#

· Delphi

The Last name of each composer in a selected row is returned in the Debug window:


Introduction

Introduction

Twenty-Two tutorials are presented in this chapter. The tutorials assume that you are familiar with programming in Visual Basic.NET, know what a DataSet is, and generally know how to use bound controls. The tutorials provide step-by-step instructions—no prior knowledge of True DBGrid is needed. By following the steps outlined in this chapter, you will be able to create projects demonstrating a variety of True DBGrid features, and get a good sense of what the True DBGrid can do and how to do it.

The tutorials use an Access database, TDBGDemo.mdb. The database files TDBGDemo.mdb are in the Common subdirectory of the ComponentOne Studio.NET program folder and the tutorial projects are in the Tutorial subdirectory of the True DBGrid installation directory.

We encourage you to run the tutorial projects in Visual Basic, examine the code, and experiment with your own modifications. This is the best and quickest way to realize the full potential of True DBGrid. You will find that True DBGrid is very easy to use, and it enables you to create powerful database applications.

The tutorials assume that the database file TDBGDemo.mdb is in the C:\Program Files\ComponentOne Studio.NET\common directory, and refer to it by filename instead of the full pathname for the sake of brevity.

Note: Depending on where you store the projects and database files, you may need to change the location of the TDBGDemo.mdb reference in the DataSet.


Modifying the ConnectionString

Modifying the ConnectionString

To change the location of the C1ListDemo.mdb reference, you can edit the ConnectionString property of the OleDbConnection.

1. In the Properties window, select Add Project Data Source from the drop-down box next to the DataSource property.

2. The Data Source Configuration Wizard appears. Select Database on the Choose a Data Source type page.

3. Click the New Connection button to create a new connection or choose one from the drop-down list.

4. Click the Browse button to specify the location of the data and enter the correct login information. Click the Test Connection button to make sure that you have successfully connected to the database or server and click OK. The new string appears in the on the Choose your data connection page.

5. Click the Next button to continue. A dialog box will appear asking if you would like to add the data file to your project and modify the connection string. Click the Yes button.

6. Save the connection string in the application configuration file by checking the Yes, save the connection as box and entering a name. Click the Next button to continue.

7. On the Choose your database object page, select the tables and fields that you would like in your dataset. Enter a name for your DataSet in the DataSet name box and click Finish to exit the wizard.

A DataSet and connection string are added to your project. Additionally, Visual Studio automatically creates the code to fill the DataSet.


Tutorial 1 - Binding True DBGrid to a DataSet

Tutorial 1 - Binding True DBGrid to a DataSet

In this tutorial, you will learn how to bind True DBGrid to a DataSet and create a fully functional database browser. You will also learn about the basic properties of the True DBGrid and then be able to run the program and observe the run-time features of the grid.

1. Start a new .NET project.

2. Open the toolbox, which is initially located on the left side of the IDE and has a hammer and a wrench as its icon. From the Toolbox, select the Windows Forms tab and then find the C1TrueDBGrid control on this form. The C1TrueDBGrid icon looks like the following:

Double-click on the C1TrueDBGrid icon to add the grid to Form1.

3. Go to the DataSource property and select Add Project Data Source from the drop-down. In the adapter’s Data Source Configuration Wizard, either select a connection to TDBGDemo.mdb or create a new connection to this database. On the Choose your database objects page of the wizard, select all fields in the Composer table and type "DsComposer" into the DataSet name box, and then finish out the wizard.

4. Visual Studio adds the following code to the Form_Load event:

· Visual Basic

· C#

· Delphi

5. Set the AllowAddNew and AllowDelete properties of C1TrueDBGrid1 to true (note that the default value of AllowUpdate is True).

Run the program and observe the following:

· True DBGrid retrieves the database schema information from the DataSet and automatically configures itself to display all of the fields contained in the database table. Note that the field names are used as the default column headings.

· True DBGrid automatically communicates with the DataSet. Any actions taken on the DataSet will be reflected in the grid.

· A fully functional database browser has been created by only writing four lines of simple code.

Refer to Run Time Interaction and try out the instructions for navigating, editing, and configuring the grid at run time.

To end the program, close the window or press the stop button on the Visual Basic toolbar.

Congratulations, you have successfully completed Tutorial 1!


Tutorial 2 - Using True DBGrid with SQL Query Results

Tutorial 2 - Using True DBGrid with SQL Query Results

An important feature of True DBGrid is its ability to automatically sense changes to the database at run time. In this tutorial, you will learn how to use True DBGrid to display the results of ad-hoc SQL queries. In addition, it will also outline how to set up a connection to a DataSet at run-time. Note that in order for the grid to automatically respond to field layout changes, you must not have defined any column properties at design time. If a layout is already defined, use the grid's Clear Fields context menu command to remove it. This will cause the grid to configure itself automatically at run time.

1. Start a new project.

2. Place a C1TrueDBGrid, a Command button and a Text box on the form. Rename the Text property of the command button to read “Execute SQL” and set the Text property of the TextBox to “Enter SQL statement here”:

3. Go to the DataSource property and select Add Project Data Source from the drop-down. In the adapter’s Data Source Configuration Wizard, either select a connection to TDBGDemo.mdb or create a new connection to this database. On the Choose your database objects page of the wizard, select all fields in the Composer table and type "DsComposer" into the DataSet name box, and then finish out the wizard.

4. Visual Studio will add the following code to the Form_Load event:

· Visual Basic

· C#

· Delphi

5. Add the following code to the Click event of Button1:

· Visual Basic

· C#

· Delphi

Run the program and observe the following:

As in Tutorial 1, True DBGrid retrieves the database schema information from the DataSet and automatically configures itself to display the data for all fields in the database table. Note that the field names are used as the default column headings.

1. In the TextBox control, type the following SQL statement:

Select * from Customer

then press the Execute SQL command button. The above SQL statement displays all fields from the Customer table and is equivalent to the default display.

2. In the TextBox control, type the following SQL statement:

Select Company from Customer

then press the Execute SQL command button. The grid responds by displaying only one column for the Company field.

3. In the TextBox control, type the following SQL statement:

Select LastName, Company from Customer

then press the Execute SQL command button. This is similar to the previous SQL statement except that two columns (LastName and Company) are now displayed.

4. In the TextBox control, type the following SQL statement:

Select Count(*) from Customer

then press the Execute SQL command button. The above SQL statement uses an aggregate function, Count(*), to return the total number of records in the Customer table. Even though the SQL result is not a set of records, the grid faithfully responds by displaying the number of records in a single column. By default, Expr1000 is used as the column heading, indicating that the display is the result of an expression.

5. In the TextBox control, type the following SQL statement:

Select UCase(LastName) as ULAST, UCase(FirstName) AS UFIRST from Customer

then press the Execute SQL command button. The above SQL statement produces two calculated columns that display the LastName and FirstName fields in upper case. The grid also displays the (assigned) calculated column names, ULAST and UFIRST, as the column headings.

6. In the TextBox control, type the following SQL statement:

SELECT * FROM Customer WHERE FirstName = "Jerry"

then press the Execute SQL command button. The above SQL statement displays only records with FirstName equal to Jerry.

7. In the TextBox control, type the following SQL statement:

SELECT * FROM Customer ORDER BY LastName

then press the Execute SQL command button. The above SQL statement displays records in alphabetical order according to the LastName field.

You can also use an SQL statement to join two database tables, as demonstrated in Tutorial 3.

This concludes Tutorial 2.


Tutorial 3 - Linking Multiple True DBGrid Controls

Tutorial 3 - Linking Multiple True DBGrid Controls

This tutorial demonstrates how to link multiple True DBGrid controls using a Master Detail dataset.

1. Start a new project and then add two C1TrueDBGrid controls to the form (C1TrueDBGrid1 and C1TrueDBGrid2).

2. Go to the DataSource property for C1TrueDBGrid1 and select Add Project Data Source from the drop-down. In the adapter’s Data Source Configuration Wizard, either select a connection to C1ListDemo.mdb or create a new connection to this database. On the Choose your database objects page of the wizard, select all fields in the Composer table and all fields in the Opus table, and type "DsMasterDetail" into the DataSet name box, and then finish out the wizard.

3. click on DsMasterDetail.xsd in the Solution Explorer window to edit it in the Designer. This will open the DsMasterDetail.xds file, which will appear like this:

4. To make a relation between two tables, click and hold down the mouse button in the light gray area next to the Last field in Composer, and then drag the mouse up over the Composers table over to the gray column of the Opus table, then release the mouse over the light gray area next to the Last field. This will bring up the Edit Relation dialog box:

Make sure Parent Table is set to Composer and the Child Table is set to Opus. In addition make sure both fields are set to the Last column (as in the preceding screenshot). Click OK and exit the Edit Relation dialog box.

5. Now go to the Build menu of .NET and choose Build Solution. This will ensure that this new relation is available in the project.

6. Now in the Properties window, set the DataSource property for the first True DBGrid to DsMasterDetail1 and the DataMember property to Composer. For the second TrueDBGrid, set the DataSource property to DsMasterDetail and the DataMember property to Composer.ComposerOpus.

7. All that is left is to populate the DataAdapters. Visual Studio adds the following code to the Load event of Form1:

· Visual Basic

· C#

· Delphi

Run the program and observe the following:

· When Form1 is loaded, C1TrueDBGrid1 and C1TrueDBGrid2 retrieve the database schema information from dsMasterDetail.

· Change the current record position of the first grid by clicking on different rows. Observe that C1TrueDBGrid2 (the detail grid) will configure itself to display a new record set every time the row changes in C1TrueDBGrid1 (the master grid).

This concludes Tutorial 3.


Tutorial 4 - Interacting with Code and Other Bound Controls

Tutorial 4 - Interacting with Code and Other Bound Controls

In this tutorial, you will learn how True DBGrid interacts with other bound controls and with Visual Basic code that manipulates the same DataSet to which the grid is bound.

1. Start a new VB.NET project.

2. Place the following controls on the form (Form1) as shown in the figure:

· True DBGrid control (C1TrueDBGrid1)

· ListBox control (ListBox1)

· Three text controls (TextBox1 to 3)

· Seven buttons (btnFirst, btnNext, btnPrevious, btnLast, btnDelete, btnUpdate, btnAdd)

· Four labels (Label1 to 4)

Set the Text properties for each of the labels and buttons seen below:

3. Go to the DataSource property and select Add Project Data Source from the drop-down. In the adapter’s Data Source Configuration Wizard, either select a connection to TDBGDemo.mdb or create a new connection to this database. On the Choose your database objects page of the wizard, select all fields in the Customers table and type "DsCustomers" into the DataSet name box, and then finish out the wizard.

4. Visual Studio adds the following code to the Form_Load event :

· Visual Basic

· C#

· Delphi

5. Now for each of the four Buttons (Button4, 5, 6, 7) on the lower right in the above image, add the following code:

· Visual Basic

· C#

· Delphi

6. Set the code for the three buttons on the upper right in the above image:

· Visual Basic

· C#

· Delphi

7. Now add the UpdateCustomers subroutine. It sends information back to the DataSet from temporary DataTables:

· Visual Basic

· C#

· Delphi

8. Now back in the .NET designer, click on the ListBox1 control. In the Properties window set its DataSource property to CustomersBindingSource, and its DisplayMember property to LastName.

9. Click on the first TextBox (TextBox1) on the form. In the Properties window, expand its DataBindings object. Set the Text property under the DataBindings object to CustomersBindingSource - FirstName. In a similar manner set the same Text property under the associated DataBindings object for the next two TextBoxes. TextBox2 should be set to LastName, and TextBox3 should be set to Company.

10. Finally in the Properties window set the AllowAddNew, AllowDelete, and AllowUpdate properties to True for the True DBGrid.

Run the program and observe the following:

· Use the mouse or the keyboard to change the current row position in the grid, and observe the other bound controls (ListBox1 and the TextBoxes) changing their record positions along with the grid, even though they contain no code.

· Click the Next, Previous, Last, and First command buttons and observe that they have the same effects as the corresponding buttons on the Data control.

· Modify data in a few cells (in the same row) on the grid. Press the Update command button. Observe that the modified data has been updated to the database and the pencil icon on the record selector column disappears. Other bound controls on the form now display the modified data.

· Modify data in one or more of the Text controls. Press the Update or the Next command button. The grid will automatically update its data to reflect the new changes.

· Move the current cell of the grid to any record you wish to delete, then click the Delete command button. The record will be deleted and disappears from the grid. The grid automatically moves the current row to the record after the deleted record. Other bound controls on the form also respond by moving their record positions.

This concludes Tutorial 4.


Tutorial 5 - Selecting Multiple Rows Using Bookmarks

Tutorial 5 - Selecting Multiple Rows Using Bookmarks

In this tutorial, you will learn how to select and highlight records that satisfy specified criteria. A group of similar items is generally implemented as a collection in True DBGrid. When manipulating a group of items in True DBGrid, use techniques similar to those described here.

1. Start a new VB.NET project.

2. From the Toolbox on the left side of the IDE draw two command buttons and the C1TrueDBGrid object onto the form. The C1TrueDBGrid icon looks like this:

3. Set Button1’s Text property to “Select” and set Button2’s Text property to “Clear.”

4. Go to the DataSource property and select Add Project Data Source from the drop-down. In the adapter’s Data Source Configuration Wizard, either select a connection to TDBGDemo.mdb or create a new connection to this database. On the Choose your database objects page of the wizard, select all fields in the Composers table and type "DsComposers" into the DataSet name box, and then finish out the wizard.

5. Visual Studio adds the following code to the Form_Load event :

· Visual Basic

· C#

· Delphi

6. We can easily select and deselect rows in True DBGrid by manipulating the SelectedRowCollection. To select rows, place the following code in the Click event of Button1:

· Visual Basic

· C#

· Delphi

7. To deselect rows, place the following code in the Click event of Button2:

· Visual Basic

· C#

· Delphi

Run the program and observe the following:

· C1TrueDBGrid1 retrieves the database schema information from the DataSet and automatically configures itself to display all of the fields in the joined database tables. This is again similar to the behavior of the grid in Tutorial 1.

· Click the Select command button and observe that all records with the Country field equal to Germany will be highlighted.

· To deselect the highlighted records, click the Clear command button. Alternatively, clicking anywhere on a grid cell will also clear the selected rows.

This concludes Tutorial 5.


Tutorial 6 - Defining Unbound Columns in a Bound Grid

Tutorial 6 - Defining Unbound Columns in a Bound Grid

In this tutorial, you will learn how to use the UnboundColumnFetch event to display two fields (FirstName and LastName) together in one column. You will also learn how to use an SQL statement to create a join between two tables in a database. The project we set up for this tutorial will also be used in Tutorials 7 through 12.

1. Start a new .NET project.

2. From the Toolbox on the left side of the IDE draw a C1TrueDBGrid object onto the form. The C1TrueDBGrid icon looks like this:

3. Go to the DataSource property and select Add Project Data Source from the drop-down. In the adapter’s Data Source Configuration Wizard, either select a connection to C1ListDemo.mdb or create a new connection to this database. On the Choose your database objects page of the wizard, select all fields in the Contacts table and type "DsContacts" into the DataSet name box, and then finish out the wizard.

4. Double click on DsContacts.xsd in the Solution Explorer window to edit it in the Designer. Right click on the Contents table and choose Configure from the context menu.

5. Modify the SQL string in the Table Adapter Configuration Wizard to: SELECT Customers.FirstName, Customers.LastName, Customers.CustType, Contacts.ContactType, Contacts.Callback, Contacts.ContactDate, Contacts.UserCode, Customers.UserCode AS Expr1 FROM Contacts INNER JOIN Customers ON Contacts.UserCode = Customers.UserCode.

6. The Contacts table is now joined with the Customers table. Click the Finish button to exit the wizard.

7. Return to Design view and if prompted to replace existing column layout, click Yes.

Note: If all of the columns are not showing up in C1List, select the DataSource again from the drop-down menu.

8. Declare a new global DataTable object in Form1

· Visual Basic

· C#

· Delphi

9. Now in the Form_Load event add the following code. The first line, supplied by Visual Studio, fills the dataset and the second lines make a copy of this DataSet, which we will use later to populate the unbound column:

· Visual Basic

· C#

· Delphi

10. To create an unbound column, open up the C1TrueDBGrid Designer by clicking on the ellipsis button (…) next to the Columns property in the Properties window. Next click the Insert column button to create a new column. Set the new columns Caption property to “Name” in the left pane. Notice that a value resides in the Caption field, but no value in the DataField, which is how the grid knows that this is an unbound column. The grid now knows to fire the UnboundColumnFetch event.

11. Open the SplitCollection editor by clicking on the ellipsis button next to the Splits property in the Properties window. Now open up the C1DisplayColumnCollection editor by clicking on the ellipsis button next to the DisplayColumns property. In this editor find the unbound column that we just created in the left pane, but it is positioned as the last column in the grid. The DisplayColumns Collection determines the position of the field. Maneuver the column to the desired location by using the up and down arrow buttons in the left pane. Then in the right pane, set its Visible property equal to True. Now our unbound column is visible to the end-user and not just the True DBGrid.

You can hide columns here that are used in the unbound column. Select the FirstName column from the left pane, then in the right, set its Visible property equal to False. This hides the FirstName column from view. Repeat, selecting the LastName column.

12. Add the following code to the UnboundColumnFetch event. This code uses dtCopy to gather values to place into the unbound column, then setting these values equal to e.Value, places the value into the unbound column:

· Visual Basic

· C#

· Delphi

When the application runs, it should look like the following:

Run the program and observe the following:

· C1TrueDBGrid1 displays data from the joined table according to the five columns configured at design time.

· The first column displays the combined FirstName and LastName fields as defined in the UnboundColumnFetch event.

· The CustType, ContactType and Callback columns display numeric values that are quite cryptic to users and provide an unappealing data presentation. In the next three tutorials (7, 8, and 9), techniques will be illustrated that improve both the display and the user interface.

This concludes Tutorial 6.


Tutorial 7 - Displaying Translated Data with the Built-in Combo

Tutorial 7 - Displaying Translated Data with the Built-in Combo

Previous Next

In this tutorial, you will learn how to use the ValueItems object to display translated text and enable the grid's built-in drop-down combo for editing—all without writing a single line of code.

1. Start with the project created in Tutorial 6.

2. Make sure the C1TrueDBGrid has focus, then click on the ellipsis button (…) next to the Columns property in the Properties window. This brings up the C1TrueDBGrid Designer.

3. Select the CustType column member. Then in the left pane, click on the expand icon next to the Valueitems property. This will display all of the members of the Valueitems object.

4. Click on the ellipsis button next to the Values property in the C1TrueDBGrid Designer. This brings up the ValueitemCollection Editor.

5. In the left pane create 5 new ValueItem objects by clicking on the Add button 5 times. Notice that a ValueItem has two properties: DisplayValue and Value.

6. Enter the following DisplayValue/Value pairs into the right pane, then close the ValueItemCollection Editor:

DisplayValue | Value
Value | 0
Prospective | 1
Normal | 2
Buyer | 3
Distributor | 4
Other | 5

7. Under the Valueitems object in the C1DataColumn Editor, set the Presentation property to ComboBox, and the Translate property to True.

8. Click the OK button at the bottom of the Property Pages dialog to accept the changes.

Run the program and observe the following:

· C1TrueDBGrid1 displays data from the joined tables as in Tutorial 6.

· The CustType column now displays the translated text instead of numeric values.

· Click a cell in the CustType column to make it the current cell. Notice that a drop-down button appears at the right edge of the cell.

· Click the drop-down button or press ALT+DOWN ARROW to display the built-in combo box containing translated values, as shown in the following figure. Change the data in the current cell by selecting the desired item from the combo box.

This concludes Tutorial 7.


Tutorial 8 - Attaching a Drop-down Control to a Grid Cell

Tutorial 8 - Attaching a Drop-down Control to a Grid Cell

In this tutorial, you will learn how to attach a multicolumn True DBDropDown control to a grid cell. Unlike the built-in combo demonstrated in Tutorial 7 the C1TrueDBDropDown control can be bound to a data source, which makes it ideal for data entry involving a secondary lookup table. The drop-down control appears whenever the user clicks a button within the current cell. This button appears automatically when the user gives focus to a column that has a drop-down control connected to it.

1. Start with the project constructed in Tutorial 6.

2. Add a C1TrueDBDropDown control (C1TrueDBDropDown1) to the form. The icon for the C1TrueDBDropDown looks like the following:

3. Go to the DataSource property and select Add Project Data Source from the drop-down. In the adapter’s Data Source Configuration Wizard, either select a connection to C1ListDemo.mdb or create a new connection to this database. On the Choose your database objects page of the wizard, select the TypeID and TypeDesc fields in the CustType table and type "DsCustType" into the DataSet name box, and then finish out the wizard.

4. Visual Studio adds the following code to the Load event of Form1 to filld the new dataset:

· Visual Basic

· C#

· Delphi

5. Then again in the Load event of Form1, add the following code to set the C1TrueDBDropDown1 to the CustType column:

· Visual Basic

· C#

· Delphi

6. In the Properties window set the ListField property of the C1TrueDBDropDown1 to TypeID. This property informs the Dropdown which column will be synchronized with the grid column that the drop-down is bound to.

Run the program and observe the following:

· C1TrueDBGrid1 displays data from the joined table as in Tutorial 6.

· Click a cell in the CustType column to make it the current cell as indicated by the highlight. A button will be displayed at the right edge of the cell. Click the button to display the True DBDropDown control as shown in the following figure.

· Use the UP ARROW and DOWN ARROW keys to move the highlight bar of True DBDropDown. If another cell in the grid is clicked, True DBDropDown will lose focus and become invisible.

· Select any item in True DBDropDown. The current cell in the grid will be updated with the selected item, and True DBDropDown will disappear until editing is initiated again.

· If the current cell is moved to another column, the button will disappear from the cell in the CustType column.

This concludes Tutorial 8.


Tutorial 9 - Attaching an Arbitrary Drop-down Control to a Grid Cell

Tutorial 9 - Attaching an Arbitrary Drop-down Control to a Grid Cell

Previous Next

In this tutorial, you will learn how to drop-down an arbitrary control from a grid cell. This example uses a ListBox control containing pre-defined input values in order to facilitate user data entry. The list will drop down whenever the user initiates editing, such as by clicking the current cell. You will also learn how to place a button in the cell which, when clicked, will cause the ListBox control to appear. You can drop-down any control from a grid cell using techniques similar to those described in this tutorial.

1. Start with the project constructed in Tutorial 6.

2. Add a ListBox control (ListBox1) to the form as shown in the figure.

3. Set the Visible property of ListBox1 to False.

Adding code to drop down a ListBox control

The CustType field in the second column (Column1) of the grid displays numeric values ranging from 1 through 5, which represent the following customer types:

1 = Prospective
2 =
Normal
3 = Buyer
4 = Distributor
5 = Other

Drop down ListBox1, which will contain textual customer type descriptions, and allow users to double-click an item in order to enter the associated value into the grid.

1. Include the following code in the general declaration section of Form1. Adding these namespaces will simplify the code we will need to write later.

· Visual Basic

· C#

· Delphi

2. In the Load event of Form1, we place code to add the customer types to ListBox1. We also place a button in the CustType column using the Button property. The Form1_Load event handler now looks like this:

· Visual Basic

· C#

· Delphi

3. If a cell in the CustType column becomes current, a button will be placed at the right edge of the cell. Clicking the button will trigger the grid's ButtonClick event. We will drop down ListBox1 whenever the button is clicked:

· Visual Basic

· C#

· Delphi

4. In the DoubleClick event of ListBox1, add the following code. When an item is selected in ListBox1, this code will copy its index to the proper column in C1TrueDBGrid1, then make ListBox1 invisible.

· Visual Basic

· C#

· Delphi

5. Then in the Leave event of ListBox1, add the following code to make sure the listbox becomes invisible once the selection has been made:

· Visual Basic

· C#

· Delphi

6. Then in the Scroll event of C1TrueDBGrid1, add the following code to make sure the listbox becomes invisible once the grid is scrolled:

· Visual Basic

· C#

· Delphi

Run the program and observe the following:

· C1TrueDBGrid1 displays data from the joined table as in Tutorial 6.

· Click a cell in the CustType column to make it the current cell as indicated by the highlight. A button will be displayed at the right edge of the cell. Click the button to fire the ButtonClick event. ListBox1 will drop down at the right edge of the cell as shown in the following illustration.

· Use the mouse or the UP ARROW and DOWN ARROW keys to move the highlight bar of ListBox1. If another cell in the grid is clicked, ListBox1 will lose focus and become invisible.

· Double-click any item in ListBox1. The current cell in the grid will be updated with the selected item, and ListBox1 will disappear until editing is again initiated.

· If the current cell is moved to another column, the button will disappear from the cell in the CustType column.

This concludes Tutorial 9.


Tutorial 10 - Enhancing the User Interface with In-Cell Bitmaps

Tutorial 10 - Enhancing the User Interface with In-Cell Bitmaps

Previous Next

In this tutorial, you will learn how to use the ValueItems object and its collection of ValueItem objects to display bitmaps and check boxes in a cell—without writing a single line of code!

1. Start with the project used in Tutorial 7.

2. First, change the captions of the ContactType and Callback columns. Open up the C1TrueDBGrid Designer by clicking on the ellipsis button (…) next to the Columns property in the Properties window.

3. Select the ContactType column, then in the left pane, change its Caption property to “How”. Then in a similar manner, change the CallBack column caption to “Call?”

4. Change the HorizontalAlignment property of these two columns by clicking the Align center button so that the bitmaps will be centered within each cell. Open the SplitCollection Editor by clicking on the ellipsis button next to the Splits property in the Properties window. Next open the C1DisplayColumnCollection Editor by clicking on the ellipsis next to the DisplayColumn property in the Splits editor. Select the How column in the left pane, then in the right pane, click on the expand icon next to the Styles property. Under the Styles object for this column set the HorizontalAlignment property to Center. Then set the VerticalAlignment properties to Center. In a similar manner, set the HorizontalAlignment and VerticalAlignment properties for the Call? column.

5. Next, assign bitmaps and check boxes to selected columns by populating the corresponding ValueItems object. We will start with the bitmaps in column 2. Open up the C1TrueDBGrid Designer by clicking on the ellipsis button next to the Columns property in the Properties window. Select the How column, and then in the left pane, click on the expand icon next to the Valueitem object. Open up the ValueItemCollection Editor by clicking on the ellipsis button next to the Values property:

6. Create three new ValueItem objects by clicking on the Add button in the left pane. The possible values of the ContactType field are 0, 1, and 2, which represent telephone, mail, and personal contact, respectively. Bitmaps shall be displayed in the cell instead of these numeric values. If the full product is installed, the following files will be found in the BITMAPS subdirectory of the True DBGrid installation directory: PHONE.BMP, MAIL.BMP, and PERSON.BMP.

7. In the right pane, for the first ValueItem, enter 0 as the value, then in the DisplayValue property box, click on the ellipsis button to search for the Image file to display in the cell. Locate the Phone.bmp file in the bitmaps subdirectory of the ComponentOne Studio.NET directory. In a similar manner set the other two ValueItem objects to a Value of 1, DisplayValue of Mail.bmp, and a Value of 2, DisplayValue of Person.BMP, respectively. Return to the ValueItems object in the C1TrueDBGrid Designer and set the Translate and CycleOnClick properties equal to True.

8. To set the checkboxes for column 3, in the C1TrueDBGrid Designer, select the Call column. In the left pane, expand the ValueItems object and set the Presentation property to CheckBox. This will display the column’s Boolean values as checkboxes. Then finally, under the same object set the Translate and CycleOnClick properties to True.

Run the program and observe the following:

· C1TrueDBGrid1 displays data from the joined table as in Tutorials 10 through 11.

· The How and Call? columns now display bitmaps instead of numeric values as shown in the following figure.

· Click a cell in the How column to make it the current cell. Then click it again several times and observe how the cell cycles through the PHONE, MAIL, and PERSON bitmaps.

· Click a cell in the Call? column and observe how the cell cycles through the check box bitmaps.

This concludes Tutorial 10.


Tutorial 11 - Using Styles to Highlight Related Data

Tutorial 11 - Using Styles to Highlight Related Data

In this tutorial, you will learn how to change the grid's display to highlight rows by creating row styles depending upon a value in the grid. True DBGrid uses the FetchRowStyle event to create style characteristics and apply them to rows dynamically.

1. Start with the project used in Tutorial 10.

2. Add thee buttons to the form. Change the caption of Button1 to Prospective Customers, Button2 to Distributors, and Button3 to Reset the Grid so that the form appears as follows.

3. Add the following declarations to the General section of Form1:

· Visual Basic

· C#

· Delphi

4. Enter the following code in the Click event of Button1:

· Visual Basic

· C#

· Delphi

5. Enter the following code in the Click event of Button2:

· Visual Basic

· C#

· Delphi

6. Enter the following code in the Click event of Button3:

· Visual Basic

· C#

· Delphi

7. Next enter the following code into the FetchRowStyles event. This code interacts with the setting of the FetchRowStyles property in the click event. When the FetchRowStyles is set to True, the grid fires the FetchRowStyle event when it needs to repaint the cells. Thus the row style is applied according to the value of the bflag flag integer:

· Visual Basic

· C#

· Delphi

Run the program and observe the following:

· C1TrueDBGrid1 displays data as in Tutorial 10.

· Click the Prospective Customers button. The grid should appear as follows.

· Click the Distributors button. The grid should now appear as follows:

· Finally, click the Reset the Grid button. The grid should now clear itself of the styles.

This concludes Tutorial 11.


Tutorial 12 - Displaying Rows in Alternating Colors

Tutorial 12 - Displaying Rows in Alternating Colors

In this tutorial, you will learn how to use the AlternatingRows property and built-in styles to apply alternating colors to grid rows to improve their readability.

1. Start with the project used in Tutorial 10.

2. In the Properties window, set the AlternatingRows property to True. The grid has default settings for both the EvenRow and OddRow styles. Use the default settings first and then change the settings for the EvenRowStyle.

Run the program and observe the following:

· C1TrueDBGrid1 displays data as in Tutorial 10 except that even-numbered rows have a light cyan background.

3. Click on the ellipsis button (…) next to the Styles property in the Properties window. This will bring up the C1TrueDBGrid Style Editor. Select the EvenRowStyle in the left pane, and in the right pane change its backcolor to LightGray. Click OK and close the editor.

Run the program and observe the following:

· C1TrueDBGrid1 displays data as in the previous figure, except that even-numbered rows now have a light gray background.

This concludes Tutorial 12.


Tutorial 13 - Implementing Drag-and-Drop in True DBGrid

Tutorial 13 – Implementing Drag-and-Drop in True DBGrid

1. Start a new .NET project

2. Place two True DBGrid controls (C1TrueDBGrid1, C1TrueDBGrid2) onto the form. Also add three labels onto the form and arrange them to look like the picture below.

3. Go to the DataSource property for C1TrueDBGrid1 and select Add Project Data Source from the drop-down. In the adapter’s Data Source Configuration Wizard, either select a connection to TDBGDemo.mdb or create a new connection to this database. On the Choose your database objects page of the wizard, select all fields in the Customers table and type "DsCustomers" into the DataSet name box, and then finish out the wizard.

4. Go to the DataSource property for C1TrueDBGrid2 and select Add Project Data Source from the drop-down. In the adapter’s Data Source Configuration Wizard, either select a connection to TDBGDemo.mdb or create a new connection to this database. On the Choose your database objects page of the wizard, select all fields in the CallList table and type "DsCallList" into the DataSet name box, and then finish out the wizard.

5. In the general section of the form, add the following declarations:

· Visual Basic

· C#

· Delphi

6. Visual Basic adds the following code to the Load event of Form1to fill the new datasets:

· Visual Basic

· C#

· Delphi

7. For the first grid (C1TrueDBGrid1) set the AllowDrag property to True. While, for the second grid, set the AllowDrop property to True.

8. Right-click on C1TrueDBGrid1 and select Retrieve Fields. Do the same with the other grid.

9. Open up the C1TrueDBGrid Designer for C1TrueDBGrid1 by clicking on the ellipsis button (…) next to the Columns property for the True DBGrid in the Properties window.

10. Remove all of the Columns from the grid except LastName, FirstName, Company, and Phone by clicking the Delete selected columns button . Enter the C1TrueDBGrid Designer for the other grid and remove all of its columns except Customer, Phone, and CallDate.

11. In the Properties window set the MarqueeStyle for C1TrueDBGrid1 to SolidCellBorder. In the C1TrueDBGrid Designer set Column 3’s (Phone) NumberFormat property to “(###)###-####”. Open up the C1TrueDBGrid Designer for the second grid and set its Column 2’s NumberFormat property to “(###)###-####”. The grid should now look like the following:

Adding code to your project

This section describes the code needed to drag the contents of a cell or row from C1TrueDBGrid1 to C1TrueDBGrid2. The code assumes that if you want to drag the entire row of data to C1TrueDBGrid2 in order to add a new record there.

1. Add the following subroutine to the project to reset the MarqueeStyle property of each grid, which is used to provide visual feedback while dragging is in progress. The reset routine will be called to perform clean-up after a drag-and-drop operation concludes.

· Visual Basic

· C#

· Delphi

2. Enter the following code to handle the mouse related events:

· Visual Basic

· C#

· Delphi

3. Enter the following code to handle the dragging and dropping events:

· Visual Basic

· C#

· Delphi

Run the program and observe the following:

· If an item in a column in C1TrueDBGrid1 is dragged, the entire row in C1TrueDBGrid1 is highlighted, indicating that the entire row of data is being dragged.

· When dragging to TDBGrid2, the current cell marquee (a solid border around the cell) disappears.

· If the data is dropped on C1TrueDBGrid2, a new record is created using the data from the current row of C1TrueDBGrid1.

This concludes Tutorial 13.


Tutorial 14 - Creating a Grid with Fixed, Nonscrolling Columns

Tutorial 14 - Creating a Grid with Fixed, Nonscrolling Columns

Previous Next

Often, you would like to prevent one or more columns from scrolling horizontally or vertically so that they will always be in view. The SplitCollection of True DBGrid provides a generalized mechanism for defining groups of adjacent columns, and can be used to implement any number of fixed, nonscrolling columns or rows. In this tutorial, you will learn how to write code to create a grid with two horizontal splits, and then "fix" a pair of columns in the leftmost split.

1. Follow steps 1 through 6 of Tutorial 1 to create a project with a C1TrueDBGrid bound to a DataSet.

2. In the Load event for Form1, place the following code to create an additional split and to fix columns 0 and 1 in the leftmost split:

· Visual Basic

· C#

· Delphi

Run the program and observe the following:

· C1TrueDBGrid displays data from the Data control as in Tutorial 1.

· The two columns (First and Last) in the leftmost split are fixed and cannot be scrolled. In fact, there is no horizontal scroll bar present under the left split. A horizontal scroll bar appears under the rightmost split, allowing users to scroll the columns in this split.

Use splits to create fixed, non-scrolling columns anywhere within the grid—even in the middle. Also use splits to present different views of data. For example, splits can be created that scroll independently (in the vertical direction) so that users may compare records at the beginning of the database with those at the end. For more information, see How to Use Splits.

This concludes Tutorial 14.


Tutorial 15 - PrintInfo and Print Preview

Tutorial 15 – PrintInfo and Print Preview

In this tutorial, you will learn how to use the printing and exporting capabilities of True DBGrid.

1. Start with the project created in Tutorial 1.

2. Add one Button to the form (Button1) and change its Text property to “Print Preview”.

3. Enter the following code in the Load event of Form1. It changes the BackColor of a column, changes a column’s font, sets the NumberFormat property for a column to the FormatText event, and changes the HeadingStyle:

· Visual Basic

· C#

· Delphi

4. In the previous code the NumberFormat property for a column was set to FormatText. This means that the FormatText event will fire enabling the programmer to change the style and format of column values. Enter the following code into the FormatText event, which changes the column values to uppercase:

· Visual Basic

· C#

· Delphi

5. Add the following code to the Click event of Button1. It uses the PrintInfo object and its properties and methods to create a print page header and footer. It ends by calling the PrintPreview method that invokes the Print Preview window:

· Visual Basic

· C#

· Delphi

Run the program and observe the following:

· C1TrueDBGrid1 displays the data using the font and color changes specified in step 4.

· Click the Print Preview button to display a separate application window. Note that the output mirrors the format of the grid.

This concludes Tutorial 15.


Tutorial 16 - Hierarchical Display

Tutorial 16 – Hierarchical Display

In this tutorial, you will learn how to display Master Detail DataSet information through the grid’s hierarchical display. This tutorial is similar to Tutorial 3, but this tutorial displays the same master detail information as Tutorial 3, except it only uses on True DBGrid object.

1. Start by setting up a form with a grid and Master Detail DataSet by following the first 6 steps of Tutorial 3.

2. In the Properties window, set the DataSource property of the grid to dsMasterDetail and the DataMember property to Composer.

3. Next in the Load event of Form1 add the following code, which fills both the DataAdapters and sets the grid’s display to hierarchical:

· Visual Basic

· C#

· Delphi

Run the program and observe the following:

· C1TrueDBGrid1 displays the Composers table as it would if it were bound to it, but each row has an expand icon. Expand one of the rows. Notice that the associated Opus column data is displayed in the far columns of the grid. The data showing relates to the record in the Composers table that was expanded:

This concludes Tutorial 16.


Tutorial 17 - Grouping Display

Tutorial 17 – Grouping Display

In this tutorial, you will learn how to use the DataView property to create a Grouping area above the grid, which enables the user to sort the data by columns at runtime.

1. Start with the project created in Tutorial 1.

2. Add the following code to the Load event of Form1 after the current DataAdapter code:

· Visual Basic

· C#

· Delphi

Run the program and observe the following:

· C1TrueDBGrid1 displays the data specified in Tutorial 1.

· Notice that there is a gray grouping section above the grid now.

· Click on the Country column header and drag it into the grouping area. Your grid should now look like the following:

· Notice that the C1TrueDBGrid has placed all of the members of the Country class into the left column and each row has an expand icon. Clicking on the expand icon will show you the data for every composer born in this country.

· Now drag the Last column header into the grouping area, then click on the expand icon next to Germany. Notice that the data is first sorted by country, then sorted by the last name of the composer. Clicking on the expand icon for one of the composers under last will bring up the remaining columns of data:

This concludes Tutorial 17.


Tutorial 18 - Value Translation

Tutorial 18 – Value Translation

In this tutorial, you will learn how to use the C1TrueDBDropDown’s ValueTranslate property to automatically translate data from the drop-down detail data to the grid’s master data.

1. Start with the project created in Tutorial 8.

2. In the Load event of the form add the following code to the existing code:

· Visual Basic

· C#

· Delphi

Run the program and observe the following:

· C1TrueDBGrid1 displays the data specified in Tutorial 8.

· The values in the CustType column of the grid now display the long descriptions displayed in the drop-down. The values were automatically translated from the drop-down to the grid column at run-time.

This concludes Tutorial 18.


Tutorial 19 - Range Selection

Tutorial 19 – Range Selection

In this tutorial, you will learn how to use the SelectedRows and SelectedCols objects copy a range from the grid in such a format that it can be pasted into Microsoft Excel.

1. Start with the project created in Tutorial 1.

2. Add a command button to the form, place it in the lower left corner of the form, and set its Text property to “copy”.

3. Next add the following code to the Click event of Button1:

· Visual Basic

· C#

· Delphi

Run the program and observe the following:

· C1TrueDBGrid1 displays the data specified in Tutorial 1.

· If you select a range of cells in the True DBGrid, then press the copy button a message box will appear detailing the cells that you have copied to the clipboard.

· Now open Microsoft Excel. Select the exact amount of row and column cells as you’ve selected in the True DBGrid, then press paste. You will see that the cells that you copied in the grid are now pasted into Microsoft Excel

This concludes Tutorial 19.


Tutorial 20 - Multiple Data Views

Tutorial 20 – Multiple Data Views

In this tutorial, you will learn how to use the grid’s DataView property to display data in uncommon display formats such as Inverted View, GroupBy View, and Form View.

1. Start with the project created in Tutorial 1.

2. Add a ComboBox (ComboBox1) to the project, and set its Text property to “Data View”.

3. In the Properties window, open up the List editor for the ComboBox by clicking on the ellipsis button (…) next to the Items property. In this editor add the following items:

Normal
Inverted
Form
GroupBy
MultipleLines
Hierarchical

4. Now add the following code to the existing code in the Load event of Form1:

· Visual Basic

· C#

· Delphi

5. Now add the following code to the SelectedIndexChanged event of ComboBox1. It changes the DataView property of the grid for each value the user selects in the ComboBox:

· Visual Basic

· C#

· Delphi

Run the program and observe the following:

· C1TrueDBGrid1 displays the data specified in Tutorial 1.

· Change the ComboBox to Inverted. Inverted view shows the grid columns as rows and the grid rows as column. The grid should now look like the following:

· Change the ComboBox to Form. Form view shows each record in a Form-like view that is optimal for data-entry. The grid should now look like the following:

· Change the ComboBox to GroupBy. GroupBy View contains a grouping section above the grid where columns can be dragged. Dragging a column to this area sorts the rest of the grid by this column. Drag the Company column to the grouping area. The grid should now look like the following:

· Change the ComboBox to MultipleLines. The MultipleLines View shows all of the columns in the current grid area, wrapping the columns that will not fit to successive lines. Notice that the three columns that would have spilled off of the grid are now on a second line. The grid should now look like the following:

· Now set the ComboBox to Hierarchical. No changes occur and the Message Box statement included in the event above pops up which is due to the fact that the hierarchical DataView cannot be set at run-time. Hierarchical data must be set before the application runs. For more information on this view, see Tutorial 16 - Hierarchical Display.

This concludes Tutorial 20.


Tutorial 21 - Filter Bar

Tutorial 21 – Filter Bar

In this tutorial, you will learn how to use the grid’s Filter Bar functionality to allow the end user to sort column data dynamically at runtime.

1. Start with the project created in Tutorial 1.

2. After the existing code in the Load event of Form1 add the following line:

· Visual Basic

· C#

· Delphi

Run the program and observe the following:

· C1TrueDBGrid1 displays the data specified in Tutorial 1.

· Above the grid data is now a line that accepts user input. This is the Filter Bar. When a user enters data into the bar the grid automatically filters the column data.

Before Filter:

After Filter:

· If you would prefer to handle the filtering yourself, then you would have to change the AllowFilter property to False (keeping FilterBar equal to True). Then you would have to handle the FilterChange event which fires each time the state of the Filter Bar changes.

This concludes Tutorial 21.


Tutorial 22 - Borders, Scroll Tracking, and Scroll Tips

Tutorial 22 – Borders, Scroll Tracking, and Scroll Tips

In this tutorial, you will learn how to use the grid’s Filter Bar functionality to allow the end user to sort column data dynamically at runtime.

1. Create a new project. Add a C1TrueDBGrid control to the form.

2. Add the following items to the form and situate them like they appear in the following image.

· 5 ComboBoxes (ComboBox1 – 5).

· Two frames and set their Text property to “Border Size” and “Scrolling” respectively.

· Four Labels (Label1 – 5) and set their Text properties to “Top Width”, “Bottom Width”, “Left Width”, “Right Width”, and “Border Appearance” respectively.

· Button (Button1) and set its Text property to “Border Color”.

· Two Checkboxes and set their text properties to “ScrollTips” and “ScrollTracking”.

3. Add a Color Dialog to the form (ColorDialog1)

4. Go to the DataSource property and select Add Project Data Source from the drop-down. In the adapter’s Data Source Configuration Wizard, either select a connection to TDBGDemo.mdb or create a new connection to this database. On the Choose your database objects page of the wizard, select all fields in the Customer table and type "DsCustomer" into the DataSet name box, and then finish out the wizard.

5. Click on the grid to give it focus, then in the Properties window set the RowHeight property to 40.

6. Visual Studio adds the following code to the Form_Load event :

· Visual Basic

· C#

· Delphi

7. In the general section of Form1 add the following declarations:

· Visual Basic

· C#

· Delphi

8. Into the Load event of Form1 add the following code:

· Visual Basic

· C#

· Delphi

9. Now add the functions that will fill the ComboBoxes:

· Visual Basic

· C#

· Delphi

10. Now create a handler for the Click event of Button1 that will set the color of the border using the color dialog:

· Visual Basic

· C#

· Delphi

11. Now include the function that updates the borders:

· Visual Basic

· C#

· Delphi

12. Now include the code that handles changes in the ComboBox values:

· Visual Basic

· C#

· Delphi

13. Finally include the code that handles the checkboxes and the FetchScrollTips event that sets the Tooltip box that displays when the user is scrolling:

· Visual Basic

· C#

· Delphi

Run the program and observe the following:

· C1TrueDBGrid1 displays the data specified.

· Setting ScrollTrack to True lets you see the data as it is being scrolled

· Setting ScrollTips to True shows a Tooltip box with column information while the user is scrolling.

· By manipulating the ComboBoxes, and the Color Dialog, create a border around a column’s cells and set them to a System color.

This concludes tutorial 22.


C1.Win.C1TrueDBGrid.2 Assembly

C1.Win.C1TrueDBGrid.2 Assembly

Namespaces

C1.Win.C1TrueDBGrid

C1.Win.C1TrueDBGrid.BaseGrid

C1.Win.C1TrueDBGrid.Util

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1.Win.C1TrueDBGrid Namespace

C1.Win.C1TrueDBGrid Namespace

C1.Win.C1TrueDBGrid Hierarchy

Classes

Class | Description
BandEventArgs | Provides data for the Expand and Collapse events.
baseTypeConverter | Base class for typeconverter.
BeforeColEditEventArgs | Provides data for the BeforeColEdit event.
BeforeColUpdateEventArgs | Provides data for the BeforeColUpdate event.
BitmapTypeConverter | Typeconverter for bitmaps. Used for serialization.
C1DataColumn | Represents a column that defines binding information for the datasource.
C1DataColumnCollection | Contains a collection of C1DataColumn objects.
C1DisplayColumn | Represents the columns in a split.
C1DisplayColumnCollection | Represents a collection of C1DisplayColumn in a Split.
C1DropDataColumn | Represents a column that defines binding information for the datasource.
C1DropDisplayColumn | Represents the columns in a split.
C1OwnerDrawPrint | Object to manage custom page headers and footers when printing and previewing.
C1PrintProgress | Print progress window.
C1TrueDBDropdown | C1TrueDBDropdown control.
C1TrueDBGrid | C1TrueDBGrid control object.
CancelEventArgs | Provides data for the BeforeDelete, BeforeInsert, BeforeUpdate, BeforeRowColChange, RowResize, Scroll, SelChange, BeforeOpen and BeforeClose events.
ColEventArgs | Provides data for the AfterColUpdate, AfterColEdit, HeadClick, FootClick, ColEdit, ButtonClick, ComboSelect, ValueItemError, and FilterButtonClick events.
ColMoveEventArgs | Provides data for the ColMove event.
ColResizeEventArgs | Provides data for the ColReisize event.
DropDownForm | Represents a window or dialog box that makes up an application's user interface.
DropdownView | Represents a horizontal or vertical pane to display and edit data.
ErrorEventArgs | Provides data for the Error event.
FetchCellStyleEventArgs | Provides data for the FetchCellStyle event.
FetchCellTipsEventArgs | Provides data for the FetchCellTips event.
FetchRowStyleEventArgs | Provides data for the FetchRowStyle event.
FetchScrollTipsEventArgs | Provides data for the FetchScrollTips event.
FilterEventArgs | Provides data for the Filter, AfterFilter, Sort, and AfterSort.
FormatTextEventArgs | Provides data for the FormatText event.
GenericTypeConverter | Expandable object converter that doesn't handle strings.
GridBorders | Represents the border in a Style.
GridStyleCollection | Represents a collection of named Style.
GroupColEventArgs | Provides data for the GroupHeadClick event.
GroupColMoveEventArgs | Provides data for the GroupColMove event.
GroupedColumnCollection | Contains a collection of C1DataColumn objects that represent columns that are grouped.
GroupInfo | GroupInfo Property of the C1DataColumn object, used to control grouping and rendering of group headers and footers
GroupIntervalEventArgs | Provides data for grouping.
GroupRow | Object that represents a groupby split.
GroupTextEventArgs | Provides data for the GroupText event.
OwnerDrawCellEventArgs | Provides data for the OwnerDrawCell and OwnerDrawCellPrint events.
OwnerDrawPageEventArgs | Provides data for the OwnerDrawPageHeader and OwnerDrawPageHeader events.
PrintCancelException | The exception that is thrown when a print is cancelled.
PrintForm | The print preview form.
PrintInfo | The object used to specify the characteristics of a grid when it's to be printed.
PrintOptionsForm | Summary description for PrintOptionsForm.
PrintPreviewWinSettings | The object used to specify the characteristics of the print preview window.
RowColChangeEventArgs | Provides data for the RowColChange event.
SelectedColumnCollection | Contains a collection of C1DataColumn objects that represent columns that are selected.
SelectedRowCollection | Represents a collection of Selected rows.
Split | Represents a horizontal or vertical pane to display and edit data.
SplitCollection | Represents a collection of Split objects.
SplitEventArgs | Provides data for the FirstRowChange and LeftColChange events.
C1.Win.C1TrueDBGrid.Style | Represents an object used to render grid elements.
UIStrings | Represents an array of user interface strings.
UIStringsItemEventArgs | Provides data for the ItemAdded and the ItemChanged events of the UIStrings class.
UnboundColumnFetchEventArgs | Provides data for the UnboundColumnFetch event.
ValueItem | Represents an object that defines a value/display value pair.
ValueItemCollection | Represents a collection of ValueItem objects.
ValueItems | Represents an object that defines how cells are rendered.

Delegates

Delegate | Description
BandEventHandler | Raised when a hierarchical node is expanded or collapsed.
BeforeColEditEventHandler | Raised before a column enters edit mode.
BeforeColUpdateEventHandler | Raised after editing is completed in a cell.
CancelEventHandler | Raised before an action is performed on the grid and the action can be canceled.
ColEventHandler | Raised when an action is perfored on a column.
ColMoveEventHandler | Raised when a column is being repositioned.
ColResizeEventHandler | Raised after a column has been resized.
ErrorEventHandler | Raised when an excpetion is thrown via the UI.
FetchCellStyleEventHandler | Raised when the Style used to render a cell needs customization.
FetchCellTipsEventHandler | Raised when cell tips are to be displayed.
FetchRowStyleEventHandler | Raised when the Style used to render a row needs customization.
FetchScrollTipsEventHandler | Raised when scroll tips are to be displayed.
FilterEventHandler | Raised when the grid is sorted or filtered.
FormatTextEventHandler | Raised when a cell needs custom formatting.
GroupColEventHandler | Raised when grouping columns.
GroupColMoveEventHandler | Raised when a column is moved into or out of the grouping area.
GroupTextEventHandler | Raised when text is grouped.
OwnerDrawCellEventHandler | Raised when a cell is to rendered by the event code.
OwnerDrawPageEventHandler | Raised when custom page headers and footers need to be rendered.
RowColChangeEventHandler | Raised after the current Row or Column changes.
SplitEventHandler | Raised when Split specific actions are performed.
UnboundColumnFetchEventHandler | Raised when an unbound column needs to be rendered.

Enumerations

Enumeration | Description
AddNewModeEnum | Provides a description of the current addnew state with respect to the current cell.
AggregateEnum | Specifies the type of aggregate that is computed for a grouped row.
AlignHorzEnum | Specifies the horizontal alignment of text or images in a cell.
AlignVertEnum | Specifies the vertical alignment of text or images in a cell.
BackgroundPictureDrawModeEnum | Specifies how the background image is rendered.
BorderTypeEnum | Specifies the borders for a Style.
ColumnChangedEnum | Enumerates the type of changes made to a display column for event listeners.
CellStyleFlag | Describes the disposition of a cell. This enumeration has a FlagsAttribute attribute that allows a bitwise combination of its member values.
CellTipEnum | Specifies the behavior of the pop-up window when the cursor is idle over the grid.
ColumnMergeEnum | Controls how columns are merged.
DataViewEnum | Specifies how the grid displays its data.
DirectionAfterEnterEnum | Specifies which cell gets focus when the enter key is pressed.
DropdownWidthEnum | Specifies the width of a C1TrueDBDropdown for a cell.
ExposeCellModeEnum | Specifies how the grid exposes the rightmost column when it gets focus.
FlatModeEnum | Specifies how 3D elements are rendered.
ForeGroundPicturePositionEnum | Specifies the location of the foreground image in a cell.
GradientModeEnum | Controls the rendering of the style using a LinearGradient.
GroupIntervalEnum | Specifies the grouping and rendering of group rows.
GroupPositionEnum | Specifies how the grouped column should be displayed.
LineStyleEnum | Specifies the line style for row and column dividers.
MarqueeEnum | Specifies how the current cell is highlighted.
MultiSelectEnum | Specifies the UI behavior for selecting rows and columns.
OutlineModeEnum | Specifies the initial expanded or collapsed state of a grouped row.
PointAtEnum | Specifies the type of ui-element for a coordinate.
PresentationEnum | Specifies how ValueItems are rendered.
ActionFlags | Specifies allowable options for printing.
FillEmptyEnum | Specifies how empty space is printed.
PageBreaksEnum | Specifies when page breaks are applied.
RowHeightEnum | Specifies the height of printed rows.
WrapTextEnum | Specifies how cell text is wrapped.
RelationState | Defined the relationship of a column.
RowSelectorEnum | Specifies which rows are to be previewed/printed.
RowSizingEnum | Specifies how rows can be resized.
RowTypeEnum | Identifies the type of row.
ScrollBarEnum | Identifies the type of scrollbar.
ScrollBarStyleEnum | Specifies the visibility of ScrollBars.
SizeModeEnum | Specifies the sizing mode for splits.
SortDirEnum | Specifies the glyph used to denote a sort direction in the column header.
TabActionEnum | Specifies how focus is handled when the Tab key is entered.

See Also

C1.Win.C1TrueDBGrid.2 Assembly

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


AddNewModeEnum Enumeration

AddNewModeEnum Enumeration

Provides a description of the current addnew state with respect to the current cell.

[Visual Basic]

Public Enum AddNewModeEnum

[C#]

public enum AddNewModeEnum

[Delphi]

type AddNewModeEnum = (AddNewCurrent, AddNewPending, NoAddNew);

Namespace: C1.Win.C1TrueDBGrid

Assembly: C1.Win.C1TrueDBGrid.2 (in C1.Win.C1TrueDBGrid.2.dll)

Remarks

Use the members of this enumeration to set the value of the AddNewMode property in the C1TrueDBGrid class.

Members

Member name | Description
AddNewCurrent | The current cell is on the addnew row.
AddNewPending | There is an Add New operation pending.
NoAddNew | The current cell is not on the addnew row.

See Also

C1.Win.C1TrueDBGrid Namespace

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


AggregateEnum Enumeration

AggregateEnum Enumeration

Specifies the type of aggregate that is computed for a grouped row.

[Visual Basic]

Public Enum AggregateEnum

[C#]

public enum AggregateEnum

[Delphi]

type AggregateEnum = (Average, Count, Custom, Max, Min, None, Std, StdPop, Sum, Var, VarPop);

Namespace: C1.Win.C1TrueDBGrid

Assembly: C1.Win.C1TrueDBGrid.2 (in C1.Win.C1TrueDBGrid.2.dll)

Remarks

Use the members of this enumeration to set the value of the Aggregate property in the C1DataColumn class.

Members

Member name | Description
Average | Average of the numerical values.
Count | Count of non-empty values.
Custom | Causes the GroupAggregate event to be raised.
Max | Maximum value (numerical, string, or date).
Min | Minimum value (numerical, string, or date).
None | No aggregate is calculated or displayed.
Std | Standard deviation (using formula for Sample, n-1).
StdPop | Standard deviation (using formula for Population, n).
Sum | Sum of numerical values.
Var | Variance (using formula for Sample, n-1).
VarPop | Variance (using formula for Population, n).

See Also

C1.Win.C1TrueDBGrid Namespace

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1.Win.C1TrueDBGrid.AlignHorzEnum Enumeration

C1.Win.C1TrueDBGrid.AlignHorzEnum Enumeration

Specifies the horizontal alignment of text or images in a cell.

[Visual Basic]

Public Enum C1.Win.C1TrueDBGrid.AlignHorzEnum

[C#]

public enum C1.Win.C1TrueDBGrid.AlignHorzEnum

[Delphi]

type C1.Win.C1TrueDBGrid.AlignHorzEnum = (Center, Far, General, Justify, Near);

Namespace: C1.Win.C1TrueDBGrid

Assembly: C1.Win.C1TrueDBGrid.2 (in C1.Win.C1TrueDBGrid.2.dll)

Remarks

Use the members of this enumeration to set the value of the Alignment property in the C1TrueDBGrid class.

Members

Member name | Description
Center | Text is aligned centered.
Far | Text is aligned to the right.
General | Text is aligned Near and numeric values Far.
Justify | Text is aligned with respect to the cells boundries.
Near | Text is aligned to the left.

See Also

C1.Win.C1TrueDBGrid Namespace

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1.Win.C1TrueDBGrid.AlignVertEnum Enumeration

C1.Win.C1TrueDBGrid.AlignVertEnum Enumeration

Specifies the vertical alignment of text or images in a cell.

[Visual Basic]

Public Enum C1.Win.C1TrueDBGrid.AlignVertEnum

[C#]

public enum C1.Win.C1TrueDBGrid.AlignVertEnum

[Delphi]

type C1.Win.C1TrueDBGrid.AlignVertEnum = (Bottom, Center, Top);

Namespace: C1.Win.C1TrueDBGrid

Assembly: C1.Win.C1TrueDBGrid.2 (in C1.Win.C1TrueDBGrid.2.dll)

Remarks

Use the members of this enumeration to set the value of the VerticalAlignment property in the C1TrueDBGrid class.

Members

Member name | Description
Bottom | Text is rendered at the bottom of the cell.
Center | Text is rendered at the center of the cell.
Top | Text is rendered at the top of the cell.

See Also

C1.Win.C1TrueDBGrid Namespace

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


BackgroundPictureDrawModeEnum Enumeration

BackgroundPictureDrawModeEnum Enumeration

Specifies how the background image is rendered.

[Visual Basic]

Public Enum BackgroundPictureDrawModeEnum

[C#]

public enum BackgroundPictureDrawModeEnum

[Delphi]

type BackgroundPictureDrawModeEnum = (Center, Stretch, Tile);

Namespace: C1.Win.C1TrueDBGrid

Assembly: C1.Win.C1TrueDBGrid.2 (in C1.Win.C1TrueDBGrid.2.dll)

Remarks

Use the members of this enumeration to set the value of the BackgroundPictureDrawMode property in the C1TrueDBGrid class.

Members

Member name | Description
Center | The image is rendered in the center of the cell.
Stretch | The image is stretched to fit within the cell.
Tile | The image is tiled in the cell.

See Also

C1.Win.C1TrueDBGrid Namespace

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


BandEventArgs Class

BandEventArgs Class

Provides data for the Expand and Collapse events.

For a list of all members of this type, see BandEventArgs Members.

System.Object

System.EventArgs

C1.Win.C1TrueDBGrid.BandEventArgs

[Visual Basic]

Public Class BandEventArgs

Inherits EventArgs

[C#]

public class BandEventArgs : EventArgs

[Delphi]

type BandEventArgs = class (EventArgs);

Namespace: C1.Win.C1TrueDBGrid

Assembly: C1.Win.C1TrueDBGrid.2 (in C1.Win.C1TrueDBGrid.2.dll)

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


BandEventArgs Members

BandEventArgs Members

BandEventArgs overview

Public Properties

Band | Indicates the recordset level that holds the current row within a master-detail hierarchy.
Cancel | Gets or sets a value indicating that the action should not be performed.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


BandEventArgs Properties

BandEventArgs Properties

The properties of the BandEventArgs class are listed here. For a complete list of BandEventArgs class members, see the BandEventArgs Members topic.

Public Properties

Band | Indicates the recordset level that holds the current row within a master-detail hierarchy.
Cancel | Gets or sets a value indicating that the action should not be performed.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


BandEventArgs.Band Property

BandEventArgs.Band Property

Indicates the recordset level that holds the current row within a master-detail hierarchy.

[Visual Basic]

Public ReadOnly Property Band As Integer

[C#]

public int Band {get;}

[Delphi]

public property Band: Int32 read get_Band;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


BandEventArgs.Cancel Property

BandEventArgs.Cancel Property

Gets or sets a value indicating that the action should not be performed.

[Visual Basic]

Public Property Cancel As Boolean

[C#]

public bool Cancel {get;set;}

[Delphi]

public property Cancel: Boolean read get_Cancel write set_Cancel;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


BandEventHandler Delegate

BandEventHandler Delegate

Raised when a hierarchical node is expanded or collapsed.

[Visual Basic]

Public Delegate Sub BandEventHandler( _

ByVal sender As Object, _

ByVal e As BandEventArgs _

)

[C#]

public delegate void BandEventHandler(

object sender,

BandEventArgs e

);

[Delphi]

type BandEventHandler = procedure (

sender: Object;

e: BandEventArgs

) of object;

Namespace: C1.Win.C1TrueDBGrid

Assembly: C1.Win.C1TrueDBGrid.2 (in C1.Win.C1TrueDBGrid.2.dll)

See Also

C1.Win.C1TrueDBGrid Namespace

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


baseTypeConverter Class

baseTypeConverter Class

Base class for typeconverter.

For a list of all members of this type, see baseTypeConverter Members.

System.Object

System.ComponentModel.TypeConverter

C1.Win.C1TrueDBGrid.baseTypeConverter

C1.Win.C1TrueDBGrid.BitmapTypeConverter

[Visual Basic]

MustInherit Public Class baseTypeConverter

Inherits TypeConverter

[C#]

public abstract class baseTypeConverter : TypeConverter

[Delphi]

type baseTypeConverter = class abstract (TypeConverter);

Namespace: C1.Win.C1TrueDBGrid

Assembly: C1.Win.C1TrueDBGrid.2 (in C1.Win.C1TrueDBGrid.2.dll)

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


baseTypeConverter Members

baseTypeConverter Members

baseTypeConverter overview

Public Methods

CanConvertFrom | Overloaded. Overriden. Returns True if the source type is string.
CanConvertTo | Overloaded. Overriden. Returns True of the type of string.
ConvertFrom | Overloaded. Overriden. Overloaded. Returns whether this converter can convert an object of one type to the type of this converter.
ConvertTo | Overloaded. Overriden. Overloaded. Converts the given value object to the specified type.

Protected Methods

ObjFromString | Returns an object from it's string representation.
StringFromObj | Returns a string representation from a given object.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


baseTypeConverter Methods

baseTypeConverter Methods

The methods of the baseTypeConverter class are listed here. For a complete list of baseTypeConverter class members, see the baseTypeConverter Members topic.

Public Methods

CanConvertFrom | Overloaded. Overriden. Returns True if the source type is string.
CanConvertTo | Overloaded. Overriden. Returns True of the type of string.
ConvertFrom | Overloaded. Overriden. Overloaded. Returns whether this converter can convert an object of one type to the type of this converter.
ConvertTo | Overloaded. Overriden. Overloaded. Converts the given value object to the specified type.

Protected Methods

ObjFromString | Returns an object from it's string representation.
StringFromObj | Returns a string representation from a given object.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


baseTypeConverter.CanConvertFrom Method

baseTypeConverter.CanConvertFrom Method

Returns True if the source type is string.

[Visual Basic]

Overrides Public Function CanConvertFrom( _

ByVal context As ITypeDescriptorContext, _

ByVal sourceType As Type _

) As Boolean

[C#]

override public bool CanConvertFrom(

ITypeDescriptorContext context,

Type sourceType

);

[Delphi]

public function CanConvertFrom(

context: ITypeDescriptorContext;

sourceType: Type

): Boolean; overload; override;

Parameters

context

A System.ComponentModel.ITypeDescriptorContext that provides a format context.

sourceType

The type to convert from.

Return Value

True if the source type is string.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


baseTypeConverter.CanConvertTo Method

baseTypeConverter.CanConvertTo Method

Returns True of the type of string.

[Visual Basic]

Overrides Public Function CanConvertTo( _

ByVal context As ITypeDescriptorContext, _

ByVal type As Type _

) As Boolean

[C#]

override public bool CanConvertTo(

ITypeDescriptorContext context,

Type type

);

[Delphi]

public function CanConvertTo(

context: ITypeDescriptorContext;

type: Type

): Boolean; overload; override;

Parameters

context

A System.ComponentModel.ITypeDescriptorContext that provides a format context.

type

The type to convert to.

Return Value

True of the type of string.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


baseTypeConverter.ConvertFrom Method

baseTypeConverter.ConvertFrom Method

Overloaded. Returns whether this converter can convert an object of one type to the type of this converter.

[Visual Basic]

Overrides Public Function ConvertFrom( _

ByVal context As ITypeDescriptorContext, _

ByVal culture As CultureInfo, _

ByVal value As Object _

) As Object

[C#]

override public object ConvertFrom(

ITypeDescriptorContext context,

CultureInfo culture,

object value

);

[Delphi]

public function ConvertFrom(

context: ITypeDescriptorContext;

culture: CultureInfo;

value: Object

): Object; overload; override;

Parameters

context

A System.ComponentModel.ITypeDescriptorContext that provides a format context.

culture

The System.Globalization.CultureInfo to use as the current culture.

value

The object to convert.

Return Value

True if this converter can perform the conversion; otherwise, False.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


baseTypeConverter.ConvertTo Method

baseTypeConverter.ConvertTo Method

Overloaded. Converts the given value object to the specified type.

[Visual Basic]

Overrides Public Function ConvertTo( _

ByVal context As ITypeDescriptorContext, _

ByVal culture As CultureInfo, _

ByVal value As Object, _

ByVal type As Type _

) As Object

[C#]

override public object ConvertTo(

ITypeDescriptorContext context,

CultureInfo culture,

object value,

Type type

);

[Delphi]

public function ConvertTo(

context: ITypeDescriptorContext;

culture: CultureInfo;

value: Object;

type: Type

): Object; overload; override;

Parameters

context

A System.ComponentModel.ITypeDescriptorContext that provides a format context.

culture

A System.Globalization.CultureInfo. If Null is passed, the current culture is assumed.

value

The object to convert.

type

The type to covert to.

Return Value

The object that represents the converted value.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


baseTypeConverter.ObjFromString Method

baseTypeConverter.ObjFromString Method

Returns an object from it's string representation.

[Visual Basic]

Overridable MustOverride Protected Function ObjFromString( _

ByVal str As String _

) As Object

[C#]

virtual abstract protected object ObjFromString(

string str

);

[Delphi]

strict protected function ObjFromString(

str: String

): Object; virtual; abstract;

Parameters

str

String to be given.

Return Value

An object from it's string representation.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


baseTypeConverter.StringFromObj Method

baseTypeConverter.StringFromObj Method

Returns a string representation from a given object.

[Visual Basic]

Overridable MustOverride Protected Function StringFromObj( _

ByVal o As Object _

) As String

[C#]

virtual abstract protected string StringFromObj(

object o

);

[Delphi]

strict protected function StringFromObj(

o: Object

): String; virtual; abstract;

Parameters

o

Object to be given.

Return Value

A string representation from a given object.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


BeforeColEditEventArgs Class

BeforeColEditEventArgs Class

Provides data for the BeforeColEdit event.

For a list of all members of this type, see BeforeColEditEventArgs Members.

System.Object

System.EventArgs

C1.Win.C1TrueDBGrid.BeforeColEditEventArgs

[Visual Basic]

Public Class BeforeColEditEventArgs

Inherits EventArgs

[C#]

public class BeforeColEditEventArgs : EventArgs

[Delphi]

type BeforeColEditEventArgs = class (EventArgs);

Namespace: C1.Win.C1TrueDBGrid

Assembly: C1.Win.C1TrueDBGrid.2 (in C1.Win.C1TrueDBGrid.2.dll)

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


BeforeColEditEventArgs Members

BeforeColEditEventArgs Members

BeforeColEditEventArgs overview

Public Properties

Cancel | Gets or sets a value indicating that editing should be disallowed.
ColIndex | Indicates the position in the DisplayColumns collection.
Column | Gets the C1DisplayColumn for the column being edited.
KeyChar | Indicates the character that initiated the editing operation.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


BeforeColEditEventArgs Properties

BeforeColEditEventArgs Properties

The properties of the BeforeColEditEventArgs class are listed here. For a complete list of BeforeColEditEventArgs class members, see the BeforeColEditEventArgs Members topic.

Public Properties

Cancel | Gets or sets a value indicating that editing should be disallowed.
ColIndex | Indicates the position in the DisplayColumns collection.
Column | Gets the C1DisplayColumn for the column being edited.
KeyChar | Indicates the character that initiated the editing operation.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


BeforeColEditEventArgs.Cancel Property

BeforeColEditEventArgs.Cancel Property

Gets or sets a value indicating that editing should be disallowed.

[Visual Basic]

Public Property Cancel As Boolean

[C#]

public bool Cancel {get;set;}

[Delphi]

public property Cancel: Boolean read get_Cancel write set_Cancel;

Remarks

If event procedure sets the Cancel argument to True, the cell will not enter edit mode. Otherwise, the ColEdit event is raised immediately, followed by the Change event for the KeyChar property, if non-zero.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


BeforeColEditEventArgs.ColIndex Property

BeforeColEditEventArgs.ColIndex Property

Indicates the position in the DisplayColumns collection.

[Visual Basic]

Public ReadOnly Property ColIndex As Integer

[C#]

public int ColIndex {get;}

[Delphi]

public property ColIndex: Int32 read get_ColIndex;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


BeforeColEditEventArgs.Column Property

BeforeColEditEventArgs.Column Property

Gets the C1DisplayColumn for the column being edited.

[Visual Basic]

Public ReadOnly Property Column As C1DisplayColumn

[C#]

public C1DisplayColumn Column {get;}

[Delphi]

public property Column: C1DisplayColumn read get_Column;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


BeforeColEditEventArgs.KeyChar Property

BeforeColEditEventArgs.KeyChar Property

Indicates the character that initiated the editing operation.

[Visual Basic]

Public ReadOnly Property KeyChar As Char

[C#]

public char KeyChar {get;}

[Delphi]

public property KeyChar: Char read get_KeyChar;

Remarks

The BeforeColEdit event occurs just before the user enters edit mode by typing a character. If a floating editor marquee is not in use, this event also occurs when the user clicks the current cell or double clicks another cell.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


BeforeColEditEventHandler Delegate

BeforeColEditEventHandler Delegate

Raised before a column enters edit mode.

[Visual Basic]

Public Delegate Sub BeforeColEditEventHandler( _

ByVal sender As Object, _

ByVal e As BeforeColEditEventArgs _

)

[C#]

public delegate void BeforeColEditEventHandler(

object sender,

BeforeColEditEventArgs e

);

[Delphi]

type BeforeColEditEventHandler = procedure (

sender: Object;

e: BeforeColEditEventArgs

) of object;

Namespace: C1.Win.C1TrueDBGrid

Assembly: C1.Win.C1TrueDBGrid.2 (in C1.Win.C1TrueDBGrid.2.dll)

See Also

C1.Win.C1TrueDBGrid Namespace

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


BeforeColUpdateEventArgs Class

BeforeColUpdateEventArgs Class

Provides data for the BeforeColUpdate event.

For a list of all members of this type, see BeforeColUpdateEventArgs Members.

System.Object

System.EventArgs

C1.Win.C1TrueDBGrid.BeforeColUpdateEventArgs

[Visual Basic]

Public Class BeforeColUpdateEventArgs

Inherits EventArgs

[C#]

public class BeforeColUpdateEventArgs : EventArgs

[Delphi]

type BeforeColUpdateEventArgs = class (EventArgs);

Namespace: C1.Win.C1TrueDBGrid

Assembly: C1.Win.C1TrueDBGrid.2 (in C1.Win.C1TrueDBGrid.2.dll)

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


BeforeColUpdateEventArgs Members

BeforeColUpdateEventArgs Members

BeforeColUpdateEventArgs overview

Public Properties

Cancel | Gets or sets a value that prevents the user from moving focus to another cell.
ColIndex | Indicates the position in the DisplayColumns collection.
Column | Gets the C1DisplayColumn for the column being edited.
OldValue | Gets or sets the value of the original cell data.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


BeforeColUpdateEventArgs Properties

BeforeColUpdateEventArgs Properties

The properties of the BeforeColUpdateEventArgs class are listed here. For a complete list of BeforeColUpdateEventArgs class members, see the BeforeColUpdateEventArgs Members topic.

Public Properties

Cancel | Gets or sets a value that prevents the user from moving focus to another cell.
ColIndex | Indicates the position in the DisplayColumns collection.
Column | Gets the C1DisplayColumn for the column being edited.
OldValue | Gets or sets the value of the original cell data.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


BeforeColUpdateEventArgs.Cancel Property

BeforeColUpdateEventArgs.Cancel Property

Gets or sets a value that prevents the user from moving focus to another cell.

[Visual Basic]

Public Property Cancel As Boolean

[C#]

public bool Cancel {get;set;}

[Delphi]

public property Cancel: Boolean read get_Cancel write set_Cancel;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


BeforeColUpdateEventArgs.ColIndex Property

BeforeColUpdateEventArgs.ColIndex Property

Indicates the position in the DisplayColumns collection.

[Visual Basic]

Public ReadOnly Property ColIndex As Integer

[C#]

public int ColIndex {get;}

[Delphi]

public property ColIndex: Int32 read get_ColIndex;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


BeforeColUpdateEventArgs.Column Property

BeforeColUpdateEventArgs.Column Property

Gets the C1DisplayColumn for the column being edited.

[Visual Basic]

Public ReadOnly Property Column As C1DisplayColumn

[C#]

public C1DisplayColumn Column {get;}

[Delphi]

public property Column: C1DisplayColumn read get_Column;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


BeforeColUpdateEventArgs.OldValue Property

BeforeColUpdateEventArgs.OldValue Property

Gets or sets the value of the original cell data.

[Visual Basic]

Public Property OldValue As Object

[C#]

public object OldValue {get;set;}

[Delphi]

public property OldValue: Object read get_OldValue write set_OldValue;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


BeforeColUpdateEventHandler Delegate

BeforeColUpdateEventHandler Delegate

Raised after editing is completed in a cell.

[Visual Basic]

Public Delegate Sub BeforeColUpdateEventHandler( _

ByVal sender As Object, _

ByVal e As BeforeColUpdateEventArgs _

)

[C#]

public delegate void BeforeColUpdateEventHandler(

object sender,

BeforeColUpdateEventArgs e

);

[Delphi]

type BeforeColUpdateEventHandler = procedure (

sender: Object;

e: BeforeColUpdateEventArgs

) of object;

Namespace: C1.Win.C1TrueDBGrid

Assembly: C1.Win.C1TrueDBGrid.2 (in C1.Win.C1TrueDBGrid.2.dll)

See Also

C1.Win.C1TrueDBGrid Namespace

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


BitmapTypeConverter Class

BitmapTypeConverter Class

Typeconverter for bitmaps. Used for serialization.

For a list of all members of this type, see BitmapTypeConverter Members.

System.Object

System.ComponentModel.TypeConverter

C1.Win.C1TrueDBGrid.baseTypeConverter

C1.Win.C1TrueDBGrid.BitmapTypeConverter

[Visual Basic]

Public Class BitmapTypeConverter

Inherits baseTypeConverter

[C#]

public class BitmapTypeConverter : baseTypeConverter

[Delphi]

type BitmapTypeConverter = class (baseTypeConverter);

Namespace: C1.Win.C1TrueDBGrid

Assembly: C1.Win.C1TrueDBGrid.2 (in C1.Win.C1TrueDBGrid.2.dll)

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


BitmapTypeConverter Members

BitmapTypeConverter Members

BitmapTypeConverter overview

Protected Methods

ObjFromString | Overriden. Override. Returns the object given a string.
StringFromObj | Overriden. Override. Returns a string given an object.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


BitmapTypeConverter Methods

BitmapTypeConverter Methods

The methods of the BitmapTypeConverter class are listed here. For a complete list of BitmapTypeConverter class members, see the BitmapTypeConverter Members topic.

Protected Methods

ObjFromString | Overriden. Override. Returns the object given a string.
StringFromObj | Overriden. Override. Returns a string given an object.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


BitmapTypeConverter.ObjFromString Method

BitmapTypeConverter.ObjFromString Method

Override. Returns the object given a string.

[Visual Basic]

Overrides Protected Function ObjFromString( _

ByVal str As String _

) As Object

[C#]

override protected object ObjFromString(

string str

);

[Delphi]

strict protected function ObjFromString(

str: String

): Object; override;

Parameters

str

String to be given.

Return Value

The object given a string.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


BitmapTypeConverter.StringFromObj Method

BitmapTypeConverter.StringFromObj Method

Override. Returns a string given an object.

[Visual Basic]

Overrides Protected Function StringFromObj( _

ByVal o As Object _

) As String

[C#]

override protected string StringFromObj(

object o

);

[Delphi]

strict protected function StringFromObj(

o: Object

): String; override;

Parameters

o

Object to be given.

Return Value

String given an object.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


BorderTypeEnum Enumeration

BorderTypeEnum Enumeration

Specifies the borders for a Style.

[Visual Basic]

Public Enum BorderTypeEnum

[C#]

public enum BorderTypeEnum

[Delphi]

type BorderTypeEnum = (Fillet, Flat, Groove, Inset, InsetBevel, None, Raised, RaisedBevel);

Namespace: C1.Win.C1TrueDBGrid

Assembly: C1.Win.C1TrueDBGrid.2 (in C1.Win.C1TrueDBGrid.2.dll)

Remarks

Use the members of this enumeration to set the value of the BorderStyle property in the C1TrueDBGrid class.

Members

Member name | Description
Fillet | A fillet type border.
Flat | Borders have a Flat appearance.
Groove | A line around the inside of the border.
Inset | Borders have a 3D inset appearance.
InsetBevel | Borders have a 3D inset with a bevel.
None | No borders.
Raised | Borders have a 3D raised appearance.
RaisedBevel | Borders have a 3D raised with a bevel.

See Also

C1.Win.C1TrueDBGrid Namespace

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1DataColumn Class

C1DataColumn Class

Represents a column that defines binding information for the datasource.

For a list of all members of this type, see C1DataColumn Members.

System.Object

C1.Win.C1TrueDBGrid.C1DataColumn

C1.Win.C1TrueDBGrid.C1DropDataColumn

[Visual Basic]

Public Class C1DataColumn

[C#]

public class C1DataColumn

[Delphi]

type C1DataColumn = class;

Namespace: C1.Win.C1TrueDBGrid

Assembly: C1.Win.C1TrueDBGrid.2 (in C1.Win.C1TrueDBGrid.2.dll)

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1DataColumn Members

C1DataColumn Members

C1DataColumn overview

Public Constructors

C1DataColumn Constructor

Creates a new instance of this object.

Public Properties

Aggregate | Gets or sets the type of aggregate computed for a grouped row.
ButtonPicture | Gets or sets the image shown in a drop-down button in a column.
Caption | Gets or sets the text in the column header.
DataChanged | Gets or sets a value indicating whether data in this column has been modified.
DataField | Gets or sets the database field name for a column.
DataType | Gets or sets the DataType for a column.
DataWidth | Gets or sets the maximum number of characters which may be entered for cells in this column.
DefaultValue | Gets or sets the default value for a column when a new row is added by the grid.
DropDown | Gets or sets the C1TrueDBDropdown control associated with this column.
EditMask | Gets or sets the edit mask for a column.
EditMaskUpdate | Gets or sets a value indicating whether literal characters in the edit mask are stored to the underlying data source.
Editor | Gets or sets the editor that is used to edit cell data.
EnableDateTimeEditor | Gets or sets a value indicating whether a DateTime picker is used to edit this column.
FilterButtonPicture | Gets or sets the image show in the filter button for the column.
FilterDropdown | Gets or sets a value indicating whether a drop-down list is displayed in the filter cell that lists all the values of the field.
FilterEscape | Gets or sets the characters that should be escaped when applying the filter criteria to the datasource.
FilterKeys | Gets or sets the key used to initiate the filtering operation as the user types in the filterbar.
FilterOperator | Gets or sets the operator that is used for a filter expression.
FilterText | Gets or sets the data associated with the value of the filter for a column.
FooterText | Gets or sets the text displayed in the column footer.
GroupInfo | Gets or sets the GroupInfo associated with this column.
Level | Gets or sets the level of this column in a hierarchical data source.
NumberFormat | Gets or sets the formmating string for a column.
SortDirection | Gets or sets the state of the sorting glyph in the column caption.
Tag | Gets or sets a user defined objects associated with this column.
Text | Gets or sets the display value for the current cell.
Value | Gets or sets the value of the current cell.
ValueItems | Gets the ValueItems object for this column.

Public Methods

CellText | Gets the display value for a cell in a given row.
CellValue | Gets the cell value for a given row.
Refetch | Repopulate the entire grid from the data source.
RefetchCell | Overloaded. Repopulates the current cell from the data source.
Refresh | Invalidate the current column in all visible rows.
RefreshCell | Overloaded. Invalidate the current cell.
ResetButtonPicture | Resets ButtonPicture to its default value.
ResetFilterButtonPicture | Resets FilterButtonPicture to its default value.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1DataColumn Constructor

C1DataColumn Constructor

Overload List

Creates a new instance of this object.

[Visual Basic] Public Function New()

[C#] public C1DataColumn();

[Delphi] public constructor Create(); overload;

Creates a new instance of this object.

[Visual Basic] Public Function New(String, Type)

[C#] public C1DataColumn(string, Type);

[Delphi] public constructor Create(String; Type); overload;

Creates a new instance of this object.

[Visual Basic] Public Function New(String, String, Type)

[C#] public C1DataColumn(string, string, Type);

[Delphi] public constructor Create(String; String; Type); overload;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1DataColumn Constructor ()

C1DataColumn Constructor ()

Previous Next

Creates a new instance of this object.

[Visual Basic]

Public Function New()

[C#]

public C1DataColumn()

[Delphi]

public constructor Create(); overload;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1DataColumn Constructor (String, Type)

C1DataColumn Constructor (String, Type)

Previous Next

Creates a new instance of this object.

[Visual Basic]

Public Function New( _

ByVal caption As String, _

ByVal datatype As Type _

)

[C#]

public C1DataColumn(

string caption,

Type datatype

);

[Delphi]

public constructor Create(

caption: String;

datatype: Type

); overload;

Parameters

caption

The column caption.

datatype

The data type.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1DataColumn Constructor (String, String, Type)

C1DataColumn Constructor (String, String, Type)

Previous Next

Creates a new instance of this object.

[Visual Basic]

Public Function New( _

ByVal caption As String, _

ByVal datafield As String, _

ByVal datatype As Type _

)

[C#]

public C1DataColumn(

string caption,

string datafield,

Type datatype

);

[Delphi]

public constructor Create(

caption: String;

datafield: String;

datatype: Type

); overload;

Parameters

caption

The column caption.

datafield

The field from the data source.

datatype

The data type.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1DataColumn Properties

C1DataColumn Properties

The properties of the C1DataColumn class are listed here. For a complete list of C1DataColumn class members, see the C1DataColumn Members topic.

Public Properties

Aggregate | Gets or sets the type of aggregate computed for a grouped row.
ButtonPicture | Gets or sets the image shown in a drop-down button in a column.
Caption | Gets or sets the text in the column header.
DataChanged | Gets or sets a value indicating whether data in this column has been modified.
DataField | Gets or sets the database field name for a column.
DataType | Gets or sets the DataType for a column.
DataWidth | Gets or sets the maximum number of characters which may be entered for cells in this column.
DefaultValue | Gets or sets the default value for a column when a new row is added by the grid.
DropDown | Gets or sets the C1TrueDBDropdown control associated with this column.
EditMask | Gets or sets the edit mask for a column.
EditMaskUpdate | Gets or sets a value indicating whether literal characters in the edit mask are stored to the underlying data source.
Editor | Gets or sets the editor that is used to edit cell data.
EnableDateTimeEditor | Gets or sets a value indicating whether a DateTime picker is used to edit this column.
FilterButtonPicture | Gets or sets the image show in the filter button for the column.
FilterDropdown | Gets or sets a value indicating whether a drop-down list is displayed in the filter cell that lists all the values of the field.
FilterEscape | Gets or sets the characters that should be escaped when applying the filter criteria to the datasource.
FilterKeys | Gets or sets the key used to initiate the filtering operation as the user types in the filterbar.
FilterOperator | Gets or sets the operator that is used for a filter expression.
FilterText | Gets or sets the data associated with the value of the filter for a column.
FooterText | Gets or sets the text displayed in the column footer.
GroupInfo | Gets or sets the GroupInfo associated with this column.
Level | Gets or sets the level of this column in a hierarchical data source.
NumberFormat | Gets or sets the formmating string for a column.
SortDirection | Gets or sets the state of the sorting glyph in the column caption.
Tag | Gets or sets a user defined objects associated with this column.
Text | Gets or sets the display value for the current cell.
Value | Gets or sets the value of the current cell.
ValueItems | Gets the ValueItems object for this column.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1DataColumn.Aggregate Property

C1DataColumn.Aggregate Property

Gets or sets the type of aggregate computed for a grouped row.

[Visual Basic]

Public Property Aggregate As AggregateEnum

[C#]

public AggregateEnum Aggregate {get;set;}

[Delphi]

public property Aggregate: AggregateEnum read get_Aggregate write set_Aggregate;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1DataColumn.ButtonPicture Property

C1DataColumn.ButtonPicture Property

Gets or sets the image shown in a drop-down button in a column.

[Visual Basic]

Public Property ButtonPicture As Image

[C#]

public Image ButtonPicture {get;set;}

[Delphi]

public property ButtonPicture: Image read get_ButtonPicture write set_ButtonPicture;

Remarks

This property sets or returns the bitmap used to draw the in-cell button for the current cell in the specified column. The in-cell button bitmap is enabled when any of the following are true:

· The column's Button property is set to True.

· The column's DropDown property is set to the name of a C1TrueDBDropdown control.

· The Presentation property of the column's ValueItems collection is set to Combo Box or Sorted Combo Box.

By default, True DBGrid uses a down arrow for the in-cell button.

However, the button bitmap can be changed at design time using either the General or Columns property page. Or, a bitmap can be assigned to the ButtonPicture property in code at run time:

· Visual Basic

· C#

· Delphi

Note: The grid automatically draws the edges corresponding to the button's up/down states as appropriate, so only the interior image needs provided (a light gray background is recommended).

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1DataColumn.Caption Property

C1DataColumn.Caption Property

Gets or sets the text in the column header.

[Visual Basic]

Public Property Caption As String

[C#]

public string Caption {get;set;}

[Delphi]

public property Caption: String read get_Caption write set_Caption;

Remarks

For a C1TrueDBGrid control, this property determines the text displayed in the caption bar at the top of the grid.

Setting the Caption property to an empty string for a C1TrueDBGrid control hides its caption bar.

For a C1DataColumn object, this property determines the text displayed in the object's heading area.

Setting the Caption property to an empty string for a C1DataColumn object clears the text in the column's heading area but does not hide the heading. Column captions are only displayed if the grid's ColumnHeaders property is set to True.

Setting the Caption property to an empty string for a Split object hides the heading area, even if other splits have non-empty captions.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1DataColumn.DataChanged Property

C1DataColumn.DataChanged Property

Gets or sets a value indicating whether data in this column has been modified.

[Visual Basic]

Public Property DataChanged As Boolean

[C#]

public bool DataChanged {get;set;}

[Delphi]

public property DataChanged: Boolean read get_DataChanged write set_DataChanged;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1DataColumn.DataField Property

C1DataColumn.DataField Property

Gets or sets the database field name for a column.

[Visual Basic]

Public Property DataField As String

[C#]

public string DataField {get;set;}

[Delphi]

public property DataField: String read get_DataField write set_DataField;

Remarks

The DataField property returns or sets the name of the field in the database table to which a grid column is bound.

The DataField property is used to bind a column to a particular field in the database table. If the specified field does not exist in the database table, binding does not occur, and the column will be blank at run time.

To specify an unbound column in a bound grid, the DataField property must be empty in order for the column data to be requested in the UnboundColumnFetch event.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1DataColumn.DataType Property

C1DataColumn.DataType Property

Gets or sets the DataType for a column.

[Visual Basic]

Public Property DataType As Type

[C#]

public Type DataType {get;set;}

[Delphi]

public property DataType: Type read get_DataType write set_DataType;

Remarks

You cannot change the DataType for a bound column.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1DataColumn.DataWidth Property

C1DataColumn.DataWidth Property

Gets or sets the maximum number of characters which may be entered for cells in this column.

[Visual Basic]

Public Property DataWidth As Integer

[C#]

public int DataWidth {get;set;}

[Delphi]

public property DataWidth: Int32 read get_DataWidth write set_DataWidth;

Remarks

This property holds the database width, in bytes, for a grid column. It is set to the appropriate field width (not display width) automatically when the layout of a bound grid is initialized at run time.

This property does not affect the physical size of a column, but imposes a limit on the number of characters that may be entered when editing a cell. If set to 0, no such limits are imposed. Setting this property does not cause truncation of existing data.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1DataColumn.DefaultValue Property

C1DataColumn.DefaultValue Property

Gets or sets the default value for a column when a new row is added by the grid.

[Visual Basic]

Public Property DefaultValue As String

[C#]

public string DefaultValue {get;set;}

[Delphi]

public property DefaultValue: String read get_DefaultValue write set_DefaultValue;

Remarks

This property returns or sets the default value of an unbound grid column in a bound grid. Unbound columns are typically used to display calculated fields or local data not maintained by the primary data source.

This property applies only to unbound columns. The value specified will be preloaded into the last argument passed to the UnboundColumnFetch event.

The DefaultValue property can also be used to identify specific columns in the UnboundColumnFetch event when columns are added, moved, or removed at run time.

This property can also be used as a tag for a column (whether it is bound or unbound). Arbitrary values can be stored and retrieved later.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1DataColumn.DropDown Property

C1DataColumn.DropDown Property

Gets or sets the C1TrueDBDropdown control associated with this column.

[Visual Basic]

Public Property DropDown As C1TrueDBDropdown

[C#]

public C1TrueDBDropdown DropDown {get;set;}

[Delphi]

public property DropDown: C1TrueDBDropdown read get_DropDown write set_DropDown;

Remarks

This property associates a C1TrueDBDropdown control with a column in a C1TrueDBGrid control. When the user clicks the column's in-cell button, the associated C1TrueDBDropdown control is displayed below the current cell.

Use the DropDown property and a C1TrueDBDropdown control to implement a multicolumn drop-down list box that works seamlessly with a C1TrueDBGrid control. The ListField property of the drop-down control determines which column is used for incremental search. The DataField property of the drop-down control determines which grid column is updated when the user selects an item.

Note: When the DropDown property of a column is set to a C1TrueDBDropdown control, then the Button property for that column will be set to True. Similarly, if the DropDown property of a column is set to null, then the Button property for that column will be set to False.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1DataColumn.EditMask Property

C1DataColumn.EditMask Property

Gets or sets the edit mask for a column.

[Visual Basic]

Public Property EditMask As String

[C#]

public string EditMask {get;set;}

[Delphi]

public property EditMask: String read get_EditMask write set_EditMask;

Remarks

The EditMask property allows an input mask to be specified for automatic input formatting and validation. The mask syntax is similar to the one used by Microsoft Access. Setting the input mask for a column will prevent the user from entering any information in the cell that is not in the format of the EditMask string.

The EditMask must be a string composed of the following symbols:

Wildcards

0 digit

9 digit or space

# digit or sign

L letter

? letter or space

a letter or digit

a letter, digit or space

& any character

Localized characters

. localized decimal separator

, localized thousand separator

: localized time separator

/ localized date separator

Command characters

\ next character is taken as a literal

> translate letters to uppercase

< translate letters to lowercase

Example

· Visual Basic

· C#

· Delphi

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1DataColumn.EditMaskUpdate Property

C1DataColumn.EditMaskUpdate Property

Gets or sets a value indicating whether literal characters in the edit mask are stored to the underlying data source.

[Visual Basic]

Public Property EditMaskUpdate As Boolean

[C#]

public bool EditMaskUpdate {get;set;}

[Delphi]

public property EditMaskUpdate: Boolean read get_EditMaskUpdate write set_EditMaskUpdate;

Remarks

Normally, after the user finishes editing a cell in a column that has its EditMask property set, C1TrueDBGrid caches the modified cell text, but any literal characters in the input mask template will be stripped from the modified cell text beforehand. However, this behavior can be overridden with the EditMaskUpdate property.

By default, the EditMaskUpdate property is False. This means that when the modified cell text is updated to the database, the grid sends the cached text (stripped of literals), not the formatted text displayed in the cell. This default behavior can be overridden by setting the EditMaskUpdate property to True, which causes the cached text to be formatted according to the EditMask property before being updated to the database.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1DataColumn.Editor Property

C1DataColumn.Editor Property

Gets or sets the editor that is used to edit cell data.

[Visual Basic]

Public Property Editor As Control

[C#]

public Control Editor {get;set;}

[Delphi]

public property Editor: Control read get_Editor write set_Editor;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1DataColumn.EnableDateTimeEditor Property

C1DataColumn.EnableDateTimeEditor Property

Gets or sets a value indicating whether a DateTime picker is used to edit this column.

[Visual Basic]

Public Property EnableDateTimeEditor As Boolean

[C#]

public bool EnableDateTimeEditor {get;set;}

[Delphi]

public property EnableDateTimeEditor: Boolean read get_EnableDateTimeEditor write set_EnableDateTimeEditor;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1DataColumn.FilterButtonPicture Property

C1DataColumn.FilterButtonPicture Property

Gets or sets the image show in the filter button for the column.

[Visual Basic]

Public Property FilterButtonPicture As Image

[C#]

public Image FilterButtonPicture {get;set;}

[Delphi]

public property FilterButtonPicture: Image read get_FilterButtonPicture write set_FilterButtonPicture;

Remarks

This property sets or returns the bitmap used to draw the in-cell button for the curret filter in the specified column. The in-cell button bitmap is enabled when any of the following are true:

· The column's Button property is set to True.

· The column's DropDown property is set to the name of a C1TrueDBDropdown control.

The Presentation property of the column's ValueItems collection is set to Combo Box or Sorted Combo Box.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1DataColumn.FilterDropdown Property

C1DataColumn.FilterDropdown Property

Gets or sets a value indicating whether a drop-down list is displayed in the filter cell that lists all the values of the field.

[Visual Basic]

Public Property FilterDropdown As Boolean

[C#]

public bool FilterDropdown {get;set;}

[Delphi]

public property FilterDropdown: Boolean read get_FilterDropdown write set_FilterDropdown;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1DataColumn.FilterEscape Property

C1DataColumn.FilterEscape Property

Gets or sets the characters that should be escaped when applying the filter criteria to the datasource.

[Visual Basic]

Public Property FilterEscape As String

[C#]

public string FilterEscape {get;set;}

[Delphi]

public property FilterEscape: String read get_FilterEscape write set_FilterEscape;

Remarks

The default value for this property is "*%".

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1DataColumn.FilterKeys Property

C1DataColumn.FilterKeys Property

Gets or sets the key used to initiate the filtering operation as the user types in the filterbar.

[Visual Basic]

Public Property FilterKeys As Keys

[C#]

public Keys FilterKeys {get;set;}

[Delphi]

public property FilterKeys: Keys read get_FilterKeys write set_FilterKeys;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1DataColumn.FilterOperator Property

C1DataColumn.FilterOperator Property

Gets or sets the operator that is used for a filter expression.

[Visual Basic]

Public Property FilterOperator As String

[C#]

public string FilterOperator {get;set;}

[Delphi]

public property FilterOperator: String read get_FilterOperator write set_FilterOperator;

Remarks

Leaving this property at it's default state uses the "=" operator for all expressions except for strings. String data types use the Like operator for example:

CustName like "john*"

If you define an operator for string type columns, no wildcards are inserted into the filter. For example if you set the FilterOperator to "=" then the above sample would filter as:

CustName = "john"

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1DataColumn.FilterText Property

C1DataColumn.FilterText Property

Gets or sets the data associated with the value of the filter for a column.

[Visual Basic]

Public Property FilterText As String

[C#]

public string FilterText {get;set;}

[Delphi]

public property FilterText: String read get_FilterText write set_FilterText;

Remarks

When applied to a C1DataColumn object, this property returns or sets the data associated with the value of the filter for the specified column.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1DataColumn.FooterText Property

C1DataColumn.FooterText Property

Gets or sets the text displayed in the column footer.

[Visual Basic]

Public Property FooterText As String

[C#]

public string FooterText {get;set;}

[Delphi]

public property FooterText: String read get_FooterText write set_FooterText;

Remarks

This property returns or sets the text displayed in the column's footing area.

Setting the FooterText property to an empty string clears the text in the column's footing area but does not hide the footing. Column footings are only displayed if the grid's ColumnFooters property is set to True and the ColumnFooterHeight property is not set to 0.

Example

The following code sets the FooterText property:

· Visual Basic

· C#

· Delphi

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1DataColumn.GroupInfo Property

C1DataColumn.GroupInfo Property

Gets or sets the GroupInfo associated with this column.

[Visual Basic]

Public Property GroupInfo As GroupInfo

[C#]

public GroupInfo GroupInfo {get;set;}

[Delphi]

public property GroupInfo: GroupInfo read get_GroupInfo write set_GroupInfo;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1DataColumn.Level Property

C1DataColumn.Level Property

Gets or sets the level of this column in a hierarchical data source.

[Visual Basic]

Public Property Level As Integer

[C#]

public int Level {get;set;}

[Delphi]

public property Level: Int32 read get_Level write set_Level;

Remarks

This property should only be used when defining columns at design time when using a hierarchical datasource.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1DataColumn.NumberFormat Property

C1DataColumn.NumberFormat Property

Gets or sets the formmating string for a column.

[Visual Basic]

Public Property NumberFormat As String

[C#]

public string NumberFormat {get;set;}

[Delphi]

public property NumberFormat: String read get_NumberFormat write set_NumberFormat;

Remarks

This property returns or sets a value indicating the format string for a grid column. By default, the NumberFormat property contains an empty string, and column data is unformatted.

For numeric data, the following predefined format names can be used:

General Number

Display number as is, with no thousand separators.

Currency

Display number with thousand separator, if appropriate; display two digits to the right of the decimal separator. Note that output is based on system locale settings.

Fixed

Display at least one digit to the left and two digits to the right of the decimal separator.

Standard

Display number with thousands separator, at least one digit to the left and two digits to the right of the decimal separator.

Percent

Display number multiplied by 100 with a percent sign (%) appended to the right; always display two digits to the right of the decimal separator.

Scientific

Use standard scientific notation.

Yes/No

Display No if number is 0; otherwise, display Yes.

True/False

Display False if number is 0; otherwise, display True.

On/Off

Display Off if number is 0; otherwise, display On.

For date and time data, the following predefined format names can be used:

General Date

Display a date and/or time. For real numbers, display a date and time (for example, 4/3/93 05:34 PM); if there is no fractional part, display only a date (for example, 4/3/93); if there is no integer part, display only a time (for example, 05:34 PM). Date display is determined by your system settings.

Long Date

Display a date according to your system's long date format.

Medium Date

Display a date using the medium date format appropriate for the language version of Visual Basic.

Short Date

Display a date using your system's short date format.

Long Time

Display a time using your system's long time format: includes hours, minutes, and seconds.

Medium Time

Display a time in 12-hour format using hours and minutes and the AM/PM designator.

Short Time

Display a time using the 24-hour format (for example, 17:45).

For arbitrary data, the following predefined format names can be used:

Edit Mask

Use the column's EditMask property to format the data for display as well as editing.

FormatText Event

Fire the FormatText event for the associated column. This option allows you to write your own formatting code for situations where Visual Basic's intrinsic formatting is unavailable or does not suit your needs.

The NumberFormat property also accepts user-defined format strings. See the Microsoft Visual Basic documentation (Format function) for details.

If the NumberFormat property is set to an invalid string, cell data are displayed as #ERR#.

Example

The following code sets the NumberFormat property of the HireDate column to Medium Date:

· Visual Basic

· C#

· Delphi

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1DataColumn.SortDirection Property

C1DataColumn.SortDirection Property

Gets or sets the state of the sorting glyph in the column caption.

[Visual Basic]

Public Property SortDirection As SortDirEnum

[C#]

public SortDirEnum SortDirection {get;set;}

[Delphi]

public property SortDirection: SortDirEnum read get_SortDirection write set_SortDirection;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1DataColumn.Tag Property

C1DataColumn.Tag Property

Gets or sets a user defined objects associated with this column.

[Visual Basic]

Public Property Tag As Object

[C#]

public object Tag {get;set;}

[Delphi]

public property Tag: Object read get_Tag write set_Tag;

Remarks

This property returns or sets an expression that stores any extra data needed for the application. Unlike other properties, the value of the Tag property is not used by the grid.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1DataColumn.Text Property

C1DataColumn.Text Property

Gets or sets the display value for the current cell.

[Visual Basic]

Public Property Text As String

[C#]

public string Text {get;set;}

[Delphi]

public property Text: String read get_Text write set_Text;

Remarks

When applied to a C1DataColumn object, this property returns or sets the formatted data value in a column for the current row.

The value returned by the Text property is derived from the underlying data value by applying the formatting as specified by the NumberFormat property of the C1DataColumn object.

When the Text property is set for a formatted column, the underlying data value cannot be derived, and the Text and Value properties will subsequently return the same result.

Use the Value property to access the underlying data value in a column for the current row.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1DataColumn.Value Property

C1DataColumn.Value Property

Gets or sets the value of the current cell.

[Visual Basic]

Public Property Value As Object

[C#]

public object Value {get;set;}

[Delphi]

public property Value: Object read get_Value write set_Value;

Remarks

This property returns or sets the underlying data value in a column for the current row.

The Value property is useful for simulating data entry within a cell. When this property is set, the value displayed in the cell respects the setting of the column's NumberFormat property.

Use the Text property to access the formatted data value in a column for the current row.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1DataColumn.ValueItems Property

C1DataColumn.ValueItems Property

Gets the ValueItems object for this column.

[Visual Basic]

Public Property ValueItems As ValueItems

[C#]

public ValueItems ValueItems {get;set;}

[Delphi]

public property ValueItems: ValueItems read get_ValueItems write set_ValueItems;

Remarks

This property returns a ValueItems object for a column.

Note: At design time, use the ValueItems object to set presentation properties for a column.

In the ActiveX versions, Valueitems was a collection. In .NET, ValueItems is an object that has properties and also exposes a collection of Value/DisplayValue pairs.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1DataColumn Methods

C1DataColumn Methods

The methods of the C1DataColumn class are listed here. For a complete list of C1DataColumn class members, see the C1DataColumn Members topic.

Public Methods

CellText | Gets the display value for a cell in a given row.
CellValue | Gets the cell value for a given row.
Refetch | Repopulate the entire grid from the data source.
RefetchCell | Overloaded. Repopulates the current cell from the data source.
Refresh | Invalidate the current column in all visible rows.
RefreshCell | Overloaded. Invalidate the current cell.
ResetButtonPicture | Resets ButtonPicture to its default value.
ResetFilterButtonPicture | Resets FilterButtonPicture to its default value.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1DataColumn.CellText Method

C1DataColumn.CellText Method

Gets the display value for a cell in a given row.

[Visual Basic]

Public Function CellText( _

ByVal row As Integer _

) As String

[C#]

public string CellText(

int row

);

[Delphi]

public function CellText(

row: Int32

): String;

Parameters

row

The row to fetch.

Return Value

The display value.

Remarks

The CellText method returns a formatted string representation of the data in a column for the row specified by the bookmark argument. Using the CellText method is similar to accessing the Text property, except that you can select a specific row from which to retrieve the value.

The value returned by the CellText method is derived from the underlying data value by applying the formatting as specified by the NumberFormat property of the C1DataColumn object.

Using the CellText method to extract information from a cell does not affect the current selection.

Use the CellValue method to access the unformatted data value for the specified row.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1DataColumn.CellValue Method

C1DataColumn.CellValue Method

Gets the cell value for a given row.

[Visual Basic]

Public Function CellValue( _

ByVal row As Integer _

) As Object

[C#]

public object CellValue(

int row

);

[Delphi]

public function CellValue(

row: Int32

): Object;

Parameters

row

The row to fetch.

Return Value

The underlying data from the data source.

Remarks

The CellValue method returns the raw data value in a column for the row specified by the row argument. Using the CellValue method is similar to accessing the Value property, except that a specific row can be selected from which to retrieve the value.

Using the CellValue method to extract information from a cell does not affect the current selection.

Use the CellText method to access the formatted data value for the specified row.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1DataColumn.Refetch Method

C1DataColumn.Refetch Method

Repopulate the entire grid from the data source.

[Visual Basic]

Public Sub Refetch()

[C#]

public void Refetch()

[Delphi]

public procedure Refetch();

Remarks

The Refetch method repopulates the cells of the specified column from a data source control and/or unbound events. It also repaints the column's visible cells, firing all events necessary for redisplay.

By default, the grid retrieves data automatically as needed. It fetches rows in blocks of ten, and only gathers data for visible columns. However, in some cases, performance can be improved by fetching only the data for a single (changed) column. The Refetch method is provided for this purpose.

Note: The Refetch method does not force the data source control to refresh its own data from the underlying database. Use data control methods or options to accomplish this.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1DataColumn.RefetchCell Method

C1DataColumn.RefetchCell Method

Overload List

Repopulates the current cell from the data source.

[Visual Basic] Overloads Public Sub RefetchCell()

[C#] public void RefetchCell();

[Delphi] public procedure RefetchCell(); overload;

Repopulates the specified data from the data source.

[Visual Basic] Overloads Public Sub RefetchCell(Integer)

[C#] public void RefetchCell(int);

[Delphi] public procedure RefetchCell(Int32); overload;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1DataColumn.RefetchCell Method ()

C1DataColumn.RefetchCell Method ()

Previous Next

Repopulates the current cell from the data source.

[Visual Basic]

Overloads Public Sub RefetchCell()

[C#]

public void RefetchCell()

[Delphi]

public procedure RefetchCell(); overload;

Remarks

The RefetchCell method repopulates the specified cell from a data source control and/or unbound events. It also repaints the cell, firing all events necessary for redisplay.

By default, the grid retrieves data automatically as needed. The RefetchCell method is provided for this purpose.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1DataColumn.RefetchCell Method (Int32)

C1DataColumn.RefetchCell Method (Int32)

Previous Next

Repopulates the specified data from the data source.

[Visual Basic]

Overloads Public Sub RefetchCell( _

ByVal row As Integer _

)

[C#]

public void RefetchCell(

int row

);

[Delphi]

public procedure RefetchCell(

row: Int32

); overload;

Parameters

row

The row to refetch.

Remarks

The RefetchCell method repopulates the specified cell from a data source control and/or unbound events. It also repaints the cell, firing all events necessary for redisplay.

By default, the grid retrieves data automatically as needed. The RefetchCell method is provided for this purpose.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1DataColumn.Refresh Method

C1DataColumn.Refresh Method

Invalidate the current column in all visible rows.

[Visual Basic]

Public Sub Refresh()

[C#]

public void Refresh()

[Delphi]

public procedure Refresh();

Remarks

For a C1DataColumn object, the Refresh method repaints the entire column. Normally, the grid repaints automatically as needed. However, if handlers have been written for the Paint or OwnerDrawCell events, use this method to force a column to be repainted and hence cause the appropriate events to fire.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1DataColumn.RefreshCell Method

C1DataColumn.RefreshCell Method

Overload List

Invalidate the current cell.

[Visual Basic] Overloads Public Sub RefreshCell()

[C#] public void RefreshCell();

[Delphi] public procedure RefreshCell(); overload;

Invalidate the cell at the given row.

[Visual Basic] Overloads Public Sub RefreshCell(Integer)

[C#] public void RefreshCell(int);

[Delphi] public procedure RefreshCell(Int32); overload;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1DataColumn.RefreshCell Method ()

C1DataColumn.RefreshCell Method ()

Previous Next

Invalidate the current cell.

[Visual Basic]

Overloads Public Sub RefreshCell()

[C#]

public void RefreshCell()

[Delphi]

public procedure RefreshCell(); overload;

Remarks

The Refresh method repaints the specified cell. Normally, the grid repaints automatically as needed. However, if handlers have been written for the Paint or OwnerDrawCell events, use this method to force a cell to be repainted and hence cause the appropriate events to fire.

Note: The RefreshCell method does not refetch data from a data source control.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1DataColumn.RefreshCell Method (Int32)

C1DataColumn.RefreshCell Method (Int32)

Previous Next

Invalidate the cell at the given row.

[Visual Basic]

Overloads Public Sub RefreshCell( _

ByVal row As Integer _

)

[C#]

public void RefreshCell(

int row

);

[Delphi]

public procedure RefreshCell(

row: Int32

); overload;

Parameters

row

Row to invalidate.

Remarks

The Refresh method repaints the specified cell. Normally, the grid repaints automatically as needed. However, if handlers have been written for the Paint or OwnerDrawCell events, use this method to force a cell to be repainted and hence cause the appropriate events to fire.

Note: The RefreshCell method does not refetch data from a data source control.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1DataColumn.ResetButtonPicture Method

C1DataColumn.ResetButtonPicture Method

Resets ButtonPicture to its default value.

[Visual Basic]

Public Sub ResetButtonPicture()

[C#]

public void ResetButtonPicture()

[Delphi]

public procedure ResetButtonPicture();

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1DataColumn.ResetFilterButtonPicture Method

C1DataColumn.ResetFilterButtonPicture Method

Resets FilterButtonPicture to its default value.

[Visual Basic]

Public Sub ResetFilterButtonPicture()

[C#]

public void ResetFilterButtonPicture()

[Delphi]

public procedure ResetFilterButtonPicture();

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1DataColumnCollection Class

C1DataColumnCollection Class

Contains a collection of C1DataColumn objects.

For a list of all members of this type, see C1DataColumnCollection Members.

System.Object

System.Collections.CollectionBase

C1.Win.C1TrueDBGrid.C1DataColumnCollection

C1.Win.C1TrueDBGrid.GroupedColumnCollection

C1.Win.C1TrueDBGrid.SelectedColumnCollection

[Visual Basic]

Public Class C1DataColumnCollection

Inherits CollectionBase

[C#]

public class C1DataColumnCollection : CollectionBase

[Delphi]

type C1DataColumnCollection = class (CollectionBase);

Namespace: C1.Win.C1TrueDBGrid

Assembly: C1.Win.C1TrueDBGrid.2 (in C1.Win.C1TrueDBGrid.2.dll)

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1DataColumnCollection Members

C1DataColumnCollection Members

C1DataColumnCollection overview

Public Properties

Item

Overloaded. Gets the specified C1DataColumn from the collection at the specified index.

Public Methods

Add | Adds a C1DataColumn to the end of the collection.
Clear | Removes all elements from the collection.
IndexOf | Gets the index of the specified C1DataColumn.
Insert | Inserts a C1DataColumn at the specified index.
RemoveAt | Removes the C1DataColumn at the specified index.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1DataColumnCollection Properties

C1DataColumnCollection Properties

The properties of the C1DataColumnCollection class are listed here. For a complete list of C1DataColumnCollection class members, see the C1DataColumnCollection Members topic.

Public Properties

Item

Overloaded. Gets the specified C1DataColumn from the collection at the specified index.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1DataColumnCollection.Item Property

C1DataColumnCollection.Item Property

Overload List

Gets the specified C1DataColumn from the collection at the specified index.

[Visual Basic] Overloads Public Default Property Item(Integer) As C1DataColumn

[C#] public C1DataColumn this[int]{get;set;}

[Delphi] public property Item[index: Int32]: C1DataColumn read get_Item write set_Item;

Gets the specified C1DataColumn from the collection with the specified name.

[Visual Basic] Overloads Public Default ReadOnly Property Item(String) As C1DataColumn

[C#] public C1DataColumn this[string]{get;}

[Delphi] public property Item[name: String]: C1DataColumn read get_Item;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1DataColumnCollection.Item Property (Int32)

C1DataColumnCollection.Item Property (Int32)

Previous Next

Gets the specified C1DataColumn from the collection at the specified index.

[Visual Basic]

Public Default Property Item( _

ByVal index As Integer _

) As C1DataColumn

[C#]

public C1DataColumn this[

int index

] {get;set;}

[Delphi]

public property Item[

index: Int32

]: C1DataColumn read get_Item write set_Item;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1DataColumnCollection.Item Property (String)

C1DataColumnCollection.Item Property (String)

Previous Next

Gets the specified C1DataColumn from the collection with the specified name.

[Visual Basic]

Public Default ReadOnly Property Item( _

ByVal name As String _

) As C1DataColumn

[C#]

public C1DataColumn this[

string name

] {get;}

[Delphi]

public property Item[

name: String

]: C1DataColumn read get_Item;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1DataColumnCollection Methods

C1DataColumnCollection Methods

The methods of the C1DataColumnCollection class are listed here. For a complete list of C1DataColumnCollection class members, see the C1DataColumnCollection Members topic.

Public Methods

Add | Adds a C1DataColumn to the end of the collection.
Clear | Removes all elements from the collection.
IndexOf | Gets the index of the specified C1DataColumn.
Insert | Inserts a C1DataColumn at the specified index.
RemoveAt | Removes the C1DataColumn at the specified index.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1DataColumnCollection.Add Method

C1DataColumnCollection.Add Method

Adds a C1DataColumn to the end of the collection.

[Visual Basic]

Overridable Public Function Add( _

ByVal dc As C1DataColumn _

) As Integer

[C#]

virtual public int Add(

C1DataColumn dc

);

[Delphi]

public function Add(

dc: C1DataColumn

): Int32; virtual;

Parameters

dc

The C1DataColumn to add.

Return Value

The index at which the C1DataColumn has been added.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1DataColumnCollection.Clear Method

C1DataColumnCollection.Clear Method

Removes all elements from the collection.

[Visual Basic]

Public Sub Clear()

[C#]

new public void Clear()

[Delphi]

public procedure Clear();

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1DataColumnCollection.IndexOf Method

C1DataColumnCollection.IndexOf Method

Gets the index of the specified C1DataColumn.

[Visual Basic]

Public Function IndexOf( _

ByVal dc As C1DataColumn _

) As Integer

[C#]

public int IndexOf(

C1DataColumn dc

);

[Delphi]

public function IndexOf(

dc: C1DataColumn

): Int32;

Parameters

dc

The C1DataColumn to index.

Return Value

The index of the the C1DataColumn.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1DataColumnCollection.Insert Method

C1DataColumnCollection.Insert Method

Inserts a C1DataColumn at the specified index.

[Visual Basic]

Overridable Public Sub Insert( _

ByVal index As Integer, _

ByVal dc As C1DataColumn _

)

[C#]

virtual public void Insert(

int index,

C1DataColumn dc

);

[Delphi]

public procedure Insert(

index: Int32;

dc: C1DataColumn

); virtual;

Parameters

index

The zero-based index at which the C1DataColumn should be inserted.

dc

The C1DataColumn to insert.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1DataColumnCollection.RemoveAt Method

C1DataColumnCollection.RemoveAt Method

Removes the C1DataColumn at the specified index.

[Visual Basic]

Public Sub RemoveAt( _

ByVal index As Integer _

)

[C#]

new public void RemoveAt(

int index

);

[Delphi]

public procedure RemoveAt(

index: Int32

);

Parameters

index

The zero-based index of the row to remove.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1DisplayColumn Class

C1DisplayColumn Class

Represents the columns in a split.

For a list of all members of this type, see C1DisplayColumn Members.

System.Object

C1.Win.C1TrueDBGrid.C1DisplayColumn

C1.Win.C1TrueDBGrid.C1DropDisplayColumn

[Visual Basic]

Public Class C1DisplayColumn

Implements IDisposable

[C#]

public class C1DisplayColumn : IDisposable

[Delphi]

type C1DisplayColumn = class (TObject, IDisposable);

Namespace: C1.Win.C1TrueDBGrid

Assembly: C1.Win.C1TrueDBGrid.2 (in C1.Win.C1TrueDBGrid.2.dll)

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1DisplayColumn Members

C1DisplayColumn Members

C1DisplayColumn overview

Public Properties

AllowFocus | Gets or sets a value indicating the ability of a column to receive focus.
AllowSizing | Gets or sets a value indicating whether column resizing is allowed.
AutoComplete | Gets or sets a value indicating whether the drop-down auto fills the edit portion with the matched entry.
AutoDropDown | Gets or sets a value indicating whether the drop-down opens automatically when a key is typed.
Button | Gets or sets a value indicating whether a drop-down button will be displayed in this column.
ButtonAlways | Gets or sets a value indicating whether buttons will be displayed when the cell does not contain focus.
ButtonFooter | Gets or sets a value indicating whether a column footer will act like a button.
ButtonHeader | Gets or sets a value indicating whether a column header will act like a button.
ButtonText | Gets or sets a value indicating whether cells in this column look like buttons.
CellTop | Gets the vertical offset of the top of the cell for the current row.
ColumnDivider | Gets or sets the style of the border drawn between columns.
DataColumn | Gets the associted C1DataColumn associated with this object.
DropDownList | Gets or sets a value indicating whether the drop-down acts like a drop-down list (text portion is not editable).
EditorStyle | Gets or sets the Style used for the cell editor.
FetchStyle | Gets or sets a value indicating whether the FetchCellStyle event will be raised for a column.
FilterButton | Gets or sets a value indicating whether a drop-down button will be displayed in this column.
FooterDivider | Gets or sets a value indicating whether to display the column divider in the footer area.
FooterStyle | Gets or sets the Style object that controls the appearance of column footers.
Frozen | Locks the columns from being scrolled.
GroupFooterStyle | Gets or sets the Style used to render the cell in the grouped footer row.
GroupHeaderStyle | Gets or sets the Style used to render the cell in the grouped header row.
HeaderDivider | Gets or sets a value indicating whether to display the column divider in the header area.
HeadingStyle | Gets or sets the Style that controls the appearance of the column headers.
Height | Gets or sets the height of the column.
Locked | Gets or sets a value indicating whether editing is permitted in a column.
Merge | Sets or retrieves whether contiguous like-valued cells of this column are merged into one large cell.
MinWidth | Gets or sets the minimum width a column can be resized to when in SpringMode.
Name | Gets the caption of the associated C1DataColumn objects.
OwnerDraw | Gets or sets a value indicating whether cells in this column are drawn by the user in the OwnerDrawCell event.
Style | Gets or sets the root Style for this column.
Visible | Gets or sets a value indicating the visibility of a column.
Width | Gets or sets the width of a column.

Public Methods

AddCellStyle | Controls the Style used to change the appearance for cells meeting the specified condition.
AddRegexCellStyle | Controls the Style used to change the appearance of cells according to their contents.
AutoSize | Adjusts the width of a column to accommodate the longest visible field within that column.
ClearCellStyle | Removes a cell condition established with a previous call to the AddCellStyle method.
ClearRegexCellStyle | Overloaded. Removes a cell condition established with a previous call to the AddRegexCellStyle method.
Dispose | Overloaded. Releases the resources used by the component.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1DisplayColumn Properties

C1DisplayColumn Properties

The properties of the C1DisplayColumn class are listed here. For a complete list of C1DisplayColumn class members, see the C1DisplayColumn Members topic.

Public Properties

AllowFocus | Gets or sets a value indicating the ability of a column to receive focus.
AllowSizing | Gets or sets a value indicating whether column resizing is allowed.
AutoComplete | Gets or sets a value indicating whether the drop-down auto fills the edit portion with the matched entry.
AutoDropDown | Gets or sets a value indicating whether the drop-down opens automatically when a key is typed.
Button | Gets or sets a value indicating whether a drop-down button will be displayed in this column.
ButtonAlways | Gets or sets a value indicating whether buttons will be displayed when the cell does not contain focus.
ButtonFooter | Gets or sets a value indicating whether a column footer will act like a button.
ButtonHeader | Gets or sets a value indicating whether a column header will act like a button.
ButtonText | Gets or sets a value indicating whether cells in this column look like buttons.
CellTop | Gets the vertical offset of the top of the cell for the current row.
ColumnDivider | Gets or sets the style of the border drawn between columns.
DataColumn | Gets the associted C1DataColumn associated with this object.
DropDownList | Gets or sets a value indicating whether the drop-down acts like a drop-down list (text portion is not editable).
EditorStyle | Gets or sets the Style used for the cell editor.
FetchStyle | Gets or sets a value indicating whether the FetchCellStyle event will be raised for a column.
FilterButton | Gets or sets a value indicating whether a drop-down button will be displayed in this column.
FooterDivider | Gets or sets a value indicating whether to display the column divider in the footer area.
FooterStyle | Gets or sets the Style object that controls the appearance of column footers.
Frozen | Locks the columns from being scrolled.
GroupFooterStyle | Gets or sets the Style used to render the cell in the grouped footer row.
GroupHeaderStyle | Gets or sets the Style used to render the cell in the grouped header row.
HeaderDivider | Gets or sets a value indicating whether to display the column divider in the header area.
HeadingStyle | Gets or sets the Style that controls the appearance of the column headers.
Height | Gets or sets the height of the column.
Locked | Gets or sets a value indicating whether editing is permitted in a column.
Merge | Sets or retrieves whether contiguous like-valued cells of this column are merged into one large cell.
MinWidth | Gets or sets the minimum width a column can be resized to when in SpringMode.
Name | Gets the caption of the associated C1DataColumn objects.
OwnerDraw | Gets or sets a value indicating whether cells in this column are drawn by the user in the OwnerDrawCell event.
Style | Gets or sets the root Style for this column.
Visible | Gets or sets a value indicating the visibility of a column.
Width | Gets or sets the width of a column.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1DisplayColumn.AllowFocus Property

C1DisplayColumn.AllowFocus Property

Gets or sets a value indicating the ability of a column to receive focus.

[Visual Basic]

Public Property AllowFocus As Boolean

[C#]

public bool AllowFocus {get;set;}

[Delphi]

public property AllowFocus: Boolean read get_AllowFocus write set_AllowFocus;

Remarks

If True (the default), the user will be able to interactively select the object, giving it focus.

If False, the user will not be able to interactively select the object. When clicked, the object will not receive focus and the control (or grid column) that previously had focus will retain it.

For C1DisplayColumn objects, setting AllowFocus to True enables cells within the object to receive focus. If set to False, there is no way to change the focus to a cell within the object. However, if an object already has the focus, setting AllowFocus to False will not give focus to another split, column, or control.

If a cell in a column which does not allow focus is clicked, and the cell is in a row other than the current row, then the row is changed, but the column with the focus retains it.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1DisplayColumn.AllowSizing Property

C1DisplayColumn.AllowSizing Property

Gets or sets a value indicating whether column resizing is allowed.

[Visual Basic]

Public Property AllowSizing As Boolean

[C#]

public bool AllowSizing {get;set;}

[Delphi]

public property AllowSizing: Boolean read get_AllowSizing write set_AllowSizing;

Remarks

If True, the user can resize the column or split.

If False, the user cannot resize the column or split.

For columns, AllowSizing defaults to True.

If AllowSizing is True for a column, the mouse pointer turns into a double-headed arrow when positioned over that column's divider within the column heading area, and the user can resize the column by dragging. Any change in column size causes a ColResize event.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1DisplayColumn.AutoComplete Property

C1DisplayColumn.AutoComplete Property

Gets or sets a value indicating whether the drop-down auto fills the edit portion with the matched entry.

[Visual Basic]

Public Property AutoComplete As Boolean

[C#]

public bool AutoComplete {get;set;}

[Delphi]

public property AutoComplete: Boolean read get_AutoComplete write set_AutoComplete;

Remarks

This property determines whether matching incremental search values are automatically copied to the text portion of the column drop-down during editing.

If True, when the user enters one or more characters that match a value in the drop-down list, the entire matching string is copied to the text portion of the control. The caret is positioned after the last character typed, and the remainder of the string is selected.

If False (the default), the automatic completion does not occur, and the text portion of the control contains only the characters entered by the user.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1DisplayColumn.AutoDropDown Property

C1DisplayColumn.AutoDropDown Property

Gets or sets a value indicating whether the drop-down opens automatically when a key is typed.

[Visual Basic]

Public Property AutoDropDown As Boolean

[C#]

public bool AutoDropDown {get;set;}

[Delphi]

public property AutoDropDown: Boolean read get_AutoDropDown write set_AutoDropDown;

Remarks

For columns with a built-in ValueItems combo box or associated C1TrueDBGrid control, this property determines whether the drop-down control is displayed in response to keyboard input.

If True, the drop-down control automatically opens when the user types a character into a cell.

If False (the default), the user can only open the drop-down control by clicking the in-cell button or by pressing Alt+Down Arrow when a cell within the column has focus.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1DisplayColumn.Button Property

C1DisplayColumn.Button Property

Gets or sets a value indicating whether a drop-down button will be displayed in this column.

[Visual Basic]

Public Property Button As Boolean

[C#]

public bool Button {get;set;}

[Delphi]

public property Button: Boolean read get_Button write set_Button;

Remarks

If True, a button will be displayed in the upper right corner of the current cell at run time.

If False (the default), no button will be displayed.

Typically, the column button is enabled when wanting to drop-down a Visual Basic control (such as the built-in combo box, a bound list box, or even another True DBGrid control) for editing or data entry. When the button in the current cell is clicked, the ButtonClick event will be raised. Then code can be written to drop-down the desired control from the cell.

When you set the Presentation property of a column's ValueItems collection to either of the combo box options (sorted or unsorted), then the Button property for that column will be set to True. Similarly, if the Presentation property is set to the normal (text) or radio button option, then the Button property for that column will be set to False.

When you set the DropDown property of a column to a C1TrueDBDropdown control, then the Button property for that column will be set to True. Similarly, if you set the DropDown property of a column to an empty string, then the Button property for that column will be set to False.

Note: If both the Button and ButtonAlways properties are True, then all cells within the column are displayed with in-cell buttons, not just the current cell.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1DisplayColumn.ButtonAlways Property

C1DisplayColumn.ButtonAlways Property

Gets or sets a value indicating whether buttons will be displayed when the cell does not contain focus.

[Visual Basic]

Public Property ButtonAlways As Boolean

[C#]

public bool ButtonAlways {get;set;}

[Delphi]

public property ButtonAlways: Boolean read get_ButtonAlways write set_ButtonAlways;

Remarks

For columns with in-cell buttons, this property determines whether a button is displayed on every row at all times or only within the current cell.

If True, a button will always be displayed within every visible cell, even if another column or control has focus.

If False (the default), a button will be displayed within the current cell only.

Note: This property has no effect on columns without in-cell buttons. In-cell buttons are enabled for a column when any of the following are true:

· The column's Button property is set to True.

· The column's ButtonText property is set to True.

· The column's DropDown property is set to a C1TrueDBDropdown control.

The Presentation property of the column's ValueItems collection is set to Combo Box or Sorted Combo Box.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1DisplayColumn.ButtonFooter Property

C1DisplayColumn.ButtonFooter Property

Gets or sets a value indicating whether a column footer will act like a button.

[Visual Basic]

Public Property ButtonFooter As Boolean

[C#]

public bool ButtonFooter {get;set;}

[Delphi]

public property ButtonFooter: Boolean read get_ButtonFooter write set_ButtonFooter;

Remarks

If True, the column footer depresses like a standard Windows command button when clicked by the user.

If False (the default), the column footer does not change its appearance when clicked by the user.

Typically, set the ButtonFooter property to True when wanting to perform a column-based action (such as summation) when the user clicks a column footer. Note that the FootClick event always is raised when the user clicks a column footer, even if ButtonFooter is False.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1DisplayColumn.ButtonHeader Property

C1DisplayColumn.ButtonHeader Property

Gets or sets a value indicating whether a column header will act like a button.

[Visual Basic]

Public Property ButtonHeader As Boolean

[C#]

public bool ButtonHeader {get;set;}

[Delphi]

public property ButtonHeader: Boolean read get_ButtonHeader write set_ButtonHeader;

Remarks

If True, the column header depresses like a standard Windows command button when clicked by the user.

If False (the default), the AllowColSelect property determines how the column header responds to mouse input.

Typically, you set the ButtonHeader property to True when you want to perform a column-based action (such as sorting) when the user clicks a column header. Note that the HeadClick event always is raised when the user clicks a column header, even if ButtonHeader is False.

Note: If ButtonHeader is True, the user must hold down the Ctrl key in order to select columns with the mouse.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1DisplayColumn.ButtonText Property

C1DisplayColumn.ButtonText Property

Gets or sets a value indicating whether cells in this column look like buttons.

[Visual Basic]

Public Property ButtonText As Boolean

[C#]

public bool ButtonText {get;set;}

[Delphi]

public property ButtonText: Boolean read get_ButtonText write set_ButtonText;

Remarks

This property controls whether the current cell takes on the appearance of a standard Windows command button within the specified column.

If True, the current cell is rendered as a command button with the cell text as the label. When clicked by the user, the ButtonClick event is raised, just as it does for a graphical in-cell button.

If False (the default), the current cell is rendered as normal text and editing is permitted (unless otherwise restricted).

The ButtonText property takes precedence over the Button property. If both are True, then the graphical in-cell button is not displayed.

Note: If both the ButtonText and ButtonAlways properties are True, then all cells within the column are displayed as buttons, not just the current cell.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1DisplayColumn.CellTop Property

C1DisplayColumn.CellTop Property

Gets the vertical offset of the top of the cell for the current row.

[Visual Basic]

Public ReadOnly Property CellTop As Integer

[C#]

public int CellTop {get;}

[Delphi]

public property CellTop: Int32 read get_CellTop;

Remarks

The CellTop property returns the vertical offset of the top of any cell in the specified column relative to the top of the containing row in terms of the coordinate system of the grid's container.

A single record may span multiple lines in the grid. For columns on the first line, the CellTop property returns zero. For columns on the second line, the CellTop property returns the cell height (the grid's RowHeight property). For columns on the third line, the CellTop property returns twice the cell height, and so on.

For example, the following code places a text box on top of the grid cell in the first column of the fourth displayed row:

· Visual Basic

· C#

· Delphi

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1DisplayColumn.ColumnDivider Property

C1DisplayColumn.ColumnDivider Property

Gets or sets the style of the border drawn between columns.

[Visual Basic]

Public Property ColumnDivider As GridLines

[C#]

public GridLines ColumnDivider {get;set;}

[Delphi]

public property ColumnDivider: GridLines read get_ColumnDivider write set_ColumnDivider;

Remarks

This property determines the style of the border drawn between grid columns.

The ColumnDivider property does not control whether columns can be resized by dragging their border. Use the AllowSizing property to control this behavior.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1DisplayColumn.DataColumn Property

C1DisplayColumn.DataColumn Property

Gets the associted C1DataColumn associated with this object.

[Visual Basic]

Public ReadOnly Property DataColumn As C1DataColumn

[C#]

public C1DataColumn DataColumn {get;}

[Delphi]

public property DataColumn: C1DataColumn read get_DataColumn;

Remarks

This property allows one to get a reference to the C1DataColumn object from a C1DisplayColumn.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1DisplayColumn.DropDownList Property

C1DisplayColumn.DropDownList Property

Gets or sets a value indicating whether the drop-down acts like a drop-down list (text portion is not editable).

[Visual Basic]

Public Property DropDownList As Boolean

[C#]

public bool DropDownList {get;set;}

[Delphi]

public property DropDownList: Boolean read get_DropDownList write set_DropDownList;

Remarks

For columns with a built-in ValueItems combo box or associated C1TrueDBDropdown control, this property determines whether the drop-down control acts like a list box.

If True, the drop-down control acts like a list box. That is, the user cannot type directly into the current cell, but can select a new value from the drop-down control.

If False (the default), the drop-down control acts like a combo box. That is, the user can either type directly into the current cell or select a new value from the drop-down control.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1DisplayColumn.EditorStyle Property

C1DisplayColumn.EditorStyle Property

Gets or sets the Style used for the cell editor.

[Visual Basic]

Public Property EditorStyle As Style

[C#]

public Style EditorStyle {get;set;}

[Delphi]

public property EditorStyle: Style read get_EditorStyle write set_EditorStyle;

Remarks

This property returns the Style object that controls the appearance of the cell editor within a grid.

Note: The EditorStyle property only applies when the floating editor marquee (MarqueeStyle = 6) is not in effect.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1DisplayColumn.FetchStyle Property

C1DisplayColumn.FetchStyle Property

Gets or sets a value indicating whether the FetchCellStyle event will be raised for a column.

[Visual Basic]

Public Property FetchStyle As Boolean

[C#]

public bool FetchStyle {get;set;}

[Delphi]

public property FetchStyle: Boolean read get_FetchStyle write set_FetchStyle;

Remarks

If True, the FetchCellStyle event will be raised as needed to determine the font and color characteristics of each cell in the associated column.

If False (the default), the FetchCellStyle event will not be raised.

Set this value to True when needing to perform complex per-cell formatting operations that can only be done using the FetchCellStyle event. For example, when wanting to apply fonts and/or colors to cells within a certain range, or cells that satisfy a complex expression, then set FetchStyle to True for the desired column(s) and write code for the FetchCellStyle event.

Note: To apply the same formatting to all cells within a row, then set the FetchRowStyles property instead of FetchStyle, and write code for the FetchRowStyle event instead of FetchCellStyle. This is much more efficient because events are raised on a per-row rather than on a per-cell basis.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1DisplayColumn.FilterButton Property

C1DisplayColumn.FilterButton Property

Gets or sets a value indicating whether a drop-down button will be displayed in this column.

[Visual Basic]

Public Property FilterButton As Boolean

[C#]

public bool FilterButton {get;set;}

[Delphi]

public property FilterButton: Boolean read get_FilterButton write set_FilterButton;

Remarks

If True, a button will be displayed in the upper right corner of the current filter cell at run time. If False (the default), no button will be displayed. Typically, the column button is enabled when wanting to drop-down a Visual Basic control (such as the built-in combo box, a bound list box, or even another True DBGrid control) for editing or data entry. When the button in the current cell is clicked, the FilterButtonClick event will be raised and then code can be written to drop-down the desired control from the cell.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1DisplayColumn.FooterDivider Property

C1DisplayColumn.FooterDivider Property

Gets or sets a value indicating whether to display the column divider in the footer area.

[Visual Basic]

Public Property FooterDivider As Boolean

[C#]

public bool FooterDivider {get;set;}

[Delphi]

public property FooterDivider: Boolean read get_FooterDivider write set_FooterDivider;

Remarks

If True (the default), the right edge of the column's footer is drawn with a vertical dividing line.

If False, no dividing line is drawn in the column's header area.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1DisplayColumn.FooterStyle Property

C1DisplayColumn.FooterStyle Property

Gets or sets the Style object that controls the appearance of column footers.

[Visual Basic]

Public Property FooterStyle As Style

[C#]

public Style FooterStyle {get;set;}

[Delphi]

public property FooterStyle: Style read get_FooterStyle write set_FooterStyle;

Remarks

This property returns the Style object that controls the appearance of column footings within a grid, column, or split. By default, this is the built-in Footing style.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1DisplayColumn.Frozen Property

C1DisplayColumn.Frozen Property

Locks the columns from being scrolled.

[Visual Basic]

Public Property Frozen As Boolean

[C#]

public bool Frozen {get;set;}

[Delphi]

public property Frozen: Boolean read get_Frozen write set_Frozen;

Remarks

Setting this property also sets the Frozen property and prevents all C1DisplayColumns with a lesser index in the C1DisplayColumnsCollection from being scrolled.

Note: Once a band of columns has been frozen, you can change the order of columns within Frozen or non-Frozen bands. You cannot drag a Frozen column into a non-Frozen band or vice versa.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1DisplayColumn.GroupFooterStyle Property

C1DisplayColumn.GroupFooterStyle Property

Gets or sets the Style used to render the cell in the grouped footer row.

[Visual Basic]

Public Property GroupFooterStyle As Style

[C#]

public Style GroupFooterStyle {get;set;}

[Delphi]

public property GroupFooterStyle: Style read get_GroupFooterStyle write set_GroupFooterStyle;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1DisplayColumn.GroupHeaderStyle Property

C1DisplayColumn.GroupHeaderStyle Property

Gets or sets the Style used to render the cell in the grouped header row.

[Visual Basic]

Public Property GroupHeaderStyle As Style

[C#]

public Style GroupHeaderStyle {get;set;}

[Delphi]

public property GroupHeaderStyle: Style read get_GroupHeaderStyle write set_GroupHeaderStyle;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1DisplayColumn.HeaderDivider Property

C1DisplayColumn.HeaderDivider Property

Gets or sets a value indicating whether to display the column divider in the header area.

[Visual Basic]

Public Property HeaderDivider As Boolean

[C#]

public bool HeaderDivider {get;set;}

[Delphi]

public property HeaderDivider: Boolean read get_HeaderDivider write set_HeaderDivider;

Remarks

If True (the default), the right edge of the column's header is drawn with a vertical dividing line.

If False, no dividing line is drawn in the column's header area.

Note: Setting this property to False does not prevent the user from resizing the column. Set the AllowSizing property to False to disable column resizing.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1DisplayColumn.HeadingStyle Property

C1DisplayColumn.HeadingStyle Property

Gets or sets the Style that controls the appearance of the column headers.

[Visual Basic]

Public Property HeadingStyle As Style

[C#]

public Style HeadingStyle {get;set;}

[Delphi]

public property HeadingStyle: Style read get_HeadingStyle write set_HeadingStyle;

Remarks

This property returns the Style object that controls the appearance of column headings within a grid, column, or split. By default, this is the built-in Heading style.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1DisplayColumn.Height Property

C1DisplayColumn.Height Property

Gets or sets the height of the column.

[Visual Basic]

Public Property Height As Integer

[C#]

public int Height {get;set;}

[Delphi]

public property Height: Int32 read get_Height write set_Height;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1DisplayColumn.Locked Property

C1DisplayColumn.Locked Property

Gets or sets a value indicating whether editing is permitted in a column.

[Visual Basic]

Public Property Locked As Boolean

[C#]

public bool Locked {get;set;}

[Delphi]

public property Locked: Boolean read get_Locked write set_Locked;

Remarks

If True, the user cannot modify data in the column or split.

If False (the default), the user can modify data in the column or split.

For Style objects, the Locked property controls the editability of the object to which the style is applied. It does not control the editability of the style object itself.

The value of the Locked property is inherited from the parent style (if any) unless explicitly overridden.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1DisplayColumn.Merge Property

C1DisplayColumn.Merge Property

Sets or retrieves whether contiguous like-valued cells of this column are merged into one large cell.

[Visual Basic]

Public Property Merge As ColumnMergeEnum

[C#]

public ColumnMergeEnum Merge {get;set;}

[Delphi]

public property Merge: ColumnMergeEnum read get_Merge write set_Merge;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1DisplayColumn.MinWidth Property

C1DisplayColumn.MinWidth Property

Gets or sets the minimum width a column can be resized to when in SpringMode.

[Visual Basic]

Public Property MinWidth As Integer

[C#]

public int MinWidth {get;set;}

[Delphi]

public property MinWidth: Int32 read get_MinWidth write set_MinWidth;

Remarks

This property returns or sets the minimum width that a column can be sized to when the grid is resized and the SpringMode property is True.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1DisplayColumn.Name Property

C1DisplayColumn.Name Property

Gets the caption of the associated C1DataColumn objects.

[Visual Basic]

Public ReadOnly Property Name As String

[C#]

public string Name {get;}

[Delphi]

public property Name: String read get_Name;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1DisplayColumn.OwnerDraw Property

C1DisplayColumn.OwnerDraw Property

Gets or sets a value indicating whether cells in this column are drawn by the user in the OwnerDrawCell event.

[Visual Basic]

Public Property OwnerDraw As Boolean

[C#]

public bool OwnerDraw {get;set;}

[Delphi]

public property OwnerDraw: Boolean read get_OwnerDraw write set_OwnerDraw;

Remarks

If True, the OwnerDrawCell event will be raised as needed to display the contents of each cell in the associated column.

If False (the default), the OwnerDrawCell event will not be raised.

Set this value to True when you need to perform complex per-cell display operations that can only be done using the OwnerDrawCell event. For example, to display a metafile within a cell, set OwnerDraw to True for the desired column and write code for the OwnerDrawCell event.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1DisplayColumn.Style Property

C1DisplayColumn.Style Property

Gets or sets the root Style for this column.

[Visual Basic]

Public Property Style As Style

[C#]

public Style Style {get;set;}

[Delphi]

public property Style: Style read get_Style write set_Style;

Remarks

This property returns or sets the Style object that controls the normal appearance of a cell within a grid, column, or split. By default, this is the built-in Normal style.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1DisplayColumn.Visible Property

C1DisplayColumn.Visible Property

Gets or sets a value indicating the visibility of a column.

[Visual Basic]

Public Property Visible As Boolean

[C#]

public bool Visible {get;set;}

[Delphi]

public property Visible: Boolean read get_Visible write set_Visible;

Remarks

This property returns a Boolean indicating whether a column in a grid or split is currently visible or capable of being scrolled into view.

If True, then the column has not been hidden in code or by the user.

If False, then the column is hidden and cannot be scrolled into view.

For columns created at design time, the default value of this property is True. For columns created in code at run time, the default value of this property is False.

Note: If a column has been scrolled out of view, its Visible property remains True.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1DisplayColumn.Width Property

C1DisplayColumn.Width Property

Gets or sets the width of a column.

[Visual Basic]

Public Property Width As Integer

[C#]

public int Width {get;set;}

[Delphi]

public property Width: Int32 read get_Width write set_Width;

Remarks

This property returns or sets the width of a column in terms of the coordinate system of the grid's container.

Use the Width property in conjunction with Left and RowHeight to determine the size and placement of controls displayed on top of a grid cell.

Note: The DefColWidth property controls the default width of new columns created at run time.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1DisplayColumn Methods

C1DisplayColumn Methods

The methods of the C1DisplayColumn class are listed here. For a complete list of C1DisplayColumn class members, see the C1DisplayColumn Members topic.

Public Methods

AddCellStyle | Controls the Style used to change the appearance for cells meeting the specified condition.
AddRegexCellStyle | Controls the Style used to change the appearance of cells according to their contents.
AutoSize | Adjusts the width of a column to accommodate the longest visible field within that column.
ClearCellStyle | Removes a cell condition established with a previous call to the AddCellStyle method.
ClearRegexCellStyle | Overloaded. Removes a cell condition established with a previous call to the AddRegexCellStyle method.
Dispose | Overloaded. Releases the resources used by the component.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1DisplayColumn.AddCellStyle Method

C1DisplayColumn.AddCellStyle Method

Controls the Style used to change the appearance for cells meeting the specified condition.

[Visual Basic]

Public Sub AddCellStyle( _

ByVal condition As CellStyleFlag, _

ByVal style As Style _

)

[C#]

public void AddCellStyle(

CellStyleFlag condition,

Style style

);

[Delphi]

public procedure AddCellStyle(

condition: CellStyleFlag;

style: Style

);

Parameters

condition

Combination of one or more CellStyleFlag enumerations.

style

Style object that specifies appearance attributes.

Remarks

This method controls the font and color of cells within a grid, column, or split according to the status values (CellStyleFlag enumeration) specified by the condition argument.

Add the first four values together to specify multiple cell conditions. For example, a cell status value of 9 (CellStyleFlag.CurrentCell + CellStyleFlag.SelectedRow) denotes a current cell within a selected row. A cell status value of 0 (CellStyleFlag.NormalCell) can also be used to refer to only those cells without any of the four basic cell conditions.

The style argument specifies the attributes that will override the default font and color characteristics for cells within an object. For example, the following code causes updated cells to be displayed in red:

· Visual Basic

· C#

· Delphi

Each time the AddCellStyle method is invoked, the specified cell condition is added to the list of existing conditions. Hence, by repeated use of this method it is possible to set up multiple conditions to affect the appearance of a grid, column, or split.

Note: If a cell condition already exists for a particular condition value, the new style setting replaces the existing one.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1DisplayColumn.AddRegexCellStyle Method

C1DisplayColumn.AddRegexCellStyle Method

Controls the Style used to change the appearance of cells according to their contents.

[Visual Basic]

Public Sub AddRegexCellStyle( _

ByVal condition As CellStyleFlag, _

ByVal style As Style, _

ByVal regex As String _

)

[C#]

public void AddRegexCellStyle(

CellStyleFlag condition,

Style style,

string regex

);

[Delphi]

public procedure AddRegexCellStyle(

condition: CellStyleFlag;

style: Style;

regex: String

);

Parameters

condition

Combination of one or more CellStyleFlag enumerations.

style

Style object that specifies appearance attributes.

regex

A regular expression string.

Remarks

This method allows you to control the font and color of cells within a grid, column, or split according to their contents. The status values (CellStyleFlag enumeration) specified by the condition argument determine which cells are affected.

Add the first four values together to specify multiple cell conditions. For example, a cell status value of (CellStyleFlag.CurrentCell + CellStyleFlag.SelectedRow) denotes a current cell within a selected row. Also use a cell status value of (CellStyleFlag.NormalCell) to refer to only those cells without any of the four basic cell conditions. To designate that a cell condition should apply to all cells regardless of status, use a cell status value of CellStyleFlag.AllCells.

The regex argument is a regular expression string that describes the pattern matching to be performed on cell contents. The regular expressions supported by True DBGrid are a subset of standard Unix regular expression syntax:

p*

Any pattern followed by an asterisk matches zero or more occurrences of that pattern. For example, ab*c matches ac, abc, and abbcy (partial match).

p+

Any pattern followed by a plus sign matches one or more occurrences of that pattern. For example, ab+c matches abc and abbcy, but not ac.

[list]

A list of case-sensitive characters enclosed in brackets matches any one of those characters in the given position in the string. Character ranges can be used, as in [abcd], which is equivalent to [a-d]. Multiple ranges can also be used. For example, [A-Za-z0-9] matches any letter or digit. Bracketed patterns can also be combined with either the * or + operators. The pattern [A-Z]+ matches a sequence of one or more uppercase letters.

[^list]

If a list starts with a caret, it matches any character except those specified in the list.

. (period)

A period represents any single character.

^p

A caret at the beginning of a pattern forces a match to occur at the start of a cell. Otherwise, the pattern can match anywhere within a cell.

p$

A dollar sign at the end of a pattern forces a match to occur at the end of a cell. Otherwise, the pattern can match anywhere within a cell.

\c

Any character preceded by a backslash represents itself, unless enclosed in brackets, in which case the backslash is interpreted literally.

Any other character represents itself and will be compared with respect to case.

The style argument specifies the attributes that will override the default font and color characteristics for cells within an object. For example, the following code causes normal cells containing the letters "SQL" to be displayed in bold:

· Visual Basic

· C#

· Delphi

Each time the AddRegexCellStyle method is invoked, the specified cell condition is added to the list of existing conditions. Hence, by repeated use of this method it is possible to set up multiple conditions to affect the appearance of a grid, column, or split.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1DisplayColumn.AutoSize Method

C1DisplayColumn.AutoSize Method

Adjusts the width of a column to accommodate the longest visible field within that column.

[Visual Basic]

Public Sub AutoSize()

[C#]

public void AutoSize()

[Delphi]

public procedure AutoSize();

Remarks

The AutoSize method adjusts the width of a column to accommodate the longest visible field within that column. Calling this method in code has the same effect as the user double-clicking a column divider.

If the column is hidden or scrolled out of view, calling this method results in a trappable error.

The AllowSizing property must be set to True for columns to be resized by the user. However, the AutoSize method can be used when the column's AllowSizing property is False, just as the column width can be set when AllowSizing is False.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1DisplayColumn.ClearCellStyle Method

C1DisplayColumn.ClearCellStyle Method

Removes a cell condition established with a previous call to the AddCellStyle method.

[Visual Basic]

Public Sub ClearCellStyle( _

ByVal condition As CellStyleFlag _

)

[C#]

public void ClearCellStyle(

CellStyleFlag condition

);

[Delphi]

public procedure ClearCellStyle(

condition: CellStyleFlag

);

Parameters

condition

Combination of one or more CellStyleFlag enumerations.

Remarks

The ClearCellStyle method removes a cell condition established with a previous call to the AddCellStyle method for the object in question. If no such cell condition exists, then calling this method has no effect.

If the condition argument is CellStyleFlag.AllCells, then all non-regex cell conditions are removed, regardless of status.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1DisplayColumn.ClearRegexCellStyle Method

C1DisplayColumn.ClearRegexCellStyle Method

Overload List

Removes a cell condition established with a previous call to the AddRegexCellStyle method.

[Visual Basic] Overloads Public Sub ClearRegexCellStyle(CellStyleFlag)

[C#] public void ClearRegexCellStyle(CellStyleFlag);

[Delphi] public procedure ClearRegexCellStyle(CellStyleFlag); overload;

Removes a cell condition established with a previous call to the AddRegexCellStyle method.

[Visual Basic] Overloads Public Sub ClearRegexCellStyle(CellStyleFlag, String)

[C#] public void ClearRegexCellStyle(CellStyleFlag, string);

[Delphi] public procedure ClearRegexCellStyle(CellStyleFlag; String); overload;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1DisplayColumn.ClearRegexCellStyle Method (CellStyleFlag)

C1DisplayColumn.ClearRegexCellStyle Method (CellStyleFlag)

Previous Next

Removes a cell condition established with a previous call to the AddRegexCellStyle method.

[Visual Basic]

Overloads Public Sub ClearRegexCellStyle( _

ByVal condition As CellStyleFlag _

)

[C#]

public void ClearRegexCellStyle(

CellStyleFlag condition

);

[Delphi]

public procedure ClearRegexCellStyle(

condition: CellStyleFlag

); overload;

Parameters

condition

Combination of one or more CellStyleFlag enumerations.

Remarks

The ClearRegexCellStyle method removes a cell condition established with a previous call to the AddRegexCellStyle method for the object in question. If no such cell condition exists, then calling this method has no effect.

If regex is omitted, then all cell conditions for any regular expression matching the condition argument are removed. If condition is CellStyleFlag.AllCells, then all regex cell conditions are removed, regardless of status or expression.

If regex is supplied, then the single cell condition matching both arguments is removed. However, if condition is CellStyleFlag.AllCells, then all cell conditions for the specified regular expression are removed, regardless of status.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1DisplayColumn.ClearRegexCellStyle Method (CellStyleFlag, String)

C1DisplayColumn.ClearRegexCellStyle Method (CellStyleFlag, String)

Previous Next

Removes a cell condition established with a previous call to the AddRegexCellStyle method.

[Visual Basic]

Overloads Public Sub ClearRegexCellStyle( _

ByVal condition As CellStyleFlag, _

ByVal regex As String _

)

[C#]

public void ClearRegexCellStyle(

CellStyleFlag condition,

string regex

);

[Delphi]

public procedure ClearRegexCellStyle(

condition: CellStyleFlag;

regex: String

); overload;

Parameters

condition

Combination of one or more CellStyleFlag enumerations.

regex

A regular expression string.

Remarks

The ClearRegexCellStyle method removes a cell condition established with a previous call to the AddRegexCellStyle method for the object in question. If no such cell condition exists, then calling this method has no effect.

If regex is omitted, then all cell conditions for any regular expression matching the condition argument are removed. If condition is CellStyleFlag.AllCells, then all regex cell conditions are removed, regardless of status or expression.

If regex is supplied, then the single cell condition matching both arguments is removed. However, if condition is CellStyleFlag.AllCells, then all cell conditions for the specified regular expression are removed, regardless of status.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1DisplayColumn.Dispose Method

C1DisplayColumn.Dispose Method

Overload List

Releases the resources used by the component.

[Visual Basic] Overloads Overridable Public Sub Dispose() Implements IDisposable.Dispose

[C#] virtual public void Dispose();

[Delphi] public procedure Dispose(); overload; virtual;

Releases the resources used by the component.

[Visual Basic] Overloads Overridable Public Sub Dispose(Boolean)

[C#] virtual public void Dispose(bool);

[Delphi] public procedure Dispose(Boolean); overload; virtual;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1DisplayColumn.Dispose Method ()

C1DisplayColumn.Dispose Method ()

Previous Next

Releases the resources used by the component.

[Visual Basic]

Overloads Overridable Public Sub Dispose() Implements IDisposable.Dispose

[C#]

virtual public void Dispose()

[Delphi]

public procedure Dispose(); overload; virtual;

Implements

IDisposable.Dispose

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1DisplayColumn.Dispose Method (Boolean)

C1DisplayColumn.Dispose Method (Boolean)

Previous Next

Releases the resources used by the component.

[Visual Basic]

Overloads Overridable Public Sub Dispose( _

ByVal disposing As Boolean _

)

[C#]

virtual public void Dispose(

bool disposing

);

[Delphi]

public procedure Dispose(

disposing: Boolean

); overload; virtual;

Parameters

disposing

True to cleanup.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1DisplayColumn.ColumnChangedEnum Enumeration

C1DisplayColumn.ColumnChangedEnum Enumeration

Enumerates the type of changes made to a display column for event listeners.

[Visual Basic]

Public Enum C1DisplayColumn+ColumnChangedEnum

[C#]

public enum C1DisplayColumn+ColumnChangedEnum

[Delphi]

type C1DisplayColumn+ColumnChangedEnum = (All, Appearance, CaptionDivider, CaptionStyle, CellCondition, ColumnDivider, ColumnStyle, FetchStyle, FooterDivider, FooterStyle, Frozen, Merge, OwnerDraw);

Namespace: C1.Win.C1TrueDBGrid

Assembly: C1.Win.C1TrueDBGrid.2 (in C1.Win.C1TrueDBGrid.2.dll)

Members

Member name

Description

See Also

C1.Win.C1TrueDBGrid Namespace

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1DisplayColumnCollection Class

C1DisplayColumnCollection Class

Represents a collection of C1DisplayColumn in a Split.

For a list of all members of this type, see C1DisplayColumnCollection Members.

System.Object

System.Collections.CollectionBase

C1.Win.C1TrueDBGrid.C1DisplayColumnCollection

[Visual Basic]

Public Class C1DisplayColumnCollection

Inherits CollectionBase

[C#]

public class C1DisplayColumnCollection : CollectionBase

[Delphi]

type C1DisplayColumnCollection = class (CollectionBase);

Namespace: C1.Win.C1TrueDBGrid

Assembly: C1.Win.C1TrueDBGrid.2 (in C1.Win.C1TrueDBGrid.2.dll)

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1DisplayColumnCollection Members

C1DisplayColumnCollection Members

C1DisplayColumnCollection overview

Public Properties

Item

Overloaded. Gets the specified C1DisplayColumn from the collection wich contains the specified C1DataColumn.

Public Methods

IndexOf | Overloaded. Gets the index of the C1DisplayColumn specified by the C1DataColumn.
Insert | Inserts a C1DisplayColumn at the specified index.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1DisplayColumnCollection Properties

C1DisplayColumnCollection Properties

The properties of the C1DisplayColumnCollection class are listed here. For a complete list of C1DisplayColumnCollection class members, see the C1DisplayColumnCollection Members topic.

Public Properties

Item

Overloaded. Gets the specified C1DisplayColumn from the collection wich contains the specified C1DataColumn.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1DisplayColumnCollection.Item Property

C1DisplayColumnCollection.Item Property

Overload List

Gets the specified C1DisplayColumn from the collection wich contains the specified C1DataColumn.

[Visual Basic] Overloads Public Default ReadOnly Property Item(C1DataColumn) As C1DisplayColumn

[C#] public C1DisplayColumn this[C1DataColumn]{get;}

[Delphi] public property Item[dc: C1DataColumn]: C1DisplayColumn read get_Item;

Gets the specified C1DisplayColumn from the collection at the specified index.

[Visual Basic] Overloads Public Default ReadOnly Property Item(Integer) As C1DisplayColumn

[C#] public C1DisplayColumn this[int]{get;}

[Delphi] public property Item[index: Int32]: C1DisplayColumn read get_Item;

Gets the specified C1DisplayColumn from the collection with the specified name.

[Visual Basic] Overloads Public Default ReadOnly Property Item(String) As C1DisplayColumn

[C#] public C1DisplayColumn this[string]{get;}

[Delphi] public property Item[name: String]: C1DisplayColumn read get_Item;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1DisplayColumnCollection.Item Property (C1DataColumn)

C1DisplayColumnCollection.Item Property (C1DataColumn)

Previous Next

Gets the specified C1DisplayColumn from the collection wich contains the specified C1DataColumn.

[Visual Basic]

Public Default ReadOnly Property Item( _

ByVal dc As C1DataColumn _

) As C1DisplayColumn

[C#]

public C1DisplayColumn this[

C1DataColumn dc

] {get;}

[Delphi]

public property Item[

dc: C1DataColumn

]: C1DisplayColumn read get_Item;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1DisplayColumnCollection.Item Property (Int32)

C1DisplayColumnCollection.Item Property (Int32)

Previous Next

Gets the specified C1DisplayColumn from the collection at the specified index.

[Visual Basic]

Public Default ReadOnly Property Item( _

ByVal index As Integer _

) As C1DisplayColumn

[C#]

public C1DisplayColumn this[

int index

] {get;}

[Delphi]

public property Item[

index: Int32

]: C1DisplayColumn read get_Item;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1DisplayColumnCollection.Item Property (String)

C1DisplayColumnCollection.Item Property (String)

Previous Next

Gets the specified C1DisplayColumn from the collection with the specified name.

[Visual Basic]

Public Default ReadOnly Property Item( _

ByVal name As String _

) As C1DisplayColumn

[C#]

public C1DisplayColumn this[

string name

] {get;}

[Delphi]

public property Item[

name: String

]: C1DisplayColumn read get_Item;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1DisplayColumnCollection Methods

C1DisplayColumnCollection Methods

The methods of the C1DisplayColumnCollection class are listed here. For a complete list of C1DisplayColumnCollection class members, see the C1DisplayColumnCollection Members topic.

Public Methods

IndexOf | Overloaded. Gets the index of the C1DisplayColumn specified by the C1DataColumn.
Insert | Inserts a C1DisplayColumn at the specified index.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1DisplayColumnCollection.IndexOf Method

C1DisplayColumnCollection.IndexOf Method

Overload List

Gets the index of the C1DisplayColumn specified by the C1DataColumn.

[Visual Basic] Overloads Public Function IndexOf(C1DataColumn) As Integer

[C#] public int IndexOf(C1DataColumn);

[Delphi] public function IndexOf(C1DataColumn) : Int32; overload;

Gets the index of the C1DisplayColumn.

[Visual Basic] Overloads Public Function IndexOf(C1DisplayColumn) As Integer

[C#] public int IndexOf(C1DisplayColumn);

[Delphi] public function IndexOf(C1DisplayColumn) : Int32; overload;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1DisplayColumnCollection.IndexOf Method (C1DataColumn)

C1DisplayColumnCollection.IndexOf Method (C1DataColumn)

Previous Next

Gets the index of the C1DisplayColumn specified by the C1DataColumn.

[Visual Basic]

Overloads Public Function IndexOf( _

ByVal dc As C1DataColumn _

) As Integer

[C#]

public int IndexOf(

C1DataColumn dc

);

[Delphi]

public function IndexOf(

dc: C1DataColumn

): Int32; overload;

Parameters

dc

The C1DisplayColumn specified by the C1DataColumn to index.

Return Value

The index of the C1DisplayColumn.

See Also

C1DisplayColumnCollection Class | C1DisplayColumnCollection Members | C1.Win.C1TrueDBGrid Namespace | C1DisplayColumnCollection.IndexOf Overload List


C1DisplayColumnCollection.IndexOf Method (C1DisplayColumn)

C1DisplayColumnCollection.IndexOf Method (C1DisplayColumn)

Previous Next

Gets the index of the C1DisplayColumn.

[Visual Basic]

Overloads Public Function IndexOf( _

ByVal vc As C1DisplayColumn _

) As Integer

[C#]

public int IndexOf(

C1DisplayColumn vc

);

[Delphi]

public function IndexOf(

vc: C1DisplayColumn

): Int32; overload;

Parameters

vc

The C1DisplayColumn to index.

Return Value

The index of the C1DisplayColumn.

See Also

C1DisplayColumnCollection Class | C1DisplayColumnCollection Members | C1.Win.C1TrueDBGrid Namespace | C1DisplayColumnCollection.IndexOf Overload List


C1DisplayColumnCollection.Insert Method

C1DisplayColumnCollection.Insert Method

Inserts a C1DisplayColumn at the specified index.

[Visual Basic]

Public Sub Insert( _

ByVal index As Integer, _

ByVal vc As C1DisplayColumn _

)

[C#]

public void Insert(

int index,

C1DisplayColumn vc

);

[Delphi]

public procedure Insert(

index: Int32;

vc: C1DisplayColumn

);

Parameters

index

The zero-based index at which the C1DisplayColumn should be inserted.

vc

The C1DataColumn to insert.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1DropDataColumn Class

C1DropDataColumn Class

For a list of all members of this type, see C1DropDataColumn Members.

System.Object

C1.Win.C1TrueDBGrid.C1DataColumn

C1.Win.C1TrueDBGrid.C1DropDataColumn

[Visual Basic]

Public Class C1DropDataColumn

Inherits C1DataColumn

[C#]

public class C1DropDataColumn : C1DataColumn

[Delphi]

type C1DropDataColumn = class (C1DataColumn);

Namespace: C1.Win.C1TrueDBGrid

Assembly: C1.Win.C1TrueDBGrid.2 (in C1.Win.C1TrueDBGrid.2.dll)

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1DropDataColumn Members

C1DropDataColumn Members

C1DropDataColumn overview

Public Properties

Aggregate (inherited from C1DataColumn) | Gets or sets the type of aggregate computed for a grouped row.
ButtonPicture (inherited from C1DataColumn) | Gets or sets the image shown in a drop-down button in a column.
Caption (inherited from C1DataColumn) | Gets or sets the text in the column header.
DataChanged (inherited from C1DataColumn) | Gets or sets a value indicating whether data in this column has been modified.
DataField (inherited from C1DataColumn) | Gets or sets the database field name for a column.
DataType (inherited from C1DataColumn) | Gets or sets the DataType for a column.
DataWidth (inherited from C1DataColumn) | Gets or sets the maximum number of characters which may be entered for cells in this column.
DefaultValue (inherited from C1DataColumn) | Gets or sets the default value for a column when a new row is added by the grid.
DropDown (inherited from C1DataColumn) | Gets or sets the C1TrueDBDropdown control associated with this column.
EditMask (inherited from C1DataColumn) | Gets or sets the edit mask for a column.
EditMaskUpdate (inherited from C1DataColumn) | Gets or sets a value indicating whether literal characters in the edit mask are stored to the underlying data source.
Editor (inherited from C1DataColumn) | Gets or sets the editor that is used to edit cell data.
EnableDateTimeEditor (inherited from C1DataColumn) | Gets or sets a value indicating whether a DateTime picker is used to edit this column.
FilterButtonPicture (inherited from C1DataColumn) | Gets or sets the image show in the filter button for the column.
FilterDropdown (inherited from C1DataColumn) | Gets or sets a value indicating whether a drop-down list is displayed in the filter cell that lists all the values of the field.
FilterEscape (inherited from C1DataColumn) | Gets or sets the characters that should be escaped when applying the filter criteria to the datasource.
FilterKeys (inherited from C1DataColumn) | Gets or sets the key used to initiate the filtering operation as the user types in the filterbar.
FilterOperator (inherited from C1DataColumn) | Gets or sets the operator that is used for a filter expression.
FilterText (inherited from C1DataColumn) | Gets or sets the data associated with the value of the filter for a column.
FooterText (inherited from C1DataColumn) | Gets or sets the text displayed in the column footer.
GroupInfo (inherited from C1DataColumn) | Gets or sets the GroupInfo associated with this column.
Level (inherited from C1DataColumn) | Gets or sets the level of this column in a hierarchical data source.
NumberFormat (inherited from C1DataColumn) | Gets or sets the formmating string for a column.
SortDirection (inherited from C1DataColumn) | Gets or sets the state of the sorting glyph in the column caption.
Tag (inherited from C1DataColumn) | Gets or sets a user defined objects associated with this column.
Text (inherited from C1DataColumn) | Gets or sets the display value for the current cell.
Value (inherited from C1DataColumn) | Gets or sets the value of the current cell.
ValueItems (inherited from C1DataColumn) | Gets the ValueItems object for this column.

Public Methods

Refetch (inherited from C1DataColumn) | Repopulate the entire grid from the data source.
RefetchCell (inherited from C1DataColumn) | Overloaded. Repopulates the current cell from the data source.
Refresh (inherited from C1DataColumn) | Invalidate the current column in all visible rows.
RefreshCell (inherited from C1DataColumn) | Overloaded. Invalidate the current cell.
ResetButtonPicture (inherited from C1DataColumn) | Resets ButtonPicture to its default value.
ResetFilterButtonPicture (inherited from C1DataColumn) | Resets FilterButtonPicture to its default value.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1DropDataColumn Properties

C1DropDataColumn Properties

The properties of the C1DropDataColumn class are listed here. For a complete list of C1DropDataColumn class members, see the C1DropDataColumn Members topic.

Public Properties

Aggregate (inherited from C1DataColumn) | Gets or sets the type of aggregate computed for a grouped row.
ButtonPicture (inherited from C1DataColumn) | Gets or sets the image shown in a drop-down button in a column.
Caption (inherited from C1DataColumn) | Gets or sets the text in the column header.
DataChanged (inherited from C1DataColumn) | Gets or sets a value indicating whether data in this column has been modified.
DataField (inherited from C1DataColumn) | Gets or sets the database field name for a column.
DataType (inherited from C1DataColumn) | Gets or sets the DataType for a column.
DataWidth (inherited from C1DataColumn) | Gets or sets the maximum number of characters which may be entered for cells in this column.
DefaultValue (inherited from C1DataColumn) | Gets or sets the default value for a column when a new row is added by the grid.
DropDown (inherited from C1DataColumn) | Gets or sets the C1TrueDBDropdown control associated with this column.
EditMask (inherited from C1DataColumn) | Gets or sets the edit mask for a column.
EditMaskUpdate (inherited from C1DataColumn) | Gets or sets a value indicating whether literal characters in the edit mask are stored to the underlying data source.
Editor (inherited from C1DataColumn) | Gets or sets the editor that is used to edit cell data.
EnableDateTimeEditor (inherited from C1DataColumn) | Gets or sets a value indicating whether a DateTime picker is used to edit this column.
FilterButtonPicture (inherited from C1DataColumn) | Gets or sets the image show in the filter button for the column.
FilterDropdown (inherited from C1DataColumn) | Gets or sets a value indicating whether a drop-down list is displayed in the filter cell that lists all the values of the field.
FilterEscape (inherited from C1DataColumn) | Gets or sets the characters that should be escaped when applying the filter criteria to the datasource.
FilterKeys (inherited from C1DataColumn) | Gets or sets the key used to initiate the filtering operation as the user types in the filterbar.
FilterOperator (inherited from C1DataColumn) | Gets or sets the operator that is used for a filter expression.
FilterText (inherited from C1DataColumn) | Gets or sets the data associated with the value of the filter for a column.
FooterText (inherited from C1DataColumn) | Gets or sets the text displayed in the column footer.
GroupInfo (inherited from C1DataColumn) | Gets or sets the GroupInfo associated with this column.
Level (inherited from C1DataColumn) | Gets or sets the level of this column in a hierarchical data source.
NumberFormat (inherited from C1DataColumn) | Gets or sets the formmating string for a column.
SortDirection (inherited from C1DataColumn) | Gets or sets the state of the sorting glyph in the column caption.
Tag (inherited from C1DataColumn) | Gets or sets a user defined objects associated with this column.
Text (inherited from C1DataColumn) | Gets or sets the display value for the current cell.
Value (inherited from C1DataColumn) | Gets or sets the value of the current cell.
ValueItems (inherited from C1DataColumn) | Gets the ValueItems object for this column.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1DropDataColumn Methods

C1DropDataColumn Methods

The methods of the C1DropDataColumn class are listed here. For a complete list of C1DropDataColumn class members, see the C1DropDataColumn Members topic.

Public Methods

Refetch (inherited from C1DataColumn) | Repopulate the entire grid from the data source.
RefetchCell (inherited from C1DataColumn) | Overloaded. Repopulates the current cell from the data source.
Refresh (inherited from C1DataColumn) | Invalidate the current column in all visible rows.
RefreshCell (inherited from C1DataColumn) | Overloaded. Invalidate the current cell.
ResetButtonPicture (inherited from C1DataColumn) | Resets ButtonPicture to its default value.
ResetFilterButtonPicture (inherited from C1DataColumn) | Resets FilterButtonPicture to its default value.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1DropDisplayColumn Class

C1DropDisplayColumn Class

For a list of all members of this type, see C1DropDisplayColumn Members.

System.Object

C1.Win.C1TrueDBGrid.C1DisplayColumn

C1.Win.C1TrueDBGrid.C1DropDisplayColumn

[Visual Basic]

Public Class C1DropDisplayColumn

Inherits C1DisplayColumn

[C#]

public class C1DropDisplayColumn : C1DisplayColumn

[Delphi]

type C1DropDisplayColumn = class (C1DisplayColumn);

Namespace: C1.Win.C1TrueDBGrid

Assembly: C1.Win.C1TrueDBGrid.2 (in C1.Win.C1TrueDBGrid.2.dll)

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1DropDisplayColumn Members

C1DropDisplayColumn Members

C1DropDisplayColumn overview

Public Properties

AllowFocus (inherited from C1DisplayColumn) | Gets or sets a value indicating the ability of a column to receive focus.
AllowSizing (inherited from C1DisplayColumn) | Gets or sets a value indicating whether column resizing is allowed.
AutoComplete (inherited from C1DisplayColumn) | Gets or sets a value indicating whether the drop-down auto fills the edit portion with the matched entry.
AutoDropDown (inherited from C1DisplayColumn) | Gets or sets a value indicating whether the drop-down opens automatically when a key is typed.
Button (inherited from C1DisplayColumn) | Gets or sets a value indicating whether a drop-down button will be displayed in this column.
ButtonAlways (inherited from C1DisplayColumn) | Gets or sets a value indicating whether buttons will be displayed when the cell does not contain focus.
ButtonFooter (inherited from C1DisplayColumn) | Gets or sets a value indicating whether a column footer will act like a button.
ButtonHeader (inherited from C1DisplayColumn) | Gets or sets a value indicating whether a column header will act like a button.
ButtonText (inherited from C1DisplayColumn) | Gets or sets a value indicating whether cells in this column look like buttons.
CellTop (inherited from C1DisplayColumn) | Gets the vertical offset of the top of the cell for the current row.
ColumnDivider (inherited from C1DisplayColumn) | Gets or sets the style of the border drawn between columns.
DataColumn (inherited from C1DisplayColumn) | Gets the associted C1DataColumn associated with this object.
DropDownList (inherited from C1DisplayColumn) | Gets or sets a value indicating whether the drop-down acts like a drop-down list (text portion is not editable).
EditorStyle (inherited from C1DisplayColumn) | Gets or sets the Style used for the cell editor.
FetchStyle (inherited from C1DisplayColumn) | Gets or sets a value indicating whether the FetchCellStyle event will be raised for a column.
FilterButton (inherited from C1DisplayColumn) | Gets or sets a value indicating whether a drop-down button will be displayed in this column.
FooterDivider (inherited from C1DisplayColumn) | Gets or sets a value indicating whether to display the column divider in the footer area.
FooterStyle (inherited from C1DisplayColumn) | Gets or sets the Style object that controls the appearance of column footers.
Frozen (inherited from C1DisplayColumn) | Locks the columns from being scrolled.
GroupFooterStyle (inherited from C1DisplayColumn) | Gets or sets the Style used to render the cell in the grouped footer row.
GroupHeaderStyle (inherited from C1DisplayColumn) | Gets or sets the Style used to render the cell in the grouped header row.
HeaderDivider (inherited from C1DisplayColumn) | Gets or sets a value indicating whether to display the column divider in the header area.
HeadingStyle (inherited from C1DisplayColumn) | Gets or sets the Style that controls the appearance of the column headers.
Height (inherited from C1DisplayColumn) | Gets or sets the height of the column.
Locked (inherited from C1DisplayColumn) | Gets or sets a value indicating whether editing is permitted in a column.
Merge (inherited from C1DisplayColumn) | Sets or retrieves whether contiguous like-valued cells of this column are merged into one large cell.
MinWidth (inherited from C1DisplayColumn) | Gets or sets the minimum width a column can be resized to when in SpringMode.
Name (inherited from C1DisplayColumn) | Gets the caption of the associated C1DataColumn objects.
OwnerDraw (inherited from C1DisplayColumn) | Gets or sets a value indicating whether cells in this column are drawn by the user in the OwnerDrawCell event.
Style (inherited from C1DisplayColumn) | Gets or sets the root Style for this column.
Visible (inherited from C1DisplayColumn) | Gets or sets a value indicating the visibility of a column.
Width (inherited from C1DisplayColumn) | Gets or sets the width of a column.

Public Methods

AutoSize (inherited from C1DisplayColumn) | Adjusts the width of a column to accommodate the longest visible field within that column.
Dispose (inherited from C1DisplayColumn) | Overloaded. Releases the resources used by the component.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1DropDisplayColumn Properties

C1DropDisplayColumn Properties

The properties of the C1DropDisplayColumn class are listed here. For a complete list of C1DropDisplayColumn class members, see the C1DropDisplayColumn Members topic.

Public Properties

AllowFocus (inherited from C1DisplayColumn) | Gets or sets a value indicating the ability of a column to receive focus.
AllowSizing (inherited from C1DisplayColumn) | Gets or sets a value indicating whether column resizing is allowed.
AutoComplete (inherited from C1DisplayColumn) | Gets or sets a value indicating whether the drop-down auto fills the edit portion with the matched entry.
AutoDropDown (inherited from C1DisplayColumn) | Gets or sets a value indicating whether the drop-down opens automatically when a key is typed.
Button (inherited from C1DisplayColumn) | Gets or sets a value indicating whether a drop-down button will be displayed in this column.
ButtonAlways (inherited from C1DisplayColumn) | Gets or sets a value indicating whether buttons will be displayed when the cell does not contain focus.
ButtonFooter (inherited from C1DisplayColumn) | Gets or sets a value indicating whether a column footer will act like a button.
ButtonHeader (inherited from C1DisplayColumn) | Gets or sets a value indicating whether a column header will act like a button.
ButtonText (inherited from C1DisplayColumn) | Gets or sets a value indicating whether cells in this column look like buttons.
CellTop (inherited from C1DisplayColumn) | Gets the vertical offset of the top of the cell for the current row.
ColumnDivider (inherited from C1DisplayColumn) | Gets or sets the style of the border drawn between columns.
DataColumn (inherited from C1DisplayColumn) | Gets the associted C1DataColumn associated with this object.
DropDownList (inherited from C1DisplayColumn) | Gets or sets a value indicating whether the drop-down acts like a drop-down list (text portion is not editable).
EditorStyle (inherited from C1DisplayColumn) | Gets or sets the Style used for the cell editor.
FetchStyle (inherited from C1DisplayColumn) | Gets or sets a value indicating whether the FetchCellStyle event will be raised for a column.
FilterButton (inherited from C1DisplayColumn) | Gets or sets a value indicating whether a drop-down button will be displayed in this column.
FooterDivider (inherited from C1DisplayColumn) | Gets or sets a value indicating whether to display the column divider in the footer area.
FooterStyle (inherited from C1DisplayColumn) | Gets or sets the Style object that controls the appearance of column footers.
Frozen (inherited from C1DisplayColumn) | Locks the columns from being scrolled.
GroupFooterStyle (inherited from C1DisplayColumn) | Gets or sets the Style used to render the cell in the grouped footer row.
GroupHeaderStyle (inherited from C1DisplayColumn) | Gets or sets the Style used to render the cell in the grouped header row.
HeaderDivider (inherited from C1DisplayColumn) | Gets or sets a value indicating whether to display the column divider in the header area.
HeadingStyle (inherited from C1DisplayColumn) | Gets or sets the Style that controls the appearance of the column headers.
Height (inherited from C1DisplayColumn) | Gets or sets the height of the column.
Locked (inherited from C1DisplayColumn) | Gets or sets a value indicating whether editing is permitted in a column.
Merge (inherited from C1DisplayColumn) | Sets or retrieves whether contiguous like-valued cells of this column are merged into one large cell.
MinWidth (inherited from C1DisplayColumn) | Gets or sets the minimum width a column can be resized to when in SpringMode.
Name (inherited from C1DisplayColumn) | Gets the caption of the associated C1DataColumn objects.
OwnerDraw (inherited from C1DisplayColumn) | Gets or sets a value indicating whether cells in this column are drawn by the user in the OwnerDrawCell event.
Style (inherited from C1DisplayColumn) | Gets or sets the root Style for this column.
Visible (inherited from C1DisplayColumn) | Gets or sets a value indicating the visibility of a column.
Width (inherited from C1DisplayColumn) | Gets or sets the width of a column.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1DropDisplayColumn Methods

C1DropDisplayColumn Methods

The methods of the C1DropDisplayColumn class are listed here. For a complete list of C1DropDisplayColumn class members, see the C1DropDisplayColumn Members topic.

Public Methods

AutoSize (inherited from C1DisplayColumn) | Adjusts the width of a column to accommodate the longest visible field within that column.
Dispose (inherited from C1DisplayColumn) | Overloaded. Releases the resources used by the component.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1OwnerDrawPrint Class

C1OwnerDrawPrint Class

Object to manage custom page headers and footers when printing and previewing.

For a list of all members of this type, see C1OwnerDrawPrint Members.

System.Object

C1.Win.C1TrueDBGrid.C1OwnerDrawPrint

[Visual Basic]

Public Class C1OwnerDrawPrint

[C#]

public class C1OwnerDrawPrint

[Delphi]

type C1OwnerDrawPrint = class;

Namespace: C1.Win.C1TrueDBGrid

Assembly: C1.Win.C1TrueDBGrid.2 (in C1.Win.C1TrueDBGrid.2.dll)

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1OwnerDrawPrint Members

C1OwnerDrawPrint Members

C1OwnerDrawPrint overview

Public Properties

HeightInch

The height of drawing area in inches.

Public Methods

RenderDirectImage | Renders an image for the document.
RenderDirectLine | Renders a line for the document.
RenderDirectText | Renders text for the document.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1OwnerDrawPrint Properties

C1OwnerDrawPrint Properties

The properties of the C1OwnerDrawPrint class are listed here. For a complete list of C1OwnerDrawPrint class members, see the C1OwnerDrawPrint Members topic.

Public Properties

HeightInch

The height of drawing area in inches.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1OwnerDrawPrint.HeightInch Property

C1OwnerDrawPrint.HeightInch Property

The height of drawing area in inches.

[Visual Basic]

Public ReadOnly Property HeightInch As Double

[C#]

public double HeightInch {get;}

[Delphi]

public property HeightInch: Double read get_HeightInch;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1OwnerDrawPrint Methods

C1OwnerDrawPrint Methods

The methods of the C1OwnerDrawPrint class are listed here. For a complete list of C1OwnerDrawPrint class members, see the C1OwnerDrawPrint Members topic.

Public Methods

RenderDirectImage | Renders an image for the document.
RenderDirectLine | Renders a line for the document.
RenderDirectText | Renders text for the document.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1OwnerDrawPrint.RenderDirectImage Method

C1OwnerDrawPrint.RenderDirectImage Method

Renders an image for the document.

[Visual Basic]

Public Sub RenderDirectImage( _

ByVal x As Object, _

ByVal y As Object, _

ByVal image As Image, _

ByVal width As Object, _

ByVal height As Object, _

ByVal imageAlign As BackgroundPictureDrawModeEnum _

)

[C#]

public void RenderDirectImage(

object x,

object y,

Image image,

object width,

object height,

BackgroundPictureDrawModeEnum imageAlign

);

[Delphi]

public procedure RenderDirectImage(

x: Object;

y: Object;

image: Image;

width: Object;

height: Object;

imageAlign: BackgroundPictureDrawModeEnum

);

Parameters

x

X-coordinate.

y

Y-coordinate.

image

Image to render.

width

Width to render.

height

Height to render.

imageAlign

Alignment options.

Remarks

Position and size (x, y, width and height) may be specified either as numbers (in which case they are interpreted in default units), as strings consisting of a number followed by a unit name (in which case units may be specified).

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1OwnerDrawPrint.RenderDirectLine Method

C1OwnerDrawPrint.RenderDirectLine Method

Renders a line for the document.

[Visual Basic]

Public Sub RenderDirectLine( _

ByVal fromX As Object, _

ByVal fromY As Object, _

ByVal toX As Object, _

ByVal toY As Object, _

ByVal color As Color, _

ByVal width As Double _

)

[C#]

public void RenderDirectLine(

object fromX,

object fromY,

object toX,

object toY,

Color color,

double width

);

[Delphi]

public procedure RenderDirectLine(

fromX: Object;

fromY: Object;

toX: Object;

toY: Object;

color: Color;

width: Double

);

Parameters

fromX

Start x-coordinate.

fromY

Start y-coordinate.

toX

End x-coordinate.

toY

End y-coordinate.

color

Color of the line.

width

Width of the line.

Remarks

Positions (fromX, fromY, toX and toY) may be specified either as numbers (in which case they are interpreted in default units), as strings consisting of a number followed by a unit name (in which case units may be specified).

Note: For position and size arguments, use the following:

cm

Centimeters.

em

The height of the element’s font.

ex

The height of the letter “x”.

in

Inches.

mm

Millimeters.

%

Percent of the parent’s size.

pc

Picas (1 pica = 1/6 inch).

pix

Pixels.

pt

Points (1 point = 1/72 inch).

tw

Pixels (1 twip = 1/1440 inch).

doc

Document units (1 unit = 1/300 inch).

For example: “25pix” would be 25 pixels, “25cm” 25 centimeters

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1OwnerDrawPrint.RenderDirectText Method

C1OwnerDrawPrint.RenderDirectText Method

Renders text for the document.

[Visual Basic]

Public Sub RenderDirectText( _

ByVal x As Object, _

ByVal y As Object, _

ByVal text As String, _

ByVal width As Object, _

ByVal font As Font, _

ByVal textColor As Color, _

ByVal horzAlign As AlignHorzEnum _

)

[C#]

public void RenderDirectText(

object x,

object y,

string text,

object width,

Font font,

Color textColor,

AlignHorzEnum horzAlign

);

[Delphi]

public procedure RenderDirectText(

x: Object;

y: Object;

text: String;

width: Object;

font: Font;

textColor: Color;

horzAlign: AlignHorzEnum

);

Parameters

x

X-coordinate to start the rendering.

y

Y-coordinate to start the rendering.

text

The text to render.

width

The width for the rendered text.

font

The font to use.

textColor

The color of the text.

horzAlign

The alignment to render the text.

Remarks

Position and size of the text box (x, y, width and height) may be specified either as numbers (in which case they are interpreted in default units), as strings consisting of a number followed by a unit name (in which case units may be specified).

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1PrintProgress Class

C1PrintProgress Class

Print progress window.

For a list of all members of this type, see C1PrintProgress Members.

System.Object

System.MarshalByRefObject

System.ComponentModel.Component

System.Windows.Forms.Control

System.Windows.Forms.ScrollableControl

System.Windows.Forms.ContainerControl

System.Windows.Forms.Form

C1.Win.C1TrueDBGrid.C1PrintProgress

[Visual Basic]

Public Class C1PrintProgress

Inherits Form

[C#]

public class C1PrintProgress : Form

[Delphi]

type C1PrintProgress = class (Form);

Namespace: C1.Win.C1TrueDBGrid

Assembly: C1.Win.C1TrueDBGrid.2 (in C1.Win.C1TrueDBGrid.2.dll)

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1PrintProgress Members

C1PrintProgress Members

C1PrintProgress overview

Public Constructors

C1PrintProgress Constructor

Initializes a new instance of the C1PrintProgress class.

Public Properties

CancelClicked | Gets a value indicating if the print/preview was cancelled.
TxtCancel | Gets or sets the text for the Cancel button.
TxtPrinting | Gets or sets the text used to display the current progress when the grid is printed/previewed.
TxtTitle | Gets or sets the text for the Windows caption.

Protected Methods

Dispose

Overloaded. Overriden. Overloaded. Releases the resources used by the component.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1PrintProgress Constructor

C1PrintProgress Constructor

Initializes a new instance of the C1PrintProgress class.

[Visual Basic]

Public Function New()

[C#]

public C1PrintProgress()

[Delphi]

public constructor Create();

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1PrintProgress Properties

C1PrintProgress Properties

The properties of the C1PrintProgress class are listed here. For a complete list of C1PrintProgress class members, see the C1PrintProgress Members topic.

Public Properties

CancelClicked | Gets a value indicating if the print/preview was cancelled.
TxtCancel | Gets or sets the text for the Cancel button.
TxtPrinting | Gets or sets the text used to display the current progress when the grid is printed/previewed.
TxtTitle | Gets or sets the text for the Windows caption.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1PrintProgress.CancelClicked Property

C1PrintProgress.CancelClicked Property

Gets a value indicating if the print/preview was cancelled.

[Visual Basic]

Public ReadOnly Property CancelClicked As Boolean

[C#]

public bool CancelClicked {get;}

[Delphi]

public property CancelClicked: Boolean read get_CancelClicked;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1PrintProgress.TxtCancel Property

C1PrintProgress.TxtCancel Property

Gets or sets the text for the Cancel button.

[Visual Basic]

Public Property TxtCancel As String

[C#]

public string TxtCancel {get;set;}

[Delphi]

public property TxtCancel: String read get_TxtCancel write set_TxtCancel;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1PrintProgress.TxtPrinting Property

C1PrintProgress.TxtPrinting Property

Gets or sets the text used to display the current progress when the grid is printed/previewed.

[Visual Basic]

Public Property TxtPrinting As String

[C#]

public string TxtPrinting {get;set;}

[Delphi]

public property TxtPrinting: String read get_TxtPrinting write set_TxtPrinting;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1PrintProgress.TxtTitle Property

C1PrintProgress.TxtTitle Property

Gets or sets the text for the Windows caption.

[Visual Basic]

Public Property TxtTitle As String

[C#]

public string TxtTitle {get;set;}

[Delphi]

public property TxtTitle: String read get_TxtTitle write set_TxtTitle;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1PrintProgress Methods

C1PrintProgress Methods

The methods of the C1PrintProgress class are listed here. For a complete list of C1PrintProgress class members, see the C1PrintProgress Members topic.

Protected Methods

Dispose

Overloaded. Overriden. Overloaded. Releases the resources used by the component.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1PrintProgress.Dispose Method

C1PrintProgress.Dispose Method

Overloaded. Releases the resources used by the component.

[Visual Basic]

Overrides Protected Sub Dispose( _

ByVal disposing As Boolean _

)

[C#]

override protected void Dispose(

bool disposing

);

[Delphi]

strict protected procedure Dispose(

disposing: Boolean

); overload; override;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBDropdown Class

C1TrueDBDropdown Class

C1TrueDBDropdown control.

For a list of all members of this type, see C1TrueDBDropdown Members.

System.Object

System.MarshalByRefObject

System.ComponentModel.Component

System.Windows.Forms.Control

C1.Win.C1TrueDBGrid.BaseGrid.Frame

C1.Win.C1TrueDBGrid.C1TrueDBDropdown

[Visual Basic]

Public Class C1TrueDBDropdown

Inherits Frame

Implements IComparable

[C#]

public class C1TrueDBDropdown : Frame , IComparable

[Delphi]

type C1TrueDBDropdown = class (Frame, IComparable);

Namespace: C1.Win.C1TrueDBGrid

Assembly: C1.Win.C1TrueDBGrid.2 (in C1.Win.C1TrueDBGrid.2.dll)

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBDropdown Members

C1TrueDBDropdown Members

C1TrueDBDropdown overview

Public Constructors

C1TrueDBDropdown Constructor

Creates a new instance of the object.

Public Properties

AllowColMove | Exposed object model.
AllowColSelect | Gets or sets a value indicating the ability to select columns.
AllowFilter (inherited from Frame) | Gets or sets a value indicating the ability of the grid to automatically filter data.
AllowRowSizing | Gets or sets how interactive row resizing is performed.
AllowSort (inherited from Frame) | Gets or sets a value indicating the ability of the grid to automatically sort data when a column header is clicked.
AlternatingRows | Gets or sets a value indicating whether the drop-down uses the OddRowStyle for odd-numbered rows and EvenRowStyle for even-numbered rows.
Bookmark | Gets or sets the current row position of the underlying CurrencyManager.
BorderStyle (inherited from Frame) | Gets or sets the border for the control.
Caption (inherited from Frame) | Gets or sets the grid's caption.
CaptionHeight (inherited from Frame) | Gets or sets the height of the grid's caption.
CaptionStyle | Gets or sets the Style object that controls the appearance of the caption area.
Col | Gets or sets the column position.
ColumnCaptionHeight | Gets or sets the height of column captions.
ColumnFooterHeight | Gets or sets the height of column footers.
ColumnFooters | Gets or sets a value indicating the visibility of column footers.
ColumnHeaders | Gets or sets a value indicating the visibility of column headers.
Columns | Gets the collection of C1DataColumn objects.
CurrentCellVisible | Gets or sets a value indicating the visibility of the current cell.
DataMember (inherited from Frame) | Gets or sets the specific data member in a multimember data source that the grid binds to.
DataSource (inherited from Frame) | Gets or sets the source containing a list of values used to populate the items within the control.
DefColWidth | Gets or sets the default width for all grid columns.
DisplayColumns | Gets the collection of C1DisplayColumn objects.
DoubleBuffer (inherited from Frame) | Gets or sets a value indicating whether the control should use an off-screen buffer when painting to redue flicker.
DropdownWidth | Gets or sets the width of the drop-down.
EmptyRows | Gets or sets a value that determines how the grid displays rows below the last data row.
EvenRowStyle | Gets or sets the Style object that controls the appearance of an even-numbered row when using AlternatingRows.
ExtendRightColumn | Gets or sets a value that determines how the last column will extend to fill the dead area of the drop-down.
FetchRowStyles | Gets or sets a value indicating whether the FetchRowStyle event will be raised.
FirstRow | Gets or sets the row index for the first visible row.
FlatStyle (inherited from Frame) | Gets or sets the general appearance of 3D elements for the entire grid.
FooterStyle | Gets or sets the Style object that controls the appearance of column footers.
HeadingStyle | Gets or sets the Style object that controls the appearance of the grids column headers.
HighLightRowStyle | Gets or sets the Style object that controls the appearance of a highlighted row.
HScrollBar | Gets the HBar object that controls the appearance of the horizontal scrollbar.
IntegralHeight | Gets or sets a value indicating whether the control should resize to avoid showing partial items.
LeftCol | Gets or sets the zero-based index of the leftmost column.
OddRowStyle | Gets or sets the Style object that controls the appearance of an odd-numbered row when using AlternatingRows.
Row | Gets or sets the the current row.
RowDivider | Gets or sets the style of the border drawn between rows.
RowHeight (inherited from Frame) | Gets or sets the height of grid rows.
RowSubDividerColor | Gets or sets the color of the subrow divider in a multi-line drop-down.
RowTracking | Gets or sets a value that determines if rows are highlighted under the mouse.
ScrollTips | Gets or sets a value that determines whether the grid displays a pop-up text window when the scrollbar thumb is dragged.
ScrollTrack (inherited from Frame) | Gets or sets a value that controls how the grid scrolls when the scroll thumb is moved.
SplitDividerSize (inherited from Frame) | Controls the height and width of split dividers.
Style | Gets or sets the root Style object.
Styles | Gets the collection of named Style objects.
ValueTranslate | Gets or sets a value that determines how the grid display values in a column.
VisibleCols | Gets the number of visible columns in the dropdown.
VisibleRows | Gets the number of visible rows in the drop-down.
VScrollBar | Gets the VBar object that controls the appearance of the vertical scrollbar.

Public Methods

AddCellStyle | Controls the Style used to change the appearance for cells meeting the specified condition.
AddRegexCellStyle | Controls the Style used to change the appearance of cells according to their contents.
BeginInit (inherited from Frame) | ISupportInitialize interface.
ClearCellStyle | Restores the default layout.
ClearFields | Restores the default layout.
ClearRegexCellStyle | Removes a cell condition established with a previous call to the AddRegexCellStyle method.
ColContaining | Returns the column index for the column containing the specified X coordinate.
EndInit (inherited from Frame) | ISupportInitialize interface.
GetCurrentSelIndex | Gets the current selected index.
Rebind | Overloaded. Reinitializes grid with data from its data source
RowContaining | Returns the zero-based index of the display row containing the Y specified coordinate.
ScrollCtl | Scrolls the data area by the specified number of rows and columns.
SetDataBinding | Binds the grid to a DataSource at runtime

Public Events

ColMove | Occurs when the user has moved a column.
ColResize | Occurs when the user has resized a column.
DataSourceChanged | Occurs when the grids DataSource has changed.
DropDownClose | Occurs when the drop-down closes.
DropDownOpen | Occurs when the drop-down closes.
FetchRowStyle | Occurs whenever the grid is about to display a row of data and the FetchRowStyles property is True.
FetchScrollTips | Occurs whenever the grid has focus and the scrollbar thumb is moved using the mouse.
FirstRowChange | Occurs when the first displayed row of a control or split is changed.
FootClick | Occurs when the user clicks on the column footer.
FormatText | Occurs when the grid is about to display cell data in a column whose NumberFormat property is set to the string FormatText Event.
HeadClick | Occurs when the user clicks on the column header.
LeftColChange | Occurs when the first visible column of a grid or split is changed.
RowChange | Occurs when the row focus changes.
RowResize | Occurs when the user has finished resizing a grid row.
Scroll | Occurs when the user scrolls the grid.
SelChange | Occurs when the user selects a different range of rows or columns.
UnboundColumnFetch | Occurs when the grid needs to display the value of a cell in an unbound column.
ValueItemError | Occurs when the user attempts to enter invalid data into a column that is using value lists.

Protected Properties

CreateParams (inherited from Frame) | Allows us to set the borderstyle.
RowPosition (inherited from Frame) | Gets the current position from the currency manager.

Protected Methods

Dispose | Overloaded. Overriden. Called when the class is being disposed.
On_Scroll | Overriden. Occurs when the user scrolls the grid.
OnColMove | Overriden. Occurs when the user has moved a column.
OnColResize | Overriden. Occurs when the user has resized a column.
OnDataSourceChanged | Overriden. Occurs when the grids DataSource has changed.
OnDropDownClose | Occurs when the drop-down closes.
OnDropDownOpen | Occurs when the drop-down closes.
OnFetchRowStyle | Overriden. Occurs whenever the grid is about to display a row of data and the FetchRowStyles property is True.
OnFetchScrollTips | Overriden. Occurs whenever the grid has focus and the scrollbar thumb is moved using the mouse.
OnFirstRowChange | Overriden. Occurs when the first displayed row of a control or split is changed.
OnFootClick | Overriden. Occurs when the user clicks on the column footer.
OnFormatText | Overriden. Occurs when the grid is about to display cell data in a column whose NumberFormat property is set to the string FormatText Event.
OnHeadClick | Overriden. Occurs when the user clicks on the column header.
OnLeftColChange | Overriden. Occurs when the first visible column of a grid or split is changed.
OnRowChange | Occurs when the row focus changes.
OnRowResize | Overriden. Occurs when the user has finished resizing a grid row.
OnSelChange | Overriden. Occurs when the user selects a different range of rows or columns.
OnUnboundColumnFetch | Overriden. Occurs when the grid needs to display the value of a cell in an unbound column.
OnValueItemError | Overriden. Occurs when the user attempts to enter invalid data into a column that is using value lists.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBDropdown Constructor

C1TrueDBDropdown Constructor

Creates a new instance of the object.

[Visual Basic]

Public Function New()

[C#]

public C1TrueDBDropdown()

[Delphi]

public constructor Create();

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBDropdown Properties

C1TrueDBDropdown Properties

The properties of the C1TrueDBDropdown class are listed here. For a complete list of C1TrueDBDropdown class members, see the C1TrueDBDropdown Members topic.

Public Properties

AllowColMove | Exposed object model.
AllowColSelect | Gets or sets a value indicating the ability to select columns.
AllowFilter (inherited from Frame) | Gets or sets a value indicating the ability of the grid to automatically filter data.
AllowRowSizing | Gets or sets how interactive row resizing is performed.
AllowSort (inherited from Frame) | Gets or sets a value indicating the ability of the grid to automatically sort data when a column header is clicked.
AlternatingRows | Gets or sets a value indicating whether the drop-down uses the OddRowStyle for odd-numbered rows and EvenRowStyle for even-numbered rows.
Bookmark | Gets or sets the current row position of the underlying CurrencyManager.
BorderStyle (inherited from Frame) | Gets or sets the border for the control.
Caption (inherited from Frame) | Gets or sets the grid's caption.
CaptionHeight (inherited from Frame) | Gets or sets the height of the grid's caption.
CaptionStyle | Gets or sets the Style object that controls the appearance of the caption area.
Col | Gets or sets the column position.
ColumnCaptionHeight | Gets or sets the height of column captions.
ColumnFooterHeight | Gets or sets the height of column footers.
ColumnFooters | Gets or sets a value indicating the visibility of column footers.
ColumnHeaders | Gets or sets a value indicating the visibility of column headers.
Columns | Gets the collection of C1DataColumn objects.
CurrentCellVisible | Gets or sets a value indicating the visibility of the current cell.
DataMember (inherited from Frame) | Gets or sets the specific data member in a multimember data source that the grid binds to.
DataSource (inherited from Frame) | Gets or sets the source containing a list of values used to populate the items within the control.
DefColWidth | Gets or sets the default width for all grid columns.
DisplayColumns | Gets the collection of C1DisplayColumn objects.
DoubleBuffer (inherited from Frame) | Gets or sets a value indicating whether the control should use an off-screen buffer when painting to redue flicker.
DropdownWidth | Gets or sets the width of the drop-down.
EmptyRows | Gets or sets a value that determines how the grid displays rows below the last data row.
EvenRowStyle | Gets or sets the Style object that controls the appearance of an even-numbered row when using AlternatingRows.
ExtendRightColumn | Gets or sets a value that determines how the last column will extend to fill the dead area of the drop-down.
FetchRowStyles | Gets or sets a value indicating whether the FetchRowStyle event will be raised.
FirstRow | Gets or sets the row index for the first visible row.
FlatStyle (inherited from Frame) | Gets or sets the general appearance of 3D elements for the entire grid.
FooterStyle | Gets or sets the Style object that controls the appearance of column footers.
HeadingStyle | Gets or sets the Style object that controls the appearance of the grids column headers.
HighLightRowStyle | Gets or sets the Style object that controls the appearance of a highlighted row.
HScrollBar | Gets the HBar object that controls the appearance of the horizontal scrollbar.
IntegralHeight | Gets or sets a value indicating whether the control should resize to avoid showing partial items.
LeftCol | Gets or sets the zero-based index of the leftmost column.
OddRowStyle | Gets or sets the Style object that controls the appearance of an odd-numbered row when using AlternatingRows.
Row | Gets or sets the the current row.
RowDivider | Gets or sets the style of the border drawn between rows.
RowHeight (inherited from Frame) | Gets or sets the height of grid rows.
RowSubDividerColor | Gets or sets the color of the subrow divider in a multi-line drop-down.
RowTracking | Gets or sets a value that determines if rows are highlighted under the mouse.
ScrollTips | Gets or sets a value that determines whether the grid displays a pop-up text window when the scrollbar thumb is dragged.
ScrollTrack (inherited from Frame) | Gets or sets a value that controls how the grid scrolls when the scroll thumb is moved.
SplitDividerSize (inherited from Frame) | Controls the height and width of split dividers.
Style | Gets or sets the root Style object.
Styles | Gets the collection of named Style objects.
ValueTranslate | Gets or sets a value that determines how the grid display values in a column.
VisibleCols | Gets the number of visible columns in the drop-down.
VisibleRows | Gets the number of visible rows in the drop-down.
VScrollBar | Gets the VBar object that controls the appearance of the vertical scrollbar.

Protected Properties

CreateParams (inherited from Frame) | Allows us to set the borderstyle.
RowPosition (inherited from Frame) | Gets the current position from the currency manager.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBDropdown.AllowColMove Property

C1TrueDBDropdown.AllowColMove Property

Exposed object model.

[Visual Basic]

Public Property AllowColMove As Boolean

[C#]

public bool AllowColMove {get;set;}

[Delphi]

public property AllowColMove: Boolean read get_AllowColMove write set_AllowColMove;

Remarks

If True (the default), the user can move columns.

If False, the user cannot move columns.

Use the AllowColMove property to control whether the user can move columns by dragging the column header to the desired location. Any change in column order causes a ColMove event.

If AllowColMove is set to True, and the DataView property is set to Group, a grouping area is added to the grid. Columns can be added or dragged to this area at run time.

See Column Grouping for more information.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBDropdown.AllowColSelect Property

C1TrueDBDropdown.AllowColSelect Property

Gets or sets a value indicating the ability to select columns.

[Visual Basic]

Public Property AllowColSelect As Boolean

[C#]

public bool AllowColSelect {get;set;}

[Delphi]

public property AllowColSelect: Boolean read get_AllowColSelect write set_AllowColSelect;

Remarks

If True (the default), the user can select columns.

If False, the user cannot select columns.

Use the AllowColSelect property to control whether the user can select columns by clicking within the column header area. Setting this property to False suppresses highlighting when the user clicks a column header, which is useful for applications that respond to the HeadClick event.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBDropdown.AllowRowSizing Property

C1TrueDBDropdown.AllowRowSizing Property

Gets or sets how interactive row resizing is performed.

[Visual Basic]

Public Property AllowRowSizing As RowSizingEnum

[C#]

public RowSizingEnum AllowRowSizing {get;set;}

[Delphi]

public property AllowRowSizing: RowSizingEnum read get_AllowRowSizing write set_AllowRowSizing;

Remarks

RecordSelectors must be visible in a split in order for the user to resize rows interactively in that split. If RecordSelectors are disabled for all splits in a C1TrueDBGrid control, the user cannot resize rows interactively in that grid.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBDropdown.AlternatingRows Property

C1TrueDBDropdown.AlternatingRows Property

Gets or sets a value indicating whether the dropdown uses the OddRowStyle for odd-numbered rows and EvenRowStyle for even-numbered rows.

[Visual Basic]

Public Property AlternatingRows As Boolean

[C#]

public bool AlternatingRows {get;set;}

[Delphi]

public property AlternatingRows: Boolean read get_AlternatingRows write set_AlternatingRows;

Remarks

If True, the OddRowStyle and EvenRowStyle properties control the appearance of rows within the specified object.

If False (the default), the Style property controls the display of rows within the specified object.

At design time, you can change the colors and fonts used to render odd (even) rows by modifying the built-in OddRow (EvenRow) style using the Styles property page.

At run time, you can change the colors and fonts used to render odd (even) rows by modifying the Style object returned by the OddRowStyle (EvenRowStyle) property.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBDropdown.Bookmark Property

C1TrueDBDropdown.Bookmark Property

Gets or sets the current row position of the underlying CurrencyManager.

[Visual Basic]

Public Property Bookmark As Integer

[C#]

public int Bookmark {get;set;}

[Delphi]

public property Bookmark: Int32 read get_Bookmark write set_Bookmark;

Remarks

Use the value returned by the Bookmark property to save a reference to the current row that remains valid even after another row becomes current.

When you set the Bookmark property to a valid value in code, the row associated with that value becomes the current row, and the grid adjusts its display to bring the new current row into view if necessary.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBDropdown.CaptionStyle Property

C1TrueDBDropdown.CaptionStyle Property

Gets or sets the Style object that controls the appearance of the caption area.

[Visual Basic]

Public Property CaptionStyle As Style

[C#]

public Style CaptionStyle {get;set;}

[Delphi]

public property CaptionStyle: Style read get_CaptionStyle write set_CaptionStyle;

Remarks

This property sets or returns the Style object that controls the appearance of a TDBGrid control's caption bar or a Split object's heading area. By default, this is the built-in Caption style.

The value of the Caption property is not affected by changes to the CaptionStyle property.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBDropdown.Col Property

C1TrueDBDropdown.Col Property

Gets or sets the column position.

[Visual Basic]

Public Property Col As Integer

[C#]

public int Col {get;set;}

[Delphi]

public property Col: Int32 read get_Col write set_Col;

Remarks

This property specifies the zero-based index of the current cell's column position. It may be set at run time to highlight a different cell within the current row. If the column is visible, the caret or marquee will be moved to the selected column. If the column is not visible, the grid will scroll to make it visible as a result of setting this property.

Setting the Col property at run time does not affect selected columns.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBDropdown.ColumnCaptionHeight Property

C1TrueDBDropdown.ColumnCaptionHeight Property

Gets or sets the height of column captions.

[Visual Basic]

Public Property ColumnCaptionHeight As Integer

[C#]

public int ColumnCaptionHeight {get;set;}

[Delphi]

public property ColumnCaptionHeight: Int32 read get_ColumnCaptionHeight write set_ColumnCaptionHeight;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBDropdown.ColumnFooterHeight Property

C1TrueDBDropdown.ColumnFooterHeight Property

Gets or sets the height of column footers.

[Visual Basic]

Public Property ColumnFooterHeight As Integer

[C#]

public int ColumnFooterHeight {get;set;}

[Delphi]

public property ColumnFooterHeight: Int32 read get_ColumnFooterHeight write set_ColumnFooterHeight;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBDropdown.ColumnFooters Property

C1TrueDBDropdown.ColumnFooters Property

Gets or sets a value indicating the visibility of column footers.

[Visual Basic]

Public Property ColumnFooters As Boolean

[C#]

public bool ColumnFooters {get;set;}

[Delphi]

public property ColumnFooters: Boolean read get_ColumnFooters write set_ColumnFooters;

Remarks

If True, the control's column footers are displayed.

If False (the default), the control's column footers are not displayed.

Use the FooterText property to set the footing text of an individual column.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBDropdown.ColumnHeaders Property

C1TrueDBDropdown.ColumnHeaders Property

Gets or sets a value indicating the visibility of column headers.

[Visual Basic]

Public Property ColumnHeaders As Boolean

[C#]

public bool ColumnHeaders {get;set;}

[Delphi]

public property ColumnHeaders: Boolean read get_ColumnHeaders write set_ColumnHeaders;

Remarks

If True (the default), the control's column headers are displayed.

If False, the control's column headers are not displayed.

Use the Caption property to set the heading text of an individual Column.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBDropdown.Columns Property

C1TrueDBDropdown.Columns Property

Gets the collection of C1DataColumn objects.

[Visual Basic]

Public ReadOnly Property Columns As C1DataColumnCollection

[C#]

public C1DataColumnCollection Columns {get;}

[Delphi]

public property Columns: C1DataColumnCollection read get_Columns;

Remarks

This property returns a collection of C1DataColumn objects for a grid or drop-down control.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBDropdown.CurrentCellVisible Property

C1TrueDBDropdown.CurrentCellVisible Property

Gets or sets a value indicating the visibility of the current cell.

[Visual Basic]

Public Property CurrentCellVisible As Boolean

[C#]

public bool CurrentCellVisible {get;set;}

[Delphi]

public property CurrentCellVisible: Boolean read get_CurrentCellVisible write set_CurrentCellVisible;

Remarks

This property returns True if the current cell (indicated by the Bookmark and Col properties) is visible within the displayed area of a grid or split. It returns False if the cell is not visible.

Setting the CurrentCellVisible property to True causes the grid to scroll so that the current cell is brought into view. If a grid contains multiple splits, then the current cell becomes visible in each split.

In all cases, setting this property to False is meaningless and is ignored.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBDropdown.DefColWidth Property

C1TrueDBDropdown.DefColWidth Property

Gets or sets the default width for all grid columns.

[Visual Basic]

Public Property DefColWidth As Integer

[C#]

public int DefColWidth {get;set;}

[Delphi]

public property DefColWidth: Int32 read get_DefColWidth write set_DefColWidth;

Remarks

This property returns or sets the default width for all grid columns in terms of the coordinate system of the grid's container.

For bound grids, the DefColWidth property is respected under the following circumstances:

· When the grid's layout is initialized at run time.

· When a new column is created at run time.

If the DefColWidth property is set to 0, the grid automatically sizes all columns based on either the width of the column heading or the display width of the underlying field, whichever is larger. For example, to set the default column width to the width of the first column:

· Visual Basic

· C#

· Delphi

Note: Setting the DefColWidth property at run time does not affect existing columns, only those that are subsequently created in code.

In bound mode, some data sources do not provide text field widths when requested by the grid. Therefore, if DefColWidth is 0, the actual column widths may not be what is expected since the grid must supply a default width.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBDropdown.DisplayColumns Property

C1TrueDBDropdown.DisplayColumns Property

Gets the collection of C1DisplayColumn objects.

[Visual Basic]

Public ReadOnly Property DisplayColumns As C1DisplayColumnCollection

[C#]

public C1DisplayColumnCollection DisplayColumns {get;}

[Delphi]

public property DisplayColumns: C1DisplayColumnCollection read get_DisplayColumns;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBDropdown.DropdownWidth Property

C1TrueDBDropdown.DropdownWidth Property

Gets or sets the width of the drop-down.

[Visual Basic]

Public Property DropdownWidth As DropdownWidthEnum

[C#]

public DropdownWidthEnum DropdownWidth {get;set;}

[Delphi]

public property DropdownWidth: DropdownWidthEnum read get_DropdownWidth write set_DropdownWidth;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBDropdown.EmptyRows Property

C1TrueDBDropdown.EmptyRows Property

Gets or sets a value that determines how the grid displays rows below the last data row.

[Visual Basic]

Public Property EmptyRows As Boolean

[C#]

public bool EmptyRows {get;set;}

[Delphi]

public property EmptyRows: Boolean read get_EmptyRows write set_EmptyRows;

Remarks

If all of the records in the data source do not fill up the entire grid, setting EmptyRows to True will fill the unpopulated grid area with empty data rows. If EmptyRows is False (the default), then the unpopulated grid area will be blank and will be filled with the system 3D Objects color (or the system Button Face color) as determined by your Control Panel settings.

Note: The RowDivider property applies to data rows and empty rows alike. You cannot suppress row dividers for just the empty rows when EmptyRows is True.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBDropdown.EvenRowStyle Property

C1TrueDBDropdown.EvenRowStyle Property

Gets or sets the Style object that controls the appearance of an even-numbered row when using AlternatingRows.

[Visual Basic]

Public Property EvenRowStyle As Style

[C#]

public Style EvenRowStyle {get;set;}

[Delphi]

public property EvenRowStyle: Style read get_EvenRowStyle write set_EvenRowStyle;

Remarks

This property sets or returns the Style object that controls the appearance of an even-numbered row in a grid or split where the AlternatingRows property is set to True. By default, this is the built-in EvenRow style.

To change the appearance of odd-numbered rows, set the OddRowStyle property.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBDropdown.ExtendRightColumn Property

C1TrueDBDropdown.ExtendRightColumn Property

Gets or sets a value that determines how the last column will extend to fill the dead area of the drop-down.

[Visual Basic]

Public Property ExtendRightColumn As Boolean

[C#]

public bool ExtendRightColumn {get;set;}

[Delphi]

public property ExtendRightColumn: Boolean read get_ExtendRightColumn write set_ExtendRightColumn;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBDropdown.FetchRowStyles Property

C1TrueDBDropdown.FetchRowStyles Property

Gets or sets a value indicating whether the FetchRowStyle event will be raised.

[Visual Basic]

Public Property FetchRowStyles As Boolean

[C#]

public bool FetchRowStyles {get;set;}

[Delphi]

public property FetchRowStyles: Boolean read get_FetchRowStyles write set_FetchRowStyles;

Remarks

If True, the FetchRowStyle event will be raised whenever the grid is about to display a row of data.

If False (the default), the FetchRowStyle event is not raised.

Set this value to True when you need to perform complex per-row formatting operations that can only be done using the FetchRowStyle event. For example, to apply fonts and/or colors to all rows that satisfy certain criteria, then set the FetchRowStyles property to True and write code for the FetchRowStyle event.

Note: To display every other row in a different color or font, set the AlternatingRows property to True.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBDropdown.FirstRow Property

C1TrueDBDropdown.FirstRow Property

Gets or sets the row index for the first visible row.

[Visual Basic]

Public Property FirstRow As Integer

[C#]

public int FirstRow {get;set;}

[Delphi]

public property FirstRow: Int32 read get_FirstRow write set_FirstRow;

Remarks

For a C1TrueDBGrid or C1TrueDBDropdown control, setting the FirstRow property causes the grid to scroll so that the specified row becomes the topmost row. If a grid contains multiple splits, then the topmost row or column changes in each split, even if the splits have different HorizontalScrollGroup or VerticalScrollGroup property settings.

For a Split object, setting the FirstRow property causes the specified row to become the topmost row for that split only.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBDropdown.FooterStyle Property

C1TrueDBDropdown.FooterStyle Property

Gets or sets the Style object that controls the appearance of column footers.

[Visual Basic]

Public Property FooterStyle As Style

[C#]

public Style FooterStyle {get;set;}

[Delphi]

public property FooterStyle: Style read get_FooterStyle write set_FooterStyle;

Remarks

This property returns the Style object that controls the appearance of column footings within a grid, column, or split. By default, this is the built-in Footing style.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBDropdown.HeadingStyle Property

C1TrueDBDropdown.HeadingStyle Property

Gets or sets the Style object that controls the appearance of the grids column headers.

[Visual Basic]

Public Property HeadingStyle As Style

[C#]

public Style HeadingStyle {get;set;}

[Delphi]

public property HeadingStyle: Style read get_HeadingStyle write set_HeadingStyle;

Remarks

This property returns the Style object that controls the appearance of column headings within a grid, column, or split. By default, this is the built-in Heading style.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBDropdown.HighLightRowStyle Property

C1TrueDBDropdown.HighLightRowStyle Property

Gets or sets the Style object that controls the appearance of a highlighted row.

[Visual Basic]

Public Property HighLightRowStyle As Style

[C#]

public Style HighLightRowStyle {get;set;}

[Delphi]

public property HighLightRowStyle: Style read get_HighLightRowStyle write set_HighLightRowStyle;

Remarks

This property sets or returns the Style object that controls the appearance of a highlighted row or cell marquee. By default, this is the built-in HighlightRow style.

The HighlightRowStyle value is only used when one of the following MarqueeStyle settings is in effect: Highlight Cell, Highlight Row, or HighlightRow, RaiseCell.

The value of the MarqueeStyle property is not affected by changes to the HighlightRowStyle property.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBDropdown.HScrollBar Property

C1TrueDBDropdown.HScrollBar Property

Gets the HBar object that controls the appearance of the horizontal scrollbar.

[Visual Basic]

Public ReadOnly Property HScrollBar As HBar

[C#]

public HBar HScrollBar {get;}

[Delphi]

public property HScrollBar: HBar read get_HScrollBar;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBDropdown.IntegralHeight Property

C1TrueDBDropdown.IntegralHeight Property

Gets or sets a value indicating whether the control should resize to avoid showing partial items.

[Visual Basic]

Public Property IntegralHeight As Boolean

[C#]

public bool IntegralHeight {get;set;}

[Delphi]

public property IntegralHeight: Boolean read get_IntegralHeight write set_IntegralHeight;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBDropdown.LeftCol Property

C1TrueDBDropdown.LeftCol Property

Gets or sets the zero-based index of the leftmost column.

[Visual Basic]

Public Property LeftCol As Integer

[C#]

public int LeftCol {get;set;}

[Delphi]

public property LeftCol: Int32 read get_LeftCol write set_LeftCol;

Remarks

For a C1TrueDBGrid or C1TrueDBDropdown control, setting the LeftCol property causes the grid to scroll so that the specified column becomes the leftmost column. If a grid contains multiple splits, then the leftmost column changes in each split.

For a Split object, setting the LeftCol property causes the specified column to become the leftmost column for that split only.

Use the LeftCol property in code to scroll a grid or split horizontally. Use the FirstRow property to determine the bookmark of the first visible row in a grid or split.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBDropdown.OddRowStyle Property

C1TrueDBDropdown.OddRowStyle Property

Gets or sets the Style object that controls the appearance of an odd-numbered row when using AlternatingRows.

[Visual Basic]

Public Property OddRowStyle As Style

[C#]

public Style OddRowStyle {get;set;}

[Delphi]

public property OddRowStyle: Style read get_OddRowStyle write set_OddRowStyle;

Remarks

This property sets or returns the Style object that controls the appearance of an odd-numbered row in a grid or split where the AlternatingRows property is set to True. By default, this is the built-in OddRow style.

To change the appearance of even-numbered rows, set the EvenRowStyle property.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBDropdown.Row Property

C1TrueDBDropdown.Row Property

Gets or sets the the current row.

[Visual Basic]

Public Property Row As Integer

[C#]

public int Row {get;set;}

[Delphi]

public property Row: Int32 read get_Row write set_Row;

Remarks

This property specifies the zero-based index of the current row relative to the first displayed row. It may be set at run time to highlight a different cell within the current column.

The Row property accepts values ranging from 0 to VisibleRows - 1. An error occurs if you attempt to set it to an invalid row index.

If the current row is not visible, then this property returns -1.

For a C1TrueDBGrid control, changing the Row property at run time does not affect selected rows.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBDropdown.RowDivider Property

C1TrueDBDropdown.RowDivider Property

Gets or sets the style of the border drawn between rows.

[Visual Basic]

Public Property RowDivider As GridLines

[C#]

public GridLines RowDivider {get;set;}

[Delphi]

public property RowDivider: GridLines read get_RowDivider write set_RowDivider;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBDropdown.RowSubDividerColor Property

C1TrueDBDropdown.RowSubDividerColor Property

Gets or sets the color of the subrow divider in a multi-line drop-down.

[Visual Basic]

Public Property RowSubDividerColor As Color

[C#]

public Color RowSubDividerColor {get;set;}

[Delphi]

public property RowSubDividerColor: Color read get_RowSubDividerColor write set_RowSubDividerColor;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBDropdown.RowTracking Property

C1TrueDBDropdown.RowTracking Property

Gets or sets a value that determines if rows are highlighted under the mouse.

[Visual Basic]

Public Property RowTracking As Boolean

[C#]

public bool RowTracking {get;set;}

[Delphi]

public property RowTracking: Boolean read get_RowTracking write set_RowTracking;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBDropdown.ScrollTips Property

C1TrueDBDropdown.ScrollTips Property

Gets or sets a value that determines whether the grid displays a pop-up text window when the scrollbar thumb is dragged.

[Visual Basic]

Public Property ScrollTips As Boolean

[C#]

public bool ScrollTips {get;set;}

[Delphi]

public property ScrollTips: Boolean read get_ScrollTips write set_ScrollTips;

Remarks

The ScrollTips property determines whether the grid displays a pop-up text window when the scrollbar thumb is dragged. By default, this property is set to False, and ScrollTips are not displayed.

If the ScrollTips property is set to True, the FetchScrollTips event will be raised whenever the grid’s scrollbar thumb is dragged.

If a handler is not provided for the FetchScrollTips event, tips will not be displayed.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBDropdown.Style Property

C1TrueDBDropdown.Style Property

Gets or sets the root Style object.

[Visual Basic]

Public Property Style As Style

[C#]

public Style Style {get;set;}

[Delphi]

public property Style: Style read get_Style write set_Style;

Remarks

This property returns or sets the Style object that controls the normal appearance of a cell within a grid, column, or split. By default, this is the built-in Normal style.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBDropdown.Styles Property

C1TrueDBDropdown.Styles Property

Gets the collection of named Style objects.

[Visual Basic]

Public ReadOnly Property Styles As GridStyleCollection

[C#]

public GridStyleCollection Styles {get;}

[Delphi]

public property Styles: GridStyleCollection read get_Styles;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBDropdown.ValueTranslate Property

C1TrueDBDropdown.ValueTranslate Property

Gets or sets a value that determines how the grid display values in a column.

[Visual Basic]

Public Property ValueTranslate As Boolean

[C#]

public bool ValueTranslate {get;set;}

[Delphi]

public property ValueTranslate: Boolean read get_ValueTranslate write set_ValueTranslate;

Remarks

This property determines whether a grid column associated with a C1TrueDBDropdown control automatically performs value translation at run time. To use this property, set the following C1TrueDBDropdown properties:

· DataField is the field containing the underlying data.

· ListField is the field that contains a descriptive version of DataField.

When this property is set to True, the grid will automatically display the ListField values in the associated column.

Example

The following code sets the ValueTranslate property to True, ListField property to TypeDesc, and DataField property to TypeID:

· Visual Basic

· C#

· Delphi

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBDropdown.VisibleCols Property

C1TrueDBDropdown.VisibleCols Property

Gets the number of visible columns in the drop-down.

[Visual Basic]

Public ReadOnly Property VisibleCols As Integer

[C#]

public int VisibleCols {get;}

[Delphi]

public property VisibleCols: Int32 read get_VisibleCols;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBDropdown.VisibleRows Property

C1TrueDBDropdown.VisibleRows Property

Gets the number of visible rows in the drop-down.

[Visual Basic]

Public ReadOnly Property VisibleRows As Integer

[C#]

public int VisibleRows {get;}

[Delphi]

public property VisibleRows: Int32 read get_VisibleRows;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBDropdown.VScrollBar Property

C1TrueDBDropdown.VScrollBar Property

Gets the VBar object that controls the appearance of the vertical scrollbar.

[Visual Basic]

Public ReadOnly Property VScrollBar As VBar

[C#]

public VBar VScrollBar {get;}

[Delphi]

public property VScrollBar: VBar read get_VScrollBar;

Remarks

This property returns or sets the VBar object that controls the appearance of the vertical scrollbar.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBDropdown Methods

C1TrueDBDropdown Methods

The methods of the C1TrueDBDropdown class are listed here. For a complete list of C1TrueDBDropdown class members, see the C1TrueDBDropdown Members topic.

Public Methods

AddCellStyle | Controls the Style used to change the appearance for cells meeting the specified condition.
AddRegexCellStyle | Controls the Style used to change the appearance of cells according to their contents.
BeginInit (inherited from Frame) | ISupportInitialize interface.
ClearCellStyle | Restores the default layout.
ClearFields | Restores the default layout.
ClearRegexCellStyle | Removes a cell condition established with a previous call to the AddRegexCellStyle method.
ColContaining | Returns the column index for the column containing the specified X coordinate.
EndInit (inherited from Frame) | ISupportInitialize interface.
GetCurrentSelIndex | Gets the current selected index.
Rebind | Overloaded. Reinitializes grid with data from its data source
RowContaining | Returns the zero-based index of the display row containing the Y specified coordinate.
ScrollCtl | Scrolls the data area by the specified number of rows and columns.
SetDataBinding | Binds the grid to a DataSource at runtime

Protected Methods

Dispose | Overloaded. Overriden. Called when the class is being disposed.
On_Scroll | Overriden. Occurs when the user scrolls the grid.
OnColMove | Overriden. Occurs when the user has moved a column.
OnColResize | Overriden. Occurs when the user has resized a column.
OnDataSourceChanged | Overriden. Occurs when the grids DataSource has changed.
OnDropDownClose | Occurs when the drop-down closes.
OnDropDownOpen | Occurs when the drop-down closes.
OnFetchRowStyle | Overriden. Occurs whenever the grid is about to display a row of data and the FetchRowStyles property is True.
OnFetchScrollTips | Overriden. Occurs whenever the grid has focus and the scrollbar thumb is moved using the mouse.
OnFirstRowChange | Overriden. Occurs when the first displayed row of a control or split is changed.
OnFootClick | Overriden. Occurs when the user clicks on the column footer.
OnFormatText | Overriden. Occurs when the grid is about to display cell data in a column whose NumberFormat property is set to the string FormatText Event.
OnHeadClick | Overriden. Occurs when the user clicks on the column header.
OnLeftColChange | Overriden. Occurs when the first visible column of a grid or split is changed.
OnRowChange | Occurs when the row focus changes.
OnRowResize | Overriden. Occurs when the user has finished resizing a grid row.
OnSelChange | Overriden. Occurs when the user selects a different range of rows or columns.
OnUnboundColumnFetch | Overriden. Occurs when the grid needs to display the value of a cell in an unbound column.
OnValueItemError | Overriden. Occurs when the user attempts to enter invalid data into a column that is using value lists.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBDropdown.AddCellStyle Method

C1TrueDBDropdown.AddCellStyle Method

Controls the Style used to change the appearance for cells meeting the specified condition.

[Visual Basic]

Public Sub AddCellStyle( _

ByVal condition As CellStyleFlag, _

ByVal style As Style _

)

[C#]

public void AddCellStyle(

CellStyleFlag condition,

Style style

);

[Delphi]

public procedure AddCellStyle(

condition: CellStyleFlag;

style: Style

);

Parameters

condition

Combination of one or more CellStyleFlag enumerations.

style

Style object that specifies appearance attributes.

Remarks

This method allows you to control the font and color of cells within a grid, column, or split according to the status values (CellStyleFlag enumeration) specified by the condition argument.

Add the first four values together to specify multiple cell conditions. For example, a cell status value of 9 (CellStyleFlag.CurrentCell + CellStyleFlag.SelectedRow) denotes a current cell within a selected row. Also use a cell status value of 0 (CellStyleFlag.NormalCell) to refer to only those cells without any of the four basic cell conditions.

The style argument specifies the attributes that will override the default font and color characteristics for cells within an object. For example, the following code causes updated cells to be displayed in red:

· Visual Basic

· C#

· Delphi

Each time the AddCellStyle method is invoked, the specified cell condition is added to the list of existing conditions. Hence, by repeated use of this method it is possible to set up multiple conditions to affect the appearance of a grid, column, or split.

Note: If a cell condition already exists for a particular condition value, the new style setting replaces the existing one.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBDropdown.AddRegexCellStyle Method

C1TrueDBDropdown.AddRegexCellStyle Method

Controls the Style used to change the appearance of cells according to their contents.

[Visual Basic]

Public Sub AddRegexCellStyle( _

ByVal condition As CellStyleFlag, _

ByVal style As Style, _

ByVal regex As String _

)

[C#]

public void AddRegexCellStyle(

CellStyleFlag condition,

Style style,

string regex

);

[Delphi]

public procedure AddRegexCellStyle(

condition: CellStyleFlag;

style: Style;

regex: String

);

Parameters

condition

Combination of one or more CellStyleFlag enumerations.

style

Style object that specifies appearance attributes.

regex

A regular expression string.

Remarks

This method allows the font and color of cells to be controlled within a grid, column, or split according to their contents. The status values (CellStyleFlag enumeration) specified by the condition argument determine which cells are affected.

Add the first four values together to specify multiple cell conditions. For example, a cell status value of (CellStyleFlag.CurrentCell + CellStyleFlag.SelectedRow) denotes a current cell within a selected row. Also use a cell status value of (CellStyleFlag.NormalCell) to refer to only those cells without any of the four basic cell conditions. To designate that a cell condition should apply to all cells regardless of status, use a cell status value of CellStyleFlag.AllCells.

The regex argument is a regular expression string that describes the pattern matching to be performed on cell contents. The regular expressions supported by True DBGrid are a subset of standard Unix regular expression syntax:

p*

Any pattern followed by an asterisk matches zero or more occurrences of that pattern. For example, ab*c matches ac, abc, and abbcy (partial match).

p+

Any pattern followed by a plus sign matches one or more occurrences of that pattern. For example, ab+c matches abc and abbcy, but not ac.

[list]

A list of case-sensitive characters enclosed in brackets matches any one of those characters in the given position in the string. Character ranges can be used, as in [abcd], which is equivalent to [a-d]. Multiple ranges can also be used. For example, [A-Za-z0-9] matches any letter or digit. Bracketed patterns can also be combined with either the * or + operators. The pattern [A-Z]+ matches a sequence of one or more uppercase letters.

[^list]

If a list starts with a caret, it matches any character except those specified in the list.

. (period)

A period represents any single character.

^p

A caret at the beginning of a pattern forces a match to occur at the start of a cell. Otherwise, the pattern can match anywhere within a cell.

p$

A dollar sign at the end of a pattern forces a match to occur at the end of a cell. Otherwise, the pattern can match anywhere within a cell.

\c

Any character preceded by a backslash represents itself, unless enclosed in brackets, in which case the backslash is interpreted literally.

Any other character represents itself and will be compared with respect to case.

The style argument specifies the attributes that will override the default font and color characteristics for cells within an object. For example, the following code causes normal cells containing the letters "SQL" to be displayed in bold:

· Visual Basic

· C#

· Delphi

Each time the AddRegexCellStyle method is invoked, the specified cell condition is added to the list of existing conditions. Hence, by repeated use of this method it is possible to set up multiple conditions to affect the appearance of a grid, column, or split.

Note: If a cell condition already exists for a particular pair of condition and regex values, the new style setting replaces the existing one.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBDropdown.ClearCellStyle Method

C1TrueDBDropdown.ClearCellStyle Method

Restores the default layout.

[Visual Basic]

Public Sub ClearCellStyle( _

ByVal Condition As CellStyleFlag _

)

[C#]

public void ClearCellStyle(

CellStyleFlag Condition

);

[Delphi]

public procedure ClearCellStyle(

Condition: CellStyleFlag

);

Remarks

The ClearCellStyle method removes a cell condition established with a previous call to the AddCellStyle method for the object in question. If no such cell condition exists, then calling this method has no effect.

If the condition argument is CellStyleFlag.AllCells, then all non-regex cell conditions are removed, regardless of status.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBDropdown.ClearFields Method

C1TrueDBDropdown.ClearFields Method

Restores the default layout.

[Visual Basic]

Public Sub ClearFields()

[C#]

public void ClearFields()

[Delphi]

public procedure ClearFields();

Remarks

The ClearFields method restores the default grid layout so that subsequent Rebind (Boolean) operations will automatically derive new column bindings from the (possibly changed) data source. Cancel the grid's automatic layout behavior by invoking the HoldFields method.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBDropdown.ClearRegexCellStyle Method

C1TrueDBDropdown.ClearRegexCellStyle Method

Removes a cell condition established with a previous call to the AddRegexCellStyle method.

[Visual Basic]

Public Sub ClearRegexCellStyle( _

ByVal condition As CellStyleFlag _

)

[C#]

public void ClearRegexCellStyle(

CellStyleFlag condition

);

[Delphi]

public procedure ClearRegexCellStyle(

condition: CellStyleFlag

);

Parameters

condition

Combination of one or more CellStyleFlag enumerations.

Remarks

The ClearRegexCellStyle method removes a cell condition established with a previous call to the AddRegexCellStyle method for the object in question. If no such cell condition exists, then calling this method has no effect.

If regex is omitted, then all cell conditions for any regular expression matching the condition argument are removed. If condition is CellStyleFlag.AllCells, then all regex cell conditions are removed, regardless of status or expression.

If regex is supplied, then the single cell condition matching both arguments is removed. However, if condition is CellStyleFlag.AllCells, then all cell conditions for the specified regular expression are removed, regardless of status.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBDropdown.ColContaining Method

C1TrueDBDropdown.ColContaining Method

Returns the column index for the column containing the specified X coordinate.

[Visual Basic]

Public Function ColContaining( _

ByVal x As Integer _

) As Integer

[C#]

public int ColContaining(

int x

);

[Delphi]

public function ColContaining(

x: Int32

): Int32;

Parameters

x

The horizontal coordinate (X value) in pixels.

Return Value

The index of the column in the DisplayColumns collection beneath the specified X coordinate.

Remarks

The ColContaining method returns the index value of the grid column containing the specified coordinate. This value ranges from 0 to Columns.Count – 1.

This method is useful when working with mouse and drag events when you are trying to determine where the user clicked or dropped another control in terms of a grid column.

If coordinate is outside of the grid's data area, this method returns -1.

The ColContaining method returns the index value of the column indicated, not the visible column position. For example, if coordinate falls within the first visible column, but two columns have been scrolled off the left side of the control, the ColContaining method returns 2, not 0 (assuming that the user did not move any columns previously).

Note: Convert the coordinate argument to pixels, even if the container's ScaleMode setting specifies a different unit of measurement.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBDropdown.Dispose Method

C1TrueDBDropdown.Dispose Method

Called when the class is being disposed.

[Visual Basic]

Overrides Protected Sub Dispose( _

ByVal disposing As Boolean _

)

[C#]

override protected void Dispose(

bool disposing

);

[Delphi]

strict protected procedure Dispose(

disposing: Boolean

); overload; override;

Parameters

disposing

True to cleanup.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBDropdown.GetCurrentSelIndex Method

C1TrueDBDropdown.GetCurrentSelIndex Method

Gets the current selected index.

[Visual Basic]

Public Function GetCurrentSelIndex() As Integer

[C#]

public int GetCurrentSelIndex()

[Delphi]

public function GetCurrentSelIndex(): Int32;

Return Value

The current selected index.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBDropdown.On_Scroll Method

C1TrueDBDropdown.On_Scroll Method

Occurs when the user scrolls the grid.

[Visual Basic]

Overrides Protected Sub On_Scroll( _

ByVal e As CancelEventArgs _

)

[C#]

override protected void On_Scroll(

CancelEventArgs e

);

[Delphi]

strict protected procedure On_Scroll(

e: CancelEventArgs

); override;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBDropdown.OnColMove Method

C1TrueDBDropdown.OnColMove Method

Occurs when the user has moved a column.

[Visual Basic]

Overrides Protected Sub OnColMove( _

ByVal e As ColMoveEventArgs _

)

[C#]

override protected void OnColMove(

ColMoveEventArgs e

);

[Delphi]

strict protected procedure OnColMove(

e: ColMoveEventArgs

); override;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBDropdown.OnColResize Method

C1TrueDBDropdown.OnColResize Method

Occurs when the user has resized a column.

[Visual Basic]

Overrides Protected Sub OnColResize( _

ByVal e As ColResizeEventArgs _

)

[C#]

override protected void OnColResize(

ColResizeEventArgs e

);

[Delphi]

strict protected procedure OnColResize(

e: ColResizeEventArgs

); override;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBDropdown.OnDataSourceChanged Method

C1TrueDBDropdown.OnDataSourceChanged Method

Occurs when the grids DataSource has changed.

[Visual Basic]

Overrides Protected Sub OnDataSourceChanged( _

ByVal e As EventArgs _

)

[C#]

override protected void OnDataSourceChanged(

EventArgs e

);

[Delphi]

strict protected procedure OnDataSourceChanged(

e: EventArgs

); override;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBDropdown.OnDropDownClose Method

C1TrueDBDropdown.OnDropDownClose Method

Occurs when the drop-down closes.

[Visual Basic]

Overridable Protected Sub OnDropDownClose( _

ByVal e As EventArgs _

)

[C#]

virtual protected void OnDropDownClose(

EventArgs e

);

[Delphi]

strict protected procedure OnDropDownClose(

e: EventArgs

); virtual;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBDropdown.OnDropDownOpen Method

C1TrueDBDropdown.OnDropDownOpen Method

Occurs when the drop-down closes.

[Visual Basic]

Overridable Protected Sub OnDropDownOpen( _

ByVal e As EventArgs _

)

[C#]

virtual protected void OnDropDownOpen(

EventArgs e

);

[Delphi]

strict protected procedure OnDropDownOpen(

e: EventArgs

); virtual;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBDropdown.OnFetchRowStyle Method

C1TrueDBDropdown.OnFetchRowStyle Method

Occurs whenever the grid is about to display a row of data and the FetchRowStyles property is True.

[Visual Basic]

Overrides Protected Sub OnFetchRowStyle( _

ByVal e As FetchRowStyleEventArgs _

)

[C#]

override protected void OnFetchRowStyle(

FetchRowStyleEventArgs e

);

[Delphi]

strict protected procedure OnFetchRowStyle(

e: FetchRowStyleEventArgs

); override;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBDropdown.OnFetchScrollTips Method

C1TrueDBDropdown.OnFetchScrollTips Method

Occurs whenever the grid has focus and the scrollbar thumb is moved using the mouse.

[Visual Basic]

Overrides Protected Sub OnFetchScrollTips( _

ByVal e As FetchScrollTipsEventArgs _

)

[C#]

override protected void OnFetchScrollTips(

FetchScrollTipsEventArgs e

);

[Delphi]

strict protected procedure OnFetchScrollTips(

e: FetchScrollTipsEventArgs

); override;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBDropdown.OnFirstRowChange Method

C1TrueDBDropdown.OnFirstRowChange Method

Occurs when the first displayed row of a control or split is changed.

[Visual Basic]

Overrides Protected Sub OnFirstRowChange( _

ByVal e As SplitEventArgs _

)

[C#]

override protected void OnFirstRowChange(

SplitEventArgs e

);

[Delphi]

strict protected procedure OnFirstRowChange(

e: SplitEventArgs

); override;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBDropdown.OnFootClick Method

C1TrueDBDropdown.OnFootClick Method

Occurs when the user clicks on the column footer.

[Visual Basic]

Overrides Protected Sub OnFootClick( _

ByVal e As ColEventArgs _

)

[C#]

override protected void OnFootClick(

ColEventArgs e

);

[Delphi]

strict protected procedure OnFootClick(

e: ColEventArgs

); override;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBDropdown.OnFormatText Method

C1TrueDBDropdown.OnFormatText Method

Occurs when the grid is about to display cell data in a column whose NumberFormat property is set to the string FormatText Event.

[Visual Basic]

Overrides Protected Sub OnFormatText( _

ByVal e As FormatTextEventArgs _

)

[C#]

override protected void OnFormatText(

FormatTextEventArgs e

);

[Delphi]

strict protected procedure OnFormatText(

e: FormatTextEventArgs

); override;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBDropdown.OnHeadClick Method

C1TrueDBDropdown.OnHeadClick Method

Occurs when the user clicks on the column header.

[Visual Basic]

Overrides Protected Sub OnHeadClick( _

ByVal e As ColEventArgs _

)

[C#]

override protected void OnHeadClick(

ColEventArgs e

);

[Delphi]

strict protected procedure OnHeadClick(

e: ColEventArgs

); override;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBDropdown.OnLeftColChange Method

C1TrueDBDropdown.OnLeftColChange Method

Occurs when the first visible column of a grid or split is changed.

[Visual Basic]

Overrides Protected Sub OnLeftColChange( _

ByVal e As SplitEventArgs _

)

[C#]

override protected void OnLeftColChange(

SplitEventArgs e

);

[Delphi]

strict protected procedure OnLeftColChange(

e: SplitEventArgs

); override;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBDropdown.OnRowChange Method

C1TrueDBDropdown.OnRowChange Method

Occurs when the row focus changes.

[Visual Basic]

Overridable Protected Sub OnRowChange( _

ByVal e As EventArgs _

)

[C#]

virtual protected void OnRowChange(

EventArgs e

);

[Delphi]

strict protected procedure OnRowChange(

e: EventArgs

); virtual;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBDropdown.OnRowResize Method

C1TrueDBDropdown.OnRowResize Method

Occurs when the user has finished resizing a grid row.

[Visual Basic]

Overrides Protected Sub OnRowResize( _

ByVal e As CancelEventArgs _

)

[C#]

override protected void OnRowResize(

CancelEventArgs e

);

[Delphi]

strict protected procedure OnRowResize(

e: CancelEventArgs

); override;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBDropdown.OnSelChange Method

C1TrueDBDropdown.OnSelChange Method

Occurs when the user selects a different range of rows or columns.

[Visual Basic]

Overrides Protected Sub OnSelChange( _

ByVal e As CancelEventArgs _

)

[C#]

override protected void OnSelChange(

CancelEventArgs e

);

[Delphi]

strict protected procedure OnSelChange(

e: CancelEventArgs

); override;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBDropdown.OnUnboundColumnFetch Method

C1TrueDBDropdown.OnUnboundColumnFetch Method

Occurs when the grid needs to display the value of a cell in an unbound column.

[Visual Basic]

Overrides Protected Sub OnUnboundColumnFetch( _

ByVal e As UnboundColumnFetchEventArgs _

)

[C#]

override protected void OnUnboundColumnFetch(

UnboundColumnFetchEventArgs e

);

[Delphi]

strict protected procedure OnUnboundColumnFetch(

e: UnboundColumnFetchEventArgs

); override;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBDropdown.OnValueItemError Method

C1TrueDBDropdown.OnValueItemError Method

Occurs when the user attempts to enter invalid data into a column that is using value lists.

[Visual Basic]

Overrides Protected Sub OnValueItemError( _

ByVal e As ColEventArgs _

)

[C#]

override protected void OnValueItemError(

ColEventArgs e

);

[Delphi]

strict protected procedure OnValueItemError(

e: ColEventArgs

); override;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBDropdown.Rebind Method

C1TrueDBDropdown.Rebind Method

Overload List

Reinitializes grid with data from its data source

[Visual Basic] Overloads Public Sub Rebind()

[C#] public void Rebind();

[Delphi] public procedure Rebind(); overload;

Reinitializes grid with data from its data source.

[Visual Basic] Overloads Public Sub Rebind(Boolean)

[C#] public void Rebind(bool);

[Delphi] public procedure Rebind(Boolean); overload;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBDropdown.Rebind Method ()

C1TrueDBDropdown.Rebind Method ()

Previous Next

Reinitializes grid with data from its data source

[Visual Basic]

Overloads Public Sub Rebind()

[C#]

public void Rebind()

[Delphi]

public procedure Rebind(); overload;

Remarks

This method re-establishes the connection with the bound data source, causing the control to perform the same operations that occur when you set the DataSource property at design time.

If you have not modified the grid columns at design time, then executing the Rebind method will reset the columns, headings, and other properties based on the current data source.

However, if the columns are altered in any way at design time (even if the DataField properties are left blank), then the grid will maintain the modified grid layout and will not automatically reset the columns.

Note: To force the grid to reset the column bindings even if the columns were modified at design time, invoke the ClearFields method immediately before Rebind. Conversely, to cancel the grid's automatic layout response and force the grid to use the current column/field layout, invoke the HoldFields method immediately before Rebind.

The HoldFields method is especially useful in the unbound modes when you have specified the column layout in code and would like to keep it intact after a Rebind operation.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBDropdown.Rebind Method (Boolean)

C1TrueDBDropdown.Rebind Method (Boolean)

Previous Next

Reinitializes grid with data from its data source.

[Visual Basic]

Overloads Public Sub Rebind( _

ByVal holdFields As Boolean _

)

[C#]

public void Rebind(

bool holdFields

);

[Delphi]

public procedure Rebind(

holdFields: Boolean

); overload;

Parameters

holdFields

True to preserves current column layout. False retrieves the schema from the datasource.

Remarks

This method re-establishes the connection with the bound data source, causing the control to perform the same operations that occur when you set the DataSource property at design time.

If you have not modified the grid columns at design time, then executing the Rebind method will reset the columns, headings, and other properties based on the current data source.

However, if the columns are altered in any way at design time (even if the DataField properties are left blank), then the grid will maintain the modified grid layout and will not automatically reset the columns.

Note: To force the grid to reset the column bindings even if the columns were modified at design time, invoke the ClearFields method immediately before Rebind. Conversely, to cancel the grid's automatic layout response and force the grid to use the current column/field layout, invoke the HoldFields method immediately before Rebind.

The HoldFields method is especially useful in the unbound modes when you have specified the column layout in code and would like to keep it intact after a Rebind operation.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBDropdown.RowContaining Method

C1TrueDBDropdown.RowContaining Method

Returns the zero-based index of the display row containing the Y specified coordinate.

[Visual Basic]

Public Function RowContaining( _

ByVal y As Integer _

) As Integer

[C#]

public int RowContaining(

int y

);

[Delphi]

public function RowContaining(

y: Int32

): Int32;

Parameters

y

The vertical coordinate (Y value) in pixels.

Return Value

The display row index beneath the specified Y coordinate.

Remarks

The RowContaining method returns the zero-based index of the display row containing the specified coordinate. This value ranges from 0 to VisibleRows - 1.

If coordinate is outside of the grid's data area, this method returns -1.

Note: You must convert the coordinate argument to pixels, even if the container's ScaleMode setting specifies a different unit of measurement.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBDropdown.ScrollCtl Method

C1TrueDBDropdown.ScrollCtl Method

Scrolls the data area by the specified number of rows and columns.

[Visual Basic]

Public Sub ScrollCtl( _

ByVal Cols As Integer, _

ByVal Rows As Integer _

)

[C#]

public void ScrollCtl(

int Cols,

int Rows

);

[Delphi]

public procedure ScrollCtl(

Cols: Int32;

Rows: Int32

);

Parameters

Cols

Number of columns to scroll.

Rows

Number of rows to scroll.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBDropdown.SetDataBinding Method

C1TrueDBDropdown.SetDataBinding Method

Overload List

Binds the grid to a DataSource at runtime

[Visual Basic] Overloads Public Sub SetDataBinding(Object, String)

[C#] public void SetDataBinding(object, string);

[Delphi] public procedure SetDataBinding(Object; String); overload;

Binds the grid to a DataSource at runtime

[Visual Basic] Overloads Public Sub SetDataBinding(Object, String, Boolean)

[C#] public void SetDataBinding(object, string, bool);

[Delphi] public procedure SetDataBinding(Object; String; Boolean); overload;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBDropdown.SetDataBinding Method (Object, String)

C1TrueDBDropdown.SetDataBinding Method (Object, String)

Previous Next

Binds the grid to a DataSource at runtime

[Visual Basic]

Overloads Public Sub SetDataBinding( _

ByVal dataSource As Object, _

ByVal dataMember As String _

)

[C#]

public void SetDataBinding(

object dataSource,

string dataMember

);

[Delphi]

public procedure SetDataBinding(

dataSource: Object;

dataMember: String

); overload;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBDropdown.SetDataBinding Method (Object, String, Boolean)

C1TrueDBDropdown.SetDataBinding Method (Object, String, Boolean)

Previous Next

Binds the grid to a DataSource at runtime

[Visual Basic]

Overloads Public Sub SetDataBinding( _

ByVal dataSource As Object, _

ByVal dataMember As String, _

ByVal holdFields As Boolean _

)

[C#]

public void SetDataBinding(

object dataSource,

string dataMember,

bool holdFields

);

[Delphi]

public procedure SetDataBinding(

dataSource: Object;

dataMember: String;

holdFields: Boolean

); overload;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBDropdown Events

C1TrueDBDropdown Events

The events of the C1TrueDBDropdown class are listed here. For a complete list of C1TrueDBDropdown class members, see the C1TrueDBDropdown Members topic.

Public Events

ColMove | Occurs when the user has moved a column.
ColResize | Occurs when the user has resized a column.
DataSourceChanged | Occurs when the grids DataSource has changed.
DropDownClose | Occurs when the drop-down closes.
DropDownOpen | Occurs when the drop-down closes.
FetchRowStyle | Occurs whenever the grid is about to display a row of data and the FetchRowStyles property is True.
FetchScrollTips | Occurs whenever the grid has focus and the scrollbar thumb is moved using the mouse.
FirstRowChange | Occurs when the first displayed row of a control or split is changed.
FootClick | Occurs when the user clicks on the column footer.
FormatText | Occurs when the grid is about to display cell data in a column whose NumberFormat property is set to the string FormatText Event.
HeadClick | Occurs when the user clicks on the column header.
LeftColChange | Occurs when the first visible column of a grid or split is changed.
RowChange | Occurs when the row focus changes.
RowResize | Occurs when the user has finished resizing a grid row.
Scroll | Occurs when the user scrolls the grid.
SelChange | Occurs when the user selects a different range of rows or columns.
UnboundColumnFetch | Occurs when the grid needs to display the value of a cell in an unbound column.
ValueItemError | Occurs when the user attempts to enter invalid data into a column that is using value lists.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBDropdown.ColMove Event

C1TrueDBDropdown.ColMove Event

Occurs when the user has moved a column.

[Visual Basic]

Public Event ColMove As ColMoveEventHandler

[C#]

public event ColMoveEventHandler ColMove

[Delphi]

public property ColMove: ColMoveEventHandler read remove_ColMove write add_ColMove;

Remarks

The ColMove event occurs when the user has finished moving the selected columns. The event procedure can either accept the movement or cancel it altogether.

The Position argument ranges from 0, which denotes the left edge, to the total number of columns, which denotes the right edge.

If the Cancel argument is set to True, no movement occurs. Selected columns always remain selected, regardless of the Cancel setting.

Note: This event is only raised when the user moves the selected columns to a new location.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBDropdown.ColResize Event

C1TrueDBDropdown.ColResize Event

Occurs when the user has resized a column.

[Visual Basic]

Public Event ColResize As ColResizeEventHandler

[C#]

public event ColResizeEventHandler ColResize

[Delphi]

public property ColResize: ColResizeEventHandler read remove_ColResize write add_ColResize;

Remarks

The ColResize event occurs after the user has finished resizing a column, but before columns to the right are repositioned. The event procedure can accept the change, alter the degree of change, or cancel the change completely.

If the Cancel argument to True, the previous column width is restored and no repainting occurs. To alter the degree of change, set the Width property of the C1DataColumn object specified by the ColIndex argument to the desired value.

It is not necessary to execute the Refresh method within this event procedure. Doing so causes the grid to be repainted even if the Cancel argument is True.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBDropdown.DataSourceChanged Event

C1TrueDBDropdown.DataSourceChanged Event

Occurs when the grids DataSource has changed.

[Visual Basic]

Public Event DataSourceChanged As EventHandler

[C#]

public event EventHandler DataSourceChanged

[Delphi]

public property DataSourceChanged: EventHandler read remove_DataSourceChanged write add_DataSourceChanged;

Remarks

The DataSourceChanged event occurs when a bound data source is changed or requeried. This event is also raised when a bound grid control is first loaded.

The DataSourceChanged event is raised before the grid is filled with data. Therefore, use this event to initialize the grid according to information obtained from the data source, if necessary.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBDropdown.DropDownClose Event

C1TrueDBDropdown.DropDownClose Event

Occurs when the drop-down closes.

[Visual Basic]

Public Event DropDownClose As EventHandler

[C#]

public event EventHandler DropDownClose

[Delphi]

public property DropDownClose: EventHandler read remove_DropDownClose write add_DropDownClose;

Remarks

This event occurs when the drop-down closes. The actions that will cause the drop-down to close are when the user selects an item from the drop-down, clicks the current cell's built-in button, presses Alt+Down Arrow, or when the drop-down loses focus.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBDropdown.DropDownOpen Event

C1TrueDBDropdown.DropDownOpen Event

Occurs when the drop-down closes.

[Visual Basic]

Public Event DropDownOpen As EventHandler

[C#]

public event EventHandler DropDownOpen

[Delphi]

public property DropDownOpen: EventHandler read remove_DropDownOpen write add_DropDownOpen;

Remarks

This event occurs when the dropdown initially appears. The actions that will cause the drop-down to appear are when the user clicks the current cell's built-in button, or presses Alt+Down Arrow.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBDropdown.FetchRowStyle Event

C1TrueDBDropdown.FetchRowStyle Event

Occurs whenever the grid is about to display a row of data and the FetchRowStyles property is True.

[Visual Basic]

Public Event FetchRowStyle As FetchRowStyleEventHandler

[C#]

public event FetchRowStyleEventHandler FetchRowStyle

[Delphi]

public property FetchRowStyle: FetchRowStyleEventHandler read remove_FetchRowStyle write add_FetchRowStyle;

Remarks

The FetchRowStyle event is raised whenever the grid is about to display a row of data, but only if the FetchRowStyles property is True for the grid or one of its splits.

Use the FetchRowStyle event to control formatting on a per-row basis, as it is much more efficient than coding the FetchCellStyle event to apply the same formatting to all columns.

Note: A common application of row-based formatting is to present rows in alternating colors to enhance their readability. Although you could use the FetchRowStyle event to achieve this effect, the AlternatingRows property is easier to use, as it requires no coding.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBDropdown.FetchScrollTips Event

C1TrueDBDropdown.FetchScrollTips Event

Occurs whenever the grid has focus and the scrollbar thumb is moved using the mouse.

[Visual Basic]

Public Event FetchScrollTips As FetchScrollTipsEventHandler

[C#]

public event FetchScrollTipsEventHandler FetchScrollTips

[Delphi]

public property FetchScrollTips: FetchScrollTipsEventHandler read remove_FetchScrollTips write add_FetchScrollTips;

Remarks

If the ScrollTips property is True, the FetchScrollTips event will be raised whenever the grid has focus and the scrollbar thumb is moved using the mouse.

By setting the properties of the TipStyle object, you can control the background color, text color, and font of the pop-up text box. By default, the TipStyle object uses the system ToolTip colors and the font attributes of the current split.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBDropdown.FirstRowChange Event

C1TrueDBDropdown.FirstRowChange Event

Occurs when the first displayed row of a control or split is changed.

[Visual Basic]

Public Event FirstRowChange As SplitEventHandler

[C#]

public event SplitEventHandler FirstRowChange

[Delphi]

public property FirstRowChange: SplitEventHandler read remove_FirstRowChange write add_FirstRowChange;

Remarks

The FirstRowChange event occurs when the first displayed row of a control or split is changed. This event is triggered under several circumstances:

· When the grid is first displayed.

· When the user scrolls through the grid with the vertical scroll bar or navigation keys.

· When data in the grid is changed in a way that implicitly affects the first row, such as when the first displayed record is deleted.

· When the FirstRow property is changed in code to a different value.

When multiple cell change events are sent, the order will be SplitChange, FirstRowChange, LeftColChange and RowColChange.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBDropdown.FootClick Event

C1TrueDBDropdown.FootClick Event

Occurs when the user clicks on the column footer.

[Visual Basic]

Public Event FootClick As ColEventHandler

[C#]

public event ColEventHandler FootClick

[Delphi]

public property FootClick: ColEventHandler read remove_FootClick write add_FootClick;

Remarks

The FootClick event occurs when the user clicks on the footer for a particular grid column.

One possible action for this event is to re-sort the DataSet object based on the selected column.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBDropdown.FormatText Event

C1TrueDBDropdown.FormatText Event

Occurs when the grid is about to display cell data in a column whose NumberFormat property is set to the string FormatText Event.

[Visual Basic]

Public Event FormatText As FormatTextEventHandler

[C#]

public event FormatTextEventHandler FormatText

[Delphi]

public property FormatText: FormatTextEventHandler read remove_FormatText write add_FormatText;

Remarks

The FormatText event occurs when the grid is about to display cell data in a column whose NumberFormat property is set to the string FormatText Event.

The Value argument contains the underlying data value and also serves as a placeholder for the formatted data to be displayed.

This event allows you to provide your own text formatting for cases where Visual Basic's intrinsic formatting is either unavailable or does not suit your needs.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBDropdown.HeadClick Event

C1TrueDBDropdown.HeadClick Event

Occurs when the user clicks on the column header.

[Visual Basic]

Public Event HeadClick As ColEventHandler

[C#]

public event ColEventHandler HeadClick

[Delphi]

public property HeadClick: ColEventHandler read remove_HeadClick write add_HeadClick;

Remarks

One possible action for this event is to re-sort the DataSet object based on the selected column.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBDropdown.LeftColChange Event

C1TrueDBDropdown.LeftColChange Event

Occurs when the first visible column of a grid or split is changed.

[Visual Basic]

Public Event LeftColChange As SplitEventHandler

[C#]

public event SplitEventHandler LeftColChange

[Delphi]

public property LeftColChange: SplitEventHandler read remove_LeftColChange write add_LeftColChange;

Remarks

The LeftColChange event occurs when the first visible column of a grid or split is changed. This event is triggered under several circumstances:

· When the grid is first displayed.

· When the user scrolls through the grid with the horizontal scroll bar or navigation keys.

· When the LeftCol property is changed in code to a different value.

· When the Visible property of the current left column is set to False.

· When the Width property of the current left column is set to 0.

· When the user resizes the current left column so that it is no longer visible.

· When the user moves the current left column or moves another column into its place.

When multiple cell change events are sent, the order will be SplitChange, FirstRowChange, LeftColChange and RowColChange.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBDropdown.RowChange Event

C1TrueDBDropdown.RowChange Event

Occurs when the row focus changes.

[Visual Basic]

Public Event RowChange As EventHandler

[C#]

public event EventHandler RowChange

[Delphi]

public property RowChange: EventHandler read remove_RowChange write add_RowChange;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBDropdown.RowResize Event

C1TrueDBDropdown.RowResize Event

Occurs when the user has finished resizing a grid row.

[Visual Basic]

Public Event RowResize As CancelEventHandler

[C#]

public event CancelEventHandler RowResize

[Delphi]

public property RowResize: CancelEventHandler read remove_RowResize write add_RowResize;

Remarks

The RowResize event occurs when the user has finished resizing a grid row. The event procedure can accept the change, alter the degree of change, or cancel the change completely.

The C1TrueDBGrid control's RowHeight property determines the height of all rows in the control.

If the Cancel argument is set to True, the previous row height is restored and no repainting occurs. To alter the degree of change, set the RowHeight property to the desired value.

It is not necessary to execute the Refresh method within this event procedure. Doing so causes the grid to be repainted even if the Cancel argument is True.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBDropdown.Scroll Event

C1TrueDBDropdown.Scroll Event

Occurs when the user scrolls the grid.

[Visual Basic]

Public Event Scroll As CancelEventHandler

[C#]

public event CancelEventHandler Scroll

[Delphi]

public property Scroll: CancelEventHandler read remove_Scroll write add_Scroll;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBDropdown.SelChange Event

C1TrueDBDropdown.SelChange Event

Occurs when the user selects a different range of rows or columns.

[Visual Basic]

Public Event SelChange As CancelEventHandler

[C#]

public event CancelEventHandler SelChange

[Delphi]

public property SelChange: CancelEventHandler read remove_SelChange write add_SelChange;

Remarks

The SelChange event occurs when the user selects a different range of rows or columns. This event is triggered under several circumstances:

· When the user selects a single row by clicking its record selector.

· When the user adds a row to the list of selected rows by clicking its record selector while holding down the Ctrl key.

· When the user selects a single column by clicking its header.

· When the user changes the range of selected columns by dragging to an adjacent column within the header row.

· When the user extends the range of selected columns by holding down the Shift key and clicking an unselected column header.

· When the user clears the current row or column selection by clicking an individual cell, in which case this event precedes RowColChange.

The current range of selected columns is provided by the SelectedRows and SelectedCols properties. The bookmarks of the selected rows are available in the SelectedRowCollection. Within this event procedure, these properties and collections reflect the user's pending selection(s).

If the event procedure sets the Cancel argument to True, the previous row and column selections (if any) are restored, and the aforementioned properties revert to their previous values.

This event is only triggered by user interaction with the grid. It cannot be triggered by code.

Note: When the user selects a column, any row selections are cleared. Similarly, when the user selects a row, any column selections are cleared.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBDropdown.UnboundColumnFetch Event

C1TrueDBDropdown.UnboundColumnFetch Event

Occurs when the grid needs to display the value of a cell in an unbound column.

[Visual Basic]

Public Event UnboundColumnFetch As UnboundColumnFetchEventHandler

[C#]

public event UnboundColumnFetchEventHandler UnboundColumnFetch

[Delphi]

public property UnboundColumnFetch: UnboundColumnFetchEventHandler read remove_UnboundColumnFetch write add_UnboundColumnFetch;

Remarks

The UnboundColumnFetch event is raised when a bound needs to display the value of a cell in an unbound column as specified by the Row and Col arguments. For a bound grid, any column with an empty DataField property and a non-empty Caption property is considered an unbound column.

To return an unbound value to the grid, simply set the Value argument to the desired result. If a value is not assigned, the cell will remain blank.

Use this event to implement calculated fields based on other columns or to display local data alongside remote bound data.

The application is responsible for storing data entered into an unbound column by the user. Use the C1DataColumn object's Text property to retrieve unbound values within the BeforeUpdate and BeforeInsert events.

If an unbound column is used to display a calculated result based on other columns, then the unbound values do not need to be stored since they can always be calculated "on the fly" using either the C1DataColumn object's Text property or data access objects.

Note: During the execution of this event, row movement is not permitted.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBDropdown.ValueItemError Event

C1TrueDBDropdown.ValueItemError Event

Occurs when the user attempts to enter invalid data into a column that is using value lists.

[Visual Basic]

Public Event ValueItemError As ColEventHandler

[C#]

public event ColEventHandler ValueItemError

[Delphi]

public property ValueItemError: ColEventHandler read remove_ValueItemError write add_ValueItemError;

Remarks

The ValueItemError event is triggered when the user attempts to enter invalid data into a column that is using value lists. This event is only triggered when the associated ValueItems collection has its Validate property set to True.

This event is useful even if the user is permitted to enter values not present in the ValueItems collection, as you may want to add the new value to the collection in this event. It also allows you to control how you want to respond to incorrect input.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid Class

C1TrueDBGrid Class

C1TrueDBGrid control object.

For a list of all members of this type, see C1TrueDBGrid Members.

System.Object

System.MarshalByRefObject

System.ComponentModel.Component

System.Windows.Forms.Control

C1.Win.C1TrueDBGrid.BaseGrid.Frame

C1.Win.C1TrueDBGrid.C1TrueDBGrid

[Visual Basic]

Public Class C1TrueDBGrid

Inherits Frame

Implements a7

[C#]

public class C1TrueDBGrid : Frame , a7

[Delphi]

type C1TrueDBGrid = class (Frame,(Frame, a7);

Namespace: C1.Win.C1TrueDBGrid

Assembly: C1.Win.C1TrueDBGrid.2 (in C1.Win.C1TrueDBGrid.2.dll)

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid Members

C1TrueDBGrid Members

C1TrueDBGrid overview

Public Constructors

C1TrueDBGrid Constructor

The C1TrueDBGrid control.

Public Properties

AddNewMode | Gets a value that describes the current AddNew state.
AllowAddNew | Gets or sets a value indicating the ability to add new rows.
AllowArrows | Gets or sets a value indicating whether arrow keys can be used to navigate around the grid.
AllowColMove | Gets or sets a value indicating the ability to move columns in the grid.
AllowColSelect | Gets or sets a value indicating the ability to select columns in the grid.
AllowDelete | Gets or sets a value indicating the ability to delete records from the grid.
AllowDrag | Gets or sets a value indicating the ability to drag from the grid.
AllowFilter (inherited from Frame) | Gets or sets a value indicating the ability of the grid to automatically filter data. Specifies if the grid should automatically filter data in the filter bar.
AllowHorizontalSplit | Gets or sets a value indicating whether a user is allowed to create horizontal splits.
AllowRowSelect | Gets or sets a value indicating the ability to select rows in the grid.
AllowRowSizing | Gets or sets how interactive row resizing is performed.
AllowSort (inherited from Frame) | Gets or sets a value indicating the ability of the grid to automatically sort data when a column header is clicked. Specifies if a user is allowed to sort columns.
AllowUpdate | Gets or sets a value indicating the ability of a user to modify data.
AllowUpdateOnBlur | Gets or sets a value indicating how the grid updates modifed data when the grid loses focus.
AllowVerticalSplit | Gets or sets a value indicating whether a user is allowed to create vertical splits.
AlternatingRows | Gets or sets a value indicating whether the grid or split uses the OddRowStyle for odd-numbered rows and EvenRowStyle for even-numbered rows.
Bands | Gets the number of levels within a hierarchical grid.
Bookmark | Gets or sets the current row position of the underlying CurrencyManager.
BorderStyle (inherited from Frame) | Gets or sets the border for the control.
Caption (inherited from Frame) | Gets or sets the grid's caption. Sets or retrieves the grid's caption text.
CaptionHeight (inherited from Frame) | Gets or sets the height of the grid's caption. Sets or retrieves the height of the caption.
CaptionStyle | Gets or sets the Style object that controls the appearance of the caption area.
CellTips | Gets or sets whether the grid displays a pop-up text window when the cursor is idle.
CellTipsDelay | Gets or sets the amount of time in milliseconds before the cell tip window is displayed.
CellTipsWidth | Gets or sets the width of the cell tip window.
ChildGrid | Gets or sets the C1TrueDBGrid control used as a child grid in a hierarchical presentation.
Col | Gets or sets the column position of the current cell in the current split.
CollapseColor | Gets or sets the color of the collapse icon.
ColumnFooters | Gets or sets a value indicating the visibility of column footers.
ColumnHeaders | Gets or sets a value indicating the visibility of column headers.
Columns | Gets the collection of C1DataColumn objects.
CurrentCellVisible | Gets or sets a value indicating the visibility of the current cell in a split.
DataChanged | Gets or sets a value indicating the modification status of the current row.
DataMember (inherited from Frame) | Gets or sets the specific data member in a multimember data source that the grid binds to. Gets or sets the sub-list of the data source that is bound to the grid.
DataSource (inherited from Frame) | Gets or sets the source containing a list of values used to populate the items within the control. The data source that is bound to the grid.
DataView | Gets or sets the layout by which the grid will display data.
DefColWidth | Gets or sets the default width for all grid columns.
DestinationCol | Gets the column which will be current after cell movement.
DestinationRow | Gets the row which will be current after cell movement.
DestinationSplit | Gets the split index which will be current after cell movement.
DirectionAfterEnter | Gets or sets a value that determines the relative position of the next cell when the user presses the Enter key.
DoubleBuffer (inherited from Frame) | Gets or sets a value indicating whether the control should use an off-screen buffer when painting to redue flicker. Specifies whether the control should use an off-screen buffer when painting to reduce flicker.
EditActive | Gets or sets a value indicating the editing status of the current cell.
EditDropDown | Gets or sets a value indicating whether editing will take place in a popup window or within cell boundaries.
EditorStyle | Gets or sets the Style object that controls the appearance of the cell editor within a grid.
EmptyRows | Gets or sets a value that determines how the grid displays rows below the last data row.
ErrorImage | Gets or sets the image used for ErrorProvider.
EvenRowStyle | Gets or sets the Style object that controls the appearance of an even-numbered row when using AlternatingRows.
ExpandColor | Gets or sets the color of the expand icon in hierarchical grids.
ExposeCellMode | Gets or sets how the rightmost column reacts when clicked by the user.
ExtendRightColumn | Gets or sets a value that determines how the last column will extend to fill the dead area of the grid.
FetchRowStyles | Gets or sets a value indicating whether the FetchRowStyle event will be raised.
FilterActive | Gets or sets a value indicating whether the filter bar has focus.
FilterBar | Gets or sets a value indicating the visibility of the FilterBar.
FilterBarStyle | Gets or sets the Style object that controls the appearance of the FilterBar.
FirstRow | Gets or sets the row index for the first visible row in a grid or split.
FlatStyle (inherited from Frame) | Gets or sets the general appearance of 3D elements for the entire grid. Controls the 3D look of headers and buttons.
FocusedSplit | Gets the Split that has focus.
FooterStyle | Gets or sets the Style object that controls the appearance of column footers.
GroupByAreaVisible | Gets or sets a value indicating the visibility of the Grouping area of the grid when the DataView property is set to GroupBy.
GroupByCaption | Gets or sets the text displayed in the grouping area when no columns have been grouped.
GroupByRectangle | Gets the rectangle occupied by the grouping area.
GroupedColumns | Gets the collection of columns that are grouped.
GroupStyle | Gets or sets the Style object that controls the appearance of grouping area.
HeadingStyle | Gets or sets the Style object that controls the appearance of the grids column headers.
HighLightRowStyle | Gets or sets the Style object that controls the current row/cell when the MarqueeStyle is set to Highlight Row/Cell.
HScrollBar | Gets the HBar object that controls the appearance of the horizontal scrollbar.
InactiveStyle | Gets or sets the Style object that controls the grids caption when it doesn't have focus.
Item | Overloaded. Gets the row object associated with the given row.
LeftCol | Gets or sets the zero-based index of the leftmost column in a grid or split.
LinesPerRow | Gets or sets the number of subrows of the grid when the DataView property is set to MutlipleLinesFixed.
MaintainRowCurrency | Gets or sets a value indicating the behavior of the grid and row currency when the grid's datasource is sorted.
MarqueeStyle | Gets or sets the MarqueeStyle for a grid.
MatchEntryTimeOut | Gets or sets the time (milliseconds) in which the incremental search string will reset for a drop-down when the DropDownList property is True.
MultiSelect | Gets or sets the selection state of the grid.
OddRowStyle | Gets or sets the Style object that controls the appearance of an odd-numbered row when using AlternatingRows.
PictureAddnewRow | Gets or sets the Image used in the record selector to indicate the AddNew row.
PictureCurrentRow | Gets or sets the Image used in the record selector to indicate the Current row.
PictureFilterBar | Gets or sets the Image used in the record selector to indicate the FilterBar row.
PictureFooterRow | Gets or sets the Image used in the record selector to indicate the Footer row.
PictureHeaderRow | Gets or sets the Image used in the record selector to indicate the Header row.
PictureModifiedRow | Gets or sets the Image used in the record selector to indicate the Modified row.
PictureStandardRow | Gets or sets the Image used in the record selector to indicate the Standard row.
PreviewInfo | Gets the PrintPreviewWinSettings object.
PrintInfo | Gets the PrintInfo object.
RecordSelectors | Gets or sets a value indicating the visibility of row headers for a grid or split.
RecordSelectorStyle | Gets or sets the Style object that controls the appearance of the RecordSelectors.
RecordSelectorWidth | Gets or sets the width of the row headers.
Row | Gets or sets the the current row.
RowDivider | Gets or sets the style of the border drawn between grid rows.
RowHeight (inherited from Frame) | Gets or sets the height of grid rows. Sets/returns height of each row in the grid.
RowSubDividerColor | Gets or sets the color of the subrow divider in a multi-line grid.
ScrollTips | Gets or sets a value that determines whether the grid displays a pop-up text window when the scrollbar thumb is dragged.
ScrollTrack (inherited from Frame) | Gets or sets a value that controls how the grid scrolls when the scroll thumb is moved. Sets or retrieves how the grid scrolls when the scrollbar thumb is moved.
SelectedCols | Gets the collection of columns that are currently selected.
SelectedRows | Gets the collection of rows that are currently selected.
SelectedStyle | Gets or sets the Style object that controls the appearance of selected rows and columns.
SelectedText | Gets or sets the string containing the currently selected text within the grid's editing window.
SelectionLength | Gets or sets the number of characters selected within the grid's editing window.
SelectionStart | Gets or sets the starting point of the text selection within the grid's editing window.
SelRange | Gets a value indicating whether a range of cells has been selected.
SplitDividerSize (inherited from Frame) | Controls the height and width of split dividers. Controls the height and width of Split Borders.
SplitIndex | Gets or sets the index of the current Split within the SplitCollection.
Splits | Gets the collection of Split objects.
SpringMode | Gets or sets a value that determines how columns will resize when the grid is resized.
Style | Gets or sets the root Style object.
Styles | Gets the collection of named Style objects.
TabAcrossSplits | Gets or sets a value indicating the behavior of the tab and arrow keys at split borders.
TabAction | Gets or sets the behavior of the tab key.
ViewCaptionWidth | Gets or sets the width of the column caption when the DataView is set to Inverted or Form.
ViewColumnWidth | Gets or sets the width of a column when the DataView is set to Inverted or Form.
VisibleCols | Gets the number of visible columns in the current Split.
VisibleRows | Gets the number of visible rows in the current Split.
VScrollBar | Gets the VBar object that controls the appearance of the vertical scrollbar.
WrapCellPointer | Gets or sets a value indicating the behavior of Tab and arrow keys at row boundaries.

Public Methods

AddCellStyle | Controls the Style used to change the appearance for cells meeting the specified condition.
AddRegexCellStyle | Controls the Style used to change the appearance of cells according to their contents.
BeginInit (inherited from Frame) | ISupportInitialize interface.
CellContaining | Returns the cell position for a set of coordinates.
ClearCellStyle | Removes a cell condition established with a previous call to the AddCellStyle method.
ClearFields | Restores the default grid layout.
ClearRegexCellStyle | Overloaded. Removes a cell condition established with a previous call to the AddRegexCellStyle method.
ColContaining | Returns the column index for the column containing the specified X coordinate.
CollapseBand | Collapses a gvien band in a hierarchical grid.
CollapseChild | Closes the Child Grid.
CollapseGroupRow | Collapses a grouped row.
Delete | Overloaded. Overriden. Deletes the current row.
EndInit (inherited from Frame) | ISupportInitialize interface.
ExpandBand | Expand the given band in a hierarchical grid.
ExpandChild | Displays the Child grid.
ExpandGroupRow | Expands the given row in GroupBy DataView.
ExportTo | Overloaded. Opens a dialog in which the user can select the export format.
ExportToDelimitedFile | Overloaded. Exports the specified rows from the grid to the specified file as delimited text.
ExportToExcel | Overloaded. Exports the grid to a XLS file.
ExportToHTML | Exports the grid to an HTML file.
ExportToPDF | Exports the grid to a PDF file.
ExportToRTF | Exports the grid to an RTF file.
GetBand | Obtains the band given a column index.
GetBandRow | Obtains the underlying row object for the given band and row.
InsertHorizontalSplit | Inserts new horizontal splits at the given position.
InsertVerticalSplit | Inserts vertical splits at the given position.
LoadLayout | Overloaded. Loads a saved layout from the given stream.
MoveFirst | Positions to the first row of the datasource.
MoveLast | Positions to the last row of the datasource.
MoveNext | Positions to the next row of the datasource.
MovePrevious | Positions to the previous row of the datasource.
MoveRelative | Overloaded. Moves the current row positions of the grid by the given offset.
PointAt | Overloaded. Returns one of the PointAtEnum enumerations, which indicates the kind of grid element beneath the specified coordinate.
Rebind | Overloaded. Reinitializes grid with data from its data source
RefetchRow | Overloaded. Retreives data from the datasource for the current row and refreshes the row.
Refresh | Overriden. Clears any cached styles and forces the grid to repaint.
RefreshCol | Overloaded. Invalidates the current column.
RefreshRow | Overloaded. Invalidates the current row.
RemoveHorizontalSplit | Removes all the horizontal splits at the given index.
RemoveVerticalSplit | Removes all vertical splits at the given index.
ResumeBinding | Resumes IBindingList.ListChange notifications from the data source to the grid.
RowBookmark | Returns the row index of the DataSource for a display row index.
RowContaining | Returns the zero-based index of the display row containing the Y specified coordinate.
RowExpanded | Obtains the expanded state of a band for a hierarchical grid.
RowTop | Returns the Y coordinate of the top of a visible row.
SaveLayout | Overloaded. Saves the grid's layout.
ScrollGrid | Scrolls the grid data area by the specified number of rows and columns.
SplitContaining | Returns the SplitIndex of the split containing the specified coordinate.
SuspendBinding | Instructs the grid to temporarily ignore IBindingList.ListChange notifications from the data source.
UpdateData | Updates any changes on the current row to the data source.
SetDataBinding (inherited from Frame) | Binds the grid to a DataSource at runtime.

Public Events

AfterColEdit | Occurs after editing is completed.
AfterColUpdate | Occurs after a cell has been updated.
AfterDelete | Occurs after a row has been deleted.
AfterFilter | Occurs after the datasource has been filtered.
AfterInsert | Occurs after a row has been added.
AfterSort | Occurs after a column has been sorted.
AfterUpdate | Occurs after a row has been updated.
BeforeClose | Occurs when the user attempts to close a child grid.
BeforeColEdit | Occurs before a cell enters edit mode.
BeforeColUpdate | Occurs before a cell is updated to the datasource.
BeforeDelete | Occurs before a row is deleted.
BeforeInsert | Occurs before a new row is added to the datasource.
BeforeOpen | Occurs when the user attempts to open a child grid.
BeforeRowColChange | Occurs prior to focus moving to another cell.
BeforeUpdate | Occurs before a row is updated to the datasource.
ButtonClick | Occurs whenever a button is clicked in a cell.
Change | Occurs whenever the user changes the value of a cell.
ColEdit | Occurs whenever a cell first enters edit mode.
Collapse | Occurs whenever a hierarchical row is collapsed.
ColMove | Occurs whenever the user has finished moving a column.
ColResize | Occurs whenever a column is resized.
ComboSelect | Occurs whenever a selection has been made to the built-in combo or TrueDBDropdown.
DataSourceChanged | Occurs whenever the datasource changes.
Error | Occurs whenever an exception is thrown during end user interaction.
Expand | Occurs whenever a hierarchical row is expanded.
FetchCellStyle | Occurs whenever a cell is to be rendered and the FetchStyle is True.
FetchCellTips | Occurs when the grid needs to display CellTips.
FetchGroupCellStyle | Occurs whenever a grouped cell that contains an aggregate is to be rendered and FetchStyle is True.
FetchRowStyle | Occurs whenever the grid renders a row and the FetchRowStyles property has been set.
FetchScrollTips | Occurs whenever the grid has focus and the scrollbar thumb is moved using the mouse.
Filter | Occurs when the user types in the filterbar and the AllowFilter property is False.
FilterButtonClick | Occurs when a button is clicked in the filterbar.
FilterChange | Occurs when the contents of a cell in the filterbar changes.
FirstRowChange | Occurs whenever the first row changes.
FootClick | Occurs whenever a column footer is clicked.
FormatText | Occurs whenever a cell is about to be rendered and whose NumberFormat property has been set to FormatTextEvent.
GroupAggregate | Occurs when the Aggregate is set to Custom for a grouped row.
GroupColMove | Occurs whenever a column is moved into or out of the grouping area.
GroupHeadClick | Occurs whenever a column in the grouping area is clicked.
GroupText | Occurs when the HeaderText property is set to custom.
HeadClick | Occrus whenever a column header is clicked.
LeftColChange | Occurs whenever the left column changes.
OnAddNew | Occurs whenever an AddNew operation has been initiated.
OnInit | Occurs after the grid has been initialized.
OwnerDrawCell | Occurs before a cell is rendered and the OwnerDraw is True.
OwnerDrawCellPrint | Occurs before a cell is to be printed and the OwnerDraw is True.
OwnerDrawPageFooter | Occurs before the page footer is to be printed.
OwnerDrawPageHeader | Occurs before the page header is to be printed.
RowColChange | Occurs when the focus moves to a different cell.
RowResize | Occrus whenever the user resizes a row.
Scroll | Occurs whenever the user scrolls the grid.
SelChange | Occurs whenever the user selected a different range of rows or columns.
Sort | Occurs when the user drags a column into the grouping area.
SplitChange | Occurs whenever a Split changes focus.
UnboundColumnFetch | Occurs when the grid needs to access the value of an unbound column.
UnboundColumnUpdated | Raised when an unbound column has been updated.
ValueItemError | Occurs whenever a user attempts to enter invalid data into a column that is using valueitems.

Protected Properties

CreateParams (inherited from Frame) | Allows us to set the borderstyle.
RowPosition (inherited from Frame) | Gets the current position from the currency manager.

Protected Methods

Dispose | Overloaded. Overriden. Called when the class is being disposed.
On_AddNew | Overriden. Raises the OnAddNew event.
On_Init | Overriden. Raises the OnInit event.
On_Scroll | Overriden. Raises the Scroll event.
OnAfterColEdit | Overriden. Raises the AfterColEdit event.
OnAfterColUpdate | Overriden. Raises the AfterColUpdate event.
OnAfterDelete | Overriden. Raises the AfterDelete event.
OnAfterFilter | Overriden. Raises the AfterFilter event.
OnAfterInsert | Overriden. Raises the AfterInsert event.
OnAfterSort | Overriden. Raises the AfterSort event.
OnAfterUpdate | Overriden. Raises the AfterUpdate event.
OnBeforeClose | Overriden. Raises the BeforeClose event.
OnBeforeColEdit | Overriden. Raises the BeforeColEdit event.
OnBeforeColUpdate | Overriden. Raises the BeforeColUpdate event.
OnBeforeDelete | Overriden. Raises the BeforeDelete event.
OnBeforeInsert | Overriden. Raises the BeforeInsert event.
OnBeforeOpen | Overriden. Raises the BeforeOpen event.
OnBeforeRowColChange | Overriden. Raises the BeforeRowColChange event.
OnBeforeUpdate | Overriden. Raises the BeforeUpdate event.
OnButtonClick | Overriden. Raises the ButtonClick event.
OnChange | Overriden. Raises the Change event.
OnColEdit | Overriden. Raises the ColEdit event.
OnCollapse | Overriden. Raises the Collapse event.
OnColMove | Overriden. Raises the ColMove event.
OnColResize | Overriden. Raises the ColResize event.
OnComboSelect | Overriden. Raises the ComboSelect event.
OnDataSourceChanged | Overriden. Raises the DataSourceChanged event.
OnError | Overriden. Raises the Error event.
OnExpand | Overriden. Raises the Expand event.
OnFetchCellStyle | Overriden. Raises the FetchCellStyle event.
OnFetchCellTips | Overriden. Raises the FetchCellTips event.
OnFetchGroupCellStyle | Overriden. Raises the FetchGroupCellStyle event.
OnFetchRowStyle | Overriden. Raises the FetchRowStyle event.
OnFetchScrollTips | Overriden. Raises the FetchScrollTips event.
OnFilter | Overriden. Raises the Filter event.
OnFilterButtonClick | Overriden. Raises the FilterButtonClick event.
OnFilterChange | Overriden. Raises the FilterChange event.
OnFirstRowChange | Overriden. Raises the FirstRowChange event.
OnFootClick | Overriden. Raises the FootClick event.
OnFormatText | Overriden. Raises the FormatText event.
OnGroupAggregate | Overriden. Raises the GroupAggregate event.
OnGroupColMove | Overriden. Raises the GroupColMove event.
OnGroupHeadClick | Overriden. Raises the GroupHeadClick event.
OnGroupText | Overriden. Raises the GroupText event.
OnHeadClick | Overriden. Raises the HeadClick event.
OnLeftColChange | Overriden. Raises the LeftColChange event.
OnOwnerDrawCell | Overriden. Raises the OwnerDrawCell event.
OnOwnerDrawCellPrint | Overriden. Raises the OwnerDrawCellPrint event.
OnOwnerDrawPageFooter | Overriden. Raises the OwnerDrawPageFooter event.
OnOwnerDrawPageHeader | Overriden. Raises the OwnerDrawPageHeader event.
OnRowColChange | Overriden. Raises the RowColChange event.
OnRowResize | Overriden. Raises the RowResize event.
OnSelChange | Overriden. Raises the SelChange event.
OnSort | Overriden. Raises the Sort event.
OnSplitChange | Overriden. Raises the SplitChange event.
OnUnboundColumnFetch | Overriden. Raises the UnboundColumnFetch event.
OnValueItemError | Overriden. Raises the ValueItemError event.
WndProc | Overriden. Processes Windows messages.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid Constructor

C1TrueDBGrid Constructor

The C1TrueDBGrid control.

[Visual Basic]

Public Function New()

[C#]

public C1TrueDBGrid()

[Delphi]

public constructor Create();

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid Properties

C1TrueDBGrid Properties

The properties of the C1TrueDBGrid class are listed here. For a complete list of C1TrueDBGrid class members, see the C1TrueDBGrid Members topic.

Public Properties

AddNewMode | Gets a value that describes the current AddNew state.
AllowAddNew | Gets or sets a value indicating the ability to add new rows.
AllowArrows | Gets or sets a value indicating whether arrow keys can be used to navigate around the grid.
AllowColMove | Gets or sets a value indicating the ability to move columns in the grid.
AllowColSelect | Gets or sets a value indicating the ability to select columns in the grid.
AllowDelete | Gets or sets a value indicating the ability to delete records from the grid.
AllowDrag | Gets or sets a value indicating the ability to drag from the grid.
AllowFilter (inherited from Frame) | Gets or sets a value indicating the ability of the grid to automatically filter data. Specifies if the grid should automatically filter data in the filter bar.
AllowHorizontalSplit | Gets or sets a value indicating whether a user is allowed to create horizontal splits.
AllowRowSelect | Gets or sets a value indicating the ability to select rows in the grid.
AllowRowSizing | Gets or sets how interactive row resizing is performed.
AllowSort (inherited from Frame) | Gets or sets a value indicating the ability of the grid to automatically sort data when a column header is clicked. Specifies if a user is allowed to sort columns.
AllowUpdate | Gets or sets a value indicating the ability of a user to modify data.
AllowUpdateOnBlur | Gets or sets a value indicating how the grid updates modifed data when the grid loses focus.
AllowVerticalSplit | Gets or sets a value indicating whether a user is allowed to create vertical splits.
AlternatingRows | Gets or sets a value indicating whether the grid or split uses the OddRowStyle for odd-numbered rows and EvenRowStyle for even-numbered rows.
Bands | Gets the number of levels within a hierarchical grid.
Bookmark | Gets or sets the current row position of the underlying CurrencyManager.
BorderStyle (inherited from Frame) | Gets or sets the border for the control.
Caption (inherited from Frame) | Gets or sets the grid's caption. Sets or retrieves the grid's caption text.
CaptionHeight (inherited from Frame) | Gets or sets the height of the grid's caption. Sets or retrieves the height of the caption.
CaptionStyle | Gets or sets the Style object that controls the appearance of the caption area.
CellTips | Gets or sets whether the grid displays a pop-up text window when the cursor is idle.
CellTipsDelay | Gets or sets the amount of time in milliseconds before the cell tip window is displayed.
CellTipsWidth | Gets or sets the width of the cell tip window.
ChildGrid | Gets or sets the C1TrueDBGrid control used as a child grid in a hierarchical presentation.
Col | Gets or sets the column position of the current cell in the current split.
CollapseColor | Gets or sets the color of the collapse icon.
ColumnFooters | Gets or sets a value indicating the visibility of column footers.
ColumnHeaders | Gets or sets a value indicating the visibility of column headers.
Columns | Gets the collection of C1DataColumn objects.
CurrentCellVisible | Gets or sets a value indicating the visibility of the current cell in a split.
DataChanged | Gets or sets a value indicating the modification status of the current row.
DataMember (inherited from Frame) | Gets or sets the specific data member in a multimember data source that the grid binds to. Gets or sets the sub-list of the data source that is bound to the grid
DataSource (inherited from Frame) | Gets or sets the source containing a list of values used to populate the items within the control. The data source that is bound to the grid.
DataView | Gets or sets the layout by which the grid will display data.
DefColWidth | Gets or sets the default width for all grid columns.
DestinationCol | Gets the column which will be current after cell movement.
DestinationRow | Gets the row which will be current after cell movement.
DestinationSplit | Gets the split index which will be current after cell movement.
DirectionAfterEnter | Gets or sets a value that determines the relative position of the next cell when the user presses the Enter key.
DoubleBuffer (inherited from Frame) | Gets or sets a value indicating whether the control should use an off-screen buffer when painting to redue flicker. Specifies whether the control should use an off-screen buffer when painting to reduce flicker.
EditActive | Gets or sets a value indicating the editing status of the current cell.
EditDropDown | Gets or sets a value indicating whether editing will take place in a popup window or within cell boundaries.
EditorStyle | Gets or sets the Style object that controls the appearance of the cell editor within a grid.
EmptyRows | Gets or sets a value that determines how the grid displays rows below the last data row.
ErrorImage | Gets or sets the image used for ErrorProvider.
EvenRowStyle | Gets or sets the Style object that controls the appearance of an even-numbered row when using AlternatingRows.
ExpandColor | Gets or sets the color of the expand icon in hierarchical grids.
ExposeCellMode | Gets or sets how the rightmost column reacts when clicked by the user.
ExtendRightColumn | Gets or sets a value that determines how the last column will extend to fill the dead area of the grid.
FetchRowStyles | Gets or sets a value indicating whether the FetchRowStyle event will be raised.
FilterActive | Gets or sets a value indicating whether the filter bar has focus.
FilterBar | Gets or sets a value indicating the visibility of the FilterBar.
FilterBarStyle | Gets or sets the Style object that controls the appearance of the FilterBar.
FirstRow | Gets or sets the row index for the first visible row in a grid or split.
FlatStyle (inherited from Frame) | Gets or sets the general appearance of 3D elements for the entire grid. Controls the 3D look of headers and buttons
FocusedSplit | Gets the Split that has focus.
FooterStyle | Gets or sets the Style object that controls the appearance of column footers.
GroupByAreaVisible | Gets or sets a value indicating the visibility of the Grouping area of the grid when the DataView property is set to GroupBy.
GroupByCaption | Gets or sets the text displayed in the grouping area when no columns have been grouped.
GroupByRectangle | Gets the rectangle occupied by the grouping area.
GroupedColumns | Gets the collection of columns that are grouped.
GroupStyle | Gets or sets the Style object that controls the appearance of grouping area.
HeadingStyle | Gets or sets the Style object that controls the appearance of the grids column headers.
HighLightRowStyle | Gets or sets the Style object that controls the current row/cell when the MarqueeStyle is set to Highlight Row/Cell.
HScrollBar | Gets the HBar object that controls the appearance of the horizontal scrollbar.
InactiveStyle | Gets or sets the Style object that controls the grids caption when it doesn't have focus.
Item | Overloaded. Gets the row object associated with the given row.
LeftCol | Gets or sets the zero-based index of the leftmost column in a grid or split.
LinesPerRow | Gets or sets the number of subrows of the grid when the DataView property is set to MutlipleLinesFixed.
MaintainRowCurrency | Gets or sets a value indicating the behavior of the grid and row currency when the grid's datasource is sorted.
MarqueeStyle | Gets or sets the MarqueeStyle for a grid.
MatchEntryTimeOut | Gets or sets the time (milliseconds) in which the incremental search string will reset for a drop-down when the DropDownList property is True.
MultiSelect | Gets or sets the selection state of the grid.
OddRowStyle | Gets or sets the Style object that controls the appearance of an odd-numbered row when using AlternatingRows.
PictureAddnewRow | Gets or sets the Image used in the record selector to indicate the AddNew row.
PictureCurrentRow | Gets or sets the Image used in the record selector to indicate the Current row.
PictureFilterBar | Gets or sets the Image used in the record selector to indicate the FilterBar row.
PictureFooterRow | Gets or sets the Image used in the record selector to indicate the Footer row.
PictureHeaderRow | Gets or sets the Image used in the record selector to indicate the Header row.
PictureModifiedRow | Gets or sets the Image used in the record selector to indicate the Modified row.
PictureStandardRow | Gets or sets the Image used in the record selector to indicate the Standard row.
PreviewInfo | Gets the PrintPreviewWinSettings object.
PrintInfo | Gets the PrintInfo object.
RecordSelectors | Gets or sets a value indicating the visibility of row headers for a grid or split.
RecordSelectorStyle | Gets or sets the Style object that controls the appearance of the RecordSelectors.
RecordSelectorWidth | Gets or sets the width of the row headers.
Row | Gets or sets the the current row.
RowDivider | Gets or sets the style of the border drawn between grid rows.
RowHeight (inherited from Frame) | Gets or sets the height of grid rows. Sets/returns height of each row in the grid.
RowSubDividerColor | Gets or sets the color of the subrow divider in a multi-line grid.
ScrollTips | Gets or sets a value that determines whether the grid displays a pop-up text window when the scrollbar thumb is dragged.
ScrollTrack (inherited from Frame) | Gets or sets a value that controls how the grid scrolls when the scroll thumb is moved. Sets or retrieves how the grid scrolls when the scrollbar thumb is moved.
SelectedCols | Gets the collection of columns that are currently selected.
SelectedRows | Gets the collection of rows that are currently selected.
SelectedStyle | Gets or sets the Style object that controls the appearance of selected rows and columns.
SelectedText | Gets or sets the string containing the currently selected text within the grid's editing window.
SelectionLength | Gets or sets the number of characters selected within the grid's editing window.
SelectionStart | Gets or sets the starting point of the text selection within the grid's editing window.
SelRange | Gets a value indicating whether a range of cells has been selected.
SplitDividerSize (inherited from Frame) | Controls the height and width of split dividers. Controls the height and width of Split Borders.
SplitIndex | Gets or sets the index of the current Split within the SplitCollection.
Splits | Gets the collection of Split objects.
SpringMode | Gets or sets a value that determines how columns will resize when the grid is resized.
Style | Gets or sets the root Style object.
Styles | Gets the collection of named Style objects.
TabAcrossSplits | Gets or sets a value indicating the behavior of the tab and arrow keys at split borders.
TabAction | Gets or sets the behavior of the tab key.
ViewCaptionWidth | Gets or sets the width of the column caption when the DataView is set to Inverted or Form.
ViewColumnWidth | Gets or sets the width of a column when the DataView is set to Inverted or Form.
VisibleCols | Gets the number of visible columns in the current Split.
VisibleRows | Gets the number of visible rows in the current Split.
VScrollBar | Gets the VBar object that controls the appearance of the vertical scrollbar.
WrapCellPointer | Gets or sets a value indicating the behavior of Tab and arrow keys at row boundaries.

Protected Properties

CreateParams (inherited from Frame) | Allows us to set the borderstyle.
RowPosition (inherited from Frame) | Gets the current position from the currency manager.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.AddNewMode Property

C1TrueDBGrid.AddNewMode Property

Gets a value that describes the current AddNew state.

[Visual Basic]

Public ReadOnly Property AddNewMode As AddNewModeEnum

[C#]

public AddNewModeEnum AddNewMode {get;}

[Delphi]

public property AddNewMode: AddNewModeEnum read get_AddNewMode;

Remarks

The AddNewMode property returns a value that describes the location of the current cell with respect to the grid's AddNew row.

If the AllowAddNew property is True, the last row displayed in the grid is left blank to permit users to enter new records. If the AllowAddNew property is False, the blank row is not displayed, and AddNewMode always returns 0.

When AllowAddNew is True, the AddNewMode property returns one of the AddNewModeEnum values.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.AllowAddNew Property

C1TrueDBGrid.AllowAddNew Property

Gets or sets a value indicating the ability to add new rows.

[Visual Basic]

Public Property AllowAddNew As Boolean

[C#]

public bool AllowAddNew {get;set;}

[Delphi]

public property AllowAddNew: Boolean read get_AllowAddNew write set_AllowAddNew;

Remarks

If True, the user can add records to the data source underlying the C1TrueDBGrid control.

If False (the default), the user cannot add records to the data source underlying the C1TrueDBGrid control.

If the AllowAddNew property is True, the last row displayed in the grid is left blank to permit users to enter new records. If the AllowAddNew property is False, the blank row (usually referred to as the AddNew row) is not displayed.

The underlying data source may not permit insertions even if the AllowAddNew property is True for the C1TrueDBGrid control. In this case, a trappable error occurs when the user tries to add a record.

If AllowAddNew is True, also set AllowUpdate to True so that users will be able to type in the cells of the AddNew row.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.AllowArrows Property

C1TrueDBGrid.AllowArrows Property

Gets or sets a value indicating whether arrow keys can be used to navigate around the grid.

[Visual Basic]

Public Property AllowArrows As Boolean

[C#]

public bool AllowArrows {get;set;}

[Delphi]

public property AllowArrows: Boolean read get_AllowArrows write set_AllowArrows;

Remarks

If True (the default), the user can use the arrow keys to move from cell to cell within the same row.

If False, the left and right arrow keys will move focus from control to control and cannot be used to move between cells.

The user cannot use the arrow keys to move out of the C1TrueDBGrid control when this property is set to True. If the WrapCellPointer property is also set to True, then the arrow keys will wrap around rows and the user can navigate the entire grid using the arrow keys.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.AllowColMove Property

C1TrueDBGrid.AllowColMove Property

Gets or sets a value indicating the ability to move columns in the grid.

[Visual Basic]

Public Property AllowColMove As Boolean

[C#]

public bool AllowColMove {get;set;}

[Delphi]

public property AllowColMove: Boolean read get_AllowColMove write set_AllowColMove;

Remarks

If True (the default), the user can move columns.

If False, the user cannot move columns.

Use the AllowColMove property to control whether the user can move columns by dragging the column header to the desired location. Any change in column order causes a ColMove event.

If AllowColMove is set to True, and the DataView property is set to Group, a grouping area is added to the grid. Columns can be added or dragged to this area at run time.

See Column Grouping for more information.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.AllowColSelect Property

C1TrueDBGrid.AllowColSelect Property

Gets or sets a value indicating the ability to select columns in the grid.

[Visual Basic]

Public Property AllowColSelect As Boolean

[C#]

public bool AllowColSelect {get;set;}

[Delphi]

public property AllowColSelect: Boolean read get_AllowColSelect write set_AllowColSelect;

Remarks

If True (the default), the user can select columns.

If False, the user cannot select columns.

Use the AllowColSelect property to control whether the user can select columns by clicking within the column header area. Setting this property to False suppresses highlighting when the user clicks a column header, which is useful for applications that respond to the HeadClick event.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.AllowDelete Property

C1TrueDBGrid.AllowDelete Property

Gets or sets a value indicating the ability to delete records from the grid.

[Visual Basic]

Public Property AllowDelete As Boolean

[C#]

public bool AllowDelete {get;set;}

[Delphi]

public property AllowDelete: Boolean read get_AllowDelete write set_AllowDelete;

Remarks

If True, the user can delete records from the data source underlying the C1TrueDBGrid control.

If False (the default), the user cannot delete records from the data source underlying the C1TrueDBGrid control.

Use the AllowDelete property to prevent the user from deleting records from the data source through interaction with the C1TrueDBGrid control.

The underlying data source may not permit deletions even if the AllowDelete property is True for the C1TrueDBGrid control. In this case, a trappable error occurs when the user tries to delete a record.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.AllowDrag Property

C1TrueDBGrid.AllowDrag Property

Gets or sets a value indicating the ability to drag from the grid.

[Visual Basic]

Public Property AllowDrag As Boolean

[C#]

public bool AllowDrag {get;set;}

[Delphi]

public property AllowDrag: Boolean read get_AllowDrag write set_AllowDrag;

Remarks

If this property is set to true the user has the ability to drag from the grid. The dragging procedure must still be handled, though, by the developer. For an example of drag and drop in the TrueDBGrid, see Tutorial 13 - Implementing Drag-and-Drop in True DBGrid.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.AllowHorizontalSplit Property

C1TrueDBGrid.AllowHorizontalSplit Property

Gets or sets a value indicating whether a user is allowed to create horizontal splits.

[Visual Basic]

Public Property AllowHorizontalSplit As Boolean

[C#]

public bool AllowHorizontalSplit {get;set;}

[Delphi]

public property AllowHorizontalSplit: Boolean read get_AllowHorizontalSplit write set_AllowHorizontalSplit;

Remarks

If True, then the user is able to split the current grid into multiple horizontal splits at run-time.

If False, then the user is prevented from splitting the grid horizontally.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.AllowRowSelect Property

C1TrueDBGrid.AllowRowSelect Property

Gets or sets a value indicating the ability to select rows in the grid.

[Visual Basic]

Public Property AllowRowSelect As Boolean

[C#]

public bool AllowRowSelect {get;set;}

[Delphi]

public property AllowRowSelect: Boolean read get_AllowRowSelect write set_AllowRowSelect;

Remarks

If True (the default), the user can select rows.

If False, the user cannot select rows.

Use the AllowRowSelect property to control whether the user can select rows by clicking the record selector buttons. By setting this property to False, record selection can be selected without hiding the record selectors altogether, since the record selectors may want to used to provide visual feedback when the current row is modified.

Note: The user cannot select rows if the RecordSelectors property is set to False for all splits, even if AllowRowSelect is True.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.AllowRowSizing Property

C1TrueDBGrid.AllowRowSizing Property

Gets or sets how interactive row resizing is performed.

[Visual Basic]

Public Property AllowRowSizing As RowSizingEnum

[C#]

public RowSizingEnum AllowRowSizing {get;set;}

[Delphi]

public property AllowRowSizing: RowSizingEnum read get_AllowRowSizing write set_AllowRowSizing;

Remarks

Note: RecordSelectors must be visible in a split in order for the user to resize rows interactively in that split. If RecordSelectors are disabled for all splits in a C1TrueDBGrid control, the user cannot resize rows interactively in that grid.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.AllowUpdate Property

C1TrueDBGrid.AllowUpdate Property

Gets or sets a value indicating the ability of a user to modify data.

[Visual Basic]

Public Property AllowUpdate As Boolean

[C#]

public bool AllowUpdate {get;set;}

[Delphi]

public property AllowUpdate: Boolean read get_AllowUpdate write set_AllowUpdate;

Remarks

If True (the default), the user can modify data in the C1TrueDBGrid control.

If False, the user cannot modify data in the C1TrueDBGrid control.

When the AllowUpdate property is False, the user can still scroll through the C1TrueDBGrid control and select data, but cannot change any of the values; any attempt to change the data in the grid is ignored.

The underlying data source may not permit updates even if the AllowUpdate property is True for the C1TrueDBGrid control. In this case, a trappable error occurs when the user tries to change the record.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.AllowUpdateOnBlur Property

C1TrueDBGrid.AllowUpdateOnBlur Property

Gets or sets a value indicating how the grid updates modifed data when the grid loses focus.

[Visual Basic]

Public Property AllowUpdateOnBlur As Boolean

[C#]

public bool AllowUpdateOnBlur {get;set;}

[Delphi]

public property AllowUpdateOnBlur: Boolean read get_AllowUpdateOnBlur write set_AllowUpdateOnBlur;

Remarks

This property of the grid is ignored if the CausesValidation property of the grid is set to False.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.AllowVerticalSplit Property

C1TrueDBGrid.AllowVerticalSplit Property

Gets or sets a value indicating whether a user is allowed to create vertical splits.

[Visual Basic]

Public Property AllowVerticalSplit As Boolean

[C#]

public bool AllowVerticalSplit {get;set;}

[Delphi]

public property AllowVerticalSplit: Boolean read get_AllowVerticalSplit write set_AllowVerticalSplit;

Remarks

If True, then the user is able to create multiple vertical splits in the grid.

If False, then the user is restricted from creating vertical splits.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.AlternatingRows Property

C1TrueDBGrid.AlternatingRows Property

Gets or sets a value indicating whether the grid or split uses the OddRowStyle for odd-numbered rows and EvenRowStyle for even-numbered rows.

[Visual Basic]

Public Property AlternatingRows As Boolean

[C#]

public bool AlternatingRows {get;set;}

[Delphi]

public property AlternatingRows: Boolean read get_AlternatingRows write set_AlternatingRows;

Remarks

If True, the OddRowStyle and EvenRowStyle properties control the appearance of rows within the specified object.

If False (the default), the Style property controls the display of rows within the specified object.

At design time, change the colors and fonts used to render odd (even) rows by modifying the built-in OddRow (EvenRow) style using the Styles property page.

At run time, change the colors and fonts used to render odd (even) rows by modifying the Style object returned by the OddRowStyle (EvenRowStyle) property.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.Bands Property

C1TrueDBGrid.Bands Property

Gets the number of levels within a hierarchical grid.

[Visual Basic]

Public ReadOnly Property Bands As Integer

[C#]

public int Bands {get;}

[Delphi]

public property Bands: Int32 read get_Bands;

Remarks

When a grid is bound to a master-detail data source, display related groups of hierarchical data using bands. A band is created for each level in a hierarchical recordset, and may consist of entire tables or a just a few selected fields. A band is a virtual representation of a hierarchical recordset; it is not the data itself.

The Bands property is provided for cases where the number of levels in a hierarchical recordset is not known in advance. The following example uses the Bands property and the ExpandBand method to display all available bands:

· Visual Basic

· C#

· Delphi

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.Bookmark Property

C1TrueDBGrid.Bookmark Property

Gets or sets the current row position of the underlying CurrencyManager.

[Visual Basic]

Public Property Bookmark As Integer

[C#]

public int Bookmark {get;set;}

[Delphi]

public property Bookmark: Int32 read get_Bookmark write set_Bookmark;

Remarks

Use the value returned by the Bookmark property to save a reference to the current row that remains valid even after another row becomes current.

When the Bookmark property is set to a valid value in code, the row associated with that value becomes the current row, and the grid adjusts its display to bring the new current row into view if necessary.

In most cases the Bookmark property is synchronized with the Row property. Under GroupBy DataView the Row property may identify a grouped row which has no association with a row in the datasource. In this case the values of Bookmark and Row will differ.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.CaptionStyle Property

C1TrueDBGrid.CaptionStyle Property

Gets or sets the Style object that controls the appearance of the caption area.

[Visual Basic]

Public Property CaptionStyle As Style

[C#]

public Style CaptionStyle {get;set;}

[Delphi]

public property CaptionStyle: Style read get_CaptionStyle write set_CaptionStyle;

Remarks

This property sets or returns the Style object that controls the appearance of a TDBGrid control's caption bar or a Split object's heading area. By default, this is the built-in Caption style.

The value of the Caption property is not affected by changes to the CaptionStyle property.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.CellTips Property

C1TrueDBGrid.CellTips Property

Gets or sets whether the grid displays a pop-up text window when the cursor is idle.

[Visual Basic]

Public Property CellTips As CellTipEnum

[C#]

public CellTipEnum CellTips {get;set;}

[Delphi]

public property CellTips: CellTipEnum read get_CellTips write set_CellTips;

Remarks

The CellTips property determines whether the grid displays a pop-up text window when the cursor is idle. By default, this property is set to NoCellTips, and cell tips are not displayed.

If the CellTips property is set to either Anchored or Floating, the FetchCellTips event will be raised whenever the grid has focus and the cursor is idle over a grid cell, record selector, column header, split header, or grid caption. The event will not fire if the cursor is over the scroll bars.

The setting Anchored aligns the cell tip window with either the left or right edge of the cell. The left edge is favored, but the right edge will be used if necessary in order to display as much text as possible.

The setting Floating displays the cell tip window below the cursor, if possible.

If a handler is not provided for the FetchCellTips event, and the cursor is over a grid cell, the default behavior is to display a text box containing the cell's contents (up to 256 characters). This enables the user to peruse the contents of a cell even if it is not big enough to be displayed in its entirety. The FetchCellTips event can be programmed to override the default cell text display in order to provide users with context-sensitive help.

Note: Use the CellTipsDelay property to control the amount of idle time that must elapse before the cell tip window is displayed.

Use the CellTipsWidth property to control the width of the cell tip window.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.CellTipsDelay Property

C1TrueDBGrid.CellTipsDelay Property

Gets or sets the amount of time in milliseconds before the cell tip window is displayed.

[Visual Basic]

Public Property CellTipsDelay As Integer

[C#]

public int CellTipsDelay {get;set;}

[Delphi]

public property CellTipsDelay: Int32 read get_CellTipsDelay write set_CellTipsDelay;

Remarks

The CellTipsDelay property controls the amount of idle time, in milliseconds, that must elapse before the cell tip window is displayed. By default, this property is set to 1000 (one second).

Setting this property to zero does not disable cell tips, but restores the default value of 1000. To disable cell tips, set the CellTips property to NoCellTips.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.CellTipsWidth Property

C1TrueDBGrid.CellTipsWidth Property

Gets or sets the width of the cell tip window.

[Visual Basic]

Public Property CellTipsWidth As Integer

[C#]

public int CellTipsWidth {get;set;}

[Delphi]

public property CellTipsWidth: Int32 read get_CellTipsWidth write set_CellTipsWidth;

Remarks

The CellTipsWidth property returns or sets the width of the cell tip window in pixels.

By default, this property is set to zero, which causes the cell tip window to grow or shrink to accommodate the cell tip text. Override this behavior and give the cell tip window a fixed width by specifying a non-zero value for this property.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.ChildGrid Property

C1TrueDBGrid.ChildGrid Property

Gets or sets the C1TrueDBGrid control used as a child grid in a hierarchical presentation.

[Visual Basic]

Public Property ChildGrid As C1TrueDBGrid

[C#]

public C1TrueDBGrid ChildGrid {get;set;}

[Delphi]

public property ChildGrid: C1TrueDBGrid read get_ChildGrid write set_ChildGrid;

Remarks

This property associates a C1TrueDBGrid control that can be used to represent hierarchical data at run time. When the user clicks the leftmost columns expand icon (“+”) the associated C1TrueDBGrid control is displayed below the current cell.

Use the ChildGrid property and a C1TrueDBGrid control to implement a fully editable master/detail presentation.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.Col Property

C1TrueDBGrid.Col Property

Gets or sets the column position of the current cell in the current split.

[Visual Basic]

Public Property Col As Integer

[C#]

public int Col {get;set;}

[Delphi]

public property Col: Int32 read get_Col write set_Col;

Remarks

This property specifies the zero-based index of the current cell's column position. It may be set at run time to highlight a different cell within the current row. If the column is visible, the caret or marquee will be moved to the selected column. If the column is not visible, the grid will scroll to make it visible as a result of setting this property.

Setting the Col property at run time does not affect selected columns.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.CollapseColor Property

C1TrueDBGrid.CollapseColor Property

Gets or sets the color of the collapse icon.

[Visual Basic]

Public Property CollapseColor As Color

[C#]

public Color CollapseColor {get;set;}

[Delphi]

public property CollapseColor: Color read get_CollapseColor write set_CollapseColor;

Remarks

Allows the user to change the color of the collapse icon for hierarchical DataSets.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.ColumnFooters Property

C1TrueDBGrid.ColumnFooters Property

Gets or sets a value indicating the visibility of column footers.

[Visual Basic]

Public Property ColumnFooters As Boolean

[C#]

public bool ColumnFooters {get;set;}

[Delphi]

public property ColumnFooters: Boolean read get_ColumnFooters write set_ColumnFooters;

Remarks

If True, the control's column footers are displayed.

If False (the default), the control's column footers are not displayed.

Use the FooterText property to set the footing text of an individual column.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.ColumnHeaders Property

C1TrueDBGrid.ColumnHeaders Property

Gets or sets a value indicating the visibility of column headers.

[Visual Basic]

Public Property ColumnHeaders As Boolean

[C#]

public bool ColumnHeaders {get;set;}

[Delphi]

public property ColumnHeaders: Boolean read get_ColumnHeaders write set_ColumnHeaders;

Remarks

If True (the default), the control's column headers are displayed.

If False, the control's column headers are not displayed.

Use the Caption property to set the heading text of an individual column.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.Columns Property

C1TrueDBGrid.Columns Property

Gets the collection of C1DataColumn objects.

[Visual Basic]

Public ReadOnly Property Columns As C1DataColumnCollection

[C#]

public C1DataColumnCollection Columns {get;}

[Delphi]

public property Columns: C1DataColumnCollection read get_Columns;

Remarks

This property returns a collection of C1DataColumn objects for a grid or drop-down control.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.CurrentCellVisible Property

C1TrueDBGrid.CurrentCellVisible Property

Gets or sets a value indicating the visibility of the current cell in a split.

[Visual Basic]

Public Property CurrentCellVisible As Boolean

[C#]

public bool CurrentCellVisible {get;set;}

[Delphi]

public property CurrentCellVisible: Boolean read get_CurrentCellVisible write set_CurrentCellVisible;

Remarks

This property returns True if the current cell (indicated by the Bookmark and Col properties) is visible within the displayed area of a grid or split. It returns False if the cell is not visible.

Setting the CurrentCellVisible property to True causes the grid to scroll so that the current cell is brought into view. If a grid contains multiple splits, then the current cell becomes visible in each split.

In all cases, setting this property to False is meaningless and is ignored.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.DataChanged Property

C1TrueDBGrid.DataChanged Property

Gets or sets a value indicating the modification status of the current row.

[Visual Basic]

Public Property DataChanged As Boolean

[C#]

public bool DataChanged {get;set;}

[Delphi]

public property DataChanged: Boolean read get_DataChanged write set_DataChanged;

Remarks

The DataChanged property indicates the modification status of the current row. If True, then one or more columns in the current row have been modified. If False, then any edits on the column are cancelled.

Setting this property to True has no effect. Setting this property to False exits editing, discards all changes to the current row, and refreshes the current row from the data source. Setting this property within the BeforeColUpdate event is disallowed, however.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.DataView Property

C1TrueDBGrid.DataView Property

Gets or sets the layout by which the grid will display data.

[Visual Basic]

Public Property DataView As DataViewEnum

[C#]

public DataViewEnum DataView {get;set;}

[Delphi]

public property DataView: DataViewEnum read get_DataView write set_DataView;

Remarks

The DataView property returns or sets the method by which the grid will display data.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.DefColWidth Property

C1TrueDBGrid.DefColWidth Property

Gets or sets the default width for all grid columns.

[Visual Basic]

Public Property DefColWidth As Integer

[C#]

public int DefColWidth {get;set;}

[Delphi]

public property DefColWidth: Int32 read get_DefColWidth write set_DefColWidth;

Remarks

This property returns or sets the default width for all grid columns in terms of the coordinate system of the grid's container.

For bound grids, the DefColWidth property is respected under the following circumstances:

· When the grid's layout is initialized at run time.

· When a new column is created at run time.

If the DefColWidth property is set to 0, the grid automatically sizes all columns based on either the width of the column heading or the display width of the underlying field, whichever is larger. For example, to set the default column width to the width of the first column:

· Visual Basic

· C#

· Delphi

Note: Setting the DefColWidth property at run time does not affect existing columns, only those that are subsequently created in code.

In bound mode, some data sources do not provide text field widths when requested by the grid. Therefore, if DefColWidth is 0, the actual column widths may not be as expected since the grid must supply a default width.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.DestinationCol Property

C1TrueDBGrid.DestinationCol Property

Gets the column which will be current after cell movement.

[Visual Basic]

Public ReadOnly Property DestinationCol As Integer

[C#]

public int DestinationCol {get;}

[Delphi]

public property DestinationCol: Int32 read get_DestinationCol;

Remarks

This property is used when moving from one cell to another in the grid. It indicates which grid column will be the destination of the movement. The value returned is the zero-based index of the column containing the destination cell. If you click outside of the column data area, (for example, in the record selector area on the left), DestinationCol returns -1.

This property is available only during those events related to cell movement: AfterColEdit, AfterColUpdate, BeforeColUpdate, BeforeRowColChange, ButtonClick, Click, DoubleClick, FootClick, GroupHeadClick, HeadClick, MouseDown, MouseUp. Any attempt to access the DestinationCol property outside of these events results in a trappable error ("Property not available in this context").

The property can only be used if the movement is initiated interactively by the user, via the keyboard or mouse. The property is not available when movement is initiated programmatically (for example, when setting the grid's Col property).

Note: Care must be exercised when using this property, because it is possible to use the value of this property in an event (such as MouseDown) before knowing whether or not the movement will actually succeed. The value returned by this property only indicates what the correct destination column will be if the cell movement is successful.

The DestinationCol property does not guarantee that the cell movement will succeed (for example, movement may fail if the contents of the current cell are not valid). In such cases, the DestinationCol property will not reflect the actual destination position (usually the cell position will remain at the previous location).

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.DestinationRow Property

C1TrueDBGrid.DestinationRow Property

Gets the row which will be current after cell movement.

[Visual Basic]

Public ReadOnly Property DestinationRow As Integer

[C#]

public int DestinationRow {get;}

[Delphi]

public property DestinationRow: Int32 read get_DestinationRow;

Remarks

This property is used when moving from one cell to another in the grid. It indicates which grid row will be the destination of the movement. The value returned is the bookmark of the row containing the destination cell. If click occurs outside any visible row (for example, on the header), DestinationRow returns Null. If the AddNew row is clicked, DestinationRow returns "" (empty string).

This property is available only during those events related to cell movement: AfterColEdit, AfterColUpdate, BeforeColUpdate, BeforeRowColChange, ButtonClick, Click, DoubleClick, FootClick, GroupHeadClick, HeadClick, MouseDown, MouseUp. Any attempt to access the DestinationRow property outside of these events results in a trappable error ("Property not available in this context").

The property can only be used if the movement is initiated interactively by the user, via the keyboard or mouse. The property is not available when movement is initiated programmatically (for example, when using the grid's MoveNext method).

Note: Care must be exercised when using this property, because it is possible to use the value of this property in an event (such as MouseDown) before knowing whether or not the movement will actually succeed. The value returned by this property only indicates what the correct destination row will be if the cell movement is successful.

The DestinationRow property does not guarantee that the cell movement will succeed (for example, movement may fail if contents of the current cell are not valid). In such cases, the DestinationRow property will not reflect the actual destination position (usually the cell position will remain at the previous location).

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.DestinationSplit Property

C1TrueDBGrid.DestinationSplit Property

Gets the split index which will be current after cell movement.

[Visual Basic]

Public ReadOnly Property DestinationSplit As Integer

[C#]

public int DestinationSplit {get;}

[Delphi]

public property DestinationSplit: Int32 read get_DestinationSplit;

Remarks

This property is used when moving from one cell to another in the grid. It indicates which grid split will be the destination of the movement. The value returned is the zero-based index of the split containing the destination cell. In the case of a click on an area of the grid not belonging to any split, such as the corner between the vertical and horizontal scrollbars, or on a split border, DestinationSplit returns -1.

This property is available only during those events related to cell movement: AfterColEdit, AfterColUpdate, BeforeColUpdate, BeforeRowColChange, ButtonClick, Click, DoubleClick, FootClick, GroupHeadClick, HeadClick, MouseDown, MouseUp. Any attempt to access the DestinationSplit property outside of these events results in a trappable error ("Property not available in this context").

The property can only be used if the movement is initiated interactively by the user, via the keyboard or mouse. The property is not available when movement is initiated programmatically (for example, when setting the grid's SplitIndex property).

Note: Care must be exercised when using this property, because it is possible to use the value of this property in an event (such as MouseDown) before knowing whether or not the movement will actually succeed. The value returned by this property only indicates what the correct destination split will be if the cell movement is successful.

The DestinationSplit property does not guarantee that the cell movement will succeed (for example, movement may fail if the contents of the current cell are not valid). In such cases, the DestinationSplit property will not reflect the actual destination position (usually the cell position will remain at the previous location).

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.DirectionAfterEnter Property

C1TrueDBGrid.DirectionAfterEnter Property

Gets or sets a value that determines the relative position of the next cell when the user presses the Enter key.

[Visual Basic]

Public Property DirectionAfterEnter As DirectionAfterEnterEnum

[C#]

public DirectionAfterEnterEnum DirectionAfterEnter {get;set;}

[Delphi]

public property DirectionAfterEnter: DirectionAfterEnterEnum read get_DirectionAfterEnter write set_DirectionAfterEnter;

Remarks

The DirectionAfterEnter property specifies the relative position of the next cell when the user presses the Enter key.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.EditActive Property

C1TrueDBGrid.EditActive Property

Gets or sets a value indicating the editing status of the current cell.

[Visual Basic]

Public Property EditActive As Boolean

[C#]

public bool EditActive {get;set;}

[Delphi]

public property EditActive: Boolean read get_EditActive write set_EditActive;

Remarks

If this property returns True, then the current cell is currently being edited by the user. If False, then no editing is in progress.

If the grid is not already in edit mode, setting EditActive to True will initiate editing on the current cell. The caret will be positioned at the end of the cell and the ColEdit event will be triggered.

If the grid is already in edit mode, setting EditActive to False will exit edit mode. If the cell has been modified, this will trigger the following events: BeforeColEdit, AfterColUpdate, and AfterColEdit.

Note: To cancel editing completely, set EditActive to False.

The EditActive property does not correspond to the pencil in the RecordSelector column. The pencil reflects the state of the grid's DataChanged property.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.EditDropDown Property

C1TrueDBGrid.EditDropDown Property

Gets or sets a value indicating whether editing will take place in a popup window or within cell boundaries.

[Visual Basic]

Public Property EditDropDown As Boolean

[C#]

public bool EditDropDown {get;set;}

[Delphi]

public property EditDropDown: Boolean read get_EditDropDown write set_EditDropDown;

Remarks

If True (the default), an edit window will pop up when the user attempts to edit a cell whose contents cannot be displayed completely within the confines of the current cell's boundaries. Unlike the built-in combo box, the drop-down edit window will only extend to the bottom of the grid.

If False, editing will be confined to the current cell's boundaries.

The drop-down edit window behaves just like a standard multiple-line TextBox control in Visual Basic. The SelectionLength, SelectionStart, and SelectedText properties are still available, and the arrow keys can be used to navigate within the edit window.

Note: If the user tries to edit the last row in the grid, the drop-down edit window will not be displayed and the user will have to edit within the current cell's boundaries.

The EditDropDown property only applies when the floating editor marquee (MarqueeStyle = 6) is not in effect.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.EditorStyle Property

C1TrueDBGrid.EditorStyle Property

Gets or sets the Style object that controls the appearance of the cell editor within a grid.

[Visual Basic]

Public Property EditorStyle As Style

[C#]

public Style EditorStyle {get;set;}

[Delphi]

public property EditorStyle: Style read get_EditorStyle write set_EditorStyle;

Remarks

This property returns the Style object that controls the appearance of the cell editor within a grid.

Note: The EditorStyle property only applies when the floating editor marquee (MarqueeStyle = 6) is not in effect.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.EmptyRows Property

C1TrueDBGrid.EmptyRows Property

Gets or sets a value that determines how the grid displays rows below the last data row.

[Visual Basic]

Public Property EmptyRows As Boolean

[C#]

public bool EmptyRows {get;set;}

[Delphi]

public property EmptyRows: Boolean read get_EmptyRows write set_EmptyRows;

Remarks

If all of the records in the data source do not fill up the entire grid, setting EmptyRows to True will fill the unpopulated grid area with empty data rows. If EmptyRows is False (the default), then the unpopulated grid area will be blank and will be filled with the system 3D Objects color (or the system Button Face color) as determined by Control Panel settings.

Note: The RowDivider property applies to data rows and empty rows alike. Row dividers cannot be suppressed for just the empty rows when EmptyRows is True.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.ErrorImage Property

C1TrueDBGrid.ErrorImage Property

Gets or sets the image used for ErrorProvider.

[Visual Basic]

Public Property ErrorImage As Image

[C#]

public Image ErrorImage {get;set;}

[Delphi]

public property ErrorImage: Image read get_ErrorImage write set_ErrorImage;

Remarks

Setting this property to Null (Nothing) disables IDataErrorInfo for the grid.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.EvenRowStyle Property

C1TrueDBGrid.EvenRowStyle Property

Gets or sets the Style object that controls the appearance of an even-numbered row when using AlternatingRows.

[Visual Basic]

Public Property EvenRowStyle As Style

[C#]

public Style EvenRowStyle {get;set;}

[Delphi]

public property EvenRowStyle: Style read get_EvenRowStyle write set_EvenRowStyle;

Remarks

This property sets or returns the Style object that controls the appearance of an even-numbered row in a grid or split where the AlternatingRows property is set to True. By default, this is the built-in EvenRow style.

To change the appearance of odd-numbered rows, set the OddRowStyle property.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.ExpandColor Property

C1TrueDBGrid.ExpandColor Property

Gets or sets the color of the expand icon in hierarchical grids.

[Visual Basic]

Public Property ExpandColor As Color

[C#]

public Color ExpandColor {get;set;}

[Delphi]

public property ExpandColor: Color read get_ExpandColor write set_ExpandColor;

Remarks

Allows the user to change the color of the expand icon for hierarchical DataSets.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.ExposeCellMode Property

C1TrueDBGrid.ExposeCellMode Property

Gets or sets how the rightmost column reacts when clicked by the user.

[Visual Basic]

Public Property ExposeCellMode As ExposeCellModeEnum

[C#]

public ExposeCellModeEnum ExposeCellMode {get;set;}

[Delphi]

public property ExposeCellMode: ExposeCellModeEnum read get_ExposeCellMode write set_ExposeCellMode;

Remarks

Note: The ExposeCellMode property only governs mouse clicks, not keyboard navigation.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.ExtendRightColumn Property

C1TrueDBGrid.ExtendRightColumn Property

Gets or sets a value that determines how the last column will extend to fill the dead area of the grid.

[Visual Basic]

Public Property ExtendRightColumn As Boolean

[C#]

public bool ExtendRightColumn {get;set;}

[Delphi]

public property ExtendRightColumn: Boolean read get_ExtendRightColumn write set_ExtendRightColumn;

Remarks

If the columns in the grid do not take up all of the space available, then an exposed area exists. This area is called the dead area and has a default back color of gray. This property sets whether this area is to be filled with the last column of the grid.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.FetchRowStyles Property

C1TrueDBGrid.FetchRowStyles Property

Gets or sets a value indicating whether the FetchRowStyle event will be raised.

[Visual Basic]

Public Property FetchRowStyles As Boolean

[C#]

public bool FetchRowStyles {get;set;}

[Delphi]

public property FetchRowStyles: Boolean read get_FetchRowStyles write set_FetchRowStyles;

Remarks

If True, the FetchRowStyle event will be raised whenever the grid is about to display a row of data.

If False (the default), the FetchRowStyle event is not raised.

Set this value to True when needing to perform complex per-row formatting operations that can only be done using the FetchRowStyle event. For example, to apply fonts and/or colors to all rows that satisfy certain criteria, then set the FetchRowStyles property to True and write code for the FetchRowStyle event.

Note: To display every other row in a different color or font, set the AlternatingRows property to True.

Example

The following code raises the FetchRowStyle event:

· Visual Basic

· C#

· Delphi

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.FilterActive Property

C1TrueDBGrid.FilterActive Property

Gets or sets a value indicating whether the filter bar has focus.

[Visual Basic]

Public Property FilterActive As Boolean

[C#]

public bool FilterActive {get;set;}

[Delphi]

public property FilterActive: Boolean read get_FilterActive write set_FilterActive;

Remarks

This property returns True if the user is currently editing within the filter bar. Use the Col property to identify the filter column being edited.

Setting this property to True initiates editing in the filter bar.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.FilterBar Property

C1TrueDBGrid.FilterBar Property

Gets or sets a value indicating the visibility of the FilterBar.

[Visual Basic]

Public Property FilterBar As Boolean

[C#]

public bool FilterBar {get;set;}

[Delphi]

public property FilterBar: Boolean read get_FilterBar write set_FilterBar;

Remarks

When set to True, the grid displays a row of data under the column headers in which the user can type. Use the FilterButtonClick and FilterChange events to implement custom operations such as incremental search or recordset filtering.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.FilterBarStyle Property

C1TrueDBGrid.FilterBarStyle Property

Gets or sets the Style object that controls the appearance of the FilterBar.

[Visual Basic]

Public Property FilterBarStyle As Style

[C#]

public Style FilterBarStyle {get;set;}

[Delphi]

public property FilterBarStyle: Style read get_FilterBarStyle write set_FilterBarStyle;

Remarks

This property returns the Style object that controls the appearance of the FilterBar cells within a grid or split.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.FirstRow Property

C1TrueDBGrid.FirstRow Property

Gets or sets the row index for the first visible row in a grid or split.

[Visual Basic]

Public Property FirstRow As Integer

[C#]

public int FirstRow {get;set;}

[Delphi]

public property FirstRow: Int32 read get_FirstRow write set_FirstRow;

Remarks

For a C1TrueDBGrid or C1TrueDBDropdown control, setting the FirstRow property causes the grid to scroll so that the specified row becomes the topmost row. If a grid contains multiple splits, then the topmost row or column changes in each split.

For a Split object, setting the FirstRow property causes the specified row to become the topmost row for that split only.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.FocusedSplit Property

C1TrueDBGrid.FocusedSplit Property

Gets the Split that has focus.

[Visual Basic]

Public ReadOnly Property FocusedSplit As Split

[C#]

public Split FocusedSplit {get;}

[Delphi]

public property FocusedSplit: Split read get_FocusedSplit;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.FooterStyle Property

C1TrueDBGrid.FooterStyle Property

Gets or sets the Style object that controls the appearance of column footers.

[Visual Basic]

Public Property FooterStyle As Style

[C#]

public Style FooterStyle {get;set;}

[Delphi]

public property FooterStyle: Style read get_FooterStyle write set_FooterStyle;

Remarks

This property returns the Style object that controls the appearance of column footings within a grid, column, or split. By default, this is the built-in Footing style.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.GroupByAreaVisible Property

C1TrueDBGrid.GroupByAreaVisible Property

Gets or sets a value indicating the visibility of the Grouping area of the grid when the DataView property is set to GroupBy.

[Visual Basic]

Public Property GroupByAreaVisible As Boolean

[C#]

public bool GroupByAreaVisible {get;set;}

[Delphi]

public property GroupByAreaVisible: Boolean read get_GroupByAreaVisible write set_GroupByAreaVisible;

Remarks

Controls the visibility of the Grouping area of the grid when the DataView property is set to GroupBy.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.GroupByCaption Property

C1TrueDBGrid.GroupByCaption Property

Gets or sets the text displayed in the grouping area when no columns have been grouped.

[Visual Basic]

Public Property GroupByCaption As String

[C#]

public string GroupByCaption {get;set;}

[Delphi]

public property GroupByCaption: String read get_GroupByCaption write set_GroupByCaption;

Remarks

When the DataView property is set to Group, a grouping area is created above the grid. Until column headers have been moved there, the GroupByCaption text is displayed in the grouping area. The default caption is: "Drag a column header here to group by that column". See Column Grouping for more information.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.GroupByRectangle Property

C1TrueDBGrid.GroupByRectangle Property

Gets the rectangle occupied by the grouping area.

[Visual Basic]

Public ReadOnly Property GroupByRectangle As Rectangle

[C#]

public Rectangle GroupByRectangle {get;}

[Delphi]

public property GroupByRectangle: Rectangle read get_GroupByRectangle;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.GroupedColumns Property

C1TrueDBGrid.GroupedColumns Property

Gets the collection of columns that are grouped.

[Visual Basic]

Public ReadOnly Property GroupedColumns As GroupedColumnCollection

[C#]

public GroupedColumnCollection GroupedColumns {get;}

[Delphi]

public property GroupedColumns: GroupedColumnCollection read get_GroupedColumns;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.GroupStyle Property

C1TrueDBGrid.GroupStyle Property

Gets or sets the Style object that controls the appearance of grouping area.

[Visual Basic]

Public Property GroupStyle As Style

[C#]

public Style GroupStyle {get;set;}

[Delphi]

public property GroupStyle: Style read get_GroupStyle write set_GroupStyle;

Remarks

This property sets or returns the Style object that controls the appearance of the grouping area for a grid whose DataView property is set to GroupBy.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.HeadingStyle Property

C1TrueDBGrid.HeadingStyle Property

Gets or sets the Style object that controls the appearance of the grids column headers.

[Visual Basic]

Public Property HeadingStyle As Style

[C#]

public Style HeadingStyle {get;set;}

[Delphi]

public property HeadingStyle: Style read get_HeadingStyle write set_HeadingStyle;

Remarks

This property returns the Style object that controls the appearance of column headings within a grid, column, or split. By default, this is the built-in Heading style.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.HighLightRowStyle Property

C1TrueDBGrid.HighLightRowStyle Property

Gets or sets the Style object that controls the current row/cell when the MarqueeStyle is set to Highlight Row/Cell.

[Visual Basic]

Public Property HighLightRowStyle As Style

[C#]

public Style HighLightRowStyle {get;set;}

[Delphi]

public property HighLightRowStyle: Style read get_HighLightRowStyle write set_HighLightRowStyle;

Remarks

This property sets or returns the Style object that controls the appearance of a highlighted row or cell marquee. By default, this is the built-in HighlightRow style.

The HighlightRowStyle value is only used when one of the following MarqueeStyle settings is in effect: Highlight Cell, Highlight Row, or HighlightRow, RaiseCell.

The value of the MarqueeStyle property is not affected by changes to the HighlightRowStyle property.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.HScrollBar Property

C1TrueDBGrid.HScrollBar Property

Gets the HBar object that controls the appearance of the horizontal scrollbar.

[Visual Basic]

Public ReadOnly Property HScrollBar As HBar

[C#]

public HBar HScrollBar {get;}

[Delphi]

public property HScrollBar: HBar read get_HScrollBar;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.InactiveStyle Property

C1TrueDBGrid.InactiveStyle Property

Gets or sets the Style object that controls the grids caption when it doesn't have focus.

[Visual Basic]

Public Property InactiveStyle As Style

[C#]

public Style InactiveStyle {get;set;}

[Delphi]

public property InactiveStyle: Style read get_InactiveStyle write set_InactiveStyle;

Remarks

This property returns the Style object that controls the appearance of column headings within a grid or split when another object has focus.

Note: The inactive style is only used when the grid's FlatStyle property is set to Flat. If the FlatStyle property is set to the default value of Standard, then the headings do not change when a grid or split receives or loses focus.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.Item Property

C1TrueDBGrid.Item Property

Overload List

Gets the row object associated with the given row.

[Visual Basic] Overloads Public Default ReadOnly Property Item(Integer) As Object

[C#] public object this[int]{get;}

[Delphi] public property Item[row: Int32]: Object read get_Item;

Set or retrieve the cell value at the given row and column.

[Visual Basic] Overloads Public Default Property Item(Integer, Integer) As Object

[C#] public object this[int, int]{get;set;}

[Delphi] public property Item[row: Int32]: Object read get_Item write set_Item;

Set or retrieve the cell value at the given row and column.

[Visual Basic] Overloads Public Default Property Item(Integer, String) As Object

[C#] public object this[int, string]{get;set;}

[Delphi] public property Item[row: Int32]: Object read get_Item write set_Item;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.Item Property (Int32)

C1TrueDBGrid.Item Property (Int32)

Previous Next

Gets the row object associated with the given row.

[Visual Basic]

Public Default ReadOnly Property Item( _

ByVal row As Integer _

) As Object

[C#]

public object this[

int row

] {get;}

[Delphi]

public property Item[

row: Int32

]: Object read get_Item;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.Item Property (Int32, Int32)

C1TrueDBGrid.Item Property (Int32, Int32)

Previous Next

Set or retrieve the cell value at the given row and column.

[Visual Basic]

Public Default Property Item( _

ByVal row As Integer, _

ByVal col As Integer _

) As Object

[C#]

public object this[

int row,

int col

] {get;set;}

[Delphi]

public property Item[

row: Int32;

col: Int32

]: Object read get_Item write set_Item;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.Item Property (Int32, String)

C1TrueDBGrid.Item Property (Int32, String)

Previous Next

Set or retrieve the cell value at the given row and column.

[Visual Basic]

Public Default Property Item( _

ByVal row As Integer, _

ByVal columnName As String _

) As Object

[C#]

public object this[

int row,

string columnName

] {get;set;}

[Delphi]

public property Item[

row: Int32;

columnName: String

]: Object read get_Item write set_Item;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.LeftCol Property

C1TrueDBGrid.LeftCol Property

Gets or sets the zero-based index of the leftmost column in a grid or split.

[Visual Basic]

Public Property LeftCol As Integer

[C#]

public int LeftCol {get;set;}

[Delphi]

public property LeftCol: Int32 read get_LeftCol write set_LeftCol;

Remarks

For a C1TrueDBGrid or C1TrueDBDropdown control, setting the LeftCol property causes the grid to scroll so that the specified column becomes the leftmost column. If a grid contains multiple splits, then the leftmost column changes in each split.

For a Split object, setting the LeftCol property causes the specified column to become the leftmost column for that split only.

Use the LeftCol property in code to scroll a grid or split horizontally. Use the FirstRow property to determine the bookmark of the first visible row in a grid or split.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.LinesPerRow Property

C1TrueDBGrid.LinesPerRow Property

Gets or sets the number of subrows of the grid when the DataView property is set to MutlipleLinesFixed.

[Visual Basic]

Public Property LinesPerRow As Integer

[C#]

public int LinesPerRow {get;set;}

[Delphi]

public property LinesPerRow: Int32 read get_LinesPerRow write set_LinesPerRow;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.MaintainRowCurrency Property

C1TrueDBGrid.MaintainRowCurrency Property

Gets or sets a value indicating the behavior of the grid and row currency when the grid's datasource is sorted.

[Visual Basic]

Public Property MaintainRowCurrency As Boolean

[C#]

public bool MaintainRowCurrency {get;set;}

[Delphi]

public property MaintainRowCurrency: Boolean read get_MaintainRowCurrency write set_MaintainRowCurrency;

Remarks

The default value for this property is False.

For example, set this property to True and click the grid's column header to sort the grid. The grid's current row position will be adjusted so that its new position will be on the same row that was current prior to the sort.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.MarqueeStyle Property

C1TrueDBGrid.MarqueeStyle Property

Gets or sets the MarqueeStyle for a grid.

[Visual Basic]

Public Property MarqueeStyle As MarqueeEnum

[C#]

public MarqueeEnum MarqueeStyle {get;set;}

[Delphi]

public property MarqueeStyle: MarqueeEnum read get_MarqueeStyle write set_MarqueeStyle;

Remarks

This property determines how the current row and cell are highlighted within a grid or split. There are seven possible values for this property.

Note: If a grid contains multiple splits, then setting its MarqueeStyle property has the same effect as setting the MarqueeStyle property of each split individually.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.MatchEntryTimeOut Property

C1TrueDBGrid.MatchEntryTimeOut Property

Gets or sets the time (milliseconds) in which the incremental search string will reset for a drop-down when the DropDownList property is True.

[Visual Basic]

Public Property MatchEntryTimeOut As Integer

[C#]

public int MatchEntryTimeOut {get;set;}

[Delphi]

public property MatchEntryTimeOut: Int32 read get_MatchEntryTimeOut write set_MatchEntryTimeOut;

Remarks

Setting this value to 0 will cause the incremental search to behave like the built in ComboBox control.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.MultiSelect Property

C1TrueDBGrid.MultiSelect Property

Gets or sets the selection state of the grid.

[Visual Basic]

Public Property MultiSelect As MultiSelectEnum

[C#]

public MultiSelectEnum MultiSelect {get;set;}

[Delphi]

public property MultiSelect: MultiSelectEnum read get_MultiSelect write set_MultiSelect;

Remarks

If set to MulitSelectEnum.None, multiple selection is disabled but single selection is permitted. When the user clicks a record selector, the current selection is cleared, and the clicked row is then selected and added to either the SelectedRows or SelectedCols collections. The Ctrl and Shift keys are ignored, and the user can only select one row at a time.

If set to MultiSelectEnum.Simple (the default), multiple selection is enabled using the mouse. When the user clicks a record selector, the selection is cleared and the clicked row is selected and added to either the SelectedRows or Selected Cols collections. However, if the user holds down the Ctrl key while clicking, the clicked row is added to the current selection. The user can also select a range of rows by selecting the first row in the range, then selecting the last row in the range while holding down the Shift key.

If set to MultiSelectEnum.Extended, multiple selection is enabled using the mouse as described in the previous paragraph. The user can also select records with the following key combinations: Shift+Up Arrow, Shift+Down Arrow, Shift+PAgE Up, and Shift+PAgE DOWn.

Note: When MultiSelectEnum.Extended is chosen, the user will not be able to select a single cell, instead the entire corresponding row will be selected.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.OddRowStyle Property

C1TrueDBGrid.OddRowStyle Property

Gets or sets the Style object that controls the appearance of an odd-numbered row when using AlternatingRows.

[Visual Basic]

Public Property OddRowStyle As Style

[C#]

public Style OddRowStyle {get;set;}

[Delphi]

public property OddRowStyle: Style read get_OddRowStyle write set_OddRowStyle;

Remarks

This property sets or returns the Style object that controls the appearance of an odd-numbered row in a grid or split where the AlternatingRows property is set to True. By default, this is the built-in OddRow style.

To change the appearance of even-numbered rows, set the EvenRowStyle property.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.PictureAddnewRow Property

C1TrueDBGrid.PictureAddnewRow Property

Gets or sets the Image used in the record selector to indicate the AddNew row.

[Visual Basic]

Public Property PictureAddnewRow As Image

[C#]

public Image PictureAddnewRow {get;set;}

[Delphi]

public property PictureAddnewRow: Image read get_PictureAddnewRow write set_PictureAddnewRow;

Remarks

This property sets or returns the bitmap used in the record selector column to indicate the AddNew row, which is displayed after the last data row when the AllowAddNew property is True.

By default, True DBGrid uses an asterisk to indicate the AddNew row.

However, a different bitmap can be specified at design time using the General property page. Or, a bitmap can be assigned to the PictureAddNewRow property in code at run time:

· Visual Basic

· C#

· Delphi

Note: The grid draws 3D effects within the record selector column, so only the interior image needs to be provided.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.PictureCurrentRow Property

C1TrueDBGrid.PictureCurrentRow Property

Gets or sets the Image used in the record selector to indicate the Current row.

[Visual Basic]

Public Property PictureCurrentRow As Image

[C#]

public Image PictureCurrentRow {get;set;}

[Delphi]

public property PictureCurrentRow: Image read get_PictureCurrentRow write set_PictureCurrentRow;

Remarks

This property sets or returns the bitmap used in the record selector column to indicate the current row when there are no modifications pending.

By default, True DBGrid uses an arrow to indicate that the current row is unmodified.

However, a different bitmap can be specified at design time using the General property page. Or, a bitmap can be assigned to the PictureCurrentRow property in code at run time:

· Visual Basic

· C#

· Delphi

Note: The grid draws 3D effects within the record selector column, so only the interior image needs to be provided.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.PictureFilterBar Property

C1TrueDBGrid.PictureFilterBar Property

Gets or sets the Image used in the record selector to indicate the FilterBar row.

[Visual Basic]

Public Property PictureFilterBar As Image

[C#]

public Image PictureFilterBar {get;set;}

[Delphi]

public property PictureFilterBar: Image read get_PictureFilterBar write set_PictureFilterBar;

Remarks

This property sets or returns the bitmap used in the record selector column on the FilterBar row. By default, True DBGrid does not display a picture for this row. However, a bitmap for this row can be specified at design time using the General property page. Or, a bitmap can be assigned to the PictureFilterBar property in code at run time:

· Visual Basic

· C#

· Delphi

Note: The grid draws 3D effects within the record selector column, so you only the interior image needs to be provided.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.PictureFooterRow Property

C1TrueDBGrid.PictureFooterRow Property

Gets or sets the Image used in the record selector to indicate the Footer row.

[Visual Basic]

Public Property PictureFooterRow As Image

[C#]

public Image PictureFooterRow {get;set;}

[Delphi]

public property PictureFooterRow: Image read get_PictureFooterRow write set_PictureFooterRow;

Remarks

This property sets or returns the bitmap used in the record selector column within the grid's footer row, which is only displayed when the ColumnFooters property is True.

By default, True DBGrid does not display a picture within the footer row. However, a bitmap for this row can be specified at design time using the General property page. Or, a bitmap can be assigned to the PictureFooterRow property in code at run time:

· Visual Basic

· C#

· Delphi

Note: The grid draws 3D effects within the record selector column, so only the interior image needs to be provided.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.PictureHeaderRow Property

C1TrueDBGrid.PictureHeaderRow Property

Gets or sets the Image used in the record selector to indicate the Header row.

[Visual Basic]

Public Property PictureHeaderRow As Image

[C#]

public Image PictureHeaderRow {get;set;}

[Delphi]

public property PictureHeaderRow: Image read get_PictureHeaderRow write set_PictureHeaderRow;

Remarks

This property sets or returns the bitmap used in the record selector column within the grid's header row, which is only displayed when the ColumnHeaders property is True.

By default, True DBGrid does not display a picture within the header row. However, a bitmap for this row can be specified at design time using the General property page. Or, a bitmap can be assigned to the PictureHeaderRow property in code at run time:

· Visual Basic

· C#

· Delphi

Note: The grid draws 3D effects within the record selector column, so only the interior image needs to be provided.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.PictureModifiedRow Property

C1TrueDBGrid.PictureModifiedRow Property

Gets or sets the Image used in the record selector to indicate the Modified row.

[Visual Basic]

Public Property PictureModifiedRow As Image

[C#]

public Image PictureModifiedRow {get;set;}

[Delphi]

public property PictureModifiedRow: Image read get_PictureModifiedRow write set_PictureModifiedRow;

Remarks

This property sets or returns the bitmap used in the record selector column to indicate the current row when there are unsaved modifications pending.

By default, True DBGrid uses a pencil to indicate that the current row is modified.

However, a different bitmap can be specified at design time using the General property page. Or, a bitmap can be assigned to the PictureModifiedRow property in code at run time:

· Visual Basic

· C#

· Delphi

Note: The grid draws 3D effects within the record selector column, so only the interior image needs to be provided.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.PictureStandardRow Property

C1TrueDBGrid.PictureStandardRow Property

Gets or sets the Image used in the record selector to indicate the Standard row.

[Visual Basic]

Public Property PictureStandardRow As Image

[C#]

public Image PictureStandardRow {get;set;}

[Delphi]

public property PictureStandardRow: Image read get_PictureStandardRow write set_PictureStandardRow;

Remarks

This property sets or returns the bitmap used in the record selector column to indicate noncurrent, unmodified rows.

By default, True DBGrid does not display a picture for standard rows. However, a bitmap can be specified for these rows at design time using the General property page. Or, a bitmap can be assigned to the PictureStandardRow property in code at run time:

· Visual Basic

· C#

· Delphi

Note: The grid draws 3D effects within the record selector column, so only the interior image needs to be provided.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.PreviewInfo Property

C1TrueDBGrid.PreviewInfo Property

Gets the PrintPreviewWinSettings object.

[Visual Basic]

Public ReadOnly Property PreviewInfo As PrintPreviewWinSettings

[C#]

public PrintPreviewWinSettings PreviewInfo {get;}

[Delphi]

public property PreviewInfo: PrintPreviewWinSettings read get_PreviewInfo;

Remarks

This property provides access to the PrintPreviewWinSettings object. This object sets the properties for the print preview window that appears when the PrintPreview method is called.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.PrintInfo Property

C1TrueDBGrid.PrintInfo Property

Gets the PrintInfo object.

[Visual Basic]

Public ReadOnly Property PrintInfo As PrintInfo

[C#]

public PrintInfo PrintInfo {get;}

[Delphi]

public property PrintInfo: PrintInfo read get_PrintInfo;

Remarks

This property returns the default PrintInfo object of the grid. PrintInfo objects are used to specify page layout and print job characteristics.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.RecordSelectors Property

C1TrueDBGrid.RecordSelectors Property

Gets or sets a value indicating the visibility of row headers for a grid or split.

[Visual Basic]

Public Property RecordSelectors As Boolean

[C#]

public bool RecordSelectors {get;set;}

[Delphi]

public property RecordSelectors: Boolean read get_RecordSelectors write set_RecordSelectors;

Remarks

If True (the default), record selectors are displayed at the left edge of the grid or split.

If False, record selectors are not displayed.

If a grid contains multiple splits, then setting its RecordSelectors property has the same effect as setting the RecordSelectors property of each split individually.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.RecordSelectorStyle Property

C1TrueDBGrid.RecordSelectorStyle Property

Gets or sets the Style object that controls the appearance of the RecordSelectors.

[Visual Basic]

Public Property RecordSelectorStyle As Style

[C#]

public Style RecordSelectorStyle {get;set;}

[Delphi]

public property RecordSelectorStyle: Style read get_RecordSelectorStyle write set_RecordSelectorStyle;

Remarks

This property returns the Style object that controls the appearance of RecordSelectors within a grid or split.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.RecordSelectorWidth Property

C1TrueDBGrid.RecordSelectorWidth Property

Gets or sets the width of the row headers.

[Visual Basic]

Public Property RecordSelectorWidth As Integer

[C#]

public int RecordSelectorWidth {get;set;}

[Delphi]

public property RecordSelectorWidth: Int32 read get_RecordSelectorWidth write set_RecordSelectorWidth;

Remarks

The RecordSelectorWidth property returns or sets the width of the RecordSelectors based on the coordinate system of the grid's container.

The RecordSelectorWidth returns to default when set to 0. The default width of the record selector column is equal to the width of the vertical scroll bar.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.Row Property

C1TrueDBGrid.Row Property

Gets or sets the the current row.

[Visual Basic]

Public Property Row As Integer

[C#]

public int Row {get;set;}

[Delphi]

public property Row: Int32 read get_Row write set_Row;

Remarks

This property specifies the zero-based index of the current row in the grid.

For a C1TrueDBGrid control, changing the Row property at run time does not affect selected rows.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.RowDivider Property

C1TrueDBGrid.RowDivider Property

Gets or sets the style of the border drawn between grid rows.

[Visual Basic]

Public Property RowDivider As GridLines

[C#]

public GridLines RowDivider {get;set;}

[Delphi]

public property RowDivider: GridLines read get_RowDivider write set_RowDivider;

Remarks

This property determines the style of the border drawn between grid rows.

The Style property of RowDivider does not control whether rows can be resized by dragging their border. Use the AllowRowSizing property to control this behavior.

Example

The following code sets the RowDivider property to Inset:

· Visual Basic

· C#

· Delphi

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.RowSubDividerColor Property

C1TrueDBGrid.RowSubDividerColor Property

Gets or sets the color of the subrow divider in a multi-line grid.

[Visual Basic]

Public Property RowSubDividerColor As Color

[C#]

public Color RowSubDividerColor {get;set;}

[Delphi]

public property RowSubDividerColor: Color read get_RowSubDividerColor write set_RowSubDividerColor;

Remarks

This property controls the row subdivider color of the grid. This property is used when the DataView is set to DataViewEnum.MultipleLines.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.ScrollTips Property

C1TrueDBGrid.ScrollTips Property

Gets or sets a value that determines whether the grid displays a pop-up text window when the scrollbar thumb is dragged.

[Visual Basic]

Public Property ScrollTips As Boolean

[C#]

public bool ScrollTips {get;set;}

[Delphi]

public property ScrollTips: Boolean read get_ScrollTips write set_ScrollTips;

Remarks

The ScrollTips property determines whether the grid displays a pop-up text window when the scrollbar thumb is dragged. By default, this property is set to False, and ScrollTips are not displayed.

If the ScrollTips property is set to True, the FetchScrollTips event will be raised whenever the grid’s scrollbar thumb is dragged.

If a handler is not provided for the FetchScrollTips event, tips will not be displayed.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.SelectedCols Property

C1TrueDBGrid.SelectedCols Property

Gets the collection of columns that are currently selected.

[Visual Basic]

Public ReadOnly Property SelectedCols As SelectedColumnCollection

[C#]

public SelectedColumnCollection SelectedCols {get;}

[Delphi]

public property SelectedCols: SelectedColumnCollection read get_SelectedCols;

Remarks

This property returns the SelectedColumnCollection object. The SelectedColumnCollection object is a collection of C1DataColumn objects.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.SelectedRows Property

C1TrueDBGrid.SelectedRows Property

Gets the collection of rows that are currently selected.

[Visual Basic]

Public ReadOnly Property SelectedRows As SelectedRowCollection

[C#]

public SelectedRowCollection SelectedRows {get;}

[Delphi]

public property SelectedRows: SelectedRowCollection read get_SelectedRows;

Remarks

This property returns the SelectedRowCollection object. The SelectedRowCollection object is a collection of integers that specify the currently selected rows.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.SelectedStyle Property

C1TrueDBGrid.SelectedStyle Property

Gets or sets the Style object that controls the appearance of selected rows and columns.

[Visual Basic]

Public Property SelectedStyle As Style

[C#]

public Style SelectedStyle {get;set;}

[Delphi]

public property SelectedStyle: Style read get_SelectedStyle write set_SelectedStyle;

Remarks

This property returns or sets the Style object that controls the appearance of selected rows and columns within a grid or split. By default, this is the built-in Selected style.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.SelectedText Property

C1TrueDBGrid.SelectedText Property

Gets or sets the string containing the currently selected text within the grid's editing window.

[Visual Basic]

Public Property SelectedText As String

[C#]

public string SelectedText {get;set;}

[Delphi]

public property SelectedText: String read get_SelectedText write set_SelectedText;

Remarks

If no text is currently selected, then this property returns an empty string.

Setting SelectedText to a new value sets SelectionLength to 0 and replaces the selected text with the new string.

Use the SelectedText property in combination with the SelectionStart and SelectionLength properties to set the insertion point, establish an insertion range, select substrings, or clear text. These properties are useful for implementing copy, cut, and paste operations that transfer string data to and from the clipboard.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.SelectionLength Property

C1TrueDBGrid.SelectionLength Property

Gets or sets the number of characters selected within the grid's editing window.

[Visual Basic]

Public Property SelectionLength As Integer

[C#]

public int SelectionLength {get;set;}

[Delphi]

public property SelectionLength: Int32 read get_SelectionLength write set_SelectionLength;

Remarks

When editing is not is progress, this property returns 0.

Setting SelectionLength to a value less than 0 causes a run time error.

Use the SelectionLength property in combination with the SelectionStart and SelectedText properties to set the insertion point, establish an insertion range, select substrings, or clear text. These properties are useful for implementing copy, cut, and paste operations that transfer string data to and from the clipboard.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.SelectionStart Property

C1TrueDBGrid.SelectionStart Property

Gets or sets the starting point of the text selection within the grid's editing window.

[Visual Basic]

Public Property SelectionStart As Integer

[C#]

public int SelectionStart {get;set;}

[Delphi]

public property SelectionStart: Int32 read get_SelectionStart write set_SelectionStart;

Remarks

If no text is currently selected, then this property indicates the position of the insertion point.

When editing is not is progress, this property returns 0.

Setting SelectionStart to a value greater than the length of the text in the cell sets it to this length. Changing SelectionStart moves the entire selection while preserving the value of SelectionLength, if possible. If there are not enough characters, SelectionLength is decreased accordingly.

Use the SelectionStart property in combination with the SelectionLength and SelectedText properties to set the insertion point, establish an insertion range, select substrings, or clear text. These properties are useful for implementing copy, cut, and paste operations that transfer string data to and from the clipboard.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.SelRange Property

C1TrueDBGrid.SelRange Property

Gets a value indicating whether a range of cells has been selected.

[Visual Basic]

Public ReadOnly Property SelRange As Boolean

[C#]

public bool SelRange {get;}

[Delphi]

public property SelRange: Boolean read get_SelRange;

Remarks

This property returns True if the user has selected a range of cells (both rows and columns), False otherwise.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.SplitIndex Property

C1TrueDBGrid.SplitIndex Property

Gets or sets the index of the current Split within the SplitCollection.

[Visual Basic]

Public Property SplitIndex As Integer

[C#]

public int SplitIndex {get;set;}

[Delphi]

public property SplitIndex: Int32 read get_SplitIndex write set_SplitIndex;

Remarks

To set the current split to the third split in the grid, for instance, the code would look like the following:

· Visual Basic

· C#

· Delphi

Notice that the index is 0 based.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.Splits Property

C1TrueDBGrid.Splits Property

Gets the collection of Split objects.

[Visual Basic]

Public ReadOnly Property Splits As SplitCollection

[C#]

public SplitCollection Splits {get;}

[Delphi]

public property Splits: SplitCollection read get_Splits;

Remarks

This property returns a collection of Split objects. The split indexer accepts three types of values. First it accepts a single Integer and returns a horizontal split object:

· Visual Basic

· C#

· Delphi

Secondly, it accepts the name of the split as a String (if one was specified), and returns either the horizontal or vertical split specified:

· Visual Basic

· C#

· Delphi

Thirdly, in order to return splits from a split matrix, this property also accepts two integers delimited by a comma that define the split index in the split matrix. For instance, to access the 1st split in the 3rd row, the indexer would look as follows:

· Visual Basic

· C#

· Delphi

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.SpringMode Property

C1TrueDBGrid.SpringMode Property

Gets or sets a value that determines how columns will resize when the grid is resized.

[Visual Basic]

Public Property SpringMode As Boolean

[C#]

public bool SpringMode {get;set;}

[Delphi]

public property SpringMode: Boolean read get_SpringMode write set_SpringMode;

Remarks

When this property is set to True and the grid is horizontally resized, the column widths for visible columns will expand and/or shrink proportionally.

When set to False (the default), column widths do not change as the grid is horizontally resized.

Note: Control the minimum width on a per column basis by using the MinWidth property of individual C1DataColumn objects.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.Style Property

C1TrueDBGrid.Style Property

Gets or sets the root Style object.

[Visual Basic]

Public Property Style As Style

[C#]

public Style Style {get;set;}

[Delphi]

public property Style: Style read get_Style write set_Style;

Remarks

This property returns or sets the Style object that controls the normal appearance of a cell within a grid, column, or split. By default, this is the built-in Normal style.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.Styles Property

C1TrueDBGrid.Styles Property

Gets the collection of named Style objects.

[Visual Basic]

Public ReadOnly Property Styles As GridStyleCollection

[C#]

public GridStyleCollection Styles {get;}

[Delphi]

public property Styles: GridStyleCollection read get_Styles;

Remarks

This property returns a collection of named Style objects. When a grid is first created, it contains ten built-in styles, which control the following display aspects:

Normal

Data cells in unselected, unhighlighted rows.

Heading

Column headers.

Footing

Column footers.

Selected

Data cells in selected rows.

Caption

Grid and split caption bars.

HighlightRow

Data cells in highlighted rows.

EvenRow

Data cells in even numbered rows.

OddRow

Data cells in odd numbered rows.

FilterBar

Cells in the filter bar row.

RecordSelector

Cells in the record selector column.

Note: At design time, use the GridStyle property page to modify these built-in styles or create custom- named styles.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.TabAcrossSplits Property

C1TrueDBGrid.TabAcrossSplits Property

Gets or sets a value indicating the behavior of the tab and arrow keys at split borders.

[Visual Basic]

Public Property TabAcrossSplits As Boolean

[C#]

public bool TabAcrossSplits {get;set;}

[Delphi]

public property TabAcrossSplits: Boolean read get_TabAcrossSplits write set_TabAcrossSplits;

Remarks

If True, the tab and arrow keys will move the current cell across split boundaries. When at the last column of the rightmost split (or the first column of the leftmost split), they will either wrap to the next row, stop, or move to other controls depending on the values of the WrapCellPointer and TabAction properties.

If False (the default), the tab and arrow keys will not move the current cell across split boundaries. They will either wrap to the next row, stop, or move to other controls depending on the values of the WrapCellPointer and TabAction properties.

Note: The TabAcrossSplits property does not determine if the tab and arrow keys will move from cell to cell, or from control to control, or wrap to the next row. Use the AllowArrows, WrapCellPointer, and TabAction properties to control this behavior. If the tab and arrow keys are able to move from cell to cell, this property determines whether they will move across split boundaries to adjacent splits.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.TabAction Property

C1TrueDBGrid.TabAction Property

Gets or sets the behavior of the tab key.

[Visual Basic]

Public Property TabAction As TabActionEnum

[C#]

public TabActionEnum TabAction {get;set;}

[Delphi]

public property TabAction: TabActionEnum read get_TabAction write set_TabAction;

Remarks

Note: The TabAction property does not determine if the tab key will cross split boundaries. Use the TabAcrossSplits property to control this behavior.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.ViewCaptionWidth Property

C1TrueDBGrid.ViewCaptionWidth Property

Gets or sets the width of the column caption when the DataView is set to Inverted or Form.

[Visual Basic]

Public Property ViewCaptionWidth As Integer

[C#]

public int ViewCaptionWidth {get;set;}

[Delphi]

public property ViewCaptionWidth: Int32 read get_ViewCaptionWidth write set_ViewCaptionWidth;

Remarks

This property returns or sets the width of the presentation area of the column caption in terms of the coordinate system of the grid's container.

Note: This property is only applicable when the DataView property is set to Form or Inverted.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.ViewColumnWidth Property

C1TrueDBGrid.ViewColumnWidth Property

Gets or sets the width of a column when the DataView is set to Inverted or Form.

[Visual Basic]

Public Property ViewColumnWidth As Integer

[C#]

public int ViewColumnWidth {get;set;}

[Delphi]

public property ViewColumnWidth: Int32 read get_ViewColumnWidth write set_ViewColumnWidth;

Remarks

This property returns or sets the width of a column in terms of the coordinate system of the grid's container.

Note: This property is only applicable when the DataView property is set to Form or Inverted.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.VisibleCols Property

C1TrueDBGrid.VisibleCols Property

Gets the number of visible columns in the current Split.

[Visual Basic]

Public ReadOnly Property VisibleCols As Integer

[C#]

public int VisibleCols {get;}

[Delphi]

public property VisibleCols: Int32 read get_VisibleCols;

Remarks

C1TrueDBGrid controls, this property returns the number of visible columns in the current split. The value returned includes both fully and partially displayed columns. Use the SplitIndex property of the C1TrueDBGrid control to determine the index of the current split.

For C1TrueDBDropdown controls, this property returns the number of visible columns in the entire control, since there can only be one split. The value returned includes both fully and partially displayed columns.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.VisibleRows Property

C1TrueDBGrid.VisibleRows Property

Gets the number of visible rows in the current Split.

[Visual Basic]

Public ReadOnly Property VisibleRows As Integer

[C#]

public int VisibleRows {get;}

[Delphi]

public property VisibleRows: Int32 read get_VisibleRows;

Remarks

This property returns the number of visible rows in the control. The value returned includes both fully and partially displayed rows.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.VScrollBar Property

C1TrueDBGrid.VScrollBar Property

Gets the VBar object that controls the appearance of the vertical scrollbar.

[Visual Basic]

Public ReadOnly Property VScrollBar As VBar

[C#]

public VBar VScrollBar {get;}

[Delphi]

public property VScrollBar: VBar read get_VScrollBar;

Remarks

This property returns or sets the VBar object that controls the appearance of the vertical scrollbar.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.WrapCellPointer Property

C1TrueDBGrid.WrapCellPointer Property

Gets or sets a value indicating the behavior of Tab and arrow keys at row boundaries.

[Visual Basic]

Public Property WrapCellPointer As Boolean

[C#]

public bool WrapCellPointer {get;set;}

[Delphi]

public property WrapCellPointer: Boolean read get_WrapCellPointer write set_WrapCellPointer;

Remarks

If True, the cell pointer will wrap from the last column to the first in the next row (or from the first column to the last in the previous row).

If False (the default), the cell pointer will not wrap to the next (or previous) row, but will stop at the last (or first) column of the current row.

If TabAcrossSplits is False, the cell pointer will wrap only within the current split. If TabAcrossSplits is True, the cell pointer will move from one split to the next before wrapping occurs.

If TabAction is set to 2 - Grid Navigation, the tab key will behave like the arrow keys, and will automatically wrap to the next or previous cell.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid Methods

C1TrueDBGrid Methods

The methods of the C1TrueDBGrid class are listed here. For a complete list of C1TrueDBGrid class members, see the C1TrueDBGrid Members topic.

Public Methods

AddCellStyle | Controls the Style used to change the appearance for cells meeting the specified condition.
AddRegexCellStyle | Controls the Style used to change the appearance of cells according to their contents.
BeginInit (inherited from Frame) | ISupportInitialize interface.
CellContaining | Returns the cell position for a set of coordinates.
ClearCellStyle | Removes a cell condition established with a previous call to the AddCellStyle method.
ClearFields | Restores the default grid layout.
ClearRegexCellStyle | Overloaded. Removes a cell condition established with a previous call to the AddRegexCellStyle method.
ColContaining | Returns the column index for the column containing the specified X coordinate.
CollapseBand | Collapses a gvien band in a hierarchical grid.
CollapseChild | Closes the Child Grid.
CollapseGroupRow | Collapses a grouped row.
Delete | Overloaded. Overriden. Deletes the current row.
EndInit (inherited from Frame) | ISupportInitialize interface.
ExpandBand | Expand the given band in a hierarchical grid.
ExpandChild | Displays the Child grid.
ExpandGroupRow | Expands the given row in GroupBy DataView.
ExportTo | Overloaded. Opens a dialog in which the user can select the export format.
ExportToDelimitedFile | Overloaded. Exports the specified rows from the grid to the specified file as delimited text.
ExportToExcel | Overloaded. Exports the grid to a XLS file.
ExportToHTML | Exports the grid to an HTML file.
ExportToPDF | Exports the grid to a PDF file.
ExportToRTF | Exports the grid to an RTF file.
GetBand | Obtains the band given a column index.
GetBandRow | Obtains the underlying row object for the given band and row.
InsertHorizontalSplit | Inserts new horizontal splits at the given position.
InsertVerticalSplit | Inserts vertical splits at the given position.
LoadLayout | Overloaded. Loads a saved layout from the given stream.
MoveFirst | Positions to the first row of the datasource.
MoveLast | Positions to the last row of the datasource.
MoveNext | Positions to the next row of the datasource.
MovePrevious | Positions to the previous row of the datasource.
MoveRelative | Overloaded. Moves the current row positions of the grid by the given offset.
PointAt | Overloaded. Returns one of the PointAtEnum enumerations, which indicates the kind of grid element beneath the specified coordinate.
Rebind | Overloaded. Reinitializes grid with data from its data source
RefetchRow | Overloaded. Retreives data from the datasource for the current row and refreshes the row.
Refresh | Overriden. Clears any cached styles and forces the grid to repaint.
RefreshCol | Overloaded. Invalidates the current column.
RefreshRow | Overloaded. Invalidates the current row.
RemoveHorizontalSplit | Removes all the horizontal splits at the given index.
RemoveVerticalSplit | Removes all vertical splits at the given index.
ResumeBinding | Resumes IBindingList.ListChange notifications from the data source to the grid.
RowBookmark | Returns the row index of the DataSource for a display row index.
RowContaining | Returns the zero-based index of the display row containing the Y specified coordinate.
RowExpanded | Obtains the expanded state of a band for a hierarchical grid.
RowTop | Returns the Y coordinate of the top of a visible row.
SaveLayout | Overloaded. Saves the grid's layout.
ScrollGrid | Scrolls the grid data area by the specified number of rows and columns.
SplitContaining | Returns the SplitIndex of the split containing the specified coordinate.
SuspendBinding | Instructs the grid to temporarily ignore IBindingList.ListChange notifications from the data source.
UpdateData | Updates any changes on the current row to the data source.
SetDataBinding (inherited from Frame) | Binds the grid to a DataSource at runtimeBinds the grid to a DataSource at runtime

Protected Methods

Dispose | Overloaded. Overriden. Called when the class is being disposed.
On_AddNew | Overriden. Raises the OnAddNew event.
On_Init | Overriden. Raises the OnInit event.
On_Scroll | Overriden. Raises the Scroll event.
OnAfterColEdit | Overriden. Raises the AfterColEdit event.
OnAfterColUpdate | Overriden. Raises the AfterColUpdate event.
OnAfterDelete | Overriden. Raises the AfterDelete event.
OnAfterFilter | Overriden. Raises the AfterFilter event.
OnAfterInsert | Overriden. Raises the AfterInsert event.
OnAfterSort | Overriden. Raises the AfterSort event.
OnAfterUpdate | Overriden. Raises the AfterUpdate event.
OnBeforeClose | Overriden. Raises the BeforeClose event.
OnBeforeColEdit | Overriden. Raises the BeforeColEdit event.
OnBeforeColUpdate | Overriden. Raises the BeforeColUpdate event.
OnBeforeDelete | Overriden. Raises the BeforeDelete event.
OnBeforeInsert | Overriden. Raises the BeforeInsert event.
OnBeforeOpen | Overriden. Raises the BeforeOpen event.
OnBeforeRowColChange | Overriden. Raises the BeforeRowColChange event.
OnBeforeUpdate | Overriden. Raises the BeforeUpdate event.
OnButtonClick | Overriden. Raises the ButtonClick event.
OnChange | Overriden. Raises the Change event.
OnColEdit | Overriden. Raises the ColEdit event.
OnCollapse | Overriden. Raises the Collapse event.
OnColMove | Overriden. Raises the ColMove event.
OnColResize | Overriden. Raises the ColResize event.
OnComboSelect | Overriden. Raises the ComboSelect event.
OnDataSourceChanged | Overriden. Raises the DataSourceChanged event.
OnError | Overriden. Raises the Error event.
OnExpand | Overriden. Raises the Expand event.
OnFetchCellStyle | Overriden. Raises the FetchCellStyle event.
OnFetchCellTips | Overriden. Raises the FetchCellTips event.
OnFetchGroupCellStyle | Overriden. Raises the FetchGroupCellStyle event.
OnFetchRowStyle | Overriden. Raises the FetchRowStyle event.
OnFetchScrollTips | Overriden. Raises the FetchScrollTips event.
OnFilter | Overriden. Raises the Filter event.
OnFilterButtonClick | Overriden. Raises the FilterButtonClick event.
OnFilterChange | Overriden. Raises the FilterChange event.
OnFirstRowChange | Overriden. Raises the FirstRowChange event.
OnFootClick | Overriden. Raises the FootClick event.
OnFormatText | Overriden. Raises the FormatText event.
OnGroupAggregate | Overriden. Raises the GroupAggregate event.
OnGroupColMove | Overriden. Raises the GroupColMove event.
OnGroupHeadClick | Overriden. Raises the GroupHeadClick event.
OnGroupText | Overriden. Raises the GroupText event.
OnHeadClick | Overriden. Raises the HeadClick event.
OnLeftColChange | Overriden. Raises the LeftColChange event.
OnOwnerDrawCell | Overriden. Raises the OwnerDrawCell event.
OnOwnerDrawCellPrint | Overriden. Raises the OwnerDrawCellPrint event.
OnOwnerDrawPageFooter | Overriden. Raises the OwnerDrawPageFooter event.
OnOwnerDrawPageHeader | Overriden. Raises the OwnerDrawPageHeader event.
OnRowColChange | Overriden. Raises the RowColChange event.
OnRowResize | Overriden. Raises the RowResize event.
OnSelChange | Overriden. Raises the SelChange event.
OnSort | Overriden. Raises the Sort event.
OnSplitChange | Overriden. Raises the SplitChange event.
OnUnboundColumnFetch | Overriden. Raises the UnboundColumnFetch event.
OnValueItemError | Overriden. Raises the ValueItemError event.
WndProc | Overriden. Processes Windows messages.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.AddCellStyle Method

C1TrueDBGrid.AddCellStyle Method

Controls the Style used to change the appearance for cells meeting the specified condition.

[Visual Basic]

Public Sub AddCellStyle( _

ByVal condition As CellStyleFlag, _

ByVal style As Style _

)

[C#]

public void AddCellStyle(

CellStyleFlag condition,

Style style

);

[Delphi]

public procedure AddCellStyle(

condition: CellStyleFlag;

style: Style

);

Parameters

condition

Combination of one or more CellStyleFlag enumerations.

style

Style object that specifies appearance attributes.

Remarks

This method allows you to control the font and color of cells within a grid, column, or split according to the status values (CellStyleFlag enumeration) specified by the condition argument.

Add the first four values together to specify multiple cell conditions. For example, a cell status value of 9 (CellStyleFlag.CurrentCell + CellStyleFlag.SelectedRow) denotes a current cell within a selected row. Also use a cell status value of 0 (CellStyleFlag.NormalCell) to refer to only those cells without any of the four basic cell conditions.

The style argument specifies the attributes that will override the default font and color characteristics for cells within an object. For example, the following code causes updated cells to be displayed in red:

· Visual Basic

· C#

· Delphi

Each time the AddCellStyle method is invoked, the specified cell condition is added to the list of existing conditions. Hence, by repeated use of this method it is possible to set up multiple conditions to affect the appearance of a grid, column, or split.

Note: If a cell condition already exists for a particular condition value, the new style setting replaces the existing one.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.AddRegexCellStyle Method

C1TrueDBGrid.AddRegexCellStyle Method

Controls the Style used to change the appearance of cells according to their contents.

[Visual Basic]

Public Sub AddRegexCellStyle( _

ByVal condition As CellStyleFlag, _

ByVal style As Style, _

ByVal regex As String _

)

[C#]

public void AddRegexCellStyle(

CellStyleFlag condition,

Style style,

string regex

);

[Delphi]

public procedure AddRegexCellStyle(

condition: CellStyleFlag;

style: Style;

regex: String

);

Parameters

condition

Combination of one or more CellStyleFlag enumerations.

style

Style object that specifies appearance attributes.

regex

A regular expression string.

Remarks

This method allows the font and color of cells within a grid, column, or split to be controlled according to their contents. The status values (CellStyleFlag enumeration) specified by the condition argument determine which cells are affected.

Add the first four values together to specify multiple cell conditions. For example, a cell status value of (CellStyleFlag.CurrentCell + CellStyleFlag.SelectedRow) denotes a current cell within a selected row. Also use a cell status value of (CellStyleFlag.NormalCell) to refer to only those cells without any of the four basic cell conditions. To designate that a cell condition should apply to all cells regardless of status, use a cell status value of CellStyleFlag.AllCells.

The regex argument is a regular expression string that describes the pattern matching to be performed on cell contents. The regular expressions supported by True DBGrid are a subset of standard Unix regular expression syntax:

p*

Any pattern followed by an asterisk matches zero or more occurrences of that pattern. For example, ab*c matches ac, abc, and abbcy (partial match).

p+

Any pattern followed by a plus sign matches one or more occurrences of that pattern. For example, ab+c matches abc and abbcy, but not ac.

[list]

A list of case-sensitive characters enclosed in brackets matches any one of those characters in the given position in the string. Character ranges can be used, as in [abcd], which is equivalent to [a-d]. Multiple ranges can also be used. For example, [A-Za-z0-9] matches any letter or digit. Bracketed patterns can also be combined with either the * or + operators. The pattern [A-Z]+ matches a sequence of one or more uppercase letters.

[^list]

If a list starts with a caret, it matches any character except those specified in the list.

. (period)

A period represents any single character.

^p

A caret at the beginning of a pattern forces a match to occur at the start of a cell. Otherwise, the pattern can match anywhere within a cell.

p$

A dollar sign at the end of a pattern forces a match to occur at the end of a cell. Otherwise, the pattern can match anywhere within a cell.

\c

Any character preceded by a backslash represents itself, unless enclosed in brackets, in which case the backslash is interpreted literally.

Any other character represents itself and will be compared with respect to case.

The style argument specifies the attributes that will override the default font and color characteristics for cells within an object. For example, the following code causes normal cells containing the letters "SQL" to be displayed in bold:

· Visual Basic

· C#

· Delphi

Each time the AddRegexCellStyle method is invoked, the specified cell condition is added to the list of existing conditions. Hence, by repeated use of this method it is possible to set up multiple conditions to affect the appearance of a grid, column, or split.

Note: If a cell condition already exists for a particular pair of condition and regex values, the new style setting replaces the existing one.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.CellContaining Method

C1TrueDBGrid.CellContaining Method

Returns the cell position for a set of coordinates.

[Visual Basic]

Public Function CellContaining( _

ByVal x As Integer, _

ByVal y As Integer, _

ByRef row As Integer, _

ByRef col As Integer _

) As Boolean

[C#]

public bool CellContaining(

int x,

int y,

out int row,

out int col

);

[Delphi]

public function CellContaining(

x: Int32;

y: Int32;

out row: Int32;

out col: Int32

): Boolean;

Parameters

x

The x-coordinate.

y

The y-coordinate.

row

The row under the coordinate pair.

col

The column index under the coordinate pair.

Return Value

A value indicating whether a data cell is beneath the specified coordinate pair.

Remarks

The CellContaining method combines the ColContaining and RowContaining methods into one call. If the coordinate pair specified by x and y points to a data cell, this method returns True, and the rowindex and colindex arguments receive zero-based indexes that identify the cell.

This method is useful when working with mouse and drag events when trying to determine where the user clicked or dropped another control in terms of a grid cell.

If the specified coordinate is outside of the grid's data area, this method returns False. Use the PointAt (Point) method to determine what kind of grid element, if any, is beneath the specified coordinate.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.ClearCellStyle Method

C1TrueDBGrid.ClearCellStyle Method

Removes a cell condition established with a previous call to the AddCellStyle method.

[Visual Basic]

Public Sub ClearCellStyle( _

ByVal condition As CellStyleFlag _

)

[C#]

public void ClearCellStyle(

CellStyleFlag condition

);

[Delphi]

public procedure ClearCellStyle(

condition: CellStyleFlag

);

Parameters

condition

Combination of one or more CellStyleFlag enumerations.

Remarks

The ClearCellStyle method removes a cell condition established with a previous call to the AddCellStyle method for the object in question. If no such cell condition exists, then calling this method has no effect.

If the condition argument is CellStyleFlag.AllCells, then all non-regex cell conditions are removed, regardless of status.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.ClearFields Method

C1TrueDBGrid.ClearFields Method

Restores the default grid layout.

[Visual Basic]

Public Sub ClearFields()

[C#]

public void ClearFields()

[Delphi]

public procedure ClearFields();

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.ClearRegexCellStyle Method

C1TrueDBGrid.ClearRegexCellStyle Method

Overload List

Removes a cell condition established with a previous call to the AddRegexCellStyle method.

[Visual Basic] Overloads Public Sub ClearRegexCellStyle(CellStyleFlag)

[C#] public void ClearRegexCellStyle(CellStyleFlag);

[Delphi] public procedure ClearRegexCellStyle(CellStyleFlag); overload;

Removes a cell condition established with a previous call to the AddRegexCellStyle method.

[Visual Basic] Overloads Public Sub ClearRegexCellStyle(CellStyleFlag, String)

[C#] public void ClearRegexCellStyle(CellStyleFlag, string);

[Delphi] public procedure ClearRegexCellStyle(CellStyleFlag; String); overload;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.ClearRegexCellStyle Method (CellStyleFlag)

C1TrueDBGrid.ClearRegexCellStyle Method (CellStyleFlag)

Previous Next

Removes a cell condition established with a previous call to the AddRegexCellStyle method.

[Visual Basic]

Overloads Public Sub ClearRegexCellStyle( _

ByVal condition As CellStyleFlag _

)

[C#]

public void ClearRegexCellStyle(

CellStyleFlag condition

);

[Delphi]

public procedure ClearRegexCellStyle(

condition: CellStyleFlag

); overload;

Parameters

condition

Combination of one or more CellStyleFlag enumerations.

Remarks

The ClearRegexCellStyle method removes a cell condition established with a previous call to the AddRegexCellStyle method for the object in question. If no such cell condition exists, then calling this method has no effect.

If regex is omitted, then all cell conditions for any regular expression matching the condition argument are removed. If condition is CellStyleFlag.AllCells, then all regex cell conditions are removed, regardless of status or expression.

If regex is supplied, then the single cell condition matching both arguments is removed. However, if condition is CellStyleFlag.AllCells, then all cell conditions for the specified regular expression are removed, regardless of status.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.ClearRegexCellStyle Method (CellStyleFlag, String)

C1TrueDBGrid.ClearRegexCellStyle Method (CellStyleFlag, String)

Previous Next

Removes a cell condition established with a previous call to the AddRegexCellStyle method.

[Visual Basic]

Overloads Public Sub ClearRegexCellStyle( _

ByVal condition As CellStyleFlag, _

ByVal regex As String _

)

[C#]

public void ClearRegexCellStyle(

CellStyleFlag condition,

string regex

);

[Delphi]

public procedure ClearRegexCellStyle(

condition: CellStyleFlag;

regex: String

); overload;

Parameters

condition

Combination of one or more CellStyleFlag enumerations.

regex

A regular expression string.

Remarks

The ClearRegexCellStyle method removes a cell condition established with a previous call to the AddRegexCellStyle method for the object in question. If no such cell condition exists, then calling this method has no effect.

If regex is omitted, then all cell conditions for any regular expression matching the condition argument are removed. If condition is CellStyleFlag.AllCells, then all regex cell conditions are removed, regardless of status or expression.

If regex is supplied, then the single cell condition matching both arguments is removed. However, if condition is CellStyleFlag.AllCells, then all cell conditions for the specified regular expression are removed, regardless of status.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.ColContaining Method

C1TrueDBGrid.ColContaining Method

Returns the column index for the column containing the specified X coordinate.

[Visual Basic]

Public Function ColContaining( _

ByVal x As Integer _

) As Integer

[C#]

public int ColContaining(

int x

);

[Delphi]

public function ColContaining(

x: Int32

): Int32;

Parameters

x

The horizontal coordinate (X value) in pixels.

Return Value

The index of the column in the DisplayColumns collection beneath the specified X coordinate.

Remarks

The ColContaining method returns the index value of the grid column containing the specified coordinate. This value ranges from 0 to Columns.Count - 1.

This method is useful when working with mouse and drag events when trying to determine where the user clicked or dropped another control in terms of a grid column.

If coordinate is outside of the grid's data area, this method returns -1.

The ColContaining method returns the index value of the column indicated, not the visible column position. For example, if coordinate falls within the first visible column, but two columns have been scrolled off the left side of the control, the ColContaining method returns 2, not 0 (assuming that the user did not move any columns previously).

Note: Convert the coordinate argument to pixels, even if the container's ScaleMode setting specifies a different unit of measurement.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.CollapseBand Method

C1TrueDBGrid.CollapseBand Method

Collapses a given band in a hierarchical grid.

[Visual Basic]

Public Function CollapseBand( _

ByVal band As Integer _

) As Boolean

[C#]

public bool CollapseBand(

int band

);

[Delphi]

public function CollapseBand(

band: Int32

): Boolean;

Remarks

The CollapseBand method collapses all rows in a hierarchical grid display for the specified band. This is a useful way to quickly collapse all of the records in the band with one step, instead of one record at a time. Note that all of the Bands that are below the one specified in the hierarchy will also be collapsed.

Use the GetBand method to obtain the band number corresponding to a particular grid column.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.CollapseChild Method

C1TrueDBGrid.CollapseChild Method

Closes the Child Grid.

[Visual Basic]

Public Sub CollapseChild()

[C#]

public void CollapseChild()

[Delphi]

public procedure CollapseChild();

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.CollapseGroupRow Method

C1TrueDBGrid.CollapseGroupRow Method

Collapses a grouped row.

[Visual Basic]

Public Sub CollapseGroupRow( _

ByVal row As Integer _

)

[C#]

public void CollapseGroupRow(

int row

);

[Delphi]

public procedure CollapseGroupRow(

row: Int32

);

Remarks

Expanding/collapsing a row in a GroupBy grid also expands/collapses the row in a split that shares the same vertical scroll group.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.Delete Method

C1TrueDBGrid.Delete Method

Deletes the current row.

[Visual Basic]

Overrides Public Sub Delete()

[C#]

override public void Delete()

[Delphi]

public procedure Delete(); overload; override;

Remarks

The Delete method deletes the current record, then automatically moves to the next available record. If the last record is deleted, then EOF becomes the current position.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.Dispose Method

C1TrueDBGrid.Dispose Method

Called when the class is being disposed.

[Visual Basic]

Overrides Protected Sub Dispose( _

ByVal disposing As Boolean _

)

[C#]

override protected void Dispose(

bool disposing

);

[Delphi]

strict protected procedure Dispose(

disposing: Boolean

); overload; override;

Parameters

disposing

True to cleanup.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.ExpandBand Method

C1TrueDBGrid.ExpandBand Method

Expand the given band in a hierarchical grid.

[Visual Basic]

Public Function ExpandBand( _

ByVal band As Integer _

) As Boolean

[C#]

public bool ExpandBand(

int band

);

[Delphi]

public function ExpandBand(

band: Int32

): Boolean;

Remarks

The ExpandBand method expands all rows in a hierarchical grid display for the specified band. This is a useful way to quickly expand the records in the specified band with one step, instead of one row at a time.

Use the GetBand method to obtain the band number corresponding to a particular grid column.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.ExpandChild Method

C1TrueDBGrid.ExpandChild Method

Displays the Child grid.

[Visual Basic]

Public Sub ExpandChild()

[C#]

public void ExpandChild()

[Delphi]

public procedure ExpandChild();

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.ExpandGroupRow Method

C1TrueDBGrid.ExpandGroupRow Method

Expands the given row in GroupBy DataView.

[Visual Basic]

Public Sub ExpandGroupRow( _

ByVal row As Integer _

)

[C#]

public void ExpandGroupRow(

int row

);

[Delphi]

public procedure ExpandGroupRow(

row: Int32

);

Parameters

row

The row to expand.

Remarks

Expanding/collapsing a row in a GroupBy grid also expands/collapses the row in a split that shares the same vertical scroll group.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.ExportTo Method

C1TrueDBGrid.ExportTo Method

Overload List

Opens a dialog in which the user can select the export format.

[Visual Basic] Overloads Public Sub ExportTo()

[C#] public void ExportTo();

[Delphi] public procedure ExportTo(); overload;

Exports the grid based upon the file extension.

[Visual Basic] Overloads Public Sub ExportTo(String)

[C#] public void ExportTo(string);

[Delphi] public procedure ExportTo(String); overload;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.ExportTo Method ()

C1TrueDBGrid.ExportTo Method ()

Previous Next

Opens a dialog in which the user can select the export format.

[Visual Basic]

Overloads Public Sub ExportTo()

[C#]

public void ExportTo()

[Delphi]

public procedure ExportTo(); overload;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.ExportTo Method (String)

C1TrueDBGrid.ExportTo Method (String)

Previous Next

Exports the grid based upon the file extension.

[Visual Basic]

Overloads Public Sub ExportTo( _

ByVal filename As String _

)

[C#]

public void ExportTo(

string filename

);

[Delphi]

public procedure ExportTo(

filename: String

); overload;

Remarks

You can export the grid based on a file extension. For example:

table.rtf – Exports to an RTF file

table.xls – Exports to an Excel file

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.ExportToDelimitedFile Method

C1TrueDBGrid.ExportToDelimitedFile Method

Overload List

Exports the specified rows from the grid to the specified file as delimited text.

[Visual Basic] Overloads Public Sub ExportToDelimitedFile(String, RowSelectorEnum)

[C#] public void ExportToDelimitedFile(string, RowSelectorEnum);

[Delphi] public procedure ExportToDelimitedFile(String; RowSelectorEnum); overload;

Exports the specified rows from the grid to the specified file as delimited text.

[Visual Basic] Overloads Public Sub ExportToDelimitedFile(String, RowSelectorEnum, String)

[C#] public void ExportToDelimitedFile(string, RowSelectorEnum, string);

[Delphi] public procedure ExportToDelimitedFile(String; RowSelectorEnum; String); overload;

Exports the specified rows from the grid to the specified file as delimited text.

[Visual Basic] Overloads Public Sub ExportToDelimitedFile(String, RowSelectorEnum, String, String)

[C#] public void ExportToDelimitedFile(string, RowSelectorEnum, string, string);

[Delphi] public procedure ExportToDelimitedFile(String; RowSelectorEnum; String; String); overload;

Exports the specified rows from the grid to the specified file as delimited text.

[Visual Basic] Overloads Public Sub ExportToDelimitedFile(String, RowSelectorEnum, String, String, String)

[C#] public void ExportToDelimitedFile(string, RowSelectorEnum, string, string, string);

[Delphi] public procedure ExportToDelimitedFile(String; RowSelectorEnum; String; String; String); overload;

Exports the specified rows from the grid to the specified file as delimited text.

[Visual Basic] Overloads Public Sub ExportToDelimitedFile(String, RowSelectorEnum, String, String, String, Boolean)

[C#] public void ExportToDelimitedFile(string, RowSelectorEnum, string, string, string, bool);

[Delphi] public procedure ExportToDelimitedFile(String; RowSelectorEnum; String; String; String; Boolean); overload;

Exports the specified rows from the grid to the specified file as delimited text.

[Visual Basic] Overloads Public Sub ExportToDelimitedFile(String, RowSelectorEnum, String, String, String, Boolean, String)

[C#] public void ExportToDelimitedFile(string, RowSelectorEnum, string, string, string, bool, string);

[Delphi] public  procedure ExportToDelimitedFile(String;
RowSelectorEnum; String; String; String; Boolean; String);
overload;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.ExportToDelimitedFile Method (String, RowSelectorEnum)

C1TrueDBGrid.ExportToDelimitedFile Method (String, RowSelectorEnum)

Previous Next

Exports the specified rows from the grid to the specified file as delimited text.

[Visual Basic]

Overloads Public Sub ExportToDelimitedFile( _

ByVal filename As String, _

ByVal selector As RowSelectorEnum _

)

[C#]

public void ExportToDelimitedFile(

string filename,

RowSelectorEnum selector

);

[Delphi]

public procedure ExportToDelimitedFile(

filename: String;

selector: RowSelectorEnum

); overload;

Remarks

The ExportToDelimitedFile method exports the specified rows from the grid to the specified file as delimited ASCII text, where each row (record) occupies its own line. Fields are delimited by the delim string (the default delim is empty). Field values can also be placed between a prefix string and suffix string.

The selector argument determines the rows to be exported.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.ExportToDelimitedFile Method (String, RowSelectorEnum, String)

C1TrueDBGrid.ExportToDelimitedFile Method (String, RowSelectorEnum, String)

Previous Next

Exports the specified rows from the grid to the specified file as delimited text.

[Visual Basic]

Overloads Public Sub ExportToDelimitedFile( _

ByVal filename As String, _

ByVal selector As RowSelectorEnum, _

ByVal delim As String _

)

[C#]

public void ExportToDelimitedFile(

string filename,

RowSelectorEnum selector,

string delim

);

[Delphi]

public procedure ExportToDelimitedFile(

filename: String;

selector: RowSelectorEnum;

delim: String

); overload;

Remarks

The ExportToDelimitedFile method exports the specified rows from the grid to the specified file as delimited ASCII text, where each row (record) occupies its own line. Fields are delimited by the delim string (the default delim is empty). Field values can also be placed between a prefix string and suffix string.

The selector argument determines the rows to be exported.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.ExportToDelimitedFile Method (String, RowSelectorEnum, String, String)

C1TrueDBGrid.ExportToDelimitedFile Method (String, RowSelectorEnum, String, String)

Previous Next

Exports the specified rows from the grid to the specified file as delimited text.

[Visual Basic]

Overloads Public Sub ExportToDelimitedFile( _

ByVal filename As String, _

ByVal selector As RowSelectorEnum, _

ByVal delim As String, _

ByVal prefix As String _

)

[C#]

public void ExportToDelimitedFile(

string filename,

RowSelectorEnum selector,

string delim,

string prefix

);

[Delphi]

public procedure ExportToDelimitedFile(

filename: String;

selector: RowSelectorEnum;

delim: String;

prefix: String

); overload;

Remarks

The ExportToDelimitedFile method exports the specified rows from the grid to the specified file as delimited ASCII text, where each row (record) occupies its own line. Fields are delimited by the delim string (the default delim is empty). Field values can also be placed between a prefix string and suffix string.

The selector argument determines the rows to be exported.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.ExportToDelimitedFile Method (String, RowSelectorEnum, String, String, String)

C1TrueDBGrid.ExportToDelimitedFile Method (String, RowSelectorEnum, String, String, String)

Previous Next

Exports the specified rows from the grid to the specified file as delimited text.

[Visual Basic]

Overloads Public Sub ExportToDelimitedFile( _

ByVal filename As String, _

ByVal selector As RowSelectorEnum, _

ByVal delim As String, _

ByVal prefix As String, _

ByVal suffix As String _

)

[C#]

public void ExportToDelimitedFile(

string filename,

RowSelectorEnum selector,

string delim,

string prefix,

string suffix

);

[Delphi]

public procedure ExportToDelimitedFile(

filename: String;

selector: RowSelectorEnum;

delim: String;

prefix: String;

suffix: String

); overload;

Remarks

The ExportToDelimitedFile method exports the specified rows from the grid to the specified file as delimited ASCII text, where each row (record) occupies its own line. Fields are delimited by the delim string (the default delim is empty). Field values can also be placed between a prefix string and suffix string.

The selector argument determines the rows to be exported.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.ExportToDelimitedFile Method (String, RowSelectorEnum, String, String, String, Boolean)

C1TrueDBGrid.ExportToDelimitedFile Method (String, RowSelectorEnum, String, String, String, Boolean)

Previous Next

Exports the specified rows from the grid to the specified file as delimited text.

[Visual Basic]

Overloads Public Sub ExportToDelimitedFile( _

ByVal filename As String, _

ByVal selector As RowSelectorEnum, _

ByVal delim As String, _

ByVal prefix As String, _

ByVal suffix As String, _

ByVal headers As Boolean _

)

[C#]

public void ExportToDelimitedFile(

string filename,

RowSelectorEnum selector,

string delim,

string prefix,

string suffix,

bool headers

);

[Delphi]

public procedure ExportToDelimitedFile(

filename: String;

selector: RowSelectorEnum;

delim: String;

prefix: String;

suffix: String;

headers: Boolean

); overload;

Remarks

The ExportToDelimitedFile method exports the specified rows from the grid to the specified file as delimited ASCII text, where each row (record) occupies its own line. Fields are delimited by the delim string (the default delim is empty). Field values can also be placed between a prefix string and suffix string.

The selector argument determines the rows to be exported.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.ExportToDelimitedFile Method (String, RowSelectorEnum, String, String, String, Boolean, String)

C1TrueDBGrid.ExportToDelimitedFile Method (String, RowSelectorEnum, String, String, String, Boolean, String)

Previous Next

Exports the specified rows from the grid to the specified file as delimited text.

[Visual Basic]

Overloads Public Sub ExportToDelimitedFile( _

ByVal filename As String, _

ByVal selector As RowSelectorEnum, _

ByVal delim As String, _

ByVal prefix As String, _

ByVal suffix As String, _

ByVal headers As Boolean, _

ByVal encoding As String _

)

[C#]

public void ExportToDelimitedFile(

string filename,

RowSelectorEnum selector,

string delim,

string prefix,

string suffix,

bool headers,

string encoding

);

[Delphi]

public procedure ExportToDelimitedFile(

filename: String;

selector: RowSelectorEnum;

delim: String;

prefix: String;

suffix: String;

headers: Boolean;

encoding: String

); overload;

Remarks

The ExportToDelimitedFile method exports the specified rows from the grid to the specified file as delimited ASCII text, where each row (record) occupies its own line. Fields are delimited by the delim string (the default delim is empty). Field values can also be placed between a prefix string and suffix string.

The selector argument determines the rows to be exported.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.ExportToExcel Method

C1TrueDBGrid.ExportToExcel Method

Overload List

Exports the grid to a XLS file.

[Visual Basic] Overloads Public Sub ExportToExcel(String)

[C#] public void ExportToExcel(string);

[Delphi] public procedure ExportToExcel(String); overload;

Exports the grid to a XLS file.

[Visual Basic] Overloads Public Sub ExportToExcel(String, Boolean)

[C#] public void ExportToExcel(string, bool);

[Delphi] public procedure ExportToExcel(String; Boolean); overload;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.ExportToExcel Method (String)

C1TrueDBGrid.ExportToExcel Method (String)

Previous Next

Exports the grid to a XLS file.

[Visual Basic]

Overloads Public Sub ExportToExcel( _

ByVal filename As String _

)

[C#]

public void ExportToExcel(

string filename

);

[Delphi]

public procedure ExportToExcel(

filename: String

); overload;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.ExportToExcel Method (String, Boolean)

C1TrueDBGrid.ExportToExcel Method (String, Boolean)

Previous Next

Exports the grid to a XLS file.

[Visual Basic]

Overloads Public Sub ExportToExcel( _

ByVal filename As String, _

ByVal onePagePerSheet As Boolean _

)

[C#]

public void ExportToExcel(

string filename,

bool onePagePerSheet

);

[Delphi]

public procedure ExportToExcel(

filename: String;

onePagePerSheet: Boolean

); overload;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.ExportToHTML Method

C1TrueDBGrid.ExportToHTML Method

Exports the grid to an HTML file.

[Visual Basic]

Public Sub ExportToHTML( _

ByVal filename As String _

)

[C#]

public void ExportToHTML(

string filename

);

[Delphi]

public procedure ExportToHTML(

filename: String

);

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.ExportToPDF Method

C1TrueDBGrid.ExportToPDF Method

Exports the grid to a PDF file.

[Visual Basic]

Public Sub ExportToPDF( _

ByVal filename As String _

)

[C#]

public void ExportToPDF(

string filename

);

[Delphi]

public procedure ExportToPDF(

filename: String

);

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.ExportToRTF Method

C1TrueDBGrid.ExportToRTF Method

Exports the grid to an RTF file.

[Visual Basic]

Public Sub ExportToRTF( _

ByVal filename As String _

)

[C#]

public void ExportToRTF(

string filename

);

[Delphi]

public procedure ExportToRTF(

filename: String

);

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.GetBand Method

C1TrueDBGrid.GetBand Method

Obtains the band given a column index.

[Visual Basic]

Public Function GetBand( _

ByVal columnIndex As Integer _

) As Integer

[C#]

public int GetBand(

int columnIndex

);

[Delphi]

public function GetBand(

columnIndex: Int32

): Int32;

Remarks

The GetBand method returns the band number corresponding to a grid column. The return value is used with the CollapseBand and ExpandBand methods when manipulating master-detail displays in code.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.GetBandRow Method

C1TrueDBGrid.GetBandRow Method

Obtains the underlying row object for the given band and row.

[Visual Basic]

Public Function GetBandRow( _

ByVal band As Integer, _

ByVal row As Integer _

) As Object

[C#]

public object GetBandRow(

int band,

int row

);

[Delphi]

public function GetBandRow(

band: Int32;

row: Int32

): Object;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.InsertHorizontalSplit Method

C1TrueDBGrid.InsertHorizontalSplit Method

Inserts new horizontal splits at the given position.

[Visual Basic]

Public Sub InsertHorizontalSplit( _

ByVal idx As Integer _

)

[C#]

public void InsertHorizontalSplit(

int idx

);

[Delphi]

public procedure InsertHorizontalSplit(

idx: Int32

);

Remarks

This property inserts a horizontal split into the grid at the index specified. By default the grid has one horizontal split.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.InsertVerticalSplit Method

C1TrueDBGrid.InsertVerticalSplit Method

Inserts vertical splits at the given position.

[Visual Basic]

Public Sub InsertVerticalSplit( _

ByVal idx As Integer _

)

[C#]

public void InsertVerticalSplit(

int idx

);

[Delphi]

public procedure InsertVerticalSplit(

idx: Int32

);

Remarks

This property inserts a vertical split into the grid at the index specified. By default the grid has one vertical split.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.LoadLayout Method

C1TrueDBGrid.LoadLayout Method

Overload List

Loads a saved layout from the given stream.

[Visual Basic] Overloads Public Sub LoadLayout(Stream)

[C#] public void LoadLayout(Stream);

[Delphi] public procedure LoadLayout(Stream); overload;

Loads a saved layout from the given file.

[Visual Basic] Overloads Public Sub LoadLayout(String)

[C#] public void LoadLayout(string);

[Delphi] public procedure LoadLayout(String); overload;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.LoadLayout Method (Stream)

C1TrueDBGrid.LoadLayout Method (Stream)

Previous Next

Loads a saved layout from the given stream.

[Visual Basic]

Overloads Public Sub LoadLayout( _

ByVal stream As Stream _

)

[C#]

public void LoadLayout(

Stream stream

);

[Delphi]

public procedure LoadLayout(

stream: Stream

); overload;

Parameters

stream

The Stream containing a saved layout.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.LoadLayout Method (String)

C1TrueDBGrid.LoadLayout Method (String)

Previous Next

Loads a saved layout from the given file.

[Visual Basic]

Overloads Public Sub LoadLayout( _

ByVal filename As String _

)

[C#]

public void LoadLayout(

string filename

);

[Delphi]

public procedure LoadLayout(

filename: String

); overload;

Parameters

filename

The file containing a saved layout.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.MoveFirst Method

C1TrueDBGrid.MoveFirst Method

Positions to the first row of the datasource.

[Visual Basic]

Overridable Public Sub MoveFirst()

[C#]

virtual public void MoveFirst()

[Delphi]

public procedure MoveFirst(); virtual;

Remarks

The MoveFirst method operates like its DataSet counterpart; it moves the current record to the first record available.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.MoveLast Method

C1TrueDBGrid.MoveLast Method

Positions to the last row of the datasource.

[Visual Basic]

Overridable Public Sub MoveLast()

[C#]

virtual public void MoveLast()

[Delphi]

public procedure MoveLast(); virtual;

Remarks

The MoveLast method operates like its DataSet counterpart; it moves the current record to the last record available.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.MoveNext Method

C1TrueDBGrid.MoveNext Method

Positions to the next row of the datasource.

[Visual Basic]

Overridable Public Sub MoveNext()

[C#]

virtual public void MoveNext()

[Delphi]

public procedure MoveNext(); virtual;

Remarks

The MoveNext method operates like its DataSet counterpart; it moves the current record to the next record available.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.MovePrevious Method

C1TrueDBGrid.MovePrevious Method

Positions to the previous row of the datasource.

[Visual Basic]

Overridable Public Sub MovePrevious()

[C#]

virtual public void MovePrevious()

[Delphi]

public procedure MovePrevious(); virtual;

Remarks

The MovePrevious method operates like its DataSet counterpart; it moves the current record to the next previous record available.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.MoveRelative Method

C1TrueDBGrid.MoveRelative Method

Overload List

Moves the current row positions of the grid by the given offset.

[Visual Basic] Overloads Overridable Public Sub MoveRelative(Integer)

[C#] virtual public void MoveRelative(int);

[Delphi] public procedure MoveRelative(Int32); overload; virtual;

Moves the current row positions of the grid by the given offset from the given row.

[Visual Basic] Overloads Overridable Public Sub MoveRelative(Integer, Integer)

[C#] virtual public void MoveRelative(int, int);

[Delphi] public procedure MoveRelative(Int32; Int32); overload; virtual;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.MoveRelative Method (Int32)

C1TrueDBGrid.MoveRelative Method (Int32)

Previous Next

Moves the current row positions of the grid by the given offset.

[Visual Basic]

Overloads Overridable Public Sub MoveRelative( _

ByVal offset As Integer _

)

[C#]

virtual public void MoveRelative(

int offset

);

[Delphi]

public procedure MoveRelative(

offset: Int32

); overload; virtual;

Parameters

offset

The number of records to move. A positive value indicates forward movement; a negative value indicates backward movement.

Remarks

The MoveRelative method operates like the Move method of the DataSet object; it moves the current record offset rows relative to the specified row index.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.MoveRelative Method (Int32, Int32)

C1TrueDBGrid.MoveRelative Method (Int32, Int32)

Previous Next

Moves the current row positions of the grid by the given offset from the given row.

[Visual Basic]

Overloads Overridable Public Sub MoveRelative( _

ByVal offset As Integer, _

ByVal row As Integer _

)

[C#]

virtual public void MoveRelative(

int offset,

int row

);

[Delphi]

public procedure MoveRelative(

offset: Int32;

row: Int32

); overload; virtual;

Parameters

offset

The number of records to move. A positive value indicates forward movement; a negative value indicates backward movement.

row

The origin of the relative movement.

Remarks

The MoveRelative method operates like the Move method of the DataSet object; it moves the current record offset rows relative to the specified row index.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.On_AddNew Method

C1TrueDBGrid.On_AddNew Method

Raises the OnAddNew event.

[Visual Basic]

Overrides Protected Sub On_AddNew( _

ByVal e As EventArgs _

)

[C#]

override protected void On_AddNew(

EventArgs e

);

[Delphi]

strict protected procedure On_AddNew(

e: EventArgs

); override;

Parameters

e

A System.EventArgs that contains the event data.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.On_Init Method

C1TrueDBGrid.On_Init Method

Raises the OnInit event.

[Visual Basic]

Overrides Protected Sub On_Init( _

ByVal e As EventArgs _

)

[C#]

override protected void On_Init(

EventArgs e

);

[Delphi]

strict protected procedure On_Init(

e: EventArgs

); override;

Parameters

e

A System.EventArgs that contains the event data.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.On_Scroll Method

C1TrueDBGrid.On_Scroll Method

Raises the Scroll event.

[Visual Basic]

Overrides Protected Sub On_Scroll( _

ByVal e As CancelEventArgs _

)

[C#]

override protected void On_Scroll(

CancelEventArgs e

);

[Delphi]

strict protected procedure On_Scroll(

e: CancelEventArgs

); override;

Parameters

e

A CancelEventArgs that contains the event data.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.OnAfterColEdit Method

C1TrueDBGrid.OnAfterColEdit Method

Raises the AfterColEdit event.

[Visual Basic]

Overrides Protected Sub OnAfterColEdit( _

ByVal e As ColEventArgs _

)

[C#]

override protected void OnAfterColEdit(

ColEventArgs e

);

[Delphi]

strict protected procedure OnAfterColEdit(

e: ColEventArgs

); override;

Parameters

e

A ColEventArgs that contains the event data.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.OnAfterColUpdate Method

C1TrueDBGrid.OnAfterColUpdate Method

Raises the AfterColUpdate event.

[Visual Basic]

Overrides Protected Sub OnAfterColUpdate( _

ByVal e As ColEventArgs _

)

[C#]

override protected void OnAfterColUpdate(

ColEventArgs e

);

[Delphi]

strict protected procedure OnAfterColUpdate(

e: ColEventArgs

); override;

Parameters

e

A ColEventArgs that contains the event data.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.OnAfterDelete Method

C1TrueDBGrid.OnAfterDelete Method

Raises the AfterDelete event.

[Visual Basic]

Overrides Protected Sub OnAfterDelete( _

ByVal e As EventArgs _

)

[C#]

override protected void OnAfterDelete(

EventArgs e

);

[Delphi]

strict protected procedure OnAfterDelete(

e: EventArgs

); override;

Parameters

e

A System.EventArgs that contains the event data.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.OnAfterFilter Method

C1TrueDBGrid.OnAfterFilter Method

Raises the AfterFilter event.

[Visual Basic]

Overrides Protected Sub OnAfterFilter( _

ByVal e As FilterEventArgs _

)

[C#]

override protected void OnAfterFilter(

FilterEventArgs e

);

[Delphi]

strict protected procedure OnAfterFilter(

e: FilterEventArgs

); override;

Parameters

e

A FilterEventArgs that contains the event data.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.OnAfterInsert Method

C1TrueDBGrid.OnAfterInsert Method

Raises the AfterInsert event.

[Visual Basic]

Overrides Protected Sub OnAfterInsert( _

ByVal e As EventArgs _

)

[C#]

override protected void OnAfterInsert(

EventArgs e

);

[Delphi]

strict protected procedure OnAfterInsert(

e: EventArgs

); override;

Parameters

e

A System.EventArgs that contains the event data.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.OnAfterSort Method

C1TrueDBGrid.OnAfterSort Method

Raises the AfterSort event.

[Visual Basic]

Overrides Protected Sub OnAfterSort( _

ByVal e As FilterEventArgs _

)

[C#]

override protected void OnAfterSort(

FilterEventArgs e

);

[Delphi]

strict protected procedure OnAfterSort(

e: FilterEventArgs

); override;

Parameters

e

A FilterEventArgs that contains the event data.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.OnAfterUpdate Method

C1TrueDBGrid.OnAfterUpdate Method

Raises the AfterUpdate event.

[Visual Basic]

Overrides Protected Sub OnAfterUpdate( _

ByVal e As EventArgs _

)

[C#]

override protected void OnAfterUpdate(

EventArgs e

);

[Delphi]

strict protected procedure OnAfterUpdate(

e: EventArgs

); override;

Parameters

e

A System.EventArgs that contains the event data.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.OnBeforeClose Method

C1TrueDBGrid.OnBeforeClose Method

Raises the BeforeClose event.

[Visual Basic]

Overrides Protected Sub OnBeforeClose( _

ByVal e As CancelEventArgs _

)

[C#]

override protected void OnBeforeClose(

CancelEventArgs e

);

[Delphi]

strict protected procedure OnBeforeClose(

e: CancelEventArgs

); override;

Parameters

e

A CancelEventArgs that contains the event data.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.OnBeforeColEdit Method

C1TrueDBGrid.OnBeforeColEdit Method

Raises the BeforeColEdit event.

[Visual Basic]

Overrides Protected Sub OnBeforeColEdit( _

ByVal e As BeforeColEditEventArgs _

)

[C#]

override protected void OnBeforeColEdit(

BeforeColEditEventArgs e

);

[Delphi]

strict protected procedure OnBeforeColEdit(

e: BeforeColEditEventArgs

); override;

Parameters

e

A BeforeColEditEventArgs that contains the event data.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.OnBeforeColUpdate Method

C1TrueDBGrid.OnBeforeColUpdate Method

Raises the BeforeColUpdate event.

[Visual Basic]

Overrides Protected Sub OnBeforeColUpdate( _

ByVal e As BeforeColUpdateEventArgs _

)

[C#]

override protected void OnBeforeColUpdate(

BeforeColUpdateEventArgs e

);

[Delphi]

strict protected procedure OnBeforeColUpdate(

e: BeforeColUpdateEventArgs

); override;

Parameters

e

A BeforeColUpdateEventArgs that contains the event data.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.OnBeforeDelete Method

C1TrueDBGrid.OnBeforeDelete Method

Raises the BeforeDelete event.

[Visual Basic]

Overrides Protected Sub OnBeforeDelete( _

ByVal e As CancelEventArgs _

)

[C#]

override protected void OnBeforeDelete(

CancelEventArgs e

);

[Delphi]

strict protected procedure OnBeforeDelete(

e: CancelEventArgs

); override;

Parameters

e

A CancelEventArgs that contains the event data.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.OnBeforeInsert Method

C1TrueDBGrid.OnBeforeInsert Method

Raises the BeforeInsert event.

[Visual Basic]

Overrides Protected Sub OnBeforeInsert( _

ByVal e As CancelEventArgs _

)

[C#]

override protected void OnBeforeInsert(

CancelEventArgs e

);

[Delphi]

strict protected procedure OnBeforeInsert(

e: CancelEventArgs

); override;

Parameters

e

A CancelEventArgs that contains the event data.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.OnBeforeOpen Method

C1TrueDBGrid.OnBeforeOpen Method

Raises the BeforeOpen event.

[Visual Basic]

Overrides Protected Sub OnBeforeOpen( _

ByVal e As CancelEventArgs _

)

[C#]

override protected void OnBeforeOpen(

CancelEventArgs e

);

[Delphi]

strict protected procedure OnBeforeOpen(

e: CancelEventArgs

); override;

Parameters

e

A CancelEventArgs that contains the event data.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.OnBeforeRowColChange Method

C1TrueDBGrid.OnBeforeRowColChange Method

Raises the BeforeRowColChange event.

[Visual Basic]

Overrides Protected Sub OnBeforeRowColChange( _

ByVal e As CancelEventArgs _

)

[C#]

override protected void OnBeforeRowColChange(

CancelEventArgs e

);

[Delphi]

strict protected procedure OnBeforeRowColChange(

e: CancelEventArgs

); override;

Parameters

e

A CancelEventArgs that contains the event data.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.OnBeforeUpdate Method

C1TrueDBGrid.OnBeforeUpdate Method

Raises the BeforeUpdate event.

[Visual Basic]

Overrides Protected Sub OnBeforeUpdate( _

ByVal e As CancelEventArgs _

)

[C#]

override protected void OnBeforeUpdate(

CancelEventArgs e

);

[Delphi]

strict protected procedure OnBeforeUpdate(

e: CancelEventArgs

); override;

Parameters

e

A CancelEventArgs that contains the event data.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.OnButtonClick Method

C1TrueDBGrid.OnButtonClick Method

Raises the ButtonClick event.

[Visual Basic]

Overrides Protected Sub OnButtonClick( _

ByVal e As ColEventArgs _

)

[C#]

override protected void OnButtonClick(

ColEventArgs e

);

[Delphi]

strict protected procedure OnButtonClick(

e: ColEventArgs

); override;

Parameters

e

A ColEventArgs that contains the event data.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.OnChange Method

C1TrueDBGrid.OnChange Method

Raises the Change event.

[Visual Basic]

Overrides Protected Sub OnChange( _

ByVal e As EventArgs _

)

[C#]

override protected void OnChange(

EventArgs e

);

[Delphi]

strict protected procedure OnChange(

e: EventArgs

); override;

Parameters

e

A System.EventArgs that contains the event data.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.OnColEdit Method

C1TrueDBGrid.OnColEdit Method

Raises the ColEdit event.

[Visual Basic]

Overrides Protected Sub OnColEdit( _

ByVal e As ColEventArgs _

)

[C#]

override protected void OnColEdit(

ColEventArgs e

);

[Delphi]

strict protected procedure OnColEdit(

e: ColEventArgs

); override;

Parameters

e

A ColEventArgs that contains the event data.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.OnCollapse Method

C1TrueDBGrid.OnCollapse Method

Raises the Collapse event.

[Visual Basic]

Overrides Protected Sub OnCollapse( _

ByVal e As BandEventArgs _

)

[C#]

override protected void OnCollapse(

BandEventArgs e

);

[Delphi]

strict protected procedure OnCollapse(

e: BandEventArgs

); override;

Parameters

e

A BandEventArgs that contains the event data.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.OnColMove Method

C1TrueDBGrid.OnColMove Method

Raises the ColMove event.

[Visual Basic]

Overrides Protected Sub OnColMove( _

ByVal e As ColMoveEventArgs _

)

[C#]

override protected void OnColMove(

ColMoveEventArgs e

);

[Delphi]

strict protected procedure OnColMove(

e: ColMoveEventArgs

); override;

Parameters

e

A ColMoveEventArgs that contains the event data.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.OnColResize Method

C1TrueDBGrid.OnColResize Method

Raises the ColResize event.

[Visual Basic]

Overrides Protected Sub OnColResize( _

ByVal e As ColResizeEventArgs _

)

[C#]

override protected void OnColResize(

ColResizeEventArgs e

);

[Delphi]

strict protected procedure OnColResize(

e: ColResizeEventArgs

); override;

Parameters

e

A ColResizeEventArgs that contains the event data.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.OnComboSelect Method

C1TrueDBGrid.OnComboSelect Method

Raises the ComboSelect event.

[Visual Basic]

Overrides Protected Sub OnComboSelect( _

ByVal e As ColEventArgs _

)

[C#]

override protected void OnComboSelect(

ColEventArgs e

);

[Delphi]

strict protected procedure OnComboSelect(

e: ColEventArgs

); override;

Parameters

e

A ColEventArgs that contains the event data.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.OnDataSourceChanged Method

C1TrueDBGrid.OnDataSourceChanged Method

Raises the DataSourceChanged event.

[Visual Basic]

Overrides Protected Sub OnDataSourceChanged( _

ByVal e As EventArgs _

)

[C#]

override protected void OnDataSourceChanged(

EventArgs e

);

[Delphi]

strict protected procedure OnDataSourceChanged(

e: EventArgs

); override;

Parameters

e

A System.EventArgs that contains the event data.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.OnError Method

C1TrueDBGrid.OnError Method

Raises the Error event.

[Visual Basic]

Overrides Protected Sub OnError( _

ByVal e As ErrorEventArgs _

)

[C#]

override protected void OnError(

ErrorEventArgs e

);

[Delphi]

strict protected procedure OnError(

e: ErrorEventArgs

); override;

Parameters

e

A ErrorEventArgs that contains the event data.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.OnExpand Method

C1TrueDBGrid.OnExpand Method

Raises the Expand event.

[Visual Basic]

Overrides Protected Sub OnExpand( _

ByVal e As BandEventArgs _

)

[C#]

override protected void OnExpand(

BandEventArgs e

);

[Delphi]

strict protected procedure OnExpand(

e: BandEventArgs

); override;

Parameters

e

A BandEventArgs that contains the event data.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.OnFetchCellStyle Method

C1TrueDBGrid.OnFetchCellStyle Method

Raises the FetchCellStyle event.

[Visual Basic]

Overrides Protected Sub OnFetchCellStyle( _

ByVal e As FetchCellStyleEventArgs _

)

[C#]

override protected void OnFetchCellStyle(

FetchCellStyleEventArgs e

);

[Delphi]

strict protected procedure OnFetchCellStyle(

e: FetchCellStyleEventArgs

); override;

Parameters

e

A FetchCellStyleEventArgs that contains the event data.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.OnFetchCellTips Method

C1TrueDBGrid.OnFetchCellTips Method

Raises the FetchCellTips event.

[Visual Basic]

Overrides Protected Sub OnFetchCellTips( _

ByVal e As FetchCellTipsEventArgs _

)

[C#]

override protected void OnFetchCellTips(

FetchCellTipsEventArgs e

);

[Delphi]

strict protected procedure OnFetchCellTips(

e: FetchCellTipsEventArgs

); override;

Parameters

e

A FetchCellTipsEventArgs that contains the event data.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.OnFetchGroupCellStyle Method

C1TrueDBGrid.OnFetchGroupCellStyle Method

Raises the FetchGroupCellStyle event.

[Visual Basic]

Overrides Protected Sub OnFetchGroupCellStyle( _

ByVal e As FetchCellStyleEventArgs _

)

[C#]

override protected void OnFetchGroupCellStyle(

FetchCellStyleEventArgs e

);

[Delphi]

strict protected procedure OnFetchGroupCellStyle(

e: FetchCellStyleEventArgs

); override;

Parameters

e

A FetchCellStyleEventArgs that contains the event data.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.OnFetchRowStyle Method

C1TrueDBGrid.OnFetchRowStyle Method

Raises the FetchRowStyle event.

[Visual Basic]

Overrides Protected Sub OnFetchRowStyle( _

ByVal e As FetchRowStyleEventArgs _

)

[C#]

override protected void OnFetchRowStyle(

FetchRowStyleEventArgs e

);

[Delphi]

strict protected procedure OnFetchRowStyle(

e: FetchRowStyleEventArgs

); override;

Parameters

e

A FetchRowStyleEventArgs that contains the event data.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.OnFetchScrollTips Method

C1TrueDBGrid.OnFetchScrollTips Method

Raises the FetchScrollTips event.

[Visual Basic]

Overrides Protected Sub OnFetchScrollTips( _

ByVal e As FetchScrollTipsEventArgs _

)

[C#]

override protected void OnFetchScrollTips(

FetchScrollTipsEventArgs e

);

[Delphi]

strict protected procedure OnFetchScrollTips(

e: FetchScrollTipsEventArgs

); override;

Parameters

e

A FetchScrollTipsEventArgs that contains the event data.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.OnFilter Method

C1TrueDBGrid.OnFilter Method

Raises the Filter event.

[Visual Basic]

Overrides Protected Sub OnFilter( _

ByVal e As FilterEventArgs _

)

[C#]

override protected void OnFilter(

FilterEventArgs e

);

[Delphi]

strict protected procedure OnFilter(

e: FilterEventArgs

); override;

Parameters

e

A FilterEventArgs that contains the event data.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.OnFilterButtonClick Method

C1TrueDBGrid.OnFilterButtonClick Method

Raises the FilterButtonClick event.

[Visual Basic]

Overrides Protected Sub OnFilterButtonClick( _

ByVal e As ColEventArgs _

)

[C#]

override protected void OnFilterButtonClick(

ColEventArgs e

);

[Delphi]

strict protected procedure OnFilterButtonClick(

e: ColEventArgs

); override;

Parameters

e

A ColEventArgs that contains the event data.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.OnFilterChange Method

C1TrueDBGrid.OnFilterChange Method

Raises the FilterChange event.

[Visual Basic]

Overrides Protected Sub OnFilterChange( _

ByVal e As EventArgs _

)

[C#]

override protected void OnFilterChange(

EventArgs e

);

[Delphi]

strict protected procedure OnFilterChange(

e: EventArgs

); override;

Parameters

e

A System.EventArgs that contains the event data.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.OnFirstRowChange Method

C1TrueDBGrid.OnFirstRowChange Method

Raises the FirstRowChange event.

[Visual Basic]

Overrides Protected Sub OnFirstRowChange( _

ByVal e As SplitEventArgs _

)

[C#]

override protected void OnFirstRowChange(

SplitEventArgs e

);

[Delphi]

strict protected procedure OnFirstRowChange(

e: SplitEventArgs

); override;

Parameters

e

A SplitEventArgs that contains the event data.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.OnFootClick Method

C1TrueDBGrid.OnFootClick Method

Raises the FootClick event.

[Visual Basic]

Overrides Protected Sub OnFootClick( _

ByVal e As ColEventArgs _

)

[C#]

override protected void OnFootClick(

ColEventArgs e

);

[Delphi]

strict protected procedure OnFootClick(

e: ColEventArgs

); override;

Parameters

e

A ColEventArgs that contains the event data.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.OnFormatText Method

C1TrueDBGrid.OnFormatText Method

Raises the FormatText event.

[Visual Basic]

Overrides Protected Sub OnFormatText( _

ByVal e As FormatTextEventArgs _

)

[C#]

override protected void OnFormatText(

FormatTextEventArgs e

);

[Delphi]

strict protected procedure OnFormatText(

e: FormatTextEventArgs

); override;

Parameters

e

A FormatTextEventArgs that contains the event data.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.OnGroupAggregate Method

C1TrueDBGrid.OnGroupAggregate Method

Raises the GroupAggregate event.

[Visual Basic]

Overrides Protected Sub OnGroupAggregate( _

ByVal e As GroupTextEventArgs _

)

[C#]

override protected void OnGroupAggregate(

GroupTextEventArgs e

);

[Delphi]

strict protected procedure OnGroupAggregate(

e: GroupTextEventArgs

); override;

Parameters

e

A GroupTextEventArgs that contains the event data.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.OnGroupColMove Method

C1TrueDBGrid.OnGroupColMove Method

Raises the GroupColMove event.

[Visual Basic]

Overrides Protected Sub OnGroupColMove( _

ByVal e As GroupColMoveEventArgs _

)

[C#]

override protected void OnGroupColMove(

GroupColMoveEventArgs e

);

[Delphi]

strict protected procedure OnGroupColMove(

e: GroupColMoveEventArgs

); override;

Parameters

e

A GroupColMoveEventArgs that contains the event data.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.OnGroupHeadClick Method

C1TrueDBGrid.OnGroupHeadClick Method

Raises the GroupHeadClick event.

[Visual Basic]

Overrides Protected Sub OnGroupHeadClick( _

ByVal e As GroupColEventArgs _

)

[C#]

override protected void OnGroupHeadClick(

GroupColEventArgs e

);

[Delphi]

strict protected procedure OnGroupHeadClick(

e: GroupColEventArgs

); override;

Parameters

e

A GroupColEventArgs that contains the event data.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.OnGroupText Method

C1TrueDBGrid.OnGroupText Method

Raises the GroupText event.

[Visual Basic]

Overrides Protected Sub OnGroupText( _

ByVal e As GroupTextEventArgs _

)

[C#]

override protected void OnGroupText(

GroupTextEventArgs e

);

[Delphi]

strict protected procedure OnGroupText(

e: GroupTextEventArgs

); override;

Parameters

e

A GroupTextEventArgs that contains the event data.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.OnHeadClick Method

C1TrueDBGrid.OnHeadClick Method

Raises the HeadClick event.

[Visual Basic]

Overrides Protected Sub OnHeadClick( _

ByVal e As ColEventArgs _

)

[C#]

override protected void OnHeadClick(

ColEventArgs e

);

[Delphi]

strict protected procedure OnHeadClick(

e: ColEventArgs

); override;

Parameters

e

A ColEventArgs that contains the event data.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.OnLeftColChange Method

C1TrueDBGrid.OnLeftColChange Method

Raises the LeftColChange event.

[Visual Basic]

Overrides Protected Sub OnLeftColChange( _

ByVal e As SplitEventArgs _

)

[C#]

override protected void OnLeftColChange(

SplitEventArgs e

);

[Delphi]

strict protected procedure OnLeftColChange(

e: SplitEventArgs

); override;

Parameters

e

A SplitEventArgs that contains the event data.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.OnOwnerDrawCell Method

C1TrueDBGrid.OnOwnerDrawCell Method

Raises the OwnerDrawCell event.

[Visual Basic]

Overrides Protected Sub OnOwnerDrawCell( _

ByVal e As OwnerDrawCellEventArgs _

)

[C#]

override protected void OnOwnerDrawCell(

OwnerDrawCellEventArgs e

);

[Delphi]

strict protected procedure OnOwnerDrawCell(

e: OwnerDrawCellEventArgs

); override;

Parameters

e

An OwnerDrawCellEventArgs that contains the event data.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.OnOwnerDrawCellPrint Method

C1TrueDBGrid.OnOwnerDrawCellPrint Method

Raises the OwnerDrawCellPrint event.

[Visual Basic]

Overrides Protected Sub OnOwnerDrawCellPrint( _

ByVal e As OwnerDrawCellEventArgs _

)

[C#]

override protected void OnOwnerDrawCellPrint(

OwnerDrawCellEventArgs e

);

[Delphi]

strict protected procedure OnOwnerDrawCellPrint(

e: OwnerDrawCellEventArgs

); override;

Parameters

e

Am OwnerDrawCellEventArgs that contains the event data.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.OnOwnerDrawPageFooter Method

C1TrueDBGrid.OnOwnerDrawPageFooter Method

Raises the OwnerDrawPageFooter event.

[Visual Basic]

Overrides Protected Sub OnOwnerDrawPageFooter( _

ByVal e As OwnerDrawPageEventArgs _

)

[C#]

override protected void OnOwnerDrawPageFooter(

OwnerDrawPageEventArgs e

);

[Delphi]

strict protected procedure OnOwnerDrawPageFooter(

e: OwnerDrawPageEventArgs

); override;

Parameters

e

An OwnerDrawPageEventArgs that contains the event data.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.OnOwnerDrawPageHeader Method

C1TrueDBGrid.OnOwnerDrawPageHeader Method

Raises the OwnerDrawPageHeader event.

[Visual Basic]

Overrides Protected Sub OnOwnerDrawPageHeader( _

ByVal e As OwnerDrawPageEventArgs _

)

[C#]

override protected void OnOwnerDrawPageHeader(

OwnerDrawPageEventArgs e

);

[Delphi]

strict protected procedure OnOwnerDrawPageHeader(

e: OwnerDrawPageEventArgs

); override;

Parameters

e

An OwnerDrawPageEventArgs that contains the event data.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.OnRowColChange Method

C1TrueDBGrid.OnRowColChange Method

Raises the RowColChange event.

[Visual Basic]

Overrides Protected Sub OnRowColChange( _

ByVal e As RowColChangeEventArgs _

)

[C#]

override protected void OnRowColChange(

RowColChangeEventArgs e

);

[Delphi]

strict protected procedure OnRowColChange(

e: RowColChangeEventArgs

); override;

Parameters

e

A RowColChangeEventArgs that contains the event data.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.OnRowResize Method

C1TrueDBGrid.OnRowResize Method

Raises the RowResize event.

[Visual Basic]

Overrides Protected Sub OnRowResize( _

ByVal e As CancelEventArgs _

)

[C#]

override protected void OnRowResize(

CancelEventArgs e

);

[Delphi]

strict protected procedure OnRowResize(

e: CancelEventArgs

); override;

Parameters

e

A CancelEventArgs that contains the event data.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.OnSelChange Method

C1TrueDBGrid.OnSelChange Method

Raises the SelChange event.

[Visual Basic]

Overrides Protected Sub OnSelChange( _

ByVal e As CancelEventArgs _

)

[C#]

override protected void OnSelChange(

CancelEventArgs e

);

[Delphi]

strict protected procedure OnSelChange(

e: CancelEventArgs

); override;

Parameters

e

A CancelEventArgs that contains the event data.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.OnSort Method

C1TrueDBGrid.OnSort Method

Raises the Sort event.

[Visual Basic]

Overrides Protected Sub OnSort( _

ByVal e As FilterEventArgs _

)

[C#]

override protected void OnSort(

FilterEventArgs e

);

[Delphi]

strict protected procedure OnSort(

e: FilterEventArgs

); override;

Parameters

e

A FilterEventArgs that contains the event data.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.OnSplitChange Method

C1TrueDBGrid.OnSplitChange Method

Raises the SplitChange event.

[Visual Basic]

Overrides Protected Sub OnSplitChange( _

ByVal e As EventArgs _

)

[C#]

override protected void OnSplitChange(

EventArgs e

);

[Delphi]

strict protected procedure OnSplitChange(

e: EventArgs

); override;

Parameters

e

A System.EventArgs that contains the event data.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.OnUnboundColumnFetch Method

C1TrueDBGrid.OnUnboundColumnFetch Method

Raises the UnboundColumnFetch event.

[Visual Basic]

Overrides Protected Sub OnUnboundColumnFetch( _

ByVal e As UnboundColumnFetchEventArgs _

)

[C#]

override protected void OnUnboundColumnFetch(

UnboundColumnFetchEventArgs e

);

[Delphi]

strict protected procedure OnUnboundColumnFetch(

e: UnboundColumnFetchEventArgs

); override;

Parameters

e

A UnboundColumnFetchEventArgs that contains the event data.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.OnValueItemError Method

C1TrueDBGrid.OnValueItemError Method

Raises the ValueItemError event.

[Visual Basic]

Overrides Protected Sub OnValueItemError( _

ByVal e As ColEventArgs _

)

[C#]

override protected void OnValueItemError(

ColEventArgs e

);

[Delphi]

strict protected procedure OnValueItemError(

e: ColEventArgs

); override;

Parameters

e

A ColEventArgs that contains the event data.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.PointAt Method

C1TrueDBGrid.PointAt Method

Overload List

Returns one of the PointAtEnum constants, which indicates the kind of grid element beneath the specified coordinate.

[Visual Basic] Overloads Public Function PointAt(Integer, Integer) As PointAtEnum

[C#] public PointAtEnum PointAt(int, int);

[Delphi] public function PointAt(Int32; Int32) : PointAtEnum; overload;

Returns one of the PointAtEnum enumerations, which indicates the kind of grid element beneath the specified coordinate.

[Visual Basic] Overloads Public Function PointAt(Point) As PointAtEnum

[C#] public PointAtEnum PointAt(Point);

[Delphi] public function PointAt(Point) : PointAtEnum; overload;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.PointAt Method (Int32, Int32)

C1TrueDBGrid.PointAt Method (Int32, Int32)

Previous Next

Returns one of the PointAtEnum constants, which indicates the kind of grid element beneath the specified coordinate.

[Visual Basic]

Overloads Public Function PointAt( _

ByVal x As Integer, _

ByVal y As Integer _

) As PointAtEnum

[C#]

public PointAtEnum PointAt(

int x,

int y

);

[Delphi]

public function PointAt(

x: Int32;

y: Int32

): PointAtEnum; overload;

Parameters

x

The x-coordinate.

y

The y-coordinate.

Return Value

The PointAtEnum enumerations under the given coordinate.

Remarks

The PointAt method returns one of the constants in the preceding list, which indicates the kind of grid element beneath the specified coordinate pair.

This method is useful when working with mouse and drag events when trying to determine where the user clicked or dropped another control in terms of a grid element.

Note: Convert the x and y arguments to pixels, even if the container's ScaleMode setting specifies a different unit of measurement.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.PointAt Method (Point)

C1TrueDBGrid.PointAt Method (Point)

Previous Next

Returns one of the PointAtEnum enumerations, which indicates the kind of grid element beneath the specified coordinate.

[Visual Basic]

Overloads Public Function PointAt( _

ByVal p As Point _

) As PointAtEnum

[C#]

public PointAtEnum PointAt(

Point p

);

[Delphi]

public function PointAt(

p: Point

): PointAtEnum; overload;

Parameters

p

The Point in client coordinates.

Return Value

The PointAtEnum enumerations under the given coordinate.

Remarks

The PointAt method returns one of the constants in the preceding list, which indicates the kind of grid element beneath the specified coordinate pair.

This method is useful when working with mouse and drag events when trying to determine where the user clicked or dropped another control in terms of a grid element.

Note: Convert the x and y arguments to pixels, even if the container's ScaleMode setting specifies a different unit of measurement.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.Rebind Method

C1TrueDBGrid.Rebind Method

Overload List

Reinitializes grid with data from its data source

[Visual Basic] Overloads Public Sub Rebind()

[C#] public void Rebind();

[Delphi] public procedure Rebind(); overload;

Reinitializes grid with data from its data source.

[Visual Basic] Overloads Public Sub Rebind(Boolean)

[C#] public void Rebind(bool);

[Delphi] public procedure Rebind(Boolean); overload;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.Rebind Method ()

C1TrueDBGrid.Rebind Method ()

Previous Next

Reinitializes grid with data from its data source

[Visual Basic]

Overloads Public Sub Rebind()

[C#]

public void Rebind()

[Delphi]

public procedure Rebind(); overload;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.Rebind Method (Boolean)

C1TrueDBGrid.Rebind Method (Boolean)

Previous Next

Reinitializes grid with data from its data source.

[Visual Basic]

Overloads Public Sub Rebind( _

ByVal holdFields As Boolean _

)

[C#]

public void Rebind(

bool holdFields

);

[Delphi]

public procedure Rebind(

holdFields: Boolean

); overload;

Parameters

holdFields

True to preserves current column layout. False retrieves the schema from the datasource.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.RefetchRow Method

C1TrueDBGrid.RefetchRow Method

Overload List

Retreives data from the datasource for the current row and refreshes the row.

[Visual Basic] Overloads Public Sub RefetchRow()

[C#] public void RefetchRow();

[Delphi] public procedure RefetchRow(); overload;

Retreives data from the datasource for the specified row and refreshes the row.

[Visual Basic] Overloads Public Sub RefetchRow(Integer)

[C#] public void RefetchRow(int);

[Delphi] public procedure RefetchRow(Int32); overload;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.RefetchRow Method ()

C1TrueDBGrid.RefetchRow Method ()

Previous Next

Retreives data from the datasource for the current row and refreshes the row.

[Visual Basic]

Overloads Public Sub RefetchRow()

[C#]

public void RefetchRow()

[Delphi]

public procedure RefetchRow(); overload;

Remarks

The RefetchRow method repopulates the specified row from a data source. It also repaints the row, firing all events necessary for redisplay.

By default, the grid retrieves data automatically as needed. In some circumstances, the underlying datasource may change without the grid receiving notification that a change has occurred. The RefetchRow method is provided for this purpose.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.RefetchRow Method (Int32)

C1TrueDBGrid.RefetchRow Method (Int32)

Previous Next

Retrieves data from the datasource for the specified row and refreshes the row.

[Visual Basic]

Overloads Public Sub RefetchRow( _

ByVal row As Integer _

)

[C#]

public void RefetchRow(

int row

);

[Delphi]

public procedure RefetchRow(

row: Int32

); overload;

Parameters

row

The row to refetch.

Remarks

The RefetchRow method repopulates the specified row from a data source. It also repaints the row, firing all events necessary for redisplay.

By default, the grid retrieves data automatically as needed. In some circumstances, the underlying datasource may change without the grid receiving notification that a change has occurred. The RefetchRow method is provided for this purpose.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.Refresh Method

C1TrueDBGrid.Refresh Method

Clears any cached styles and forces the grid to repaint.

[Visual Basic]

Overrides Public Sub Refresh()

[C#]

override public void Refresh()

[Delphi]

public procedure Refresh(); override;

Remarks

The Refresh method repaints the entire grid. Use this method to force the grid to be repainted and hence cause the appropriate events to fire.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.RefreshCol Method

C1TrueDBGrid.RefreshCol Method

Overload List

Invalidates the current column.

[Visual Basic] Overloads Public Sub RefreshCol()

[C#] public void RefreshCol();

[Delphi] public procedure RefreshCol(); overload;

Invalidates the specified column.

[Visual Basic] Overloads Public Sub RefreshCol(Integer)

[C#] public void RefreshCol(int);

[Delphi] public procedure RefreshCol(Int32); overload;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.RefreshCol Method ()

C1TrueDBGrid.RefreshCol Method ()

Previous Next

Invalidates the current column.

[Visual Basic]

Overloads Public Sub RefreshCol()

[C#]

public void RefreshCol()

[Delphi]

public procedure RefreshCol(); overload;

Remarks

The RefreshCol method causes a repaint of the entire column in the grid. Normally, the grid repaints automatically as needed. However, if handlers have been written for the OwnerDrawCell event, use this method to force a column to be repainted and hence cause the appropriate events to fire.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.RefreshCol Method (Int32)

C1TrueDBGrid.RefreshCol Method (Int32)

Previous Next

Invalidates the specified column.

[Visual Basic]

Overloads Public Sub RefreshCol( _

ByVal col As Integer _

)

[C#]

public void RefreshCol(

int col

);

[Delphi]

public procedure RefreshCol(

col: Int32

); overload;

Parameters

col

The split column index to repaint.

Remarks

The RefreshCol method causes a repaint of the entire column in the grid. Normally, the grid repaints automatically as needed. However, if handlers have been written for the OwnerDrawCell event, use this method to force a column to be repainted and hence cause the appropriate events to fire.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.RefreshRow Method

C1TrueDBGrid.RefreshRow Method

Overload List

Invalidates the current row.

[Visual Basic] Overloads Public Sub RefreshRow()

[C#] public void RefreshRow();

[Delphi] public procedure RefreshRow(); overload;

Invalidates the current row.

[Visual Basic] Overloads Public Sub RefreshRow(Integer)

[C#] public void RefreshRow(int);

[Delphi] public procedure RefreshRow(Int32); overload;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.RefreshRow Method ()

C1TrueDBGrid.RefreshRow Method ()

Previous Next

Invalidates the current row.

[Visual Basic]

Overloads Public Sub RefreshRow()

[C#]

public void RefreshRow()

[Delphi]

public procedure RefreshRow(); overload;

Remarks

The RefreshRow method causes a repaint of the entire row in the grid. Normally, the grid repaints automatically as needed. However, if handlers have been written for the OwnerDrawCell event, use this method to force a row to be repainted and hence cause the appropriate events to fire.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.RefreshRow Method (Int32)

C1TrueDBGrid.RefreshRow Method (Int32)

Previous Next

Invalidates the current row.

[Visual Basic]

Overloads Public Sub RefreshRow( _

ByVal row As Integer _

)

[C#]

public void RefreshRow(

int row

);

[Delphi]

public procedure RefreshRow(

row: Int32

); overload;

Parameters

row

The row to refresh.

Remarks

The RefreshRow method causes a repaint of the entire row in the grid. Normally, the grid repaints automatically as needed. However, if handlers have been written for the OwnerDrawCell event, use this method to force a row to be repainted and hence cause the appropriate events to fire.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.RemoveHorizontalSplit Method

C1TrueDBGrid.RemoveHorizontalSplit Method

Removes all the horizontal splits at the given index.

[Visual Basic]

Public Sub RemoveHorizontalSplit( _

ByVal idx As Integer _

)

[C#]

public void RemoveHorizontalSplit(

int idx

);

[Delphi]

public procedure RemoveHorizontalSplit(

idx: Int32

);

Remarks

This property removes a horizontal split from the grid at the index specified. By default the grid has one horizontal split.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.RemoveVerticalSplit Method

C1TrueDBGrid.RemoveVerticalSplit Method

Removes all vertical splits at the given index.

[Visual Basic]

Public Sub RemoveVerticalSplit( _

ByVal idx As Integer _

)

[C#]

public void RemoveVerticalSplit(

int idx

);

[Delphi]

public procedure RemoveVerticalSplit(

idx: Int32

);

Remarks

This property removes a vertical split from the grid at the index specified. By default the grid has one vertical split.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.ResumeBinding Method

C1TrueDBGrid.ResumeBinding Method

Resumes IBindingList.ListChange notifications from the data source to the grid.

[Visual Basic]

Public Sub ResumeBinding()

[C#]

public void ResumeBinding()

[Delphi]

public procedure ResumeBinding();

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.RowBookmark Method

C1TrueDBGrid.RowBookmark Method

Returns the row index of the DataSource for a display row index.

[Visual Basic]

Public Function RowBookmark( _

ByVal row As Integer _

) As Integer

[C#]

public int RowBookmark(

int row

);

[Delphi]

public function RowBookmark(

row: Int32

): Int32;

Parameters

row

The row index of the grid.

Return Value

The underlying row index of the DataSource.

Remarks

Typically the row and bookmark properties are the same for a given row. When in GroupBy DataView, the visible row may or may not be the correct index for the underlying datasource. This method maps the row number to the underlying datasource row index.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.RowContaining Method

C1TrueDBGrid.RowContaining Method

Returns the zero-based index of the display row containing the Y specified coordinate.

[Visual Basic]

Public Function RowContaining( _

ByVal y As Integer _

) As Integer

[C#]

public int RowContaining(

int y

);

[Delphi]

public function RowContaining(

y: Int32

): Int32;

Parameters

y

The vertical coordinate (Y value) in pixels.

Return Value

The display row index beneath the specified Y coordinate.

Remarks

The RowContaining method returns the zero-based index of the display row containing the specified coordinate. This value ranges from 0 to VisibleRows - 1.

If coordinate is outside of the grid's data area, this method returns -1.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.RowExpanded Method

C1TrueDBGrid.RowExpanded Method

Obtains the expanded state of a band for a hierarchical grid.

[Visual Basic]

Public Function RowExpanded( _

ByVal band As Integer _

) As Boolean

[C#]

public bool RowExpanded(

int band

);

[Delphi]

public function RowExpanded(

band: Int32

): Boolean;

Remarks

The RowExpanded method returns True if the specified band is expanded within the current row. Use this method to determine whether the current row of a hierarchical grid has been expanded to display its related data.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.RowTop Method

C1TrueDBGrid.RowTop Method

Returns the Y coordinate of the top of a visible row.

[Visual Basic]

Public Function RowTop( _

ByVal row As Integer _

) As Integer

[C#]

public int RowTop(

int row

);

[Delphi]

public function RowTop(

row: Int32

): Int32;

Parameters

row

The displayed row index.

Return Value

The Y coordinate of the specified display row, based on the client coordinates of the grid.

Remarks

The RowTop method returns the Y coordinate of the top of a visible row relative to the top of the grid, as given by the grid's Top property.

Allowable values for the rownumber argument range from 0 to VisibleRows - 1.

Use the RowTop method in conjunction with RowHeight, Left, and Width to determine the size and placement of controls displayed on top of a grid cell.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.SaveLayout Method

C1TrueDBGrid.SaveLayout Method

Overload List

Saves the grid's layout.

[Visual Basic] Overloads Public Sub SaveLayout(Stream)

[C#] public void SaveLayout(Stream);

[Delphi] public procedure SaveLayout(Stream); overload;

Saves the grid's layout.

[Visual Basic] Overloads Public Sub SaveLayout(String)

[C#] public void SaveLayout(string);

[Delphi] public procedure SaveLayout(String); overload;

Saves the grids layout to the given stream

[Visual Basic] Overloads Public Sub SaveLayout(Stream, Boolean)

[C#] public void SaveLayout(Stream, bool);

[Delphi] public procedure SaveLayout(Stream; Boolean); overload;

Saves the grids layout to the given file.

[Visual Basic] Overloads Public Sub SaveLayout(String, Boolean)

[C#] public void SaveLayout(string, bool);

[Delphi] public procedure SaveLayout(String; Boolean); overload;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.SaveLayout Method (Stream)

C1TrueDBGrid.SaveLayout Method (Stream)

Previous Next

Saves the grid's layout.

[Visual Basic]

Overloads Public Sub SaveLayout( _

ByVal stream As Stream _

)

[C#]

public void SaveLayout(

Stream stream

);

[Delphi]

public procedure SaveLayout(

stream: Stream

); overload;

Parameters

stream

The Stream to contain the grid layout.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.SaveLayout Method (String)

C1TrueDBGrid.SaveLayout Method (String)

Previous Next

Saves the grid's layout.

[Visual Basic]

Overloads Public Sub SaveLayout( _

ByVal filename As String _

)

[C#]

public void SaveLayout(

string filename

);

[Delphi]

public procedure SaveLayout(

filename: String

); overload;

Parameters

filename

File to contain the grid layout.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.SaveLayout Method (Stream, Boolean)

C1TrueDBGrid.SaveLayout Method (Stream, Boolean)

Previous Next

Saves the grids layout to the given stream.

[Visual Basic]

Overloads Public Sub SaveLayout( _

ByVal stream As Stream, _

ByVal defaultValues As Boolean _

)

[C#]

public void SaveLayout(

Stream stream,

bool defaultValues

);

[Delphi]

public procedure SaveLayout(

stream: Stream;

defaultValues: Boolean

); overload;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.SaveLayout Method (String, Boolean)

C1TrueDBGrid.SaveLayout Method (String, Boolean)

Previous Next

Saves the grids layout to the given file.

[Visual Basic]

Overloads Public Sub SaveLayout( _

ByVal filename As String, _

ByVal defaultValues As Boolean _

)

[C#]

public void SaveLayout(

string filename,

bool defaultValues

);

[Delphi]

public procedure SaveLayout(

filename: String;

defaultValues: Boolean

); overload;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.ScrollGrid Method

C1TrueDBGrid.ScrollGrid Method

Scrolls the grid data area by the specified number of rows and columns.

[Visual Basic]

Public Sub ScrollGrid( _

ByVal cols As Integer, _

ByVal rows As Integer _

)

[C#]

public void ScrollGrid(

int cols,

int rows

);

[Delphi]

public procedure ScrollGrid(

cols: Int32;

rows: Int32

);

Parameters

cols

Number of columns to scroll.

rows

Number of rows to scroll.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.SplitContaining Method

C1TrueDBGrid.SplitContaining Method

Returns the SplitIndex of the split containing the specified coordinate.

[Visual Basic]

Public Function SplitContaining( _

ByVal x As Integer, _

ByVal y As Integer _

) As Integer

[C#]

public int SplitContaining(

int x,

int y

);

[Delphi]

public function SplitContaining(

x: Int32;

y: Int32

): Int32;

Parameters

x

The x-coordinate.

y

The y-coordinate.

Return Value

The SplitIndex beneath the specified coordinate pair.

Remarks

The SplitContaining method returns the Index value of the split containing the specified coordinate pair. This value ranges from 0 to Split.Count – 1.

This method is useful when working with mouse and drag events when trying to determine where the user clicked or dropped another control in terms of a grid column.

If either argument is outside of the grid's data area, this method returns -1.

Note: Convert the x and y arguments to pixels, even if the container's ScaleMode setting specifies a different unit of measurement.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.SuspendBinding Method

C1TrueDBGrid.SuspendBinding Method

Instructs the grid to temporarily ignore IBindingList.ListChange notifications from the data source.

[Visual Basic]

Public Sub SuspendBinding()

[C#]

public void SuspendBinding()

[Delphi]

public procedure SuspendBinding();

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.UpdateData Method

C1TrueDBGrid.UpdateData Method

Updates any changes on the current row to the data source.

[Visual Basic]

Overridable Public Sub UpdateData()

[C#]

virtual public void UpdateData()

[Delphi]

public procedure UpdateData(); virtual;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.WndProc Method

C1TrueDBGrid.WndProc Method

Processes Windows messages.

[Visual Basic]

Overrides Protected Sub WndProc( _

ByRef m As Message _

)

[C#]

override protected void WndProc(

ref Message m

);

[Delphi]

strict protected procedure WndProc(

var m: Message

); override;

Parameters

m

Windows message to process.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid Events

C1TrueDBGrid Events

The events of the C1TrueDBGrid class are listed here. For a complete list of C1TrueDBGrid class members, see the C1TrueDBGrid Members topic.

Public Events

AfterColEdit | Occurs after editing is completed.
AfterColUpdate | Occurs after a cell has been updated.
AfterDelete | Occurs after a row has been deleted.
AfterFilter | Occurs after the datasource has been filtered.
AfterInsert | Occurs after a row has been added.
AfterSort | Occurs after a column has been sorted.
AfterUpdate | Occurs after a row has been updated.
BeforeClose | Occurs when the user attempts to close a child grid.
BeforeColEdit | Occurs before a cell enters edit mode.
BeforeColUpdate | Occurs before a cell is updated to the datasource.
BeforeDelete | Occurs before a row is deleted.
BeforeInsert | Occurs before a new row is added to the datasource.
BeforeOpen | Occurs when the user attempts to open a child grid.
BeforeRowColChange | Occurs prior to focus moving to another cell.
BeforeUpdate | Occurs before a row is updated to the datasource.
ButtonClick | Occurs whenever a button is clicked in a cell.
Change | Occurs whenever the user changes the value of a cell.
ColEdit | Occurs whenever a cell first enters edit mode.
Collapse | Occurs whenever a hierarchical row is collapsed.
ColMove | Occurs whenever the user has finished moving a column.
ColResize | Occurs whenever a column is resized.
ComboSelect | Occurs whenever a selection has been made to the built-in combo or TrueDBDropdown.
DataSourceChanged | Occurs whenever the datasource changes.
Error | Occurs whenever an exception is thrown during end user interaction.
Expand | Occurs whenever a hierarchical row is expanded.
FetchCellStyle | Occurs whenever a cell is to be rendered and the FetchStyle is true.
FetchCellTips | Occurs when the grid needs to display CellTips.
FetchGroupCellStyle | Occurs whenever a grouped cell that contains an aggregate is to be rendered and FetchStyle is True.
FetchRowStyle | Occurs whenever the grid renders a row and the FetchRowStyles property has been set.
FetchScrollTips | Occurs whenever the grid has focus and the scrollbar thumb is moved using the mouse.
Filter | Occurs when the user types in the filterbar and the AllowFilter property is False.
FilterButtonClick | Occurs when a button is clicked in the filterbar.
FilterChange | Occurs when the contents of a cell in the filterbar changes.
FirstRowChange | Occurs whenever the first row changes.
FootClick | Occurs whenever a column footer is clicked.
FormatText | Occurs whenever a cell is about to be rendered and whose NumberFormat property has been set to FormatTextEvent.
GroupAggregate | Occurs when the Aggregate is set to Custom for a grouped row.
GroupColMove | Occurs whenever a column is moved into or out of the grouping area.
GroupHeadClick | Occurs whenever a column in the grouping area is clicked.
GroupText | Occurs when the HeaderText property is set to custom.
HeadClick | Occrus whenever a column header is clicked.
LeftColChange | Occurs whenever the left column changes.
OnAddNew | Occurs whenever an AddNew operation has been initiated.
OnInit | Occurs after the grid has been initialized.
OwnerDrawCell | Occurs before a cell is rendered and the OwnerDraw is True.
OwnerDrawCellPrint | Occurs before a cell is to be printed and the OwnerDraw is True.
OwnerDrawPageFooter | Occurs before the page footer is to be printed.
OwnerDrawPageHeader | Occurs before the page header is to be printed.
RowColChange | Occurs when the focus moves to a different cell.
RowResize | Occrus whenever the user resizes a row.
Scroll | Occurs whenever the user scrolls the grid.
SelChange | Occurs whenever the user selected a different range of rows or columns.
Sort | Occurs when the user drags a column into the grouping area.
SplitChange | Occurs whenever a Split changes focus.
UnboundColumnFetch | Occurs when the grid needs to access the value of an unbound column.
UnboundColumnUpdated | Raised when an unbound column has been updated.
ValueItemError | Occurs whenever a user attempts to enter invalid data into a column that is using valueitems.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.AfterColEdit Event

C1TrueDBGrid.AfterColEdit Event

Occurs after editing is completed.

[Visual Basic]

Public Event AfterColEdit As ColEventHandler

[C#]

public event ColEventHandler AfterColEdit

[Delphi]

public property AfterColEdit: ColEventHandler read remove_AfterColEdit write add_AfterColEdit;

Remarks

The AfterColEdit event occurs after editing is completed in a grid cell.

When the user completes editing within a grid cell, as when tabbing to another column in the same row, pressing the Enter key, or clicking on another cell, the BeforeColUpdate and AfterColUpdate events are executed, and data from the cell is moved to the grid's copy buffer. The AfterColEdit event immediately follows the AfterColUpdate event.

When editing is completed in a grid cell, this event is always triggered, even if no changes were made to the cell or the BeforeColUpdate event was canceled.

The AfterColEdit event will not be raised if the BeforeColEdit event is canceled.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.AfterColUpdate Event

C1TrueDBGrid.AfterColUpdate Event

Occurs after a cell has been updated.

[Visual Basic]

Public Event AfterColUpdate As ColEventHandler

[C#]

public event ColEventHandler AfterColUpdate

[Delphi]

public property AfterColUpdate: ColEventHandler read remove_AfterColUpdate write add_AfterColUpdate;

Remarks

When the user completes editing within a grid cell, as when tabbing to another column in the same row, pressing the Enter key, or clicking on another cell, the BeforeColUpdate event is executed, and unless canceled, data from the cell is moved to the grid's copy buffer. Once moved, the AfterColUpdate event is executed.

The AfterColUpdate event occurs after the BeforeColUpdate event, and only if the Cancel argument in the BeforeColUpdate event is not set to True.

Once the AfterColUpdate event procedure begins, the cell data has already been moved to the grid's copy buffer and cannot be canceled, but other updates can occur before the data is committed to the data source.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.AfterDelete Event

C1TrueDBGrid.AfterDelete Event

Occurs after a row has been deleted.

[Visual Basic]

Public Event AfterDelete As EventHandler

[C#]

public event EventHandler AfterDelete

[Delphi]

public property AfterDelete: EventHandler read remove_AfterDelete write add_AfterDelete;

Remarks

When the user selects a record selector in the grid and presses Del or Ctrl+X, the BeforeDelete event is executed, and unless canceled, the row is deleted. Once the row is deleted, the AfterDelete event is executed.

While the AfterDelete event procedure is executing, the bookmark of the deleted row is available in the collection provided by the SelectedRows property.

The AfterDelete event cannot be canceled.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.AfterFilter Event

C1TrueDBGrid.AfterFilter Event

Occurs after the datasource has been filtered.

[Visual Basic]

Public Event AfterFilter As FilterEventHandler

[C#]

public event FilterEventHandler AfterFilter

[Delphi]

public property AfterFilter: FilterEventHandler read remove_AfterFilter write add_AfterFilter;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.AfterInsert Event

C1TrueDBGrid.AfterInsert Event

Occurs after a row has been added.

[Visual Basic]

Public Event AfterInsert As EventHandler

[C#]

public event EventHandler AfterInsert

[Delphi]

public property AfterInsert: EventHandler read remove_AfterInsert write add_AfterInsert;

Remarks

The AfterInsert event occurs after the user inserts a new record into the grid. It can be used to update other tables or to perform post-update cleanup of other controls.

When the user selects the AddNew row (the last row in the grid) and enters a character in one of the cells, the BeforeInsert event is executed, and unless canceled, the row is scrolled up one line and its record selector changes to show that it has been modified. However, a new row has not yet been added to the database.

Once the user commits the new row by moving to another row within the grid, the BeforeUpdate event is triggered, followed by the AfterUpdate and AfterInsert events. If the BeforeUpdate event is canceled, then the AfterUpdate and AfterInsert events will not be raised.

When the AfterInsert event is triggered, the record has already been added to the database. The Bookmark property can be used to access the new record.

The AfterInsert event cannot be canceled.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.AfterSort Event

C1TrueDBGrid.AfterSort Event

Occurs after a column has been sorted.

[Visual Basic]

Public Event AfterSort As FilterEventHandler

[C#]

public event FilterEventHandler AfterSort

[Delphi]

public property AfterSort: FilterEventHandler read remove_AfterSort write add_AfterSort;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.AfterUpdate Event

C1TrueDBGrid.AfterUpdate Event

Occurs after a row has been updated.

[Visual Basic]

Public Event AfterUpdate As EventHandler

[C#]

public event EventHandler AfterUpdate

[Delphi]

public property AfterUpdate: EventHandler read remove_AfterUpdate write add_AfterUpdate;

Remarks

The AfterUpdate event occurs after changed data has been written to the database from the grid.

When the user moves to another row, or the UpdateData method of the grid or the DataSet object is executed, data is moved from the grid's copy buffer to the Data control's copy buffer and written to the database. Once the write operation is complete, the AfterUpdate event is triggered.

The Bookmark property does not reflect the newly added row because of the row being inserted.

The AfterUpdate event cannot be canceled.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.BeforeClose Event

C1TrueDBGrid.BeforeClose Event

Occurs when the user attempts to close a child grid.

[Visual Basic]

Public Event BeforeClose As CancelEventHandler

[C#]

public event CancelEventHandler BeforeClose

[Delphi]

public property BeforeClose: CancelEventHandler read remove_BeforeClose write add_BeforeClose;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.BeforeColEdit Event

C1TrueDBGrid.BeforeColEdit Event

Occurs before a cell enters edit mode.

[Visual Basic]

Public Event BeforeColEdit As BeforeColEditEventHandler

[C#]

public event BeforeColEditEventHandler BeforeColEdit

[Delphi]

public property BeforeColEdit: BeforeColEditEventHandler read remove_BeforeColEdit write add_BeforeColEdit;

Remarks

The BeforeColEdit event occurs just before the user enters edit mode by typing a character. If a floating editor marquee is not in use, this event also occurs when the user clicks the current cell or double clicks another cell.

If event procedure sets the Cancel argument to True, the cell will not enter edit mode. Otherwise, the ColEdit event is raised immediately, followed by the Change event for the KeyAscii argument, if non-zero.

Use this event to control the editability of cells on a per-cell basis.

Note: The KeyAscii argument can only be 0 if a floating editor marquee is not in use.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.BeforeColUpdate Event

C1TrueDBGrid.BeforeColUpdate Event

Occurs before a cell is updated to the datasource.

[Visual Basic]

Public Event BeforeColUpdate As BeforeColUpdateEventHandler

[C#]

public event BeforeColUpdateEventHandler BeforeColUpdate

[Delphi]

public property BeforeColUpdate: BeforeColUpdateEventHandler read remove_BeforeColUpdate write add_BeforeColUpdate;

Remarks

The BeforeColUpdate event occurs after editing is completed in a cell, but before data is moved from the cell to the grid's internal copy buffer.

The data specified by the OldValue argument moves from the cell to the grid's copy buffer when the user completes editing within a cell, as when tabbing to another column in the same row, pressing the Enter key, or clicking on another cell. Before the data has been moved from the cell into the grid's copy buffer, the BeforeColUpdate event is triggered. This event gives the application an opportunity to check the individual grid cells before they are committed to the grid's copy buffer.

If your event procedure sets the Cancel argument to True, the grid retains focus, and the AfterColUpdate event is not triggered.

To restore OldValue in the cell and permit the user to move focus off of the cell, set Cancel to False and set the cell to OldValue as follows:

· Visual Basic

· C#

· Delphi

Setting the Cancel argument to True prevents the user from moving focus away from the control until the application determines that the data can be safely moved back to the grid's copy buffer.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.BeforeDelete Event

C1TrueDBGrid.BeforeDelete Event

Occurs before a row is deleted.

[Visual Basic]

Public Event BeforeDelete As CancelEventHandler

[C#]

public event CancelEventHandler BeforeDelete

[Delphi]

public property BeforeDelete: CancelEventHandler read remove_BeforeDelete write add_BeforeDelete;

Remarks

When the user selects a record selector in the grid and presses Del or Ctrl+X, the BeforeDelete event is triggered to give the application a chance to override the user's action.

If event procedure sets the Cancel argument to True, the row is not deleted. Otherwise, the grid deletes the row and triggers the AfterDelete event.

The bookmark of the row selected for deletion is available in the collection provided by the SelectedRows property.

Note: If more than one row is selected, the error message "Cannot delete multiple rows" is displayed, and the BeforeDelete event will not be raised.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.BeforeInsert Event

C1TrueDBGrid.BeforeInsert Event

Occurs before a new row is added to the datasource.

[Visual Basic]

Public Event BeforeInsert As CancelEventHandler

[C#]

public event CancelEventHandler BeforeInsert

[Delphi]

public property BeforeInsert: CancelEventHandler read remove_BeforeInsert write add_BeforeInsert;

Remarks

When the user selects the AddNew row (the last row in the grid) and enters a character in one of the cells, the BeforeInsert event is triggered to give the application a chance to override the user's action.

If event procedure sets the Cancel argument to True, no insertion takes place and the cell is cleared. Otherwise, the AddNew row is scrolled up one line and its record selector changes to show that it has been modified. However, a new row has not yet been added to the database.

Once the user commits the new row by moving to another row within the grid, the BeforeUpdate event is triggered, followed by the AfterUpdate and AfterInsert events. If the BeforeUpdate event is canceled, then the AfterUpdate and AfterInsert events will not be raised.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.BeforeOpen Event

C1TrueDBGrid.BeforeOpen Event

Occurs when the user attempts to open a child grid.

[Visual Basic]

Public Event BeforeOpen As CancelEventHandler

[C#]

public event CancelEventHandler BeforeOpen

[Delphi]

public property BeforeOpen: CancelEventHandler read remove_BeforeOpen write add_BeforeOpen;

Remarks

The BeforeOpen event occurs when the user clicks the + indicator in a cell. Setting the Cancel argument to True prevents the detail grid from opening.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.BeforeRowColChange Event

C1TrueDBGrid.BeforeRowColChange Event

Occurs prior to focus moving to another cell.

[Visual Basic]

Public Event BeforeRowColChange As CancelEventHandler

[C#]

public event CancelEventHandler BeforeRowColChange

[Delphi]

public property BeforeRowColChange: CancelEventHandler read remove_BeforeRowColChange write add_BeforeRowColChange;

Remarks

The BeforeRowColChange event occurs when the user attempts to move to a different cell using the navigation keys or the mouse. This event is raised regardless of whether the current cell is modified.

Setting the Cancel argument to True prevents the user from moving to a different cell. If this event is not canceled, the behavior depends upon the modification status of the current cell. If the current cell is unmodified, then cell movement proceeds as usual and the RowColChange event is raised. If the current cell is modified, then cell movement may be restricted by the BeforeColUpdate, BeforeUpdate, or BeforeInsert events, in which case the RowColChange event will not fire.

Note: The BeforeRowColChange event does not fire if the current cell is changed in code, such as by setting the Bookmark or Col properties of the grid.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.BeforeUpdate Event

C1TrueDBGrid.BeforeUpdate Event

Occurs before a row is updated to the datasource.

[Visual Basic]

Public Event BeforeUpdate As CancelEventHandler

[C#]

public event CancelEventHandler BeforeUpdate

[Delphi]

public property BeforeUpdate: CancelEventHandler read remove_BeforeUpdate write add_BeforeUpdate;

Remarks

The BeforeUpdate event occurs before data is moved from the grid's internal copy buffer to the DataSet’s copy buffer and then written to the database.

When the user moves to another row, or the UpdateData method of the grid or DataSet object is executed, data is moved from the grid's copy buffer to the DataSet’s copy buffer and then written to the database.

Just before the data is moved from the grid's copy buffer back into the DataSet’s copy buffer, the BeforeUpdate event is triggered. Unless the copy operation is canceled, the AfterUpdate event is triggered after the data has been moved back into the DataSet’s copy buffer and written to the database.

The Bookmark property can be used to access the updated record.

If your event procedure sets the Cancel argument to True, focus remains on the control, the AfterUpdate event is not triggered, and the record is not saved to the database.

Use this event to validate data in a record before permitting the user to commit the change to the DataSet's copy buffer. Setting the Cancel argument to True prevents the user from moving focus to another control until the application determines whether the data can be safely moved back to the DataSet's copy buffer.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.ButtonClick Event

C1TrueDBGrid.ButtonClick Event

Occurs whenever a button is clicked in a cell.

[Visual Basic]

Public Event ButtonClick As ColEventHandler

[C#]

public event ColEventHandler ButtonClick

[Delphi]

public property ButtonClick: ColEventHandler read remove_ButtonClick write add_ButtonClick;

Remarks

This event is raised when the current cell's built-in button is clicked. The built-in button is enabled for a column when its Button property is set to True, its DropDown property is set to the name of a valid C1TrueDBDropdown control, or the Presentation property of its associated ValueItems collection is set to one of the combo box options.

Typically, the column button is enabled when wanting to drop-down a Visual Basic control (such as the built-in combo box, a bound list box, or even another TrueDBGrid control) for editing or data entry. When the button in the current cell is clicked, the ButtonClick event will be raised. Code can then be written to drop-down the desired control from the cell.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.Change Event

C1TrueDBGrid.Change Event

Occurs whenever the user changes the value of a cell.

[Visual Basic]

Public Event Change As EventHandler

[C#]

public event EventHandler Change

[Delphi]

public property Change: EventHandler read remove_Change write add_Change;

Remarks

This event is only raised when the current cell is being edited and the user enters or deletes a character, pastes text from the clipboard, or cuts text to the clipboard. It does not apply to database changes.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.ColEdit Event

C1TrueDBGrid.ColEdit Event

Occurs whenever a cell first enters edit mode.

[Visual Basic]

Public Event ColEdit As ColEventHandler

[C#]

public event ColEventHandler ColEdit

[Delphi]

public property ColEdit: ColEventHandler read remove_ColEdit write add_ColEdit;

Remarks

The ColEdit event occurs when a cell first enters edit mode by typing a character. If a floating editor marquee is not in use, this event also occurs when the user clicks the current cell or double clicks another cell.

The ColEdit event immediately follows the BeforeColEdit event only when the latter is not canceled.

When the user completes editing within a grid cell, as when tabbing to another column in the same row, pressing the Enter key, or clicking on another cell, the BeforeColUpdate and AfterColUpdate events are executed if the data has been changed. The AfterColEdit event is then raised to indicate that editing is completed.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.Collapse Event

C1TrueDBGrid.Collapse Event

Occurs whenever a hierarchical row is collapsed.

[Visual Basic]

Public Event Collapse As BandEventHandler

[C#]

public event BandEventHandler Collapse

[Delphi]

public property Collapse: BandEventHandler read remove_Collapse write add_Collapse;

Remarks

The Collapse event is raised when a user clicks on the collapse row icon ("–") in an expanded hierarchical grid row.

Note: Setting the Cancel parameter to True ignores the user action and does not collapse the row.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.ColMove Event

C1TrueDBGrid.ColMove Event

Occurs whenever the user has finished moving a column.

[Visual Basic]

Public Event ColMove As ColMoveEventHandler

[C#]

public event ColMoveEventHandler ColMove

[Delphi]

public property ColMove: ColMoveEventHandler read remove_ColMove write add_ColMove;

Remarks

The ColMove event occurs when the user has finished moving the selected columns. Event procedure can either accept the movement or cancel it altogether.

The Position argument ranges from 0, which denotes the left edge, to the total number of columns, which denotes the right edge.

If the Cancel argument is set to True, no movement occurs. Selected columns always remain selected, regardless of the Cancel setting.

Note: This event is only raised when the user moves the selected columns to a new location.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.ColResize Event

C1TrueDBGrid.ColResize Event

Occurs whenever a column is resized.

[Visual Basic]

Public Event ColResize As ColResizeEventHandler

[C#]

public event ColResizeEventHandler ColResize

[Delphi]

public property ColResize: ColResizeEventHandler read remove_ColResize write add_ColResize;

Remarks

The ColResize event occurs after the user has finished resizing a column, but before columns to the right are repositioned. Event procedure can accept the change, alter the degree of change, or cancel the change completely.

If the Cancel argument is set to True, the previous column width is restored and no repainting occurs. To alter the degree of change, set the Width property of the C1DataColumn object specified by the ColIndex argument to the desired value.

It is not necessary to execute the Refresh method within this event procedure, but doing so causes the grid to be repainted even if the Cancel argument is True.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.ComboSelect Event

C1TrueDBGrid.ComboSelect Event

Occurs whenever a selection has been made to the built-in combo or TrueDBDropdown.

[Visual Basic]

Public Event ComboSelect As ColEventHandler

[C#]

public event ColEventHandler ComboSelect

[Delphi]

public property ComboSelect: ColEventHandler read remove_ComboSelect write add_ComboSelect;

Remarks

The ComboSelect event is triggered when the user selects (by clicking) a built-in combo box item. The built-in combo box is enabled for a column when the Presentation property of its associated ValueItems collection is set to one of the combo box options.

This event is useful for determining the contents of the cell before the user exits editing mode. By setting the EditActive property to False within this event procedure, the grid can be forced to exit editing mode without allowing the user a chance to edit his selection.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.DataSourceChanged Event

C1TrueDBGrid.DataSourceChanged Event

Occurs whenever the datasource changes.

[Visual Basic]

Public Event DataSourceChanged As EventHandler

[C#]

public event EventHandler DataSourceChanged

[Delphi]

public property DataSourceChanged: EventHandler read remove_DataSourceChanged write add_DataSourceChanged;

Remarks

The DataSourceChanged event occurs when a bound data source is changed or requeried. This event is also raised when a bound grid control is first loaded.

The DataSourceChanged event is raised before the grid is filled with data. Therefore, use this event to initialize the grid according to information obtained from the data source, if necessary.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.Error Event

C1TrueDBGrid.Error Event

Occurs whenever an exception is thrown during end user interaction.

[Visual Basic]

Public Event Error As ErrorEventHandler

[C#]

public event ErrorEventHandler Error

[Delphi]

public property Error: ErrorEventHandler read remove_Error write add_Error;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.Expand Event

C1TrueDBGrid.Expand Event

Occurs whenever a hierarchical row is expanded.

[Visual Basic]

Public Event Expand As BandEventHandler

[C#]

public event BandEventHandler Expand

[Delphi]

public property Expand: BandEventHandler read remove_Expand write add_Expand;

Remarks

The Expand event is raised when a user clicks on the expand row icon ("+") in a collapsed hierarchical grid row.

Setting the Cancel parameter to True ignores the user action and does not expand the row.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.FetchCellStyle Event

C1TrueDBGrid.FetchCellStyle Event

Occurs whenever a cell is to be rendered and the FetchStyle is true.

[Visual Basic]

Public Event FetchCellStyle As FetchCellStyleEventHandler

[C#]

public event FetchCellStyleEventHandler FetchCellStyle

[Delphi]

public property FetchCellStyle: FetchCellStyleEventHandler read remove_FetchCellStyle write add_FetchCellStyle;

Remarks

The FetchCellStyle event occurs when the grid is about to display cell data in a column whose FetchStyle property is set to True. By setting one or more properties of the Style object passed in the CellStyle parameter, the application can change the appearance of individual cells.

The ForegroundImage property of the CellStyle parameter can be set to display distinct bitmaps on a per-cell basis.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.FetchCellTips Event

C1TrueDBGrid.FetchCellTips Event

Occurs when the grid needs to display CellTips.

[Visual Basic]

Public Event FetchCellTips As FetchCellTipsEventHandler

[C#]

public event FetchCellTipsEventHandler FetchCellTips

[Delphi]

public property FetchCellTips: FetchCellTipsEventHandler read remove_FetchCellTips write add_FetchCellTips;

Remarks

If the CellTips property is not set to CellTipsEnum.NoCellTips, the FetchCellTips event will be raised whenever the grid has focus and the cursor is idle for a small amount of time (defined by the CellTipsDelay property) over a data cell, record selector, column header, column footer, split header, or grid caption bar. This event will not fire if the cursor is over the scroll bars.

If the cursor is over a data cell, CellTip contains the contents of the cell as text. By default, the grid will display up to 256 characters of the cell contents in a pop-up text box, enabling the user to peruse the contents of a cell even if it is not big enough to be displayed in its entirety. Instead of displaying the cell text, modify CellTip to display a custom message. However, if CellTip to Null or an empty string is set, the text box will not be displayed.

Program this event to provide context-sensitive help or tips to users. For example, if the user points to column header, provide a more detailed description of the column. If the user points to a record selector, display instructions for selecting multiple records.

Also provide content-sensitive help to users using this event. By default, CellTip contains the text of the cell under the cursor. However, other cell values can be determined if desired. Using the grid's Row property, retrieve the bookmark of the row under the cursor, then use the CellValue or CellText method to derive other cell values.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.FetchGroupCellStyle Event

C1TrueDBGrid.FetchGroupCellStyle Event

Occurs whenever a grouped cell that contains an aggregate is to be rendered and FetchStyle is True.

[Visual Basic]

Public Event FetchGroupCellStyle As FetchCellStyleEventHandler

[C#]

public event FetchCellStyleEventHandler FetchGroupCellStyle

[Delphi]

public property FetchGroupCellStyle: FetchCellStyleEventHandler read remove_FetchGroupCellStyle write add_FetchGroupCellStyle;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.FetchRowStyle Event

C1TrueDBGrid.FetchRowStyle Event

Occurs whenever the grid renders a row and the FetchRowStyles property has been set.

[Visual Basic]

Public Event FetchRowStyle As FetchRowStyleEventHandler

[C#]

public event FetchRowStyleEventHandler FetchRowStyle

[Delphi]

public property FetchRowStyle: FetchRowStyleEventHandler read remove_FetchRowStyle write add_FetchRowStyle;

Remarks

The FetchRowStyle event is raised whenever the grid is about to display a row of data, but only if the FetchRowStyles property is True for the grid or one of its splits.

Use the FetchRowStyle event to control formatting on a per-row basis, as it is much more efficient than coding the FetchCellStyle event to apply the same formatting to all columns.

Note: A common application of row-based formatting is to present rows in alternating colors to enhance their readability. Although the FetchRowStyle event could be used to achieve this effect, the AlternatingRows property is easier to use, as it requires no coding.

Example

The following code displays all rows with Germany in the Country column as LemonChiffon:

· Visual Basic

· C#

· Delphi

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.FetchScrollTips Event

C1TrueDBGrid.FetchScrollTips Event

Occurs whenever the grid has focus and the scrollbar thumb is moved using the mouse.

[Visual Basic]

Public Event FetchScrollTips As FetchScrollTipsEventHandler

[C#]

public event FetchScrollTipsEventHandler FetchScrollTips

[Delphi]

public property FetchScrollTips: FetchScrollTipsEventHandler read remove_FetchScrollTips write add_FetchScrollTips;

Remarks

If the ScrollTips property is True, the FetchScrollTips event will be raised whenever the grid has focus and the scrollbar thumb is moved using the mouse.

By setting the properties of the TipStyle object, control the background color, text color, and font of the pop-up text box. By default, the TipStyle object uses the system ToolTip colors and the font attributes of the current split.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.Filter Event

C1TrueDBGrid.Filter Event

Occurs when the user types in the filterbar and the AllowFilter property is False.

[Visual Basic]

Public Event Filter As FilterEventHandler

[C#]

public event FilterEventHandler Filter

[Delphi]

public property Filter: FilterEventHandler read remove_Filter write add_Filter;

Remarks

The Filter event occurs when the user types a character into the filter cell. It is expected that upon return from this event, the datasource that the C1TrueDBGrid is attached to will be filtered by the given condition.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.FilterButtonClick Event

C1TrueDBGrid.FilterButtonClick Event

Occurs when a button is clicked in the filterbar.

[Visual Basic]

Public Event FilterButtonClick As ColEventHandler

[C#]

public event ColEventHandler FilterButtonClick

[Delphi]

public property FilterButtonClick: ColEventHandler read remove_FilterButtonClick write add_FilterButtonClick;

Remarks

If the FilterBar property is set to True, the FilterButtonClick event will be raised whenever the user clicks the in-cell button within a filter cell.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.FilterChange Event

C1TrueDBGrid.FilterChange Event

Occurs when the contents of a cell in the filterbar changes.

[Visual Basic]

Public Event FilterChange As EventHandler

[C#]

public event EventHandler FilterChange

[Delphi]

public property FilterChange: EventHandler read remove_FilterChange write add_FilterChange;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.FirstRowChange Event

C1TrueDBGrid.FirstRowChange Event

Occurs whenever the first row changes.

[Visual Basic]

Public Event FirstRowChange As SplitEventHandler

[C#]

public event SplitEventHandler FirstRowChange

[Delphi]

public property FirstRowChange: SplitEventHandler read remove_FirstRowChange write add_FirstRowChange;

Remarks

The FirstRowChange event occurs when the first displayed row of a control or split is changed. This event is triggered under several circumstances:

· When the grid is first displayed.

· When the user scrolls through the grid with the vertical scroll bar or navigation keys.

· When data in the grid is changed in a way that implicitly affects the first row, such as when the first displayed record is deleted.

· When the FirstRow property is changed in code to a different value.

When multiple cell change events are sent, the order will be SplitChange, FirstRowChange, LeftColChange, and RowColChange. None of these events will be sent until any modified data has been validated with the BeforeColUpdate event.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.FootClick Event

C1TrueDBGrid.FootClick Event

Occurs whenever a column footer is clicked.

[Visual Basic]

Public Event FootClick As ColEventHandler

[C#]

public event ColEventHandler FootClick

[Delphi]

public property FootClick: ColEventHandler read remove_FootClick write add_FootClick;

Remarks

The FootClick event occurs when the user clicks on the footer for a particular grid column.

One possible action for this event is to re-sort the DataSet object based on the selected column.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.FormatText Event

C1TrueDBGrid.FormatText Event

Occurs whenever a cell is about to be rendered and whose NumberFormat property has been set to FormatText Event.

[Visual Basic]

Public Event FormatText As FormatTextEventHandler

[C#]

public event FormatTextEventHandler FormatText

[Delphi]

public property FormatText: FormatTextEventHandler read remove_FormatText write add_FormatText;

Remarks

The FormatText event occurs when the grid is about to display cell data in a column whose NumberFormat property is set to the string FormatText Event.

The Value argument contains the underlying data value and also serves as a placeholder for the formatted data to be displayed.

This event allows custom text formatting for circumstances where Visual Basic's intrinsic formatting is either unavailable or does not suit the project needs.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.GroupAggregate Event

C1TrueDBGrid.GroupAggregate Event

Occurs when the Aggregate is set to Custom for a grouped row.

[Visual Basic]

Public Event GroupAggregate As GroupTextEventHandler

[C#]

public event GroupTextEventHandler GroupAggregate

[Delphi]

public property GroupAggregate: GroupTextEventHandler read remove_GroupAggregate write add_GroupAggregate;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.GroupColMove Event

C1TrueDBGrid.GroupColMove Event

Occurs whenever a column is moved into or out of the grouping area.

[Visual Basic]

Public Event GroupColMove As GroupColMoveEventHandler

[C#]

public event GroupColMoveEventHandler GroupColMove

[Delphi]

public property GroupColMove: GroupColMoveEventHandler read remove_GroupColMove write add_GroupColMove;

Remarks

The GroupColMove event occurs before a selected column is moved to or from the grouping area. The event procedure can either accept the movement or cancel it altogether.

The Position argument ranges from 0, which denotes the left edge, to the total number of columns, which denotes the right edge. A position of -1 is used to indicate that a column is being moved from the grouping area back to the grid.

To determine which column is being moved, use the Item method.

If the Cancel argument is set to True, no movement occurs. Selected columns always remain selected, regardless of the Cancel setting.

See Column Grouping for more information.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.GroupHeadClick Event

C1TrueDBGrid.GroupHeadClick Event

Occurs whenever a column in the grouping area is clicked.

[Visual Basic]

Public Event GroupHeadClick As GroupColEventHandler

[C#]

public event GroupColEventHandler GroupHeadClick

[Delphi]

public property GroupHeadClick: GroupColEventHandler read remove_GroupHeadClick write add_GroupHeadClick;

Remarks

One possible action for this event is to re-sort the DataSet object based on the selected column.

See Column Grouping for more information.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.GroupText Event

C1TrueDBGrid.GroupText Event

Occurs when the HeaderText property is set to custom.

[Visual Basic]

Public Event GroupText As GroupTextEventHandler

[C#]

public event GroupTextEventHandler GroupText

[Delphi]

public property GroupText: GroupTextEventHandler read remove_GroupText write add_GroupText;

Remarks

See Column Grouping for more information.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.HeadClick Event

C1TrueDBGrid.HeadClick Event

Occrus whenever a column header is clicked.

[Visual Basic]

Public Event HeadClick As ColEventHandler

[C#]

public event ColEventHandler HeadClick

[Delphi]

public property HeadClick: ColEventHandler read remove_HeadClick write add_HeadClick;

Remarks

One possible action for this event is to re-sort the DataSet object based on the selected column.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.LeftColChange Event

C1TrueDBGrid.LeftColChange Event

Occurs whenever the left column changes.

[Visual Basic]

Public Event LeftColChange As SplitEventHandler

[C#]

public event SplitEventHandler LeftColChange

[Delphi]

public property LeftColChange: SplitEventHandler read remove_LeftColChange write add_LeftColChange;

Remarks

The LeftColChange event occurs when the first visible column of a grid or split is changed. This event is triggered under several circumstances:

· When the grid is first displayed.

· When the user scrolls through the grid with the horizontal scroll bar or navigation keys.

· When the LeftCol property is changed in code to a different value.

· When the Visible property of the current left column is set to False.

· When the Width property of the current left column is set to 0.

· When the user resizes the current left column so that it is no longer visible.

· When the user moves the current left column or moves another column into its place.

When multiple cell change events are sent, the order will be SplitChange, FirstRowChange, LeftColChange, and RowColChange. None of these events will be sent until any modified data has been validated with the BeforeColUpdate event.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.OnAddNew Event

C1TrueDBGrid.OnAddNew Event

Occurs whenever an AddNew operation has been initiated.

[Visual Basic]

Public Event OnAddNew As EventHandler

[C#]

public event EventHandler OnAddNew

[Delphi]

public property OnAddNew: EventHandler read remove_OnAddNew write add_OnAddNew;

Remarks

The OnAddNew event occurs when an AddNew operation has been initiated by either of the following:

· The user modifies a cell within the AddNew row. Typically, this occurs as soon as the user types a character, but may also occur as a result of a built-in radio button or combo box selection.

· The Value or Text property of a column is set in code when the current cell is within the AddNew row.

This event is raised only if the grid's AllowAddNew property is True.

When the OnAddNew event is raised, the value of the AddNewMode property is AddNew Pending.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.OnInit Event

C1TrueDBGrid.OnInit Event

Occurs after the grid has been initialized.

[Visual Basic]

Public Event OnInit As EventHandler

[C#]

public event EventHandler OnInit

[Delphi]

public property OnInit: EventHandler read remove_OnInit write add_OnInit;

Remarks

The OnInit event occurs after the grid is initially loaded. This event precedes DataSourceChanged. You can always use this event to initialize the grid independent of its container.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.OwnerDrawCell Event

C1TrueDBGrid.OwnerDrawCell Event

Occurs before a cell is rendered and the OwnerDraw is True.

[Visual Basic]

Public Event OwnerDrawCell As OwnerDrawCellEventHandler

[C#]

public event OwnerDrawCellEventHandler OwnerDrawCell

[Delphi]

public property OwnerDrawCell: OwnerDrawCellEventHandler read remove_OwnerDrawCell write add_OwnerDrawCell;

Remarks

The OwnerDrawCell event occurs just before the cell specified by the Row, Col, and Split arguments is to be painted. This event is only raised for columns in which the OwnerDraw property is set to True.

Use this event to customize the appearance of individual cells by drawing directly to the grid's device context using standard Windows GDI calls.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.OwnerDrawCellPrint Event

C1TrueDBGrid.OwnerDrawCellPrint Event

Occurs before a cell is to be printed and the OwnerDraw is True.

[Visual Basic]

Public Event OwnerDrawCellPrint As OwnerDrawCellEventHandler

[C#]

public event OwnerDrawCellEventHandler OwnerDrawCellPrint

[Delphi]

public property OwnerDrawCellPrint: OwnerDrawCellEventHandler read remove_OwnerDrawCellPrint write add_OwnerDrawCellPrint;

Remarks

The OwnerDrawCellPrint event occurs just before the cell specified by the Row, Col, and Split arguments is to be printed. This event is only raised for columns in which the OwnerDraw property is set to True.

Use this event to customize the appearance of individual cells by drawing directly to the printer device context using standard Windows GDI calls. Note that this is an enhanced metafile device context, so some operations (such as BitBlt) are not available.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.OwnerDrawPageFooter Event

C1TrueDBGrid.OwnerDrawPageFooter Event

Occurs before the page footer is to be printed.

[Visual Basic]

Public Event OwnerDrawPageFooter As OwnerDrawPageEventHandler

[C#]

public event OwnerDrawPageEventHandler OwnerDrawPageFooter

[Delphi]

public property OwnerDrawPageFooter: OwnerDrawPageEventHandler read remove_OwnerDrawPageFooter write add_OwnerDrawPageFooter;

Remarks

The OwnerDrawPageFooter event occurs once per print session. By using the methods of the OwnerDrawPrint object you can customize the appearance of Printed Page footers. This event is only raised for PrintInfo objects in which the OwnerDrawPageFooter property is set to True.

The only argument for this event is the OwnerDrawPrint argument. This event and OwnerDrawPageHeader both use an object called the C1OwnerDrawPrint object to render the appropriate text and images. The OwnerDrawPrint argument provides access to this object that has one property and three methods to aid in rendering the correct images. For more information see the OwnerDrawPageEventArgs reference.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.OwnerDrawPageHeader Event

C1TrueDBGrid.OwnerDrawPageHeader Event

Occurs before the page header is to be printed.

[Visual Basic]

Public Event OwnerDrawPageHeader As OwnerDrawPageEventHandler

[C#]

public event OwnerDrawPageEventHandler OwnerDrawPageHeader

[Delphi]

public property OwnerDrawPageHeader: OwnerDrawPageEventHandler read remove_OwnerDrawPageHeader write add_OwnerDrawPageHeader;

Remarks

The OwnerDrawPageHeader event occurs once per print session just before the header is to be printed. This event is only raised for PrintInfo objects in which the OwnerDrawPageHeader property is set to True.

The only argument for this event is the OwnerDrawPrint argument. This event and OwnerDrawPageFooter both use an object called the C1OwnerDrawPrint object to render the appropriate text and images. The OwnerDrawPrint argument provides access to this object that has one property and three methods to aid in rendering the correct images. For more information see the OwnerDrawPageEventArgs reference.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.RowColChange Event

C1TrueDBGrid.RowColChange Event

Occurs when the focus moves to a different cell.

[Visual Basic]

Public Event RowColChange As RowColChangeEventHandler

[C#]

public event RowColChangeEventHandler RowColChange

[Delphi]

public property RowColChange: RowColChangeEventHandler read remove_RowColChange write add_RowColChange;

Remarks

The RowColChange event occurs when the current cell changes to a different cell. This event is triggered under several circumstances:

· When the grid is first displayed.

· When the user moves the current cell by clicking another cell or using the navigation keys.

· When data in the grid is changed in a way that implicitly affects the current row, such as when the current row is deleted when it is the last row in the grid.

· When the Bookmark, Row, Col, or SplitIndex properties are changed in code to a different value.

The current cell position is provided by the Bookmark and Col properties. The previous cell position is specified by the LastRow and LastCol arguments.

If the user edits data and then moves the current cell position to a new row, the update events for the original row are completed before another cell becomes the current cell.

If a cell change also results in a change to the current split, then the SplitChange event will always precede the RowColChange event.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.RowResize Event

C1TrueDBGrid.RowResize Event

Occrus whenever the user resizes a row.

[Visual Basic]

Public Event RowResize As CancelEventHandler

[C#]

public event CancelEventHandler RowResize

[Delphi]

public property RowResize: CancelEventHandler read remove_RowResize write add_RowResize;

Remarks

The RowResize event occurs when the user has finished resizing a grid row. The event procedure can accept the change, alter the degree of change, or cancel the change completely.

The C1TrueDBGrid control's RowHeight property determines the height of all rows in the control.

If the Cancel argument is set to True, the previous row height is restored and no repainting occurs. To alter the degree of change, set the RowHeight property to the desired value.

It is not necessary to execute the Refresh method within this event procedure. Doing so causes the grid to be repainted even if the Cancel argument is True.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.Scroll Event

C1TrueDBGrid.Scroll Event

Occurs whenever the user scrolls the grid.

[Visual Basic]

Public Event Scroll As CancelEventHandler

[C#]

public event CancelEventHandler Scroll

[Delphi]

public property Scroll: CancelEventHandler read remove_Scroll write add_Scroll;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.SelChange Event

C1TrueDBGrid.SelChange Event

Occurs whenever the user selected a different range of rows or columns.

[Visual Basic]

Public Event SelChange As CancelEventHandler

[C#]

public event CancelEventHandler SelChange

[Delphi]

public property SelChange: CancelEventHandler read remove_SelChange write add_SelChange;

Remarks

The SelChange event occurs when the user selects a different range of rows or columns. This event is triggered under several circumstances:

· When the user selects a single row by clicking its record selector.

· When the user adds a row to the list of selected rows by clicking its record selector while holding down the Ctrl key.

· When the user selects a single column by clicking its header.

· When the user changes the range of selected columns by dragging to an adjacent column within the header row.

· When the user extends the range of selected columns by holding down the Shift key and clicking an unselected column header.

· When the user clears the current row or column selection by clicking an individual cell, in which case this event precedes RowColChange.

The current range of selected columns is provided by the SelectedRows and SelectedCols properties. The bookmarks of the selected rows are available in the SelectedRowCollection. Within this event procedure, these properties and collections reflect the user's pending selection(s).

If the event procedure sets the Cancel argument to True, the previous row and column selections (if any) are restored, and the aforementioned properties revert to their previous values.

This event is only triggered by user interaction with the grid. It cannot be triggered by code.

Note: When the user selects a column, any row selections are cleared. Similarly, when the user selects a row, any column selections are cleared.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.Sort Event

C1TrueDBGrid.Sort Event

Occurs when the user drags a column into the grouping area.

[Visual Basic]

Public Event Sort As FilterEventHandler

[C#]

public event FilterEventHandler Sort

[Delphi]

public property Sort: FilterEventHandler read remove_Sort write add_Sort;

Remarks

The Sort event occurs when the user drags a column into the grouping area of the grid. It is expected that upon return from this event, the datasource that the C1TrueDBGrid is attached to will be sorted by the given database fields provided within the condition argument.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.SplitChange Event

C1TrueDBGrid.SplitChange Event

Occurs whenever a Split changes focus.

[Visual Basic]

Public Event SplitChange As EventHandler

[C#]

public event EventHandler SplitChange

[Delphi]

public property SplitChange: EventHandler read remove_SplitChange write add_SplitChange;

Remarks

The SplitChange event occurs when the current cell changes to a different cell in another split. This event is triggered under several circumstances:

· When the grid is first displayed.

· When the user clicks a cell in another split, subject to the setting of the AllowFocus property.

· When the user presses a navigation key to cross a split boundary, subject to the setting of the TabAcrossSplits property.

· When the SplitIndex property is changed in code to a different value.

· When a new split is inserted before the current split via code or user interaction.

· When the current split is removed via code or user interaction.

If the user edits data and then moves the current cell position to a new row in another split, the update events for the original row are completed before the SplitChange event is executed.

If a split change also results in a change to the current row or column, then the SplitChange event will always precede the RowColChange event.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.UnboundColumnFetch Event

C1TrueDBGrid.UnboundColumnFetch Event

Occurs when the grid needs to access the value of an unbound column.

[Visual Basic]

Public Event UnboundColumnFetch As UnboundColumnFetchEventHandler

[C#]

public event UnboundColumnFetchEventHandler UnboundColumnFetch

[Delphi]

public property UnboundColumnFetch: UnboundColumnFetchEventHandler read remove_UnboundColumnFetch write add_UnboundColumnFetch;

Remarks

The UnboundColumnFetch event is raised when a bound needs to display the value of a cell in an unbound column as specified by the Row and Col arguments. For a bound grid, any column with an empty DataField property and a non-empty Caption property is considered an unbound column.

To return an unbound value to the grid, simply set the Value argument to the desired result. If a value is not assigned, the cell will remain blank.

Use this event to implement calculated fields based on other columns or to display local data alongside remote bound data.

The application is responsible for storing data entered into an unbound column by the user. Use the C1DataColumn object's Text property to retrieve unbound values within the BeforeUpdate and BeforeInsert events.

If an unbound column is used to display a calculated result based on other columns, then the unbound values do not need to be stored since they can always be calculated "on the fly" using either the C1DataColumn object's Text property or data access objects.

Note: During the execution of this event, row movement is not permitted.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.UnboundColumnUpdated Event

C1TrueDBGrid.UnboundColumnUpdated Event

Raised when an unbound column has been updated.

[Visual Basic]

Public Event UnboundColumnUpdated As UnboundColumnFetchEventHandler

[C#]

public event UnboundColumnFetchEventHandler UnboundColumnUpdated

[Delphi]

public property UnboundColumnUpdated: UnboundColumnFetchEventHandler read remove_UnboundColumnUpdated write add_UnboundColumnUpdated;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1TrueDBGrid.ValueItemError Event

C1TrueDBGrid.ValueItemError Event

Occurs whenever a user attempts to enter invalid data into a column that is using valueitems.

[Visual Basic]

Public Event ValueItemError As ColEventHandler

[C#]

public event ColEventHandler ValueItemError

[Delphi]

public property ValueItemError: ColEventHandler read remove_ValueItemError write add_ValueItemError;

Remarks

The ValueItemError event is triggered when the user attempts to enter invalid data into a column that is using value lists. This event is only triggered when the associated ValueItems collection has its Validate property set to True.

This event is useful even if the user is permitted to enter values not present in the ValueItems collection, such as add a new value to the collection in this event. It also controls how to respond to incorrect input.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


CancelEventArgs Class

CancelEventArgs Class

Provides data for the BeforeDelete, BeforeInsert, BeforeUpdate, BeforeRowColChange, RowResize, Scroll, SelChange, BeforeOpen and BeforeClose events.

For a list of all members of this type, see CancelEventArgs Members.

System.Object

System.EventArgs

C1.Win.C1TrueDBGrid.CancelEventArgs

[Visual Basic]

Public Class CancelEventArgs

Inherits EventArgs

[C#]

public class CancelEventArgs : EventArgs

[Delphi]

type CancelEventArgs = class (EventArgs);

Namespace: C1.Win.C1TrueDBGrid

Assembly: C1.Win.C1TrueDBGrid.2 (in C1.Win.C1TrueDBGrid.2.dll)

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


CancelEventArgs Members

CancelEventArgs Members

CancelEventArgs overview

Public Properties

Cancel

Gets or sets a value indicating that the action should not be performed.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


CancelEventArgs Properties

CancelEventArgs Properties

The properties of the CancelEventArgs class are listed here. For a complete list of CancelEventArgs class members, see the CancelEventArgs Members topic.

Public Properties

Cancel

Gets or sets a value indicating that the action should not be performed.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


CancelEventArgs.Cancel Property

CancelEventArgs.Cancel Property

Gets or sets a value indicating that the action should not be performed.

[Visual Basic]

Public Property Cancel As Boolean

[C#]

public bool Cancel {get;set;}

[Delphi]

public property Cancel: Boolean read get_Cancel write set_Cancel;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


CancelEventHandler Delegate

CancelEventHandler Delegate

Raised before an action is performed on the grid and the action can be canceled.

[Visual Basic]

Public Delegate Sub CancelEventHandler( _

ByVal sender As Object, _

ByVal e As CancelEventArgs _

)

[C#]

public delegate void CancelEventHandler(

object sender,

CancelEventArgs e

);

[Delphi]

type CancelEventHandler = procedure (

sender: Object;

e: CancelEventArgs

) of object;

Namespace: C1.Win.C1TrueDBGrid

Assembly: C1.Win.C1TrueDBGrid.2 (in C1.Win.C1TrueDBGrid.2.dll)

See Also

C1.Win.C1TrueDBGrid Namespace

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


CellStyleFlag Enumeration

CellStyleFlag Enumeration

Describes the disposition of a cell.

This enumeration has a FlagsAttribute attribute that allows a bitwise combination of its member values.

[Visual Basic]

Public Enum CellStyleFlag

[C#]

public enum CellStyleFlag

[Delphi]

type CellStyleFlag = (AllCells, CurrentCell, MarqueeRow, NormalCell, SelectedRow, UpdatedCell);

Namespace: C1.Win.C1TrueDBGrid

Assembly: C1.Win.C1TrueDBGrid.2 (in C1.Win.C1TrueDBGrid.2.dll)

Remarks

Use the members of this enumeration to set one of the values of the AddCellStyle or AddRegexCellStyle methods in the C1TrueDBGrid class.

This enum has the [Flags] attribute and can be combined.

Members

Member name | Description
AllCells | All cells.
CurrentCell | The cell is the that currently has focus. At any given time, only one cell can have this status. When the MarqueeStyle property is set to Floating Editor, this condition is ignored.
MarqueeRow | The cell is part of a highlighted row marquee. When the MarqueeStyle property indicates that the entire current row is to be highlighted, all visible cells in the current row have this additional condition set.
NormalCell | The cell satisfies none of the conditions. For grouped rows, this is the only applicable cell style.
SelectedRow | The cell is part of a row selected by the user or in code. The SelectedRowCollection contains the index for each selected row.
UpdatedCell | The cell contents have been modified by the user but not yet written to the datasource. This condition is also set when cell contents have been modified in code with the Text or Value properties.

See Also

C1.Win.C1TrueDBGrid Namespace

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


CellTipEnum Enumeration

CellTipEnum Enumeration

Specifies the behavior of the pop-up window when the cursor is idle over the grid.

[Visual Basic]

Public Enum CellTipEnum

[C#]

public enum CellTipEnum

[Delphi]

type CellTipEnum = (Anchored, Floating, NoCellTips);

Namespace: C1.Win.C1TrueDBGrid

Assembly: C1.Win.C1TrueDBGrid.2 (in C1.Win.C1TrueDBGrid.2.dll)

Remarks

Use the members of this enumeration to set the value of the CellTips property in the C1TrueDBGrid class.

Members

Member name | Description
Anchored | Cell tips will be displayed in the bounding rectable of the cell.
Floating | Cell tips will be displayed under the mouse cursor.
NoCellTips | No cell tips will be displayed.

See Also

C1.Win.C1TrueDBGrid Namespace

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ColEventArgs Class

ColEventArgs Class

Provides data for the AfterColUpdate, AfterColEdit, HeadClick, FootClick, ColEdit, ButtonClick, ComboSelect, ValueItemError, and FilterButtonClick events.

For a list of all members of this type, see ColEventArgs Members.

System.Object

System.EventArgs

C1.Win.C1TrueDBGrid.ColEventArgs

[Visual Basic]

Public Class ColEventArgs

Inherits EventArgs

[C#]

public class ColEventArgs : EventArgs

[Delphi]

type ColEventArgs = class (EventArgs);

Namespace: C1.Win.C1TrueDBGrid

Assembly: C1.Win.C1TrueDBGrid.2 (in C1.Win.C1TrueDBGrid.2.dll)

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ColEventArgs Members

ColEventArgs Members

ColEventArgs overview

Public Properties

ColIndex | Indicates the position in the DisplayColumns collection.
Column | Gets the C1DisplayColumn.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ColEventArgs Properties

ColEventArgs Properties

The properties of the ColEventArgs class are listed here. For a complete list of ColEventArgs class members, see the ColEventArgs Members topic.

Public Properties

ColIndex | Indicates the position in the DisplayColumns collection.
Column | Gets the C1DisplayColumn.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ColEventArgs.ColIndex Property

ColEventArgs.ColIndex Property

Indicates the position in the DisplayColumns collection.

[Visual Basic]

Public ReadOnly Property ColIndex As Integer

[C#]

public int ColIndex {get;}

[Delphi]

public property ColIndex: Int32 read get_ColIndex;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ColEventArgs.Column Property

ColEventArgs.Column Property

Gets the C1DisplayColumn.

[Visual Basic]

Public ReadOnly Property Column As C1DisplayColumn

[C#]

public C1DisplayColumn Column {get;}

[Delphi]

public property Column: C1DisplayColumn read get_Column;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ColEventHandler Delegate

ColEventHandler Delegate

Raised when an action is perfored on a column.

[Visual Basic]

Public Delegate Sub ColEventHandler( _

ByVal sender As Object, _

ByVal e As ColEventArgs _

)

[C#]

public delegate void ColEventHandler(

object sender,

ColEventArgs e

);

[Delphi]

type ColEventHandler = procedure (

sender: Object;

e: ColEventArgs

) of object;

Namespace: C1.Win.C1TrueDBGrid

Assembly: C1.Win.C1TrueDBGrid.2 (in C1.Win.C1TrueDBGrid.2.dll)

See Also

C1.Win.C1TrueDBGrid Namespace

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ColMoveEventArgs Class

ColMoveEventArgs Class

Provides data for the ColMove event.

For a list of all members of this type, see ColMoveEventArgs Members.

System.Object

System.EventArgs

C1.Win.C1TrueDBGrid.ColMoveEventArgs

C1.Win.C1TrueDBGrid.GroupColMoveEventArgs

[Visual Basic]

Public Class ColMoveEventArgs

Inherits EventArgs

[C#]

public class ColMoveEventArgs : EventArgs

[Delphi]

type ColMoveEventArgs = class (EventArgs);

Namespace: C1.Win.C1TrueDBGrid

Assembly: C1.Win.C1TrueDBGrid.2 (in C1.Win.C1TrueDBGrid.2.dll)

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ColMoveEventArgs Members

ColMoveEventArgs Members

ColMoveEventArgs overview

Public Properties

Cancel | Gets or sets a value indicating that the action should not be performed.
ColIndex | Indicates the starting position in the DisplayColumns collection.
Column | Gets the C1DisplayColumn that is being moved.
Position | Indicates the target index of the column being moved.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ColMoveEventArgs Properties

ColMoveEventArgs Properties

The properties of the ColMoveEventArgs class are listed here. For a complete list of ColMoveEventArgs class members, see the ColMoveEventArgs Members topic.

Public Properties

Cancel | Gets or sets a value indicating that the action should not be performed.
ColIndex | Indicates the starting position in the DisplayColumns collection.
Column | Gets the C1DisplayColumn that is being moved.
Position | Indicates the target index of the column being moved.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ColMoveEventArgs.Cancel Property

ColMoveEventArgs.Cancel Property

Gets or sets a value indicating that the action should not be performed.

[Visual Basic]

Public Property Cancel As Boolean

[C#]

public bool Cancel {get;set;}

[Delphi]

public property Cancel: Boolean read get_Cancel write set_Cancel;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ColMoveEventArgs.ColIndex Property

ColMoveEventArgs.ColIndex Property

Indicates the starting position in the DisplayColumns collection.

[Visual Basic]

Public ReadOnly Property ColIndex As Integer

[C#]

public int ColIndex {get;}

[Delphi]

public property ColIndex: Int32 read get_ColIndex;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ColMoveEventArgs.Column Property

ColMoveEventArgs.Column Property

Gets the C1DisplayColumn that is being moved.

[Visual Basic]

Public ReadOnly Property Column As C1DisplayColumn

[C#]

public C1DisplayColumn Column {get;}

[Delphi]

public property Column: C1DisplayColumn read get_Column;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ColMoveEventArgs.Position Property

ColMoveEventArgs.Position Property

Indicates the target index of the column being moved.

[Visual Basic]

Public ReadOnly Property Position As Integer

[C#]

public int Position {get;}

[Delphi]

public property Position: Int32 read get_Position;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ColMoveEventHandler Delegate

ColMoveEventHandler Delegate

Raised when a column is being repositioned.

[Visual Basic]

Public Delegate Sub ColMoveEventHandler( _

ByVal sender As Object, _

ByVal e As ColMoveEventArgs _

)

[C#]

public delegate void ColMoveEventHandler(

object sender,

ColMoveEventArgs e

);

[Delphi]

type ColMoveEventHandler = procedure (

sender: Object;

e: ColMoveEventArgs

) of object;

Namespace: C1.Win.C1TrueDBGrid

Assembly: C1.Win.C1TrueDBGrid.2 (in C1.Win.C1TrueDBGrid.2.dll)

See Also

C1.Win.C1TrueDBGrid Namespace

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ColResizeEventArgs Class

ColResizeEventArgs Class

Provides data for the ColReisize event.

For a list of all members of this type, see ColResizeEventArgs Members.

System.Object

System.EventArgs

C1.Win.C1TrueDBGrid.ColResizeEventArgs

[Visual Basic]

Public Class ColResizeEventArgs

Inherits EventArgs

[C#]

public class ColResizeEventArgs : EventArgs

[Delphi]

type ColResizeEventArgs = class (EventArgs);

Namespace: C1.Win.C1TrueDBGrid

Assembly: C1.Win.C1TrueDBGrid.2 (in C1.Win.C1TrueDBGrid.2.dll)

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ColResizeEventArgs Members

ColResizeEventArgs Members

ColResizeEventArgs overview

Public Properties

Cancel | Gets or sets a value indicating that sizing should be ignored.
ColIndex | Indicates the position in the DisplayColumns collection.
Column | Gets the C1DisplayColumn for the column being sized.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ColResizeEventArgs Properties

ColResizeEventArgs Properties

The properties of the ColResizeEventArgs class are listed here. For a complete list of ColResizeEventArgs class members, see the ColResizeEventArgs Members topic.

Public Properties

Cancel | Gets or sets a value indicating that sizing should be ignored.
ColIndex | Indicates the position in the DisplayColumns collection.
Column | Gets the C1DisplayColumn for the column being sized.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ColResizeEventArgs.Cancel Property

ColResizeEventArgs.Cancel Property

Gets or sets a value indicating that sizing should be ignored.

[Visual Basic]

Public Property Cancel As Boolean

[C#]

public bool Cancel {get;set;}

[Delphi]

public property Cancel: Boolean read get_Cancel write set_Cancel;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ColResizeEventArgs.ColIndex Property

ColResizeEventArgs.ColIndex Property

Indicates the position in the DisplayColumns collection.

[Visual Basic]

Public ReadOnly Property ColIndex As Integer

[C#]

public int ColIndex {get;}

[Delphi]

public property ColIndex: Int32 read get_ColIndex;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ColResizeEventArgs.Column Property

ColResizeEventArgs.Column Property

Gets the C1DisplayColumn for the column being sized.

[Visual Basic]

Public ReadOnly Property Column As C1DisplayColumn

[C#]

public C1DisplayColumn Column {get;}

[Delphi]

public property Column: C1DisplayColumn read get_Column;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ColResizeEventHandler Delegate

ColResizeEventHandler Delegate

Raised after a column has been resized.

[Visual Basic]

Public Delegate Sub ColResizeEventHandler( _

ByVal sender As Object, _

ByVal e As ColResizeEventArgs _

)

[C#]

public delegate void ColResizeEventHandler(

object sender,

ColResizeEventArgs e

);

[Delphi]

type ColResizeEventHandler = procedure (

sender: Object;

e: ColResizeEventArgs

) of object;

Namespace: C1.Win.C1TrueDBGrid

Assembly: C1.Win.C1TrueDBGrid.2 (in C1.Win.C1TrueDBGrid.2.dll)

See Also

C1.Win.C1TrueDBGrid Namespace

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ColumnMergeEnum Enumeration

ColumnMergeEnum Enumeration

Controls how columns are merged.

[Visual Basic]

Public Enum ColumnMergeEnum

[C#]

public enum ColumnMergeEnum

[Delphi]

type ColumnMergeEnum = (Free, None, Restricted);

Namespace: C1.Win.C1TrueDBGrid

Assembly: C1.Win.C1TrueDBGrid.2 (in C1.Win.C1TrueDBGrid.2.dll)

Members

Member name | Description
Free | Like value cells in adjacent rows are combined.
None | Columns are not merged (default value).
Restricted | Like value cells in adjacent rows are combined in the same row span as the previous column.

See Also

C1.Win.C1TrueDBGrid Namespace

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


DataViewEnum Enumeration

DataViewEnum Enumeration

Specifies how the grid displays its data.

[Visual Basic]

Public Enum DataViewEnum

[C#]

public enum DataViewEnum

[Delphi]

type DataViewEnum = (Form, GroupBy, Hierarchical, Inverted, MultipleLines, MultipleLinesFixed, Normal);

Namespace: C1.Win.C1TrueDBGrid

Assembly: C1.Win.C1TrueDBGrid.2 (in C1.Win.C1TrueDBGrid.2.dll)

Remarks

Use the members of this enumeration to set the value of the DataView property in the C1TrueDBGrid class.

Members

Member name | Description
Form | The data will be displayed in a convenient data entry form.
GroupBy | A grouping area is created at the top of the grid; any columns that are placed into this area become part of the GroupedColumn collection. When in group mode, grid columns can be moved into or out of the grouping area with the Add and RemoveAt methods, respectively. Users can also perform this action by selecting and dragging a column into or out of the grouping. Users can customize the display of the grouped row with styles and automatically compute aggregates for columns that are grouped. The expanded/collapsed state of the grouping can also be specified.
Hierarchical | The grid will display DataSets in a hierarchical format. At run time, users can expand and collapse hierarchical recordset Bands using a treeview-like interface.
Inverted | Rows will be represented horizontally and columns vertically.
MultipleLines | The grid will display all the fields in the current grid area with multiple lines.
MultipleLinesFixed | The grid will display all the fields in the current grid area with multiple lines. The number of subrows does not change once set. The number of subrows can be set using the LinesPerRow property.
Normal | The grid will only display flat files and will not support a hierarchical view. If the data source is a hierarchical dataset, the grid will only display data from the master table.

See Also

C1.Win.C1TrueDBGrid Namespace

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


DirectionAfterEnterEnum Enumeration

DirectionAfterEnterEnum Enumeration

Specifies which cell gets focus when the enter key is pressed.

[Visual Basic]

Public Enum DirectionAfterEnterEnum

[C#]

public enum DirectionAfterEnterEnum

[Delphi]

type DirectionAfterEnterEnum = (MoveDown, MoveLeft, MoveNone, MoveRight, MoveUp);

Namespace: C1.Win.C1TrueDBGrid

Assembly: C1.Win.C1TrueDBGrid.2 (in C1.Win.C1TrueDBGrid.2.dll)

Remarks

Use the members of this enumeration to set the value of the DirectionAfterEnter property in the C1TrueDBGrid class.

Members

Member name | Description
MoveDown | The next cell will be the cell below the current cell.
MoveLeft | The next cell will be the cell to the left of the current cell.
MoveNone | Cell currency doesn't change.
MoveRight | The next cell will be the cell to the right of the current cell.
MoveUp | The next cell will be the cell above the current cell.

See Also

C1.Win.C1TrueDBGrid Namespace

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


DropDownForm Class

DropDownForm Class

For a list of all members of this type, see DropDownForm Members.

System.Object

System.MarshalByRefObject

System.ComponentModel.Component

System.Windows.Forms.Control

System.Windows.Forms.ScrollableControl

System.Windows.Forms.ContainerControl

System.Windows.Forms.Form

C1.Win.C1TrueDBGrid.DropDownForm

[Visual Basic]

Public Class DropDownForm

Inherits Form

Implements IMessageFilter

[C#]

public class DropDownForm : Form , IMessageFilter

[Delphi]

type DropDownForm = class (Form, IMessageFilter);

Namespace: C1.Win.C1TrueDBGrid

Assembly: C1.Win.C1TrueDBGrid.2 (in C1.Win.C1TrueDBGrid.2.dll)

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


DropDownForm Members

DropDownForm Members

DropDownForm overview

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


DropdownView Class

DropdownView Class

For a list of all members of this type, see DropdownView Members.

System.Object

C1.Win.C1TrueDBGrid.BaseGrid.View

C1.Win.C1TrueDBGrid.Split

C1.Win.C1TrueDBGrid.DropdownView

[Visual Basic]

Public Class DropdownView

Inherits Split

[C#]

public class DropdownView : Split

[Delphi]

type DropdownView = class (Split);

Namespace: C1.Win.C1TrueDBGrid

Assembly: C1.Win.C1TrueDBGrid.2 (in C1.Win.C1TrueDBGrid.2.dll)

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


DropdownView Members

DropdownView Members

DropdownView overview

Public Properties

AllowColMove (inherited from Split) | Gets or sets a value indicating the ability to move columns.
AllowColSelect (inherited from Split) | Gets or sets a value indicating the ability to select columns.
AllowFocus (inherited from Split) | Gets or sets a value indicating whether the split can recieve focus.
AllowHorizontalSizing (inherited from Split) | Gets or sets a value indicating whether a user is allowed to resize horizontal splits.
AllowRowSelect (inherited from Split) | Gets or sets a value indicating the ability to select rows.
AllowRowSizing (inherited from Split) | Gets or sets how interactive row resizing is performed.
AllowVerticalSizing (inherited from Split) | Gets or sets a value indicating whether a user is allowed to resize vertical splits.
AlternatingRowStyle (inherited from Split) | Gets or sets a value indicating whether the split uses the OddRowStyle for odd-numbered rows and EvenRowStyle for even-numbered rows.
BorderStyle (inherited from View) | Controls the appearance of the border rendered for a split.
Caption (inherited from Split) | Gets or sets the caption.
CaptionHeight (inherited from Split) | Gets or sets the height of the caption.
CaptionStyle (inherited from Split) | Gets or sets the Style object that controls the appearance of the caption area.
ColumnCaptionHeight (inherited from Split) | Gets or sets the height of the column captions.
ColumnFooterHeight (inherited from Split) | Gets or sets the height of column footers.
CurrentCellVisible (inherited from Split) | Gets or sets a value indicating the visibility of the current cell in a split.
DisplayColumns (inherited from Split) | Gets a collection of C1DisplayColumn objects.
EditorStyle (inherited from Split) | Gets or sets the Style object that controls the appearance of the cell editor within a grid.
EvenRowStyle (inherited from Split) | Gets or sets the Style object that controls the appearance of an even-numbered row when using AlternatingRows.
ExtendRightColumn (inherited from Split) | Gets or sets a value that determines how the last column will extend to fill the dead area of the split.
FetchRowStyles (inherited from Split) | Gets or sets a value indicating whether the FetchRowStyle event will be raised.
FilterActive (inherited from Split) | Gets or sets a value indicating whether the filter bar has focus.
FilterBar (inherited from Split) | Gets or sets a value indicating the visibility of the FilterBar.
FilterBarStyle (inherited from Split) | Gets or sets the Style object that controls the appearance of the FilterBar.
FilterBorderStyle (inherited from Split) | Controls the appearance of the border between the filterbar and the body of the grid.
FirstRow (inherited from Split) | Gets or sets the row index for the first visible row in a split.
FooterStyle (inherited from Split) | Gets or sets the Style object that controls the appearance of column footers.
HeadingStyle (inherited from Split) | Gets or sets the Style object that controls the appearance of the grids column headers.
Height (inherited from Split) | Gets or sets the height of a split.
HighLightRowStyle (inherited from Split) | Gets or sets the Style object that controls the current row/cell when the MarqueeStyle is set to Highlight Row/Cell.
HorizontalOffset (inherited from Split) | Gets or sets the position of the Horizontal scrollbar.
HorizontalScrollGroup (inherited from Split) | Gets or sets the group which synchronizes horizontal scrolling between splits.
HScrollBar (inherited from Split) | Gets the HBar object that controls the appearance of the horizontal scrollbar.
InactiveStyle (inherited from Split) | Gets or sets the Style object that controls the grids caption when it doesn't have focus.
LeftCol (inherited from Split) | Gets or sets the left most visible column for a split.
Locked (inherited from Split) | Gets or sets a value indicating if the cells of a split can be edited.
MarqueeStyle (inherited from Split) | Gets or sets the MarqueeStyle for a Split.
MinHeight (inherited from Split) | Gets or sets the minimum height that a split can be interactively resized.
MinWidth (inherited from Split) | Gets or sets the minimum width that a split can be interactively resized.
Name (inherited from Split) | Gets or sets the name of a split.
OddRowStyle (inherited from Split) | Gets or sets the Style object that controls the appearance of an odd-numbered row when using AlternatingRows.
RecordSelectors (inherited from Split) | Gets or sets a value indicating the visibility of row headers for Split.
RecordSelectorStyle (inherited from Split) | Gets or sets the Style object that controls the appearance of the RecordSelectors.
RecordSelectorWidth (inherited from Split) | Gets or sets the width of the row headers.
Rows (inherited from Split) | Gets the collection of Rows displayed in the Split.
SelectedStyle (inherited from Split) | Gets or sets the Style object that controls the appearance of selected rows and columns.
SplitSize (inherited from Split) | Gets or sets the size of a split.
SplitSizeMode (inherited from Split) | Gets or sets a value indicating how the SplitSize property is used to determine the actual size of a split.
SpringMode (inherited from Split) | Gets or sets a value that determines how columns will resize when the grid is resized.
Style (inherited from Split) | Gets or sets the root Style object for the Split.
VerticalOffset (inherited from Split) | Gets or sets the position of the Vertical scrollbar.
VerticalScrollGroup (inherited from Split) | Gets or sets the group which synchronizes verticall scrolling between splits.
VScrollBar (inherited from Split) | Gets the VBar object that controls the appearance of the vertical scrollbar.

Public Methods

Dispose (inherited from View) | Overloaded. Releases the resources used by the view.
ToString (inherited from View) | Returns the string that represents the current object.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


DropdownView Properties

DropdownView Properties

The properties of the DropdownView class are listed here. For a complete list of DropdownView class members, see the DropdownView Members topic.

Public Properties

AllowColMove (inherited from Split) | Gets or sets a value indicating the ability to move columns.
AllowColSelect (inherited from Split) | Gets or sets a value indicating the ability to select columns.
AllowFocus (inherited from Split) | Gets or sets a value indicating whether the split can recieve focus.
AllowHorizontalSizing (inherited from Split) | Gets or sets a value indicating whether a user is allowed to resize horizontal splits.
AllowRowSelect (inherited from Split) | Gets or sets a value indicating the ability to select rows.
AllowRowSizing (inherited from Split) | Gets or sets how interactive row resizing is performed.
AllowVerticalSizing (inherited from Split) | Gets or sets a value indicating whether a user is allowed to resize vertical splits.
AlternatingRowStyle (inherited from Split) | Gets or sets a value indicating whether the split uses the OddRowStyle for odd-numbered rows and EvenRowStyle for even-numbered rows.
BorderStyle (inherited from View) | Controls the appearance of the border rendered for a split.
Caption (inherited from Split) | Gets or sets the caption.
CaptionHeight (inherited from Split) | Gets or sets the height of the caption.
CaptionStyle (inherited from Split) | Gets or sets the Style object that controls the appearance of the caption area.
ColumnCaptionHeight (inherited from Split) | Gets or sets the height of the column captions.
ColumnFooterHeight (inherited from Split) | Gets or sets the height of column footers.
CurrentCellVisible (inherited from Split) | Gets or sets a value indicating the visibility of the current cell in a split.
DisplayColumns (inherited from Split) | Gets a collection of C1DisplayColumn objects.
EditorStyle (inherited from Split) | Gets or sets the Style object that controls the appearance of the cell editor within a grid.
EvenRowStyle (inherited from Split) | Gets or sets the Style object that controls the appearance of an even-numbered row when using AlternatingRows.
ExtendRightColumn (inherited from Split) | Gets or sets a value that determines how the last column will extend to fill the dead area of the split.
FetchRowStyles (inherited from Split) | Gets or sets a value indicating whether the FetchRowStyle event will be raised.
FilterActive (inherited from Split) | Gets or sets a value indicating whether the filter bar has focus.
FilterBar (inherited from Split) | Gets or sets a value indicating the visibility of the FilterBar.
FilterBarStyle (inherited from Split) | Gets or sets the Style object that controls the appearance of the FilterBar.
FilterBorderStyle (inherited from Split) | Controls the appearance of the border between the filterbar and the body of the grid.
FirstRow (inherited from Split) | Gets or sets the row index for the first visible row in a split.
FooterStyle (inherited from Split) | Gets or sets the Style object that controls the appearance of column footers.
HeadingStyle (inherited from Split) | Gets or sets the Style object that controls the appearance of the grids column headers.
Height (inherited from Split) | Gets or sets the height of a split.
HighLightRowStyle (inherited from Split) | Gets or sets the Style object that controls the current row/cell when the MarqueeStyle is set to Highlight Row/Cell.
HorizontalOffset (inherited from Split) | Gets or sets the position of the Horizontal scrollbar.
HorizontalScrollGroup (inherited from Split) | Gets or sets the group which synchronizes horizontal scrolling between splits.
HScrollBar (inherited from Split) | Gets the HBar object that controls the appearance of the horizontal scrollbar.
InactiveStyle (inherited from Split) | Gets or sets the Style object that controls the grids caption when it doesn't have focus.
LeftCol (inherited from Split) | Gets or sets the left most visible column for a split.
Locked (inherited from Split) | Gets or sets a value indicating if the cells of a split can be edited.
MarqueeStyle (inherited from Split) | Gets or sets the MarqueeStyle for a Split.
MinHeight (inherited from Split) | Gets or sets the minimum height that a split can be interactively resized.
MinWidth (inherited from Split) | Gets or sets the minimum width that a split can be interactively resized.
Name (inherited from Split) | Gets or sets the name of a split.
OddRowStyle (inherited from Split) | Gets or sets the Style object that controls the appearance of an odd-numbered row when using AlternatingRows.
RecordSelectors (inherited from Split) | Gets or sets a value indicating the visibility of row headers for Split.
RecordSelectorStyle (inherited from Split) | Gets or sets the Style object that controls the appearance of the RecordSelectors.
RecordSelectorWidth (inherited from Split) | Gets or sets the width of the row headers.
Rows (inherited from Split) | Gets the collection of Rows displayed in the Split.
SelectedStyle (inherited from Split) | Gets or sets the Style object that controls the appearance of selected rows and columns.
SplitSize (inherited from Split) | Gets or sets the size of a split.
SplitSizeMode (inherited from Split) | Gets or sets a value indicating how the SplitSize property is used to determine the actual size of a split.
SpringMode (inherited from Split) | Gets or sets a value that determines how columns will resize when the grid is resized.
Style (inherited from Split) | Gets or sets the root Style object for the Split.
VerticalOffset (inherited from Split) | Gets or sets the position of the Vertical scrollbar.
VerticalScrollGroup (inherited from Split) | Gets or sets the group which synchronizes verticall scrolling between splits.
VScrollBar (inherited from Split) | Gets the VBar object that controls the appearance of the vertical scrollbar.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


DropdownView Methods

DropdownView Methods

The methods of the DropdownView class are listed here. For a complete list of DropdownView class members, see the DropdownView Members topic.

Public Methods

Dispose (inherited from View) | Overloaded. Releases the resources used by the view.
ToString (inherited from View) | Returns the string that represents the current object.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


DropdownWidthEnum Enumeration

DropdownWidthEnum Enumeration

Specifies the width of a C1TrueDBDropdown for a cell.

[Visual Basic]

Public Enum DropdownWidthEnum

[C#]

public enum DropdownWidthEnum

[Delphi]

type DropdownWidthEnum = (Column, Default);

Namespace: C1.Win.C1TrueDBGrid

Assembly: C1.Win.C1TrueDBGrid.2 (in C1.Win.C1TrueDBGrid.2.dll)

Remarks

Use the members of this enumeration to set the value of the DropdownWidth property in the C1TrueDBDropdown class.

Members

Member name | Description
Column | The width of the drop-down is the column width.
Default | The width of the drop-down is the control width.

See Also

C1.Win.C1TrueDBGrid Namespace

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ErrorEventArgs Class

ErrorEventArgs Class

Provides data for the Error event.

For a list of all members of this type, see ErrorEventArgs Members.

System.Object

System.EventArgs

C1.Win.C1TrueDBGrid.ErrorEventArgs

[Visual Basic]

Public Class ErrorEventArgs

Inherits EventArgs

[C#]

public class ErrorEventArgs : EventArgs

[Delphi]

type ErrorEventArgs = class (EventArgs);

Namespace: C1.Win.C1TrueDBGrid

Assembly: C1.Win.C1TrueDBGrid.2 (in C1.Win.C1TrueDBGrid.2.dll)

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ErrorEventArgs Members

ErrorEventArgs Members

ErrorEventArgs overview

Public Properties

Continue | True to continue as if no exception was raised.
Exception | The exception which caused the event to be raised.
Handled | True if the exception has been handled.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ErrorEventArgs Properties

ErrorEventArgs Properties

The properties of the ErrorEventArgs class are listed here. For a complete list of ErrorEventArgs class members, see the ErrorEventArgs Members topic.

Public Properties

Continue | True to continue as if no exception was raised.
Exception | The exception which caused the event to be raised.
Handled | True if the exception has been handled.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ErrorEventArgs.Continue Property

ErrorEventArgs.Continue Property

True to continue as if no exception was raised.

[Visual Basic]

Public Property Continue As Boolean

[C#]

public bool Continue {get;set;}

[Delphi]

public property Continue: Boolean read get_Continue write set_Continue;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ErrorEventArgs.Exception Property

ErrorEventArgs.Exception Property

The exception which caused the event to be raised.

[Visual Basic]

Public ReadOnly Property Exception As Exception

[C#]

public Exception Exception {get;}

[Delphi]

public property Exception: Exception read get_Exception;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ErrorEventArgs.Handled Property

ErrorEventArgs.Handled Property

True if the exception has been handled.

[Visual Basic]

Public Property Handled As Boolean

[C#]

public bool Handled {get;set;}

[Delphi]

public property Handled: Boolean read get_Handled write set_Handled;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ErrorEventHandler Delegate

ErrorEventHandler Delegate

Raised when an excpetion is thrown via the UI.

[Visual Basic]

Public Delegate Sub ErrorEventHandler( _

ByVal sender As Object, _

ByVal e As ErrorEventArgs _

)

[C#]

public delegate void ErrorEventHandler(

object sender,

ErrorEventArgs e

);

[Delphi]

type ErrorEventHandler = procedure (

sender: Object;

e: ErrorEventArgs

) of object;

Namespace: C1.Win.C1TrueDBGrid

Assembly: C1.Win.C1TrueDBGrid.2 (in C1.Win.C1TrueDBGrid.2.dll)

See Also

C1.Win.C1TrueDBGrid Namespace

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ExposeCellModeEnum Enumeration

ExposeCellModeEnum Enumeration

Specifies how the grid exposes the rightmost column when it gets focus.

[Visual Basic]

Public Enum ExposeCellModeEnum

[C#]

public enum ExposeCellModeEnum

[Delphi]

type ExposeCellModeEnum = (ScrollNever, ScrollOnEdit, ScrollOnSelect);

Namespace: C1.Win.C1TrueDBGrid

Assembly: C1.Win.C1TrueDBGrid.2 (in C1.Win.C1TrueDBGrid.2.dll)

Remarks

Use the members of this enumeration to set the value of the ExposeCellMode property in the C1TrueDBGrid class.

Members

Member name | Description
ScrollNever | The grid will always leave the rightmost column clipped.
ScrollOnEdit | The grid will not move when the rightmost column is clicked initially. However, if the user attempts to edit the cell, then the grid will scroll to the left to display the rightmost column in its entirety.
ScrollOnSelect | The grid will scroll to the left to display the rightmost column in its entirety.

See Also

C1.Win.C1TrueDBGrid Namespace

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


FetchCellStyleEventArgs Class

FetchCellStyleEventArgs Class

Provides data for the FetchCellStyle event.

For a list of all members of this type, see FetchCellStyleEventArgs Members.

System.Object

System.EventArgs

C1.Win.C1TrueDBGrid.FetchCellStyleEventArgs

[Visual Basic]

Public Class FetchCellStyleEventArgs

Inherits EventArgs

[C#]

public class FetchCellStyleEventArgs : EventArgs

[Delphi]

type FetchCellStyleEventArgs = class (EventArgs);

Namespace: C1.Win.C1TrueDBGrid

Assembly: C1.Win.C1TrueDBGrid.2 (in C1.Win.C1TrueDBGrid.2.dll)

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


FetchCellStyleEventArgs Members

FetchCellStyleEventArgs Members

FetchCellStyleEventArgs overview

Public Properties

CellStyle | The Style used to render the cell.
Col | The index of the column in the DisplayColumns collection.
Column | The C1DisplayColumn being rendered.
Condition | The sum of one or more CellStyleFlag constants describing the disposition of the cell being rendered.
Row | The index of the row for the cell being rendered.
Split | Indicates the position in the Splits collection.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


FetchCellStyleEventArgs Properties

FetchCellStyleEventArgs Properties

The properties of the FetchCellStyleEventArgs class are listed here. For a complete list of FetchCellStyleEventArgs class members, see the FetchCellStyleEventArgs Members topic.

Public Properties

CellStyle | The Style used to render the cell.
Col | The index of the column in the DisplayColumns collection.
Column | The C1DisplayColumn being rendered.
Condition | The sum of one or more CellStyleFlag constants describing the disposition of the cell being rendered.
Row | The index of the row for the cell being rendered.
Split | Indicates the position in the Splits collection.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


FetchCellStyleEventArgs.CellStyle Property

FetchCellStyleEventArgs.CellStyle Property

The Style used to render the cell.

[Visual Basic]

Public ReadOnly Property CellStyle As Style

[C#]

public Style CellStyle {get;}

[Delphi]

public property CellStyle: Style read get_CellStyle;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


FetchCellStyleEventArgs.Col Property

FetchCellStyleEventArgs.Col Property

The index of the column in the DisplayColumns collection.

[Visual Basic]

Public ReadOnly Property Col As Integer

[C#]

public int Col {get;}

[Delphi]

public property Col: Int32 read get_Col;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


FetchCellStyleEventArgs.Column Property

FetchCellStyleEventArgs.Column Property

The C1DisplayColumn being rendered.

[Visual Basic]

Public ReadOnly Property Column As C1DisplayColumn

[C#]

public C1DisplayColumn Column {get;}

[Delphi]

public property Column: C1DisplayColumn read get_Column;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


FetchCellStyleEventArgs.Condition Property

FetchCellStyleEventArgs.Condition Property

The sum of one or more CellStyleFlag constants describing the disposition of the cell being rendered.

[Visual Basic]

Public ReadOnly Property Condition As CellStyleFlag

[C#]

public CellStyleFlag Condition {get;}

[Delphi]

public property Condition: CellStyleFlag read get_Condition;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


FetchCellStyleEventArgs.Row Property

FetchCellStyleEventArgs.Row Property

The index of the row for the cell being rendered.

[Visual Basic]

Public ReadOnly Property Row As Integer

[C#]

public int Row {get;}

[Delphi]

public property Row: Int32 read get_Row;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


FetchCellStyleEventArgs.Split Property

FetchCellStyleEventArgs.Split Property

Indicates the position in the Splits collection.

[Visual Basic]

Public ReadOnly Property Split As Integer

[C#]

public int Split {get;}

[Delphi]

public property Split: Int32 read get_Split;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


FetchCellStyleEventHandler Delegate

FetchCellStyleEventHandler Delegate

Raised when the Style used to render a cell needs customization.

[Visual Basic]

Public Delegate Sub FetchCellStyleEventHandler( _

ByVal sender As Object, _

ByVal e As FetchCellStyleEventArgs _

)

[C#]

public delegate void FetchCellStyleEventHandler(

object sender,

FetchCellStyleEventArgs e

);

[Delphi]

type FetchCellStyleEventHandler = procedure (

sender: Object;

e: FetchCellStyleEventArgs

) of object;

Namespace: C1.Win.C1TrueDBGrid

Assembly: C1.Win.C1TrueDBGrid.2 (in C1.Win.C1TrueDBGrid.2.dll)

See Also

C1.Win.C1TrueDBGrid Namespace

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


FetchCellTipsEventArgs Class

FetchCellTipsEventArgs Class

Provides data for the FetchCellTips event.

For a list of all members of this type, see FetchCellTipsEventArgs Members.

System.Object

System.EventArgs

C1.Win.C1TrueDBGrid.FetchCellTipsEventArgs

[Visual Basic]

Public Class FetchCellTipsEventArgs

Inherits EventArgs

[C#]

public class FetchCellTipsEventArgs : EventArgs

[Delphi]

type FetchCellTipsEventArgs = class (EventArgs);

Namespace: C1.Win.C1TrueDBGrid

Assembly: C1.Win.C1TrueDBGrid.2 (in C1.Win.C1TrueDBGrid.2.dll)

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


FetchCellTipsEventArgs Members

FetchCellTipsEventArgs Members

FetchCellTipsEventArgs overview

Public Properties

CellTip | The text to be displayed in the cell tip.
ColIndex | Indicates the position in the DisplayColumns collection.
Column | The C1DisplayColumn that this tip is associated with.
FullyDisplayed | Indicates if the contents of the cell is fully displayed.
Row | The index of the row for the cell tip.
SplitIndex | Indicates the position of the Split in the Splits collection.
TipStyle | The Style used to render the cell tip.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


FetchCellTipsEventArgs Properties

FetchCellTipsEventArgs Properties

The properties of the FetchCellTipsEventArgs class are listed here. For a complete list of FetchCellTipsEventArgs class members, see the FetchCellTipsEventArgs Members topic.

Public Properties

CellTip | The text to be displayed in the cell tip.
ColIndex | Indicates the position in the DisplayColumns collection.
Column | The C1DisplayColumn that this tip is associated with.
FullyDisplayed | Indicates if the contents of the cell is fully displayed.
Row | The index of the row for the cell tip.
SplitIndex | Indicates the position of the Split in the Splits collection.
TipStyle | The Style used to render the cell tip.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


FetchCellTipsEventArgs.CellTip Property

FetchCellTipsEventArgs.CellTip Property

The text to be displayed in the cell tip.

[Visual Basic]

Public Property CellTip As String

[C#]

public string CellTip {get;set;}

[Delphi]

public property CellTip: String read get_CellTip write set_CellTip;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


FetchCellTipsEventArgs.ColIndex Property

FetchCellTipsEventArgs.ColIndex Property

Indicates the position in the DisplayColumns collection.

[Visual Basic]

Public ReadOnly Property ColIndex As Integer

[C#]

public int ColIndex {get;}

[Delphi]

public property ColIndex: Int32 read get_ColIndex;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


FetchCellTipsEventArgs.Column Property

FetchCellTipsEventArgs.Column Property

The C1DisplayColumn that this tip is associated with.

[Visual Basic]

Public ReadOnly Property Column As C1DisplayColumn

[C#]

public C1DisplayColumn Column {get;}

[Delphi]

public property Column: C1DisplayColumn read get_Column;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


FetchCellTipsEventArgs.FullyDisplayed Property

FetchCellTipsEventArgs.FullyDisplayed Property

Indicates if the contents of the cell is fully displayed.

[Visual Basic]

Public ReadOnly Property FullyDisplayed As Boolean

[C#]

public bool FullyDisplayed {get;}

[Delphi]

public property FullyDisplayed: Boolean read get_FullyDisplayed;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


FetchCellTipsEventArgs.Row Property

FetchCellTipsEventArgs.Row Property

The index of the row for the cell tip.

[Visual Basic]

Public ReadOnly Property Row As Integer

[C#]

public int Row {get;}

[Delphi]

public property Row: Int32 read get_Row;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


FetchCellTipsEventArgs.SplitIndex Property

FetchCellTipsEventArgs.SplitIndex Property

Indicates the position of the Split in the Splits collection.

[Visual Basic]

Public ReadOnly Property SplitIndex As Integer

[C#]

public int SplitIndex {get;}

[Delphi]

public property SplitIndex: Int32 read get_SplitIndex;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


FetchCellTipsEventArgs.TipStyle Property

FetchCellTipsEventArgs.TipStyle Property

The Style used to render the cell tip.

[Visual Basic]

Public ReadOnly Property TipStyle As Style

[C#]

public Style TipStyle {get;}

[Delphi]

public property TipStyle: Style read get_TipStyle;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


FetchCellTipsEventHandler Delegate

FetchCellTipsEventHandler Delegate

Raised when cell tips are to be displayed.

[Visual Basic]

Public Delegate Sub FetchCellTipsEventHandler( _

ByVal sender As Object, _

ByVal e As FetchCellTipsEventArgs _

)

[C#]

public delegate void FetchCellTipsEventHandler(

object sender,

FetchCellTipsEventArgs e

);

[Delphi]

type FetchCellTipsEventHandler = procedure (

sender: Object;

e: FetchCellTipsEventArgs

) of object;

Namespace: C1.Win.C1TrueDBGrid

Assembly: C1.Win.C1TrueDBGrid.2 (in C1.Win.C1TrueDBGrid.2.dll)

See Also

C1.Win.C1TrueDBGrid Namespace

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


FetchRowStyleEventArgs Class

FetchRowStyleEventArgs Class

Provides data for the FetchRowStyle event.

For a list of all members of this type, see FetchRowStyleEventArgs Members.

System.Object

System.EventArgs

C1.Win.C1TrueDBGrid.FetchRowStyleEventArgs

[Visual Basic]

Public Class FetchRowStyleEventArgs

Inherits EventArgs

[C#]

public class FetchRowStyleEventArgs : EventArgs

[Delphi]

type FetchRowStyleEventArgs = class (EventArgs);

Namespace: C1.Win.C1TrueDBGrid

Assembly: C1.Win.C1TrueDBGrid.2 (in C1.Win.C1TrueDBGrid.2.dll)

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


FetchRowStyleEventArgs Members

FetchRowStyleEventArgs Members

FetchRowStyleEventArgs overview

Public Properties

CellStyle | The Style used to render the row.
Row | The index of the row for the cell being rendered.
Split | Indicates the position in the Splits collection.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


FetchRowStyleEventArgs Properties

FetchRowStyleEventArgs Properties

The properties of the FetchRowStyleEventArgs class are listed here. For a complete list of FetchRowStyleEventArgs class members, see the FetchRowStyleEventArgs Members topic.

Public Properties

CellStyle | The Style used to render the row.
Row | The index of the row for the cell being rendered.
Split | Indicates the position in the Splits collection.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


FetchRowStyleEventArgs.CellStyle Property

FetchRowStyleEventArgs.CellStyle Property

The Style used to render the row.

[Visual Basic]

Public ReadOnly Property CellStyle As Style

[C#]

public Style CellStyle {get;}

[Delphi]

public property CellStyle: Style read get_CellStyle;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


FetchRowStyleEventArgs.Row Property

FetchRowStyleEventArgs.Row Property

The index of the row for the cell being rendered.

[Visual Basic]

Public ReadOnly Property Row As Integer

[C#]

public int Row {get;}

[Delphi]

public property Row: Int32 read get_Row;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


FetchRowStyleEventArgs.Split Property

FetchRowStyleEventArgs.Split Property

Indicates the position in the Splits collection.

[Visual Basic]

Public ReadOnly Property Split As Integer

[C#]

public int Split {get;}

[Delphi]

public property Split: Int32 read get_Split;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


FetchRowStyleEventHandler Delegate

FetchRowStyleEventHandler Delegate

Raised when the Style used to render a row needs customization.

[Visual Basic]

Public Delegate Sub FetchRowStyleEventHandler( _

ByVal sender As Object, _

ByVal e As FetchRowStyleEventArgs _

)

[C#]

public delegate void FetchRowStyleEventHandler(

object sender,

FetchRowStyleEventArgs e

);

[Delphi]

type FetchRowStyleEventHandler = procedure (

sender: Object;

e: FetchRowStyleEventArgs

) of object;

Namespace: C1.Win.C1TrueDBGrid

Assembly: C1.Win.C1TrueDBGrid.2 (in C1.Win.C1TrueDBGrid.2.dll)

See Also

C1.Win.C1TrueDBGrid Namespace

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


FetchScrollTipsEventArgs Class

FetchScrollTipsEventArgs Class

Provides data for the FetchScrollTips event.

For a list of all members of this type, see FetchScrollTipsEventArgs Members.

System.Object

System.EventArgs

C1.Win.C1TrueDBGrid.FetchScrollTipsEventArgs

[Visual Basic]

Public Class FetchScrollTipsEventArgs

Inherits EventArgs

[C#]

public class FetchScrollTipsEventArgs : EventArgs

[Delphi]

type FetchScrollTipsEventArgs = class (EventArgs);

Namespace: C1.Win.C1TrueDBGrid

Assembly: C1.Win.C1TrueDBGrid.2 (in C1.Win.C1TrueDBGrid.2.dll)

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


FetchScrollTipsEventArgs Members

FetchScrollTipsEventArgs Members

FetchScrollTipsEventArgs overview

Public Properties

ColIndex | Indicates the position in the DisplayColumns collection.
Column | The current C1DisplayColumn.
Row | The index of the topmost row for the scroll tip.
ScrollBar | Indicates the scrollbar that was moved.
ScrollTip | The text to be displayed in the scroll tip.
SplitIndex | Indicates the position of the Split in the Splits collection.
TipStyle | The Style used to render the scroll tip.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


FetchScrollTipsEventArgs Properties

FetchScrollTipsEventArgs Properties

The properties of the FetchScrollTipsEventArgs class are listed here. For a complete list of FetchScrollTipsEventArgs class members, see the FetchScrollTipsEventArgs Members topic.

Public Properties

ColIndex | Indicates the position in the DisplayColumns collection.
Column | The current C1DisplayColumn.
Row | The index of the topmost row for the scroll tip.
ScrollBar | Indicates the scrollbar that was moved.
ScrollTip | The text to be displayed in the scroll tip.
SplitIndex | Indicates the position of the Split in the Splits collection.
TipStyle | The Style used to render the scroll tip.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


FetchScrollTipsEventArgs.ColIndex Property

FetchScrollTipsEventArgs.ColIndex Property

Indicates the position in the DisplayColumns collection.

[Visual Basic]

Public ReadOnly Property ColIndex As Integer

[C#]

public int ColIndex {get;}

[Delphi]

public property ColIndex: Int32 read get_ColIndex;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


FetchScrollTipsEventArgs.Column Property

FetchScrollTipsEventArgs.Column Property

The current C1DisplayColumn.

[Visual Basic]

Public ReadOnly Property Column As C1DisplayColumn

[C#]

public C1DisplayColumn Column {get;}

[Delphi]

public property Column: C1DisplayColumn read get_Column;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


FetchScrollTipsEventArgs.Row Property

FetchScrollTipsEventArgs.Row Property

The index of the topmost row for the scroll tip.

[Visual Basic]

Public ReadOnly Property Row As Integer

[C#]

public int Row {get;}

[Delphi]

public property Row: Int32 read get_Row;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


FetchScrollTipsEventArgs.ScrollBar Property

FetchScrollTipsEventArgs.ScrollBar Property

Indicates the scrollbar that was moved.

[Visual Basic]

Public ReadOnly Property ScrollBar As ScrollBarEnum

[C#]

public ScrollBarEnum ScrollBar {get;}

[Delphi]

public property ScrollBar: ScrollBarEnum read get_ScrollBar;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


FetchScrollTipsEventArgs.ScrollTip Property

FetchScrollTipsEventArgs.ScrollTip Property

The text to be displayed in the scroll tip.

[Visual Basic]

Public Property ScrollTip As String

[C#]

public string ScrollTip {get;set;}

[Delphi]

public property ScrollTip: String read get_ScrollTip write set_ScrollTip;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


FetchScrollTipsEventArgs.SplitIndex Property

FetchScrollTipsEventArgs.SplitIndex Property

Indicates the position of the Split in the Splits collection.

[Visual Basic]

Public ReadOnly Property SplitIndex As Integer

[C#]

public int SplitIndex {get;}

[Delphi]

public property SplitIndex: Int32 read get_SplitIndex;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


FetchScrollTipsEventArgs.TipStyle Property

FetchScrollTipsEventArgs.TipStyle Property

The Style used to render the scroll tip.

[Visual Basic]

Public ReadOnly Property TipStyle As Style

[C#]

public Style TipStyle {get;}

[Delphi]

public property TipStyle: Style read get_TipStyle;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


FetchScrollTipsEventHandler Delegate

FetchScrollTipsEventHandler Delegate

Raised when scroll tips are to be displayed.

[Visual Basic]

Public Delegate Sub FetchScrollTipsEventHandler( _

ByVal sender As Object, _

ByVal e As FetchScrollTipsEventArgs _

)

[C#]

public delegate void FetchScrollTipsEventHandler(

object sender,

FetchScrollTipsEventArgs e

);

[Delphi]

type FetchScrollTipsEventHandler = procedure (

sender: Object;

e: FetchScrollTipsEventArgs

) of object;

Namespace: C1.Win.C1TrueDBGrid

Assembly: C1.Win.C1TrueDBGrid.2 (in C1.Win.C1TrueDBGrid.2.dll)

See Also

C1.Win.C1TrueDBGrid Namespace

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


FilterEventArgs Class

FilterEventArgs Class

Provides data for the Filter, AfterFilter, Sort, and AfterSort.

For a list of all members of this type, see FilterEventArgs Members.

System.Object

System.EventArgs

C1.Win.C1TrueDBGrid.FilterEventArgs

[Visual Basic]

Public Class FilterEventArgs

Inherits EventArgs

[C#]

public class FilterEventArgs : EventArgs

[Delphi]

type FilterEventArgs = class (EventArgs);

Namespace: C1.Win.C1TrueDBGrid

Assembly: C1.Win.C1TrueDBGrid.2 (in C1.Win.C1TrueDBGrid.2.dll)

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


FilterEventArgs Members

FilterEventArgs Members

FilterEventArgs overview

Public Properties

Condition

The filter or sort condition.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


FilterEventArgs Properties

FilterEventArgs Properties

The properties of the FilterEventArgs class are listed here. For a complete list of FilterEventArgs class members, see the FilterEventArgs Members topic.

Public Properties

Condition

The filter or sort condition.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


FilterEventArgs.Condition Property

FilterEventArgs.Condition Property

The filter or sort condition.

[Visual Basic]

Public ReadOnly Property Condition As String

[C#]

public string Condition {get;}

[Delphi]

public property Condition: String read get_Condition;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


FilterEventHandler Delegate

FilterEventHandler Delegate

Raised when the grid is sorted or filtered.

[Visual Basic]

Public Delegate Sub FilterEventHandler( _

ByVal sender As Object, _

ByVal e As FilterEventArgs _

)

[C#]

public delegate void FilterEventHandler(

object sender,

FilterEventArgs e

);

[Delphi]

type FilterEventHandler = procedure (

sender: Object;

e: FilterEventArgs

) of object;

Namespace: C1.Win.C1TrueDBGrid

Assembly: C1.Win.C1TrueDBGrid.2 (in C1.Win.C1TrueDBGrid.2.dll)

See Also

C1.Win.C1TrueDBGrid Namespace

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


FlatModeEnum Enumeration

FlatModeEnum Enumeration

Specifies how 3D elements are rendered.

[Visual Basic]

Public Enum FlatModeEnum

[C#]

public enum FlatModeEnum

[Delphi]

type FlatModeEnum = (Flat, Popup, Standard, System);

Namespace: C1.Win.C1TrueDBGrid

Assembly: C1.Win.C1TrueDBGrid.2 (in C1.Win.C1TrueDBGrid.2.dll)

Remarks

Use the members of this enumeration to set the value of the FlatStyle property in the C1TrueDBGrid class.

Members

Member name | Description
Flat | Three-dimensional elements appear flat.
Popup | Three-dimensional elements are flat, but when the user drags the cursor over a column heading or recordselector, they become three-dimensional and appear to pop up.
Standard | The grid’s column headers and recordselectors are rendered with an inset three-dimensional look.
System | Three-dimensional elements uses XP Themes if available.

See Also

C1.Win.C1TrueDBGrid Namespace

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ForeGroundPicturePositionEnum Enumeration

ForeGroundPicturePositionEnum Enumeration

Specifies the location of the foreground image in a cell.

[Visual Basic]

Public Enum ForeGroundPicturePositionEnum

[C#]

public enum ForeGroundPicturePositionEnum

[Delphi]

type ForeGroundPicturePositionEnum = (BottomOfText, Far, LeftOfText, Near, PictureOnly, RightOfText, TextOnly, TopOfText);

Namespace: C1.Win.C1TrueDBGrid

Assembly: C1.Win.C1TrueDBGrid.2 (in C1.Win.C1TrueDBGrid.2.dll)

Remarks

Use the members of this enumeration to set the value of the ForeGroundPicturePosition property in the C1TrueDBGrid class.

Members

Member name | Description
BottomOfText | Image is rendered below any text in the cell.
Far | Image is rendered in the far side of the cell.
LeftOfText | Image is rendered to the left of any text in the cell.
Near | Image is rendered in the near side of the cell.
PictureOnly | Text is not displayed.
RightOfText | Image is rendered to the right of any text in the cell.
TextOnly | Image is not displayed.
TopOfText | Image is rendered on top of any text in the cell.

See Also

C1.Win.C1TrueDBGrid Namespace

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


FormatTextEventArgs Class

FormatTextEventArgs Class

Provides data for the FormatText event.

For a list of all members of this type, see FormatTextEventArgs Members.

System.Object

System.EventArgs

C1.Win.C1TrueDBGrid.FormatTextEventArgs

[Visual Basic]

Public Class FormatTextEventArgs

Inherits EventArgs

[C#]

public class FormatTextEventArgs : EventArgs

[Delphi]

type FormatTextEventArgs = class (EventArgs);

Namespace: C1.Win.C1TrueDBGrid

Assembly: C1.Win.C1TrueDBGrid.2 (in C1.Win.C1TrueDBGrid.2.dll)

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


FormatTextEventArgs Members

FormatTextEventArgs Members

FormatTextEventArgs overview

Public Properties

ColIndex | Indicates the position in the Columns collection.
Column | The C1DataColumn object.
Row | The row index for the cell to be formatted.
Value | The value to format.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


FormatTextEventArgs Properties

FormatTextEventArgs Properties

The properties of the FormatTextEventArgs class are listed here. For a complete list of FormatTextEventArgs class members, see the FormatTextEventArgs Members topic.

Public Properties

ColIndex | Indicates the position in the Columns collection.
Column | The C1DataColumn object.
Row | The row index for the cell to be formatted.
Value | The value to format.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


FormatTextEventArgs.ColIndex Property

FormatTextEventArgs.ColIndex Property

Indicates the position in the Columns collection.

[Visual Basic]

Public ReadOnly Property ColIndex As Integer

[C#]

public int ColIndex {get;}

[Delphi]

public property ColIndex: Int32 read get_ColIndex;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


FormatTextEventArgs.Column Property

FormatTextEventArgs.Column Property

The C1DataColumn object.

[Visual Basic]

Public ReadOnly Property Column As C1DataColumn

[C#]

public C1DataColumn Column {get;}

[Delphi]

public property Column: C1DataColumn read get_Column;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


FormatTextEventArgs.Row Property

FormatTextEventArgs.Row Property

The row index for the cell to be formatted.

[Visual Basic]

Public ReadOnly Property Row As Integer

[C#]

public int Row {get;}

[Delphi]

public property Row: Int32 read get_Row;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


FormatTextEventArgs.Value Property

FormatTextEventArgs.Value Property

The value to format.

[Visual Basic]

Public Property Value As String

[C#]

public string Value {get;set;}

[Delphi]

public property Value: String read get_Value write set_Value;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


FormatTextEventHandler Delegate

FormatTextEventHandler Delegate

Raised when a cell needs custom formatting.

[Visual Basic]

Public Delegate Sub FormatTextEventHandler( _

ByVal sender As Object, _

ByVal e As FormatTextEventArgs _

)

[C#]

public delegate void FormatTextEventHandler(

object sender,

FormatTextEventArgs e

);

[Delphi]

type FormatTextEventHandler = procedure (

sender: Object;

e: FormatTextEventArgs

) of object;

Namespace: C1.Win.C1TrueDBGrid

Assembly: C1.Win.C1TrueDBGrid.2 (in C1.Win.C1TrueDBGrid.2.dll)

See Also

C1.Win.C1TrueDBGrid Namespace

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


GenericTypeConverter Class

GenericTypeConverter Class

Expandable object converter that doesn't handle strings.

For a list of all members of this type, see GenericTypeConverter Members.

System.Object

System.ComponentModel.TypeConverter

System.ComponentModel.ExpandableObjectConverter

C1.Win.C1TrueDBGrid.GenericTypeConverter

[Visual Basic]

Public Class GenericTypeConverter

Inherits ExpandableObjectConverter

[C#]

public class GenericTypeConverter : ExpandableObjectConverter

[Delphi]

type GenericTypeConverter = class (ExpandableObjectConverter);

Namespace: C1.Win.C1TrueDBGrid

Assembly: C1.Win.C1TrueDBGrid.2 (in C1.Win.C1TrueDBGrid.2.dll)

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


GenericTypeConverter Members

GenericTypeConverter Members

GenericTypeConverter overview

Public Methods

CanConvertFrom | Overloaded. Overriden. Overloaded. Returns whether this converter can convert an object of one type to the type of this converter.
CanConvertTo | Overloaded. Overriden. Overloaded. Returns whether this converter can convert the object to the specified type.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


GenericTypeConverter Methods

GenericTypeConverter Methods

The methods of the GenericTypeConverter class are listed here. For a complete list of GenericTypeConverter class members, see the GenericTypeConverter Members topic.

Public Methods

CanConvertFrom | Overloaded. Overriden. Overloaded. Returns whether this converter can convert an object of one type to the type of this converter.
CanConvertTo | Overloaded. Overriden. Overloaded. Returns whether this converter can convert the object to the specified type.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


GenericTypeConverter.CanConvertFrom Method

GenericTypeConverter.CanConvertFrom Method

Overloaded. Returns whether this converter can convert an object of one type to the type of this converter.

[Visual Basic]

Overrides Public Function CanConvertFrom( _

ByVal context As ITypeDescriptorContext, _

ByVal sourceType As Type _

) As Boolean

[C#]

override public bool CanConvertFrom(

ITypeDescriptorContext context,

Type sourceType

);

[Delphi]

public function CanConvertFrom(

context: ITypeDescriptorContext;

sourceType: Type

): Boolean; overload; override;

Parameters

context

A System.ComponentModel.ITypeDescriptorContext that provides a format context.

sourceType

The type to convert from.

Return Value

True if this converter can perform the conversion; otherwise, False.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


GenericTypeConverter.CanConvertTo Method

GenericTypeConverter.CanConvertTo Method

Overloaded. Returns whether this converter can convert the object to the specified type.

[Visual Basic]

Overrides Public Function CanConvertTo( _

ByVal context As ITypeDescriptorContext, _

ByVal type As Type _

) As Boolean

[C#]

override public bool CanConvertTo(

ITypeDescriptorContext context,

Type type

);

[Delphi]

public function CanConvertTo(

context: ITypeDescriptorContext;

type: Type

): Boolean; overload; override;

Parameters

context

The System.ComponentModel.ITypeDescriptorContext that provides a format context.

type

The type to convert to.

Return Value

True if this converter can perform the conversion; otherwise, False.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


GradientModeEnum Enumeration

GradientModeEnum Enumeration

Controls the rendering of the style using a LinearGradient.

[Visual Basic]

Public Enum GradientModeEnum

[C#]

public enum GradientModeEnum

[Delphi]

type GradientModeEnum = (BackwardDiagonal, ForwardDiagonal, Horizontal, None, Vertical);

Namespace: C1.Win.C1TrueDBGrid

Assembly: C1.Win.C1TrueDBGrid.2 (in C1.Win.C1TrueDBGrid.2.dll)

Members

Member name | Description
BackwardDiagonal | Style is rendered using a backward diagonal LinearGradient.
ForwardDiagonal | Style is rendered using a forward diagonal LinearGradient.
Horizontal | Style is rendered using a horizontal LinearGradient.
None | Style is not rendered using a LinearGradient (default value).
Vertical | Style is rendered using a vertical LinearGradient.

See Also

C1.Win.C1TrueDBGrid Namespace

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


GridBorders Class

GridBorders Class

Represents the border in a Style.

For a list of all members of this type, see GridBorders Members.

System.Object

C1.Win.C1TrueDBGrid.GridBorders

[Visual Basic]

Public Class GridBorders

[C#]

public class GridBorders

[Delphi]

type GridBorders = class;

Namespace: C1.Win.C1TrueDBGrid

Assembly: C1.Win.C1TrueDBGrid.2 (in C1.Win.C1TrueDBGrid.2.dll)

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


GridBorders Members

GridBorders Members

GridBorders overview

Public Properties

BorderType | Gets or sets the type of border.
Bottom | Gets or sets the width of the bottom border.
Color | Gets or sets the color of the border.
Left | Gets or sets the width of the left border.
Right | Gets or sets the width of the right border.
Top | Gets or sets the width of the top border.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


GridBorders Properties

GridBorders Properties

The properties of the GridBorders class are listed here. For a complete list of GridBorders class members, see the GridBorders Members topic.

Public Properties

BorderType | Gets or sets the type of border.
Bottom | Gets or sets the width of the bottom border.
Color | Gets or sets the color of the border.
Left | Gets or sets the width of the left border.
Right | Gets or sets the width of the right border.
Top | Gets or sets the width of the top border.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


GridBorders.BorderType Property

GridBorders.BorderType Property

Gets or sets the type of border.

[Visual Basic]

Public Property BorderType As BorderTypeEnum

[C#]

public BorderTypeEnum BorderType {get;set;}

[Delphi]

public property BorderType: BorderTypeEnum read get_BorderType write set_BorderType;

Remarks

One of the GridBorders five properties. This property sets the width of the bottom cell border to the integer specified.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


GridBorders.Bottom Property

GridBorders.Bottom Property

Gets or sets the width of the bottom border.

[Visual Basic]

Public Property Bottom As Integer

[C#]

public int Bottom {get;set;}

[Delphi]

public property Bottom: Int32 read get_Bottom write set_Bottom;

Remarks

One of the GridBorders five properties. This property sets the width of the bottom cell border to the integer specified.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


GridBorders.Color Property

GridBorders.Color Property

Gets or sets the color of the border.

[Visual Basic]

Public Property Color As Color

[C#]

public Color Color {get;set;}

[Delphi]

public property Color: Color read get_Color write set_Color;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


GridBorders.Left Property

GridBorders.Left Property

Gets or sets the width of the left border.

[Visual Basic]

Public Property Left As Integer

[C#]

public int Left {get;set;}

[Delphi]

public property Left: Int32 read get_Left write set_Left;

Remarks

One of the GridBorders five properties. This property sets the width of the left cell border to the integer specified.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


GridBorders.Right Property

GridBorders.Right Property

Gets or sets the width of the right border.

[Visual Basic]

Public Property Right As Integer

[C#]

public int Right {get;set;}

[Delphi]

public property Right: Int32 read get_Right write set_Right;

Remarks

One of the GridBorders five properties. This property sets the width of the right cell border to the integer specified.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


GridBorders.Top Property

GridBorders.Top Property

Gets or sets the width of the top border.

[Visual Basic]

Public Property Top As Integer

[C#]

public int Top {get;set;}

[Delphi]

public property Top: Int32 read get_Top write set_Top;

Remarks

One of the GridBorders five properties. This property sets the width of the top cell border to the integer specified.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


GridStyleCollection Class

GridStyleCollection Class

Represents a collection of named Style.

For a list of all members of this type, see GridStyleCollection Members.

System.Object

System.Collections.CollectionBase

C1.Win.C1TrueDBGrid.GridStyleCollection

[Visual Basic]

Public Class GridStyleCollection

Inherits CollectionBase

[C#]

public class GridStyleCollection : CollectionBase

[Delphi]

type GridStyleCollection = class (CollectionBase);

Namespace: C1.Win.C1TrueDBGrid

Assembly: C1.Win.C1TrueDBGrid.2 (in C1.Win.C1TrueDBGrid.2.dll)

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


GridStyleCollection Members

GridStyleCollection Members

GridStyleCollection overview

Public Properties

Item

Overloaded. Gets the specified Style from the collection given its index.

Public Methods

Add | Adds a Style to the end of the collection.
IndexOf | Gets the index of the specified Style.
Insert | Inserts a Style at the specified index.
RemoveAt | Removes the Style at the specified index.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


GridStyleCollection Properties

GridStyleCollection Properties

The properties of the GridStyleCollection class are listed here. For a complete list of GridStyleCollection class members, see the GridStyleCollection Members topic.

Public Properties

Item

Overloaded. Gets the specified Style from the collection given its index.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


GridStyleCollection.Item Property

GridStyleCollection.Item Property

Overload List

Gets the specified Style from the collection given its index.

[Visual Basic] Overloads Public Default ReadOnly Property Item(Integer) As Style

[C#] public Style this[int]{get;}

[Delphi] public property Item[index: Int32]: Style read get_Item;

Gets the specified Style from the collection given its name.

[Visual Basic] Overloads Public Default ReadOnly Property Item(String) As Style

[C#] public Style this[string]{get;}

[Delphi] public property Item[name: String]: Style read get_Item;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


GridStyleCollection.Item Property (Int32)

GridStyleCollection.Item Property (Int32)

Previous Next

Gets the specified Style from the collection given its index.

[Visual Basic]

Public Default ReadOnly Property Item( _

ByVal index As Integer _

) As Style

[C#]

public Style this[

int index

] {get;}

[Delphi]

public property Item[

index: Int32

]: Style read get_Item;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


GridStyleCollection.Item Property (String)

GridStyleCollection.Item Property (String)

Previous Next

Gets the specified Style from the collection given its name.

[Visual Basic]

Public Default ReadOnly Property Item( _

ByVal name As String _

) As Style

[C#]

public Style this[

string name

] {get;}

[Delphi]

public property Item[

name: String

]: Style read get_Item;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


GridStyleCollection Methods

GridStyleCollection Methods

The methods of the GridStyleCollection class are listed here. For a complete list of GridStyleCollection class members, see the GridStyleCollection Members topic.

Public Methods

Add | Adds a Style to the end of the collection.
IndexOf | Gets the index of the specified Style.
Insert | Inserts a Style at the specified index.
RemoveAt | Removes the Style at the specified index.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


GridStyleCollection.Add Method

GridStyleCollection.Add Method

Adds a Style to the end of the collection.

[Visual Basic]

Public Function Add( _

ByVal style As Style _

) As Integer

[C#]

public int Add(

Style style

);

[Delphi]

public function Add(

style: Style

): Int32;

Parameters

style

The Style to add.

Return Value

The index at which the Style has been added.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


GridStyleCollection.IndexOf Method

GridStyleCollection.IndexOf Method

Gets the index of the specified Style.

[Visual Basic]

Public Function IndexOf( _

ByVal style As Style _

) As Integer

[C#]

public int IndexOf(

Style style

);

[Delphi]

public function IndexOf(

style: Style

): Int32;

Parameters

style

The Style to index.

Return Value

The index of the Style.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


GridStyleCollection.Insert Method

GridStyleCollection.Insert Method

Inserts a Style at the specified index.

[Visual Basic]

Public Sub Insert( _

ByVal index As Integer, _

ByVal style As Style _

)

[C#]

public void Insert(

int index,

Style style

);

[Delphi]

public procedure Insert(

index: Int32;

style: Style

);

Parameters

index

The zero-based index at which the Style should be inserted.

style

The Style to insert.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


GridStyleCollection.RemoveAt Method

GridStyleCollection.RemoveAt Method

Removes the Style at the specified index.

[Visual Basic]

Public Sub RemoveAt( _

ByVal index As Integer _

)

[C#]

new public void RemoveAt(

int index

);

[Delphi]

public procedure RemoveAt(

index: Int32

);

Parameters

index

The zero-based index of the Style to remove.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


GroupColEventArgs Class

GroupColEventArgs Class

Provides data for the GroupHeadClick event.

For a list of all members of this type, see GroupColEventArgs Members.

System.Object

System.EventArgs

C1.Win.C1TrueDBGrid.GroupColEventArgs

[Visual Basic]

Public Class GroupColEventArgs

Inherits EventArgs

[C#]

public class GroupColEventArgs : EventArgs

[Delphi]

type GroupColEventArgs = class (EventArgs);

Namespace: C1.Win.C1TrueDBGrid

Assembly: C1.Win.C1TrueDBGrid.2 (in C1.Win.C1TrueDBGrid.2.dll)

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


GroupColEventArgs Members

GroupColEventArgs Members

GroupColEventArgs overview

Public Properties

ColIndex | Indicates the position in the DisplayColumns collection.
DataColumn | The C1DataColumn that was clicked.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


GroupColEventArgs Properties

GroupColEventArgs Properties

The properties of the GroupColEventArgs class are listed here. For a complete list of GroupColEventArgs class members, see the GroupColEventArgs Members topic.

Public Properties

ColIndex | Indicates the position in the DisplayColumns collection.
DataColumn | The C1DataColumn that was clicked.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


GroupColEventArgs.ColIndex Property

GroupColEventArgs.ColIndex Property

Indicates the position in the DisplayColumns collection.

[Visual Basic]

Public ReadOnly Property ColIndex As Integer

[C#]

public int ColIndex {get;}

[Delphi]

public property ColIndex: Int32 read get_ColIndex;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


GroupColEventArgs.DataColumn Property

GroupColEventArgs.DataColumn Property

The C1DataColumn that was clicked.

[Visual Basic]

Public ReadOnly Property DataColumn As C1DataColumn

[C#]

public C1DataColumn DataColumn {get;}

[Delphi]

public property DataColumn: C1DataColumn read get_DataColumn;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


GroupColEventHandler Delegate

GroupColEventHandler Delegate

Raised when grouping columns.

[Visual Basic]

Public Delegate Sub GroupColEventHandler( _

ByVal sender As Object, _

ByVal e As GroupColEventArgs _

)

[C#]

public delegate void GroupColEventHandler(

object sender,

GroupColEventArgs e

);

[Delphi]

type GroupColEventHandler = procedure (

sender: Object;

e: GroupColEventArgs

) of object;

Namespace: C1.Win.C1TrueDBGrid

Assembly: C1.Win.C1TrueDBGrid.2 (in C1.Win.C1TrueDBGrid.2.dll)

See Also

C1.Win.C1TrueDBGrid Namespace

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


GroupColMoveEventArgs Class

GroupColMoveEventArgs Class

Provides data for the GroupColMove event.

For a list of all members of this type, see GroupColMoveEventArgs Members.

System.Object

System.EventArgs

C1.Win.C1TrueDBGrid.ColMoveEventArgs

C1.Win.C1TrueDBGrid.GroupColMoveEventArgs

[Visual Basic]

Public Class GroupColMoveEventArgs

Inherits ColMoveEventArgs

[C#]

public class GroupColMoveEventArgs : ColMoveEventArgs

[Delphi]

type GroupColMoveEventArgs = class (ColMoveEventArgs);

Remarks

These properties can mean different things depending on what operation is being performed.

If a column is being dragged into the grouping area from a split, ColIndex is the index into the Split.DisplayColumns collection. Position is the index into the GroupedColumns collection.

If a column is rearranged within the grouping area, the Column property will be Null (Nothing). ColIndex is the current position within the GroupedColumns collection; Position will be the new position.

If a column is dragged from the grouping area into a split, the Position property will be –1. ColIndex denotes the insertion point within the Split.DisplayColumns collection.

Namespace: C1.Win.C1TrueDBGrid

Assembly: C1.Win.C1TrueDBGrid.2 (in C1.Win.C1TrueDBGrid.2.dll)

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


GroupColMoveEventArgs Members

GroupColMoveEventArgs Members

GroupColMoveEventArgs overview

Public Properties

Cancel (inherited from ColMoveEventArgs) | Gets or sets a value indicating that the action should not be performed.
ColIndex (inherited from ColMoveEventArgs) | Indicates the starting position in the DisplayColumns collection.
Column (inherited from ColMoveEventArgs) | Gets the C1DisplayColumn that is being moved.
DataColumn | The C1DataColumn for the column being moved.
Position (inherited from ColMoveEventArgs) | Indicates the target index of the column being moved.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


GroupColMoveEventArgs Properties

GroupColMoveEventArgs Properties

The properties of the GroupColMoveEventArgs class are listed here. For a complete list of GroupColMoveEventArgs class members, see the GroupColMoveEventArgs Members topic.

Public Properties

Cancel (inherited from ColMoveEventArgs) | Gets or sets a value indicating that the action should not be performed.
ColIndex (inherited from ColMoveEventArgs) | Indicates the starting position in the DisplayColumns collection.
Column (inherited from ColMoveEventArgs) | Gets the C1DisplayColumn that is being moved.
DataColumn | The C1DataColumn for the column being moved.
Position (inherited from ColMoveEventArgs) | Indicates the target index of the column being moved.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


GroupColMoveEventArgs.DataColumn Property

GroupColMoveEventArgs.DataColumn Property

The C1DataColumn for the column being moved.

[Visual Basic]

Public ReadOnly Property DataColumn As C1DataColumn

[C#]

public C1DataColumn DataColumn {get;}

[Delphi]

public property DataColumn: C1DataColumn read get_DataColumn;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


GroupColMoveEventHandler Delegate

GroupColMoveEventHandler Delegate

Raised when a column is moved into or out of the grouping area.

[Visual Basic]

Public Delegate Sub GroupColMoveEventHandler( _

ByVal sender As Object, _

ByVal e As GroupColMoveEventArgs _

)

[C#]

public delegate void GroupColMoveEventHandler(

object sender,

GroupColMoveEventArgs e

);

[Delphi]

type GroupColMoveEventHandler = procedure (

sender: Object;

e: GroupColMoveEventArgs

) of object;

Namespace: C1.Win.C1TrueDBGrid

Assembly: C1.Win.C1TrueDBGrid.2 (in C1.Win.C1TrueDBGrid.2.dll)

See Also

C1.Win.C1TrueDBGrid Namespace

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


GroupedColumnCollection Class

GroupedColumnCollection Class

Contains a collection of C1DataColumn objects that represent columns that are grouped.

For a list of all members of this type, see GroupedColumnCollection Members.

System.Object

System.Collections.CollectionBase

C1.Win.C1TrueDBGrid.C1DataColumnCollection

C1.Win.C1TrueDBGrid.GroupedColumnCollection

[Visual Basic]

Public Class GroupedColumnCollection

Inherits C1DataColumnCollection

[C#]

public class GroupedColumnCollection : C1DataColumnCollection

[Delphi]

type GroupedColumnCollection = class (C1DataColumnCollection);

Namespace: C1.Win.C1TrueDBGrid

Assembly: C1.Win.C1TrueDBGrid.2 (in C1.Win.C1TrueDBGrid.2.dll)

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


GroupedColumnCollection Members

GroupedColumnCollection Members

GroupedColumnCollection overview

Public Properties

Item (inherited from C1DataColumnCollection)

Overloaded. Gets the specified C1DataColumn from the collection at the specified index.

Public Methods

Add | Overriden. Adds a C1DataColumn to the end of the collection.
Clear | Removes all elements from the collection.
Exchange | Overloaded. Exchanges the C1DataColumn objects at the specified index. Exchanges the C1DataColumn objects at the specified index.
Insert | Overriden. Inserts a C1DataColumn at the specified index.
RemoveAt | Removes the C1DataColumn at the specified index.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


GroupedColumnCollection Properties

GroupedColumnCollection Properties

The properties of the GroupedColumnCollection class are listed here. For a complete list of GroupedColumnCollection class members, see the GroupedColumnCollection Members topic.

Public Properties

Item (inherited from C1DataColumnCollection)

Overloaded. Gets the specified C1DataColumn from the collection at the specified index.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


GroupedColumnCollection Methods

GroupedColumnCollection Methods

The methods of the GroupedColumnCollection class are listed here. For a complete list of GroupedColumnCollection class members, see the GroupedColumnCollection Members topic.

Public Methods

Add | Overriden. Adds a C1DataColumn to the end of the collection.
Clear | Removes all elements from the collection.
Exchange | Overloaded. Exchanges the C1DataColumn objects at the specified index. Exchanges the C1DataColumn objects at the specified index.
Insert | Overriden. Inserts a C1DataColumn at the specified index.
RemoveAt | Removes the C1DataColumn at the specified index.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


GroupedColumnCollection.Add Method

GroupedColumnCollection.Add Method

Adds a C1DataColumn to the end of the collection.

[Visual Basic]

Overrides Public Function Add( _

ByVal dc As C1DataColumn _

) As Integer

[C#]

override public int Add(

C1DataColumn dc

);

[Delphi]

public function Add(

dc: C1DataColumn

): Int32; override;

Parameters

dc

The C1DataColumn to add.

Return Value

The index at which the C1DataColumn has been added.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


GroupedColumnCollection.Clear Method

GroupedColumnCollection.Clear Method

Removes all elements from the collection.

[Visual Basic]

Public Sub Clear()

[C#]

new public void Clear()

[Delphi]

public procedure Clear();

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


GroupedColumnCollection.Exchange Method

GroupedColumnCollection.Exchange Method

Exchanges the C1DataColumn objects at the specified index.

[Visual Basic]

Public Sub Exchange( _

ByVal src As Integer, _

ByVal dst As Integer _

)

[C#]

public void Exchange(

int src,

int dst

);

[Delphi]

public procedure Exchange(

src: Int32;

dst: Int32

);

Parameters

src

The zero-based index of the first C1DataColumn.

dst

The zero-based index of the second C1DataColumn.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


GroupedColumnCollection.Insert Method

GroupedColumnCollection.Insert Method

Inserts a C1DataColumn at the specified index.

[Visual Basic]

Overrides Public Sub Insert( _

ByVal index As Integer, _

ByVal dc As C1DataColumn _

)

[C#]

override public void Insert(

int index,

C1DataColumn dc

);

[Delphi]

public procedure Insert(

index: Int32;

dc: C1DataColumn

); override;

Parameters

index

The zero-based index at which the C1DataColumn should be inserted.

dc

The C1DataColumn to insert.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


GroupedColumnCollection.RemoveAt Method

GroupedColumnCollection.RemoveAt Method

Removes the C1DataColumn at the specified index.

[Visual Basic]

Public Sub RemoveAt( _

ByVal index As Integer _

)

[C#]

new public void RemoveAt(

int index

);

[Delphi]

public procedure RemoveAt(

index: Int32

);

Parameters

index

The zero-based index of the row to remove.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


GroupInfo Class

GroupInfo Class

GroupInfo property of the C1DataColumn object, used to control grouping and rendering of group headers and footers

For a list of all members of this type, see GroupInfo Members.

System.Object

C1.Win.C1TrueDBGrid.GroupInfo

[Visual Basic]

Public Class GroupInfo

[C#]

public class GroupInfo

[Delphi]

type GroupInfo = class;

Namespace: C1.Win.C1TrueDBGrid

Assembly: C1.Win.C1TrueDBGrid.2 (in C1.Win.C1TrueDBGrid.2.dll)

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


GroupInfo Members

GroupInfo Members

GroupInfo overview

Public Constructors

GroupInfo Constructor

Creates a new instance of the object.

Public Properties

ColumnVisible | Determines the visibility of a column when it is dragged into the grouping area.
FooterText | Gets or sets the text that is displayed in the group footer row.
HeaderText | Gets or sets the text that is displayed in the group header row.
Interval | Sets or retrieves the way rows are grouped.
OutlineMode | Gets or sets the initial expanded/collapsed state of the grouped row.
Position | Gets or sets the position of the grouped row.

Public Methods

ToString

Overriden. Override. The string representation of the object.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


GroupInfo Constructor

GroupInfo Constructor

Creates a new instance of the object.

[Visual Basic]

Public Function New( _

ByVal owner As C1DataColumn _

)

[C#]

public GroupInfo(

C1DataColumn owner

);

[Delphi]

public constructor Create(

owner: C1DataColumn

);

Parameters

owner

The column this object is associated with.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


GroupInfo Properties

GroupInfo Properties

The properties of the GroupInfo class are listed here. For a complete list of GroupInfo class members, see the GroupInfo Members topic.

Public Properties

ColumnVisible | Determines the visibility of a column when it is dragged into the grouping area.
FooterText | Gets or sets the text that is displayed in the group footer row.
HeaderText | Gets or sets the text that is displayed in the group header row.
Interval | Sets or retrieves the way rows are grouped.
OutlineMode | Gets or sets the initial expanded/collapsed state of the grouped row.
Position | Gets or sets the position of the grouped row.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


GroupInfo.ColumnVisible Property

GroupInfo.ColumnVisible Property

Determines the visibility of a column when it is dragged into the grouping area.

[Visual Basic]

Public Property ColumnVisible As Boolean

[C#]

public bool ColumnVisible {get;set;}

[Delphi]

public property ColumnVisible: Boolean read get_ColumnVisible write set_ColumnVisible;

Remarks

The default value is False.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


GroupInfo.FooterText Property

GroupInfo.FooterText Property

Gets or sets the text that is displayed in the group footer row.

[Visual Basic]

Public Property FooterText As String

[C#]

public string FooterText {get;set;}

[Delphi]

public property FooterText: String read get_FooterText write set_FooterText;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


GroupInfo.HeaderText Property

GroupInfo.HeaderText Property

Gets or sets the text that is displayed in the group header row.

[Visual Basic]

Public Property HeaderText As String

[C#]

public string HeaderText {get;set;}

[Delphi]

public property HeaderText: String read get_HeaderText write set_HeaderText;

Remarks

Default value: "{1}: {0}".

The text may include up to two placeholders:

"{0}" is replaced with the value being grouped on.

"{1}" is replaced with the group's column header.

Setting the value to Custom causes the GroupText event to be raised.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


GroupInfo.Interval Property

GroupInfo.Interval Property

Sets or retrieves the way rows are grouped.

[Visual Basic]

Public Property Interval As GroupIntervalEnum

[C#]

public GroupIntervalEnum Interval {get;set;}

[Delphi]

public property Interval: GroupIntervalEnum read get_Interval write set_Interval;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


GroupInfo.OutlineMode Property

GroupInfo.OutlineMode Property

Gets or sets the initial expanded/collapsed state of the grouped row.

[Visual Basic]

Public Property OutlineMode As OutlineModeEnum

[C#]

public OutlineModeEnum OutlineMode {get;set;}

[Delphi]

public property OutlineMode: OutlineModeEnum read get_OutlineMode write set_OutlineMode;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


GroupInfo.Position Property

GroupInfo.Position Property

Gets or sets the position of the grouped row.

[Visual Basic]

Public Property Position As GroupPositionEnum

[C#]

public GroupPositionEnum Position {get;set;}

[Delphi]

public property Position: GroupPositionEnum read get_Position write set_Position;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


GroupInfo Methods

GroupInfo Methods

The methods of the GroupInfo class are listed here. For a complete list of GroupInfo class members, see the GroupInfo Members topic.

Public Methods

ToString

Overriden. Override. The string representation of the object.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


GroupInfo.ToString Method

GroupInfo.ToString Method

Override. The string representation of the object.

[Visual Basic]

Overrides Public Function ToString() As String

[C#]

override public string ToString()

[Delphi]

public function ToString(): String; override;

Return Value

The string representation of the object.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


GroupIntervalEnum Enumeration

GroupIntervalEnum Enumeration

Specifies the grouping and rendering of group rows.

[Visual Basic]

Public Enum GroupIntervalEnum

[C#]

public enum GroupIntervalEnum

[Delphi]

type GroupIntervalEnum = (Alphabetical, Custom, Date, DateSpan, Default, Month, Year);

Namespace: C1.Win.C1TrueDBGrid

Assembly: C1.Win.C1TrueDBGrid.2 (in C1.Win.C1TrueDBGrid.2.dll)

Members

Member name | Description
Alphabetical | Rows are grouped by the first character of their values.
Custom | Causes the GroupInterval event to be raised.
Date | Rows are grouped by the date portion of their values.
DateSpan | Rows are grouped according to their date values (Outlook style).
Default | Rows are grouped by their values.
Month | Rows are grouped by the month portion of their values.
Year | Rows are grouped by the year portion of their values.

See Also

C1.Win.C1TrueDBGrid Namespace

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


GroupIntervalEventArgs Class

GroupIntervalEventArgs Class

Provides data for grouping.

For a list of all members of this type, see GroupIntervalEventArgs Members.

System.Object

System.EventArgs

C1.Win.C1TrueDBGrid.GroupIntervalEventArgs

[Visual Basic]

Public Class GroupIntervalEventArgs

Inherits EventArgs

[C#]

public class GroupIntervalEventArgs : EventArgs

[Delphi]

type GroupIntervalEventArgs = class (EventArgs);

Namespace: C1.Win.C1TrueDBGrid

Assembly: C1.Win.C1TrueDBGrid.2 (in C1.Win.C1TrueDBGrid.2.dll)

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


GroupIntervalEventArgs Members

GroupIntervalEventArgs Members

GroupIntervalEventArgs overview

Public Properties

Col | C1DisplayColumn being grouped.
Row | Index of the row being grouped.
Value | Value being grouped.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


GroupIntervalEventArgs Properties

GroupIntervalEventArgs Properties

The properties of the GroupIntervalEventArgs class are listed here. For a complete list of GroupIntervalEventArgs class members, see the GroupIntervalEventArgs Members topic.

Public Properties

Col | C1DisplayColumn being grouped.
Row | Index of the row being grouped.
Value | Value being grouped.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


GroupIntervalEventArgs.Col Property

GroupIntervalEventArgs.Col Property

C1DisplayColumn being grouped.

[Visual Basic]

Public ReadOnly Property Col As C1DisplayColumn

[C#]

public C1DisplayColumn Col {get;}

[Delphi]

public property Col: C1DisplayColumn read get_Col;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


GroupIntervalEventArgs.Row Property

GroupIntervalEventArgs.Row Property

Index of the row being grouped.

[Visual Basic]

Public ReadOnly Property Row As Integer

[C#]

public int Row {get;}

[Delphi]

public property Row: Int32 read get_Row;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


GroupIntervalEventArgs.Value Property

GroupIntervalEventArgs.Value Property

Value being grouped.

[Visual Basic]

Public Property Value As Object

[C#]

public object Value {get;set;}

[Delphi]

public property Value: Object read get_Value write set_Value;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


GroupPositionEnum Enumeration

GroupPositionEnum Enumeration

Specifies how the grouped column should be displayed.

[Visual Basic]

Public Enum GroupPositionEnum

[C#]

public enum GroupPositionEnum

[Delphi]

type GroupPositionEnum = (Header, HeaderAndFooter);

Namespace: C1.Win.C1TrueDBGrid

Assembly: C1.Win.C1TrueDBGrid.2 (in C1.Win.C1TrueDBGrid.2.dll)

Remarks

Use the members of this enumeration to set the value of the Position property in the GroupInfo class.

Members

Member name | Description
Header | Grouped columns contain just a header row (default).
HeaderAndFooter | Grouped columns contain a header and footer row.

See Also

C1.Win.C1TrueDBGrid Namespace

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


GroupRow Class

GroupRow Class

Object that represents a groupby split.

For a list of all members of this type, see GroupRow Members.

System.Object

C1.Win.C1TrueDBGrid.BaseGrid.ViewRow

C1.Win.C1TrueDBGrid.GroupRow

[Visual Basic]

Public Class GroupRow

Inherits ViewRow

[C#]

public class GroupRow : ViewRow

[Delphi]

type GroupRow = class (ViewRow);

Namespace: C1.Win.C1TrueDBGrid

Assembly: C1.Win.C1TrueDBGrid.2 (in C1.Win.C1TrueDBGrid.2.dll)

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


GroupRow Members

GroupRow Members

GroupRow overview

Public Properties

GroupedText | Gets the text that is being grouped.
Height (inherited from ViewRow) | Gets or sets the height of a row.
Level | Gets the level of the grouping.
RowType | Overriden. Gets the type of row.
Visible (inherited from ViewRow) | Gets or sets the visiblity of a row.
Width (inherited from ViewRow) | Gets or sets the width of a row.

Public Methods

AutoSize (inherited from ViewRow)

Adjust the size of the row to fully display cell data.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


GroupRow Properties

GroupRow Properties

The properties of the GroupRow class are listed here. For a complete list of GroupRow class members, see the GroupRow Members topic.

Public Properties

GroupedText | Gets the text that is being grouped.
Height (inherited from ViewRow) | Gets or sets the height of a row.
Level | Gets the level of the grouping.
RowType | Overriden. Gets the type of row.
Visible (inherited from ViewRow) | Gets or sets the visiblity of a row.
Width (inherited from ViewRow) | Gets or sets the width of a row.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


GroupRow.GroupedText Property

GroupRow.GroupedText Property

Gets the text that is being grouped.

[Visual Basic]

Public ReadOnly Property GroupedText As String

[C#]

public string GroupedText {get;}

[Delphi]

public property GroupedText: String read get_GroupedText;

Example

The following code provides an example of the GroupedText property:

· Visual Basic

· C#

· Delphi

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


GroupRow.Level Property

GroupRow.Level Property

Gets the level of the grouping.

[Visual Basic]

Public ReadOnly Property Level As Integer

[C#]

public int Level {get;}

[Delphi]

public property Level: Int32 read get_Level;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


GroupRow.RowType Property

GroupRow.RowType Property

Gets the type of row.

[Visual Basic]

Overrides Public ReadOnly Property RowType As RowTypeEnum

[C#]

override public RowTypeEnum RowType {get;}

[Delphi]

public property RowType: RowTypeEnum read get_RowType;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


GroupRow Methods

GroupRow Methods

The methods of the GroupRow class are listed here. For a complete list of GroupRow class members, see the GroupRow Members topic.

Public Methods

AutoSize (inherited from ViewRow)

Adjust the size of the row to fully display cell data.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


GroupTextEventArgs Class

GroupTextEventArgs Class

Provides data for the GroupText event.

For a list of all members of this type, see GroupTextEventArgs Members.

System.Object

System.EventArgs

C1.Win.C1TrueDBGrid.GroupTextEventArgs

[Visual Basic]

Public Class GroupTextEventArgs

Inherits EventArgs

[C#]

public class GroupTextEventArgs : EventArgs

[Delphi]

type GroupTextEventArgs = class (EventArgs);

Namespace: C1.Win.C1TrueDBGrid

Assembly: C1.Win.C1TrueDBGrid.2 (in C1.Win.C1TrueDBGrid.2.dll)

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


GroupTextEventArgs Members

GroupTextEventArgs Members

GroupTextEventArgs overview

Public Properties

Col | Column that is being grouped.
EndRowIndex | Last row index that is being grouped.
GroupText | Value that the data is being grouped on.
RowType | Type of row being grouped.
StartRowIndex | First row index that is being grouped.
Text | Custom text for the grouped row.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


GroupTextEventArgs Properties

GroupTextEventArgs Properties

The properties of the GroupTextEventArgs class are listed here. For a complete list of GroupTextEventArgs class members, see the GroupTextEventArgs Members topic.

Public Properties

Col | Column that is being grouped.
EndRowIndex | Last row index that is being grouped.
GroupText | Value that the data is being grouped on.
RowType | Type of row being grouped.
StartRowIndex | First row index that is being grouped.
Text | Custom text for the grouped row.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


GroupTextEventArgs.Col Property

GroupTextEventArgs.Col Property

Column that is being grouped.

[Visual Basic]

Public ReadOnly Property Col As C1DisplayColumn

[C#]

public C1DisplayColumn Col {get;}

[Delphi]

public property Col: C1DisplayColumn read get_Col;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


GroupTextEventArgs.EndRowIndex Property

GroupTextEventArgs.EndRowIndex Property

Last row index that is being grouped.

[Visual Basic]

Public ReadOnly Property EndRowIndex As Integer

[C#]

public int EndRowIndex {get;}

[Delphi]

public property EndRowIndex: Int32 read get_EndRowIndex;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


GroupTextEventArgs.GroupText Property

GroupTextEventArgs.GroupText Property

Value that the data is being grouped on.

[Visual Basic]

Public ReadOnly Property GroupText As String

[C#]

public string GroupText {get;}

[Delphi]

public property GroupText: String read get_GroupText;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


GroupTextEventArgs.RowType Property

GroupTextEventArgs.RowType Property

Type of row being grouped.

[Visual Basic]

Public ReadOnly Property RowType As RowTypeEnum

[C#]

public RowTypeEnum RowType {get;}

[Delphi]

public property RowType: RowTypeEnum read get_RowType;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


GroupTextEventArgs.StartRowIndex Property

GroupTextEventArgs.StartRowIndex Property

First row index that is being grouped.

[Visual Basic]

Public ReadOnly Property StartRowIndex As Integer

[C#]

public int StartRowIndex {get;}

[Delphi]

public property StartRowIndex: Int32 read get_StartRowIndex;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


GroupTextEventArgs.Text Property

GroupTextEventArgs.Text Property

Custom text for the grouped row.

[Visual Basic]

Public Property Text As String

[C#]

public string Text {get;set;}

[Delphi]

public property Text: String read get_Text write set_Text;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


GroupTextEventHandler Delegate

GroupTextEventHandler Delegate

Raised when text is grouped.

[Visual Basic]

Public Delegate Sub GroupTextEventHandler( _

ByVal sender As Object, _

ByVal e As GroupTextEventArgs _

)

[C#]

public delegate void GroupTextEventHandler(

object sender,

GroupTextEventArgs e

);

[Delphi]

type GroupTextEventHandler = procedure (

sender: Object;

e: GroupTextEventArgs

) of object;

Namespace: C1.Win.C1TrueDBGrid

Assembly: C1.Win.C1TrueDBGrid.2 (in C1.Win.C1TrueDBGrid.2.dll)

See Also

C1.Win.C1TrueDBGrid Namespace

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


LineStyleEnum Enumeration

LineStyleEnum Enumeration

Specifies the line style for row and column dividers.

[Visual Basic]

Public Enum LineStyleEnum

[C#]

public enum LineStyleEnum

[Delphi]

type LineStyleEnum = (Double, Inset, None, Raised, Single);

Namespace: C1.Win.C1TrueDBGrid

Assembly: C1.Win.C1TrueDBGrid.2 (in C1.Win.C1TrueDBGrid.2.dll)

Remarks

This enumeration is used to set the line style for row and column divider.

Members

Member name | Description
Double | Double line.
Inset | Line with 3D inset appearance.
None | No line.
Raised | Line with 3D raised appearance.
Single | Single line.

See Also

C1.Win.C1TrueDBGrid Namespace

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


MarqueeEnum Enumeration

MarqueeEnum Enumeration

Specifies how the current cell is highlighted.

[Visual Basic]

Public Enum MarqueeEnum

[C#]

public enum MarqueeEnum

[Delphi]

type MarqueeEnum = (DottedCellBorder, DottedRowBorder, FloatingEditor, HighlightCell, HighlightRow, HighlightRowRaiseCell, NoMarquee, SolidCellBorder);

Namespace: C1.Win.C1TrueDBGrid

Assembly: C1.Win.C1TrueDBGrid.2 (in C1.Win.C1TrueDBGrid.2.dll)

Remarks

Use the members of this enumeration to set the value of the MarqueeStyle property in the C1TrueDBGrid class.

Members

Member name | Description
DottedCellBorder | The current cell within the current row will be highlighted by drawing a dotted border around the cell. In Microsoft Windows terminology, this is usually called a focus rectangle.
DottedRowBorder | The entire current row will be highlighted by drawing a dotted border around it. This effect is similar to setting 0.
FloatingEditor | The current cell will be highlighted by a floating text editor window with a blinking caret (as in Microsoft Access).
HighlightCell | The entire current cell will be drawn using the attributes of the HighLightRowStyle property. This provides a very distinctive block-style highlight for the current cell.
HighlightRow | The entire row containing the current cell will be drawn using the attributes of the HighLightRowStyle property. In this mode, it is not possible to visually determine which cell is the current cell, only the current row. When the grid or split is not editable, this setting is often preferred, since cell position is then irrelevant.
HighlightRowRaiseCell | The entire row will be highlighted as in setting 3, but the current cell within the row will be "raised" so that it appears distinctive. This setting does not appear clearly with all background color and divider settings. The best effect is achieved by using 3D dividers and a light gray background.
NoMarquee | The marquee will not be shown. This setting is useful for cases where the current row is irrelevant, or when not wanting to draw the user's attention to the grid until necessary.
SolidCellBorder | The current cell within the current row will be highlighted by drawing a solid box around the current cell. This is more visible than the dotted cell border, especially when 3D divider properties are used for the grid.

See Also

C1.Win.C1TrueDBGrid Namespace

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


MultiSelectEnum Enumeration

MultiSelectEnum Enumeration

Specifies the UI behavior for selecting rows and columns.

[Visual Basic]

Public Enum MultiSelectEnum

[C#]

public enum MultiSelectEnum

[Delphi]

type MultiSelectEnum = (Extended, None, Simple);

Namespace: C1.Win.C1TrueDBGrid

Assembly: C1.Win.C1TrueDBGrid.2 (in C1.Win.C1TrueDBGrid.2.dll)

Remarks

Use the members of this enumeration to set the value of the MultiSelect property in the C1TrueDBGrid class.

Members

Member name | Description
Extended | Multiple selection is enabled using the mouse. The user can also select records with the following key combinations: Shift+Up Arrow, Shift+Down Arrow, Shift+Page Up, and Shift+Page Down. Note: The user will not be able to select a single cell, instead the entire corresponding row will be selected.
None | Multiple selection is disabled but single selection is permitted. When the user clicks a record selector, the current selection is cleared, and the clicked row is then selected and added to either the SelectedRows or SelectedCols collections. The Ctrl and Shift keys are ignored, and the user can only select one row at a time.
Simple | Multiple selection is enabled using the mouse. When the user clicks a record selector, the selection is cleared and the clicked row is selected and added to either the SelectedRows or Selected Cols collections. However, if the user holds down the Ctrl key while clicking, the clicked row is added to the current selection. The user can also select a range of rows by selecting the first row in the range, then selecting the last row in the range while holding down the Shift key.

See Also

C1.Win.C1TrueDBGrid Namespace

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


OutlineModeEnum Enumeration

OutlineModeEnum Enumeration

Specifies the initial expanded or collapsed state of a grouped row.

[Visual Basic]

Public Enum OutlineModeEnum

[C#]

public enum OutlineModeEnum

[Delphi]

type OutlineModeEnum = (StartCollapsed, StartExpanded);

Namespace: C1.Win.C1TrueDBGrid

Assembly: C1.Win.C1TrueDBGrid.2 (in C1.Win.C1TrueDBGrid.2.dll)

Remarks

Use the members of this enumeration to access the return value of the OutlineMode property in the GroupInfo class.

Members

Member name | Description
StartCollapsed | Grouped rows initial display is collapsed (default).
StartExpanded | Grouped rows initial display is expanded.

See Also

C1.Win.C1TrueDBGrid Namespace

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


OwnerDrawCellEventArgs Class

OwnerDrawCellEventArgs Class

Provides data for the OwnerDrawCell and OwnerDrawCellPrint events.

For a list of all members of this type, see OwnerDrawCellEventArgs Members.

System.Object

System.EventArgs

C1.Win.C1TrueDBGrid.OwnerDrawCellEventArgs

[Visual Basic]

Public Class OwnerDrawCellEventArgs

Inherits EventArgs

[C#]

public class OwnerDrawCellEventArgs : EventArgs

[Delphi]

type OwnerDrawCellEventArgs = class (EventArgs);

Namespace: C1.Win.C1TrueDBGrid

Assembly: C1.Win.C1TrueDBGrid.2 (in C1.Win.C1TrueDBGrid.2.dll)

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


OwnerDrawCellEventArgs Members

OwnerDrawCellEventArgs Members

OwnerDrawCellEventArgs overview

Public Properties

CellRect | The bounding rectangle for the cell that needs to be rendered.
Col | The index of the column in the DisplayColumns collection.
Column | The C1DisplayColumn being rendered.
Graphics | The GDI+ graphics object to render on.
Handled | Indicates whether the event code rendered the cell.
Row | The index of the row for the cell being rendered.
Split | The index of the split for the cell being rendered.
Style | The Style used to render the cell.
Text | The text of the cell.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


OwnerDrawCellEventArgs Properties

OwnerDrawCellEventArgs Properties

The properties of the OwnerDrawCellEventArgs class are listed here. For a complete list of OwnerDrawCellEventArgs class members, see the OwnerDrawCellEventArgs Members topic.

Public Properties

CellRect | The bounding rectangle for the cell that needs to be rendered.
Col | The index of the column in the DisplayColumns collection.
Column | The C1DisplayColumn being rendered.
Graphics | The GDI+ graphics object to render on.
Handled | Indicates whether the event code rendered the cell.
Row | The index of the row for the cell being rendered.
Split | The index of the split for the cell being rendered.
Style | The Style used to render the cell.
Text | The text of the cell.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


OwnerDrawCellEventArgs.CellRect Property

OwnerDrawCellEventArgs.CellRect Property

The bounding rectangle for the cell that needs to be rendered.

[Visual Basic]

Public ReadOnly Property CellRect As Rectangle

[C#]

public Rectangle CellRect {get;}

[Delphi]

public property CellRect: Rectangle read get_CellRect;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


OwnerDrawCellEventArgs.Col Property

OwnerDrawCellEventArgs.Col Property

The index of the column in the DisplayColumns collection.

[Visual Basic]

Public ReadOnly Property Col As Integer

[C#]

public int Col {get;}

[Delphi]

public property Col: Int32 read get_Col;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


OwnerDrawCellEventArgs.Column Property

OwnerDrawCellEventArgs.Column Property

The C1DisplayColumn being rendered.

[Visual Basic]

Public ReadOnly Property Column As C1DisplayColumn

[C#]

public C1DisplayColumn Column {get;}

[Delphi]

public property Column: C1DisplayColumn read get_Column;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


OwnerDrawCellEventArgs.Graphics Property

OwnerDrawCellEventArgs.Graphics Property

The GDI+ graphics object to render on.

[Visual Basic]

Public ReadOnly Property Graphics As Graphics

[C#]

public Graphics Graphics {get;}

[Delphi]

public property Graphics: Graphics read get_Graphics;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


OwnerDrawCellEventArgs.Handled Property

OwnerDrawCellEventArgs.Handled Property

Indicates whether the event code rendered the cell.

[Visual Basic]

Public Property Handled As Boolean

[C#]

public bool Handled {get;set;}

[Delphi]

public property Handled: Boolean read get_Handled write set_Handled;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


OwnerDrawCellEventArgs.Row Property

OwnerDrawCellEventArgs.Row Property

The index of the row for the cell being rendered.

[Visual Basic]

Public ReadOnly Property Row As Integer

[C#]

public int Row {get;}

[Delphi]

public property Row: Int32 read get_Row;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


OwnerDrawCellEventArgs.Split Property

OwnerDrawCellEventArgs.Split Property

The index of the split for the cell being rendered.

[Visual Basic]

Public ReadOnly Property Split As Integer

[C#]

public int Split {get;}

[Delphi]

public property Split: Int32 read get_Split;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


OwnerDrawCellEventArgs.Style Property

OwnerDrawCellEventArgs.Style Property

The Style used to render the cell.

[Visual Basic]

Public ReadOnly Property Style As Style

[C#]

public Style Style {get;}

[Delphi]

public property Style: Style read get_Style;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


OwnerDrawCellEventArgs.Text Property

OwnerDrawCellEventArgs.Text Property

The text of the cell.

[Visual Basic]

Public ReadOnly Property Text As String

[C#]

public string Text {get;}

[Delphi]

public property Text: String read get_Text;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


OwnerDrawCellEventHandler Delegate

OwnerDrawCellEventHandler Delegate

Raised when a cell is to rendered by the event code.

[Visual Basic]

Public Delegate Sub OwnerDrawCellEventHandler( _

ByVal sender As Object, _

ByVal e As OwnerDrawCellEventArgs _

)

[C#]

public delegate void OwnerDrawCellEventHandler(

object sender,

OwnerDrawCellEventArgs e

);

[Delphi]

type OwnerDrawCellEventHandler = procedure (

sender: Object;

e: OwnerDrawCellEventArgs

) of object;

Namespace: C1.Win.C1TrueDBGrid

Assembly: C1.Win.C1TrueDBGrid.2 (in C1.Win.C1TrueDBGrid.2.dll)

See Also

C1.Win.C1TrueDBGrid Namespace

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


OwnerDrawPageEventArgs Class

OwnerDrawPageEventArgs Class

Provides data for the OwnerDrawPageHeader and OwnerDrawPageHeader events.

For a list of all members of this type, see OwnerDrawPageEventArgs Members.

System.Object

System.EventArgs

C1.Win.C1TrueDBGrid.OwnerDrawPageEventArgs

[Visual Basic]

Public Class OwnerDrawPageEventArgs

Inherits EventArgs

[C#]

public class OwnerDrawPageEventArgs : EventArgs

[Delphi]

type OwnerDrawPageEventArgs = class (EventArgs);

Remarks

OwnerDrawPageFooter and OwnerDrawPageHeader both use an object called the C1OwnerDrawPrint object to render the appropriate text and images. The OwnerDrawPrint argument provides access to this object that has one property and three methods to aid in rendering the correct images.

Namespace: C1.Win.C1TrueDBGrid

Assembly: C1.Win.C1TrueDBGrid.2 (in C1.Win.C1TrueDBGrid.2.dll)

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


OwnerDrawPageEventArgs Members

OwnerDrawPageEventArgs Members

OwnerDrawPageEventArgs overview

Public Properties

OwnerDrawPrint

The C1OwnerDrawPrint object used to render the custom header or footer.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


OwnerDrawPageEventArgs Properties

OwnerDrawPageEventArgs Properties

The properties of the OwnerDrawPageEventArgs class are listed here. For a complete list of OwnerDrawPageEventArgs class members, see the OwnerDrawPageEventArgs Members topic.

Public Properties

OwnerDrawPrint

The C1OwnerDrawPrint object used to render the custom header or footer.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


OwnerDrawPageEventArgs.OwnerDrawPrint Property

OwnerDrawPageEventArgs.OwnerDrawPrint Property

The C1OwnerDrawPrint object used to render the custom header or footer.

[Visual Basic]

Public ReadOnly Property OwnerDrawPrint As C1OwnerDrawPrint

[C#]

public C1OwnerDrawPrint OwnerDrawPrint {get;}

[Delphi]

public property OwnerDrawPrint: C1OwnerDrawPrint read get_OwnerDrawPrint;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


OwnerDrawPageEventHandler Delegate

OwnerDrawPageEventHandler Delegate

Raised when custom page headers and footers need to be rendered.

[Visual Basic]

Public Delegate Sub OwnerDrawPageEventHandler( _

ByVal sender As Object, _

ByVal e As OwnerDrawPageEventArgs _

)

[C#]

public delegate void OwnerDrawPageEventHandler(

object sender,

OwnerDrawPageEventArgs e

);

[Delphi]

type OwnerDrawPageEventHandler = procedure (

sender: Object;

e: OwnerDrawPageEventArgs

) of object;

Namespace: C1.Win.C1TrueDBGrid

Assembly: C1.Win.C1TrueDBGrid.2 (in C1.Win.C1TrueDBGrid.2.dll)

See Also

C1.Win.C1TrueDBGrid Namespace

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


PointAtEnum Enumeration

PointAtEnum Enumeration

Specifies the type of UI-element for a coordinate.

[Visual Basic]

Public Enum PointAtEnum

[C#]

public enum PointAtEnum

[Delphi]

type PointAtEnum = (AtAddNewRow, AtCaption, AtColumnFooter, AtColumnHeader, AtColumnSize, AtDataArea, AtEmptyColumn, AtEmptyRow, AtFilterBar, AtGroupArea, AtGroupHeader, AtRowSelect, AtRowSize, AtSplitHeader, AtSplitSizeBox, NotInGrid);

Namespace: C1.Win.C1TrueDBGrid

Assembly: C1.Win.C1TrueDBGrid.2 (in C1.Win.C1TrueDBGrid.2.dll)

Remarks

Use the members of this enumeration to access the return value of the PointAt (Point) method in the C1TrueDBGrid class.

Members

Member name | Description
AtAddNewRow | Coordinates are in the addnew row.
AtCaption | Coordinates are in the caption area.
AtColumnFooter | Coordinates are in the column footers.
AtColumnHeader | Coordinates are in the column headers.
AtColumnSize | Coordinates are in the column resizing box.
AtDataArea | Coordinates are in the data area.
AtEmptyColumn | Coordinates are in the empty column area.
AtEmptyRow | Coordinates are in the empty row area.
AtFilterBar | Coordinates are in the filter bar.
AtGroupArea | Coordinates are in the grouping area.
AtGroupHeader | Coordinates are in the group header.
AtRowSelect | Coordinates are in the row selector.
AtRowSize | Coordinates are in the row resizing box.
AtSplitHeader | Coordinates are in the split's header.
AtSplitSizeBox | Coordinates are in the split's resizing box
NotInGrid | Coordinates are not in the grid.

See Also

C1.Win.C1TrueDBGrid Namespace

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


PresentationEnum Enumeration

PresentationEnum Enumeration

Specifies how ValueItems are rendered.

[Visual Basic]

Public Enum PresentationEnum

[C#]

public enum PresentationEnum

[Delphi]

type PresentationEnum = (CheckBox, ComboBox, Normal, RadioButton, SortedComboBox);

Namespace: C1.Win.C1TrueDBGrid

Assembly: C1.Win.C1TrueDBGrid.2 (in C1.Win.C1TrueDBGrid.2.dll)

Remarks

Use the members of this enumeration to set the value of the Presentation property in the C1TrueDBGrid class.

Members

Member name | Description
CheckBox | Values are displayed as a checkbox.
ComboBox | Values are displayed as a drop-down combobox.
Normal | Values are displayed as text or graphics.
RadioButton | Values are displayed as a group of radio buttons.
SortedComboBox | Values are displayed as a drop-down combobox in sorted order.

See Also

C1.Win.C1TrueDBGrid Namespace

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


PrintCancelException Class

PrintCancelException Class

The exception that is thrown when a print is cancelled.

For a list of all members of this type, see PrintCancelException Members.

System.Object

System.Exception

C1.Win.C1TrueDBGrid.PrintCancelException

[Visual Basic]

Public Class PrintCancelException

Inherits Exception

[C#]

public class PrintCancelException : Exception

[Delphi]

type PrintCancelException = class (Exception);

Namespace: C1.Win.C1TrueDBGrid

Assembly: C1.Win.C1TrueDBGrid.2 (in C1.Win.C1TrueDBGrid.2.dll)

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


PrintCancelException Members

PrintCancelException Members

PrintCancelException overview

Public Constructors

PrintCancelException Constructor

Creates a new instance of the PrintCancelException class.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


PrintCancelException Constructor

PrintCancelException Constructor

Creates a new instance of the PrintCancelException class.

[Visual Basic]

Public Function New()

[C#]

public PrintCancelException()

[Delphi]

public constructor Create();

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


PrintForm Class

PrintForm Class

The print preview form.

For a list of all members of this type, see PrintForm Members.

System.Object

System.MarshalByRefObject

System.ComponentModel.Component

System.Windows.Forms.Control

System.Windows.Forms.ScrollableControl

System.Windows.Forms.ContainerControl

System.Windows.Forms.Form

C1.Win.C1TrueDBGrid.PrintForm

[Visual Basic]

Public Class PrintForm

Inherits Form

[C#]

public class PrintForm : Form

[Delphi]

type PrintForm = class (Form);

Namespace: C1.Win.C1TrueDBGrid

Assembly: C1.Win.C1TrueDBGrid.2 (in C1.Win.C1TrueDBGrid.2.dll)

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


PrintForm Members

PrintForm Members

PrintForm overview

Public Constructors

PrintForm Constructor

Creates a new instance of the PrintFrom class.

Protected Methods

Dispose | Overloaded. Overriden. Overloaded. Overridden. Releases all resources used by the Control.
Init | Additional initialization of the form.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


PrintForm Constructor

PrintForm Constructor

Creates a new instance of the PrintFrom class.

[Visual Basic]

Public Function New()

[C#]

public PrintForm()

[Delphi]

public constructor Create();

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


PrintForm Methods

PrintForm Methods

The methods of the PrintForm class are listed here. For a complete list of PrintForm class members, see the PrintForm Members topic.

Protected Methods

Dispose | Overloaded. Overriden. Overloaded. Overridden. Releases all resources used by the Control.
Init | Additional initialization of the form.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


PrintForm.Dispose Method

PrintForm.Dispose Method

Overloaded. Overridden. Releases all resources used by the Control.

[Visual Basic]

Overrides Protected Sub Dispose( _

ByVal disposing As Boolean _

)

[C#]

override protected void Dispose(

bool disposing

);

[Delphi]

strict protected procedure Dispose(

disposing: Boolean

); overload; override;

Parameters

disposing

True to cleanup.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


PrintForm.Init Method

PrintForm.Init Method

Additional initialization of the form.

[Visual Basic]

Overridable Protected Sub Init()

[C#]

virtual protected void Init()

[Delphi]

strict protected procedure Init(); virtual;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


PrintInfo Class

PrintInfo Class

The object used to specify the characteristics of a grid when it's to be printed.

For a list of all members of this type, see PrintInfo Members.

System.Object

C1.Win.C1TrueDBGrid.PrintInfo

[Visual Basic]

Public Class PrintInfo

[C#]

public class PrintInfo

[Delphi]

type PrintInfo = class;

Namespace: C1.Win.C1TrueDBGrid

Assembly: C1.Win.C1TrueDBGrid.2 (in C1.Win.C1TrueDBGrid.2.dll)

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


PrintInfo Members

PrintInfo Members

PrintInfo overview

Public Properties

FillAreaWidth | Gets or sets the mode of stretching to the page width.
MaxRowHeight | Gets or sets the maximum row height in hundredths of an inch.
OwnerDrawPageFooter | Gets or sets a value indicating whether the page footer is owner-drawn.
OwnerDrawPageHeader | Gets or sets a value indicating whether the page header is owner-drawn.
PageBreak | Gets or sets the horizontal page break mode.
PageFooter | Gets or sets a string to be printed at the bottom of each page.
PageFooterHeight | Gets or sets the page footer height in hundredths of an inch.
PageFooterStyle | Gets or sets the style used to render the page footer.
PageHeader | Gets or sets the string to be printed at the top of each page.
PageHeaderHeight | Gets or sets the height of the Page header.
PageHeaderStyle | Gets or sets the style used to render the Page header.
PageSettings | Gets or sets the PageSettings for printing.
PreviewFormClassName | Gets or sets the class name of the Form which will be used as the Preview Form.
PrintHorizontalSplits | Gets or sets a value indicating whether horizontal splits are previewed and printed.
PrintOptionsFormClassName | Gets or sets the class name of the form which will be used as the Print Options form.
ProgressCaption | Gets or sets the caption of the Progress dialog box.
RepeatColumnFooters | Gets or sets a value indicating whether column footers should appear on each page.
RepeatColumnHeaders | Gets or sets a value indicating whether column headers should appear on each page.
RepeatGridHeader | Gets or sets a value indicating whether the grid caption should appear on each page.
RepeatSplitHeaders | Gets or sets a value inidcating whether split captions should appear on each page.
ShowOptionsDialog | Gets or sets a value indicating whether the Options dialog is displayed.
ShowProgressForm | Gets or sets a value indicating whether the Progress Form is displayed.
ShowSelection | Gets or sets a value indicating whether selected cells will be highlighted when previewing or printing.
UseGridColors | Gets or sets a value indicating whether the grid's color scheme is translated to the print page.
VarRowHeight | Gets or sets the height of printed rows.
WrapText | Gets or sets a value that controls how text is wrapped in a cell.

Public Methods

Print | Overloaded. Generates the printed page.
PrintPreview | Opens a separate application window in which end users can preview the output that would be generated by the print operation.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


PrintInfo Properties

PrintInfo Properties

The properties of the PrintInfo class are listed here. For a complete list of PrintInfo class members, see the PrintInfo Members topic.

Public Properties

FillAreaWidth | Gets or sets the mode of stretching to the page width.
MaxRowHeight | Gets or sets the maximum row height in hundredths of an inch.
OwnerDrawPageFooter | Gets or sets a value indicating whether the page footer is owner-drawn.
OwnerDrawPageHeader | Gets or sets a value indicating whether the page header is owner-drawn.
PageBreak | Gets or sets the horizontal page break mode.
PageFooter | Gets or sets a string to be printed at the bottom of each page.
PageFooterHeight | Gets or sets the page footer height in hundredths of an inch.
PageFooterStyle | Gets or sets the style used to render the page footer.
PageHeader | Gets or sets the string to be printed at the top of each page.
PageHeaderHeight | Gets or sets the height of the Page header.
PageHeaderStyle | Gets or sets the style used to render the Page header.
PageSettings | Gets or sets the PageSettings for printing.
PreviewFormClassName | Gets or sets the class name of the Form which will be used as the Preview Form.
PrintHorizontalSplits | Gets or sets a value indicating whether horizontal splits are previewed and printed.
PrintOptionsFormClassName | Gets or sets the class name of the form which will be used as the Print Options form.
ProgressCaption | Gets or sets the caption of the Progress dialog box.
RepeatColumnFooters | Gets or sets a value indicating whether column footers should appear on each page.
RepeatColumnHeaders | Gets or sets a value indicating whether column headers should appear on each page.
RepeatGridHeader | Gets or sets a value indicating whether the grid caption should appear on each page.
RepeatSplitHeaders | Gets or sets a value inidcating whether split captions should appear on each page.
ShowOptionsDialog | Gets or sets a value indicating whether the Options dialog is displayed.
ShowProgressForm | Gets or sets a value indicating whether the Progress Form is displayed.
ShowSelection | Gets or sets a value indicating whether selected cells will be highlighted when previewing or printing.
UseGridColors | Gets or sets a value indicating whether the grid's color scheme is translated to the print page.
VarRowHeight | Gets or sets the height of printed rows.
WrapText | Gets or sets a value that controls how text is wrapped in a cell.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


PrintInfo.FillAreaWidth Property

PrintInfo.FillAreaWidth Property

Gets or sets the mode of stretching to the page width.

[Visual Basic]

Public Property FillAreaWidth As PrintInfo.FillEmptyEnum

[C#]

public PrintInfo.FillEmptyEnum FillAreaWidth {get;set;}

[Delphi]

public property FillAreaWidth: PrintInfo.FillEmptyEnum read get_FillAreaWidth write set_FillAreaWidth;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


PrintInfo.MaxRowHeight Property

PrintInfo.MaxRowHeight Property

Gets or sets the maximum row height in hundredths of an inch.

[Visual Basic]

Public Property MaxRowHeight As Integer

[C#]

public int MaxRowHeight {get;set;}

[Delphi]

public property MaxRowHeight: Int32 read get_MaxRowHeight write set_MaxRowHeight;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


PrintInfo.OwnerDrawPageFooter Property

PrintInfo.OwnerDrawPageFooter Property

Gets or sets a value indicating whether the page footer is owner-drawn.

[Visual Basic]

Public Property OwnerDrawPageFooter As Boolean

[C#]

public bool OwnerDrawPageFooter {get;set;}

[Delphi]

public property OwnerDrawPageFooter: Boolean read get_OwnerDrawPageFooter write set_OwnerDrawPageFooter;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


PrintInfo.OwnerDrawPageHeader Property

PrintInfo.OwnerDrawPageHeader Property

Gets or sets a value indicating whether the page header is owner-drawn.

[Visual Basic]

Public Property OwnerDrawPageHeader As Boolean

[C#]

public bool OwnerDrawPageHeader {get;set;}

[Delphi]

public property OwnerDrawPageHeader: Boolean read get_OwnerDrawPageHeader write set_OwnerDrawPageHeader;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


PrintInfo.PageBreak Property

PrintInfo.PageBreak Property

Gets or sets the horizontal page break mode.

[Visual Basic]

Public Property PageBreak As PrintInfo.PageBreaksEnum

[C#]

public PrintInfo.PageBreaksEnum PageBreak {get;set;}

[Delphi]

public property PageBreak: PrintInfo.PageBreaksEnum read get_PageBreak write set_PageBreak;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


PrintInfo.PageFooter Property

PrintInfo.PageFooter Property

Gets or sets a string to be printed at the bottom of each page.

[Visual Basic]

Public Property PageFooter As String

[C#]

public string PageFooter {get;set;}

[Delphi]

public property PageFooter: String read get_PageFooter write set_PageFooter;

Remarks

By default, this property returns an empty string, and no page footer is printed.

If specified, the page footer can consist of up to three substrings separated by the \t character sequence. The first substring will be left-aligned, the second centered, and the third right-aligned on the printed page. The \p sequence will be replaced by the current page number during printing.

For example, the following statement sets the PageFooter property of the default PrintInfo object so that the word "CONFIDENTIAL" is centered at the bottom of each page:

· Visual Basic

· C#

· Delphi

In addition, the following characters provide even greater control over the appearance of the PageFooter property, especially when the grid is so large that columns span more than one printed page.

\p

Current page number. 1-based, and incremented by subpages (i.e., the group of pages that hold all of the columns for a set of records).

\P

Total number of pages; each sub-page is counted separately.

\g

Current subpage group number. 1-based.

\G

Total number of subpage groups.

\s

Current subpage number. 1-based.

\S

Total number of subpages.

For example, the following statement sets the PageFooter property of the default PrintInfo object so that the number of groups is on the left, the sub-page number is in the center, and the total number of pages is on the right, preceded by the word "Page":

· Visual Basic

· C#

· Delphi

The page footer will look something like this:

Page: 1 of group 169, 1 of subpage 2, 1 of page 338

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


PrintInfo.PageFooterHeight Property

PrintInfo.PageFooterHeight Property

Gets or sets the page footer height in hundredths of an inch.

[Visual Basic]

Public Property PageFooterHeight As Integer

[C#]

public int PageFooterHeight {get;set;}

[Delphi]

public property PageFooterHeight: Int32 read get_PageFooterHeight write set_PageFooterHeight;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


PrintInfo.PageFooterStyle Property

PrintInfo.PageFooterStyle Property

Gets or sets the style used to render the page footer.

[Visual Basic]

Public Property PageFooterStyle As Style

[C#]

public Style PageFooterStyle {get;set;}

[Delphi]

public property PageFooterStyle: Style read get_PageFooterStyle write set_PageFooterStyle;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


PrintInfo.PageHeader Property

PrintInfo.PageHeader Property

Gets or sets the string to be printed at the top of each page.

[Visual Basic]

Public Property PageHeader As String

[C#]

public string PageHeader {get;set;}

[Delphi]

public property PageHeader: String read get_PageHeader write set_PageHeader;

Remarks

By default, this property returns an empty string, and no page header is printed.

If specified, the page header can consist of up to three substrings separated by the \t character sequence. The first substring will be left-aligned, the second centered, and the third right-aligned on the printed page. The \p sequence will be replaced by the current page number during printing.

For example, the following statement sets the PageHeader property of the default PrintInfo object so that the current date is on the left, and the page number is on the right, preceded by the word "Page".

· Visual Basic

· C#

· Delphi

In addition, the following characters provide even greater control over the appearance of the PageHeader property when the grid is so large that columns span more than one printed page.

\p

Current page number. 1-based, and incremented by subpages (i.e., the group of pages that hold all of the columns for a set of records).

\P

Total number of pages; each sub-page is counted separately.

\g

Current subpage group number. 1-based.

\G

Total number of subpage groups.

\s

Current subpage number. 1-based.

\S

Total number of subpages.

For example, the following statement sets the PageHeader property of the default PrintInfo object so that the number of groups is on the left, the sub-page number is in the center, and the total number of pages is on the right, preceded by the word "Page":

· Visual Basic

· C#

· Delphi

The page header will look something like this:

Page: 1 of group 169, 1 of subpage 2, 1 of page 338

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


PrintInfo.PageHeaderHeight Property

PrintInfo.PageHeaderHeight Property

Gets or sets the height of the Page header.

[Visual Basic]

Public Property PageHeaderHeight As Integer

[C#]

public int PageHeaderHeight {get;set;}

[Delphi]

public property PageHeaderHeight: Int32 read get_PageHeaderHeight write set_PageHeaderHeight;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


PrintInfo.PageHeaderStyle Property

PrintInfo.PageHeaderStyle Property

Gets or sets the style used to render the Page header.

[Visual Basic]

Public Property PageHeaderStyle As Style

[C#]

public Style PageHeaderStyle {get;set;}

[Delphi]

public property PageHeaderStyle: Style read get_PageHeaderStyle write set_PageHeaderStyle;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


PrintInfo.PageSettings Property

PrintInfo.PageSettings Property

Gets or sets the PageSettings for printing.

[Visual Basic]

Public Property PageSettings As PageSettings

[C#]

public PageSettings PageSettings {get;set;}

[Delphi]

public property PageSettings: PageSettings read get_PageSettings write set_PageSettings;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


PrintInfo.PreviewFormClassName Property

PrintInfo.PreviewFormClassName Property

Gets or sets the class name of the Form which will be used as the Preview Form.

[Visual Basic]

Public Property PreviewFormClassName As String

[C#]

public string PreviewFormClassName {get;set;}

[Delphi]

public property PreviewFormClassName: String read get_PreviewFormClassName write set_PreviewFormClassName;

Remarks

This property contains the class name of the form which will be used as the preview form.

To customize the Print Preview form you must derive your preview form from the C1.Win.C1TrueDBGrid.PrintForm class. Assign this property the class name of your derived form.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


PrintInfo.PrintHorizontalSplits Property

PrintInfo.PrintHorizontalSplits Property

Gets or sets a value indicating whether horizontal splits are previewed and printed.

[Visual Basic]

Public Property PrintHorizontalSplits As Boolean

[C#]

public bool PrintHorizontalSplits {get;set;}

[Delphi]

public property PrintHorizontalSplits: Boolean read get_PrintHorizontalSplits write set_PrintHorizontalSplits;

Remarks

The default value for this property is False.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


PrintInfo.PrintOptionsFormClassName Property

PrintInfo.PrintOptionsFormClassName Property

Gets or sets the class name of the form which will be used as the Print Options form.

[Visual Basic]

Public Property PrintOptionsFormClassName As String

[C#]

public string PrintOptionsFormClassName {get;set;}

[Delphi]

public property PrintOptionsFormClassName: String read get_PrintOptionsFormClassName write set_PrintOptionsFormClassName;

Remarks

To customize the Print Options form you must derive your options form from C1.Win.C1TrueDBGrid.PrintOptionsForm class. Assign this property to the class name of your derived form.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


PrintInfo.ProgressCaption Property

PrintInfo.ProgressCaption Property

Gets or sets the caption of the Progress dialog box.

[Visual Basic]

Public Property ProgressCaption As String

[C#]

public string ProgressCaption {get;set;}

[Delphi]

public property ProgressCaption: String read get_ProgressCaption write set_ProgressCaption;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


PrintInfo.RepeatColumnFooters Property

PrintInfo.RepeatColumnFooters Property

Gets or sets a value indicating whether column footers should appear on each page.

[Visual Basic]

Public Property RepeatColumnFooters As Boolean

[C#]

public bool RepeatColumnFooters {get;set;}

[Delphi]

public property RepeatColumnFooters: Boolean read get_RepeatColumnFooters write set_RepeatColumnFooters;

Remarks

If True, column footers are printed at the bottom of each physical page.

If False (the default), column footers are printed on the last page only.

Note: If the ColumnFooters property of the associated C1TrueDBGrid control is False, then column footers are not printed, regardless of the setting of this property.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


PrintInfo.RepeatColumnHeaders Property

PrintInfo.RepeatColumnHeaders Property

Gets or sets a value indicating whether column headers should appear on each page.

[Visual Basic]

Public Property RepeatColumnHeaders As Boolean

[C#]

public bool RepeatColumnHeaders {get;set;}

[Delphi]

public property RepeatColumnHeaders: Boolean read get_RepeatColumnHeaders write set_RepeatColumnHeaders;

Remarks

If True, column headers are printed at the top of each physical page below the split headers and grid header, if present.

If False (the default), column headers are printed on the first page only.

Note: If the ColumnHeaders property of the associated C1TrueDBGrid control is False, then column headers are not printed, regardless of the setting of this property.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


PrintInfo.RepeatGridHeader Property

PrintInfo.RepeatGridHeader Property

Gets or sets a value indicating whether the grid caption should appear on each page.

[Visual Basic]

Public Property RepeatGridHeader As Boolean

[C#]

public bool RepeatGridHeader {get;set;}

[Delphi]

public property RepeatGridHeader: Boolean read get_RepeatGridHeader write set_RepeatGridHeader;

Remarks

If True, the grid caption is printed at the top of each physical page.

If False (the default), the grid caption is printed on the first page only.

Note: If the Caption property of the associated C1TrueDBGrid control is not set, then the grid header is not printed, regardless of the setting of this property.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


PrintInfo.RepeatSplitHeaders Property

PrintInfo.RepeatSplitHeaders Property

Gets or sets a value inidcating whether split captions should appear on each page.

[Visual Basic]

Public Property RepeatSplitHeaders As Boolean

[C#]

public bool RepeatSplitHeaders {get;set;}

[Delphi]

public property RepeatSplitHeaders: Boolean read get_RepeatSplitHeaders write set_RepeatSplitHeaders;

Remarks

If True, split captions are printed at the top of each physical page below the grid header and above the column headers, if present.

If False (the default), split captions are printed on the first page only.

Note: If split captions are not set within the associated C1TrueDBGrid control, then the split headers are not printed, regardless of the setting of this property.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


PrintInfo.ShowOptionsDialog Property

PrintInfo.ShowOptionsDialog Property

Gets or sets a value indicating whether the Options dialog is displayed.

[Visual Basic]

Public Property ShowOptionsDialog As Boolean

[C#]

public bool ShowOptionsDialog {get;set;}

[Delphi]

public property ShowOptionsDialog: Boolean read get_ShowOptionsDialog write set_ShowOptionsDialog;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


PrintInfo.ShowProgressForm Property

PrintInfo.ShowProgressForm Property

Gets or sets a value indicating whether the Progress Form is displayed.

[Visual Basic]

Public Property ShowProgressForm As Boolean

[C#]

public bool ShowProgressForm {get;set;}

[Delphi]

public property ShowProgressForm: Boolean read get_ShowProgressForm write set_ShowProgressForm;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


PrintInfo.ShowSelection Property

PrintInfo.ShowSelection Property

Gets or sets a value indicating whether selected cells will be highlighted when previewing or printing.

[Visual Basic]

Public Property ShowSelection As Boolean

[C#]

public bool ShowSelection {get;set;}

[Delphi]

public property ShowSelection: Boolean read get_ShowSelection write set_ShowSelection;

Remarks

The default value for this property is True.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


PrintInfo.UseGridColors Property

PrintInfo.UseGridColors Property

Gets or sets a value indicating whether the grid's color scheme is translated to the print page.

[Visual Basic]

Public Property UseGridColors As Boolean

[C#]

public bool UseGridColors {get;set;}

[Delphi]

public property UseGridColors: Boolean read get_UseGridColors write set_UseGridColors;

Remarks

Determines whether the printout of the grid will use the grid’s color scheme. This property can be set through the PrintInfo object of the C1TrueDBGrid control.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


PrintInfo.VarRowHeight Property

PrintInfo.VarRowHeight Property

Gets or sets the height of printed rows.

[Visual Basic]

Public Property VarRowHeight As PrintInfo.RowHeightEnum

[C#]

public PrintInfo.RowHeightEnum VarRowHeight {get;set;}

[Delphi]

public property VarRowHeight: PrintInfo.RowHeightEnum read get_VarRowHeight write set_VarRowHeight;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


PrintInfo.WrapText Property

PrintInfo.WrapText Property

Gets or sets a value that controls how text is wrapped in a cell.

[Visual Basic]

Public Property WrapText As PrintInfo.WrapTextEnum

[C#]

public PrintInfo.WrapTextEnum WrapText {get;set;}

[Delphi]

public property WrapText: PrintInfo.WrapTextEnum read get_WrapText write set_WrapText;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


PrintInfo Methods

PrintInfo Methods

The methods of the PrintInfo class are listed here. For a complete list of PrintInfo class members, see the PrintInfo Members topic.

Public Methods

Print | Overloaded. Generates the printed page.
PrintPreview | Opens a separate application window in which end users can preview the output that would be generated by the print operation.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


PrintInfo.Print Method

PrintInfo.Print Method

Overload List

Generates the printed page.

[Visual Basic] Overloads Public Sub Print()

[C#] public void Print();

[Delphi] public procedure Print(); overload;

Generates the printed page.

[Visual Basic] Overloads Public Sub Print(PrinterSettings)

[C#] public void Print(PrinterSettings);

[Delphi] public procedure Print(PrinterSettings); overload;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


PrintInfo.Print Method ()

PrintInfo.Print Method ()

Previous Next

Generates the printed page.

[Visual Basic]

Overloads Public Sub Print()

[C#]

public void Print()

[Delphi]

public procedure Print(); overload;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


PrintInfo.Print Method (PrinterSettings)

PrintInfo.Print Method (PrinterSettings)

Previous Next

Generates the printed page.

[Visual Basic]

Overloads Public Sub Print( _

ByVal printerSettings As PrinterSettings _

)

[C#]

public void Print(

PrinterSettings printerSettings

);

[Delphi]

public procedure Print(

printerSettings: PrinterSettings

); overload;

Parameters

printerSettings

Specifies information about how a document is printed, including the printer that prints it.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


PrintInfo.PrintPreview Method

PrintInfo.PrintPreview Method

Opens a separate application window in which end users can preview the output that would be generated by the print operation.

[Visual Basic]

Public Sub PrintPreview()

[C#]

public void PrintPreview()

[Delphi]

public procedure PrintPreview();

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


PrintInfo.ActionFlags Enumeration

PrintInfo.ActionFlags Enumeration

Specifies allowable options for printing.

[Visual Basic]

Public Enum PrintInfo+ActionFlags

[C#]

public enum PrintInfo+ActionFlags

[Delphi]

type PrintInfo+ActionFlags = (Export, MaskAll, None, Preview, Print);

Namespace: C1.Win.C1TrueDBGrid

Assembly: C1.Win.C1TrueDBGrid.2 (in C1.Win.C1TrueDBGrid.2.dll)

Members

Member name | Description
Export | Export.
MaskAll | All.
None | No options.
Preview | Preview.
Print | Print.

See Also

C1.Win.C1TrueDBGrid Namespace

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


PrintInfo.FillEmptyEnum Enumeration

PrintInfo.FillEmptyEnum Enumeration

Specifies how empty space is printed.

[Visual Basic]

Public Enum PrintInfo+FillEmptyEnum

[C#]

public enum PrintInfo+FillEmptyEnum

[Delphi]

type PrintInfo+FillEmptyEnum = (ExtendAll, ExtendLast, None);

Namespace: C1.Win.C1TrueDBGrid

Assembly: C1.Win.C1TrueDBGrid.2 (in C1.Win.C1TrueDBGrid.2.dll)

Remarks

Use the members of this enumeration to set the style of the FillAreaWidth property of the PrintInfo class.

Members

Member name | Description
ExtendAll | All columns are extended proportionally.
ExtendLast | Last column is extended to fill the empty space.
None | Empty space on the right.

See Also

C1.Win.C1TrueDBGrid Namespace

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


PrintInfo.PageBreaksEnum Enumeration

PrintInfo.PageBreaksEnum Enumeration

Specifies when page breaks are applied.

[Visual Basic]

Public Enum PrintInfo+PageBreaksEnum

[C#]

public enum PrintInfo+PageBreaksEnum

[Delphi]

type PrintInfo+PageBreaksEnum = (ClipInArea, FitIntoArea, OnColumn, OnSplit);

Namespace: C1.Win.C1TrueDBGrid

Assembly: C1.Win.C1TrueDBGrid.2 (in C1.Win.C1TrueDBGrid.2.dll)

Remarks

Use the members of this enumeration to set the style of the PageBreak property of the PrintInfo class.

Members

Member name | Description
ClipInArea | Clip columns.
FitIntoArea | Fit all columns in one page.
OnColumn | Breaks on any column that doesn't fit.
OnSplit | Breaks on a new split or any column that doesn't fit.

See Also

C1.Win.C1TrueDBGrid Namespace

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


PrintInfo.RowHeightEnum Enumeration

PrintInfo.RowHeightEnum Enumeration

Specifies the height of printed rows.

[Visual Basic]

Public Enum PrintInfo+RowHeightEnum

[C#]

public enum PrintInfo+RowHeightEnum

[Delphi]

type PrintInfo+RowHeightEnum = (LikeGrid, StretchToFit, StretchToMax);

Namespace: C1.Win.C1TrueDBGrid

Assembly: C1.Win.C1TrueDBGrid.2 (in C1.Win.C1TrueDBGrid.2.dll)

Remarks

Use the members of this enumeration to set the style of the VarRowHeight property of the PrintInfo class.

Members

Member name | Description
LikeGrid | Use the grid's row height.
StretchToFit | Stretch the row height to fit all the data.
StretchToMax | Stretch the row height no greater than MaxRowHeight

See Also

C1.Win.C1TrueDBGrid Namespace

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


PrintInfo.WrapTextEnum Enumeration

PrintInfo.WrapTextEnum Enumeration

Specifies how cell text is wrapped.

[Visual Basic]

Public Enum PrintInfo+WrapTextEnum

[C#]

public enum PrintInfo+WrapTextEnum

[Delphi]

type PrintInfo+WrapTextEnum = (LikeColumn, NoWrap, Wrap);

Namespace: C1.Win.C1TrueDBGrid

Assembly: C1.Win.C1TrueDBGrid.2 (in C1.Win.C1TrueDBGrid.2.dll)

Remarks

Use the members of this enumeration to set the style of the WrapText property of the PrintInfo class.

Members

Member name | Description
LikeColumn | Use the columns Style property.
NoWrap | Never wrap.
Wrap | Always wrap text in a cell.

See Also

C1.Win.C1TrueDBGrid Namespace

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


PrintOptionsForm Class

PrintOptionsForm Class

Summary description for PrintOptionsForm.

For a list of all members of this type, see PrintOptionsForm Members.

System.Object

System.MarshalByRefObject

System.ComponentModel.Component

System.Windows.Forms.Control

System.Windows.Forms.ScrollableControl

System.Windows.Forms.ContainerControl

System.Windows.Forms.Form

C1.Win.C1TrueDBGrid.PrintOptionsForm

[Visual Basic]

Public Class PrintOptionsForm

Inherits Form

[C#]

public class PrintOptionsForm : Form

[Delphi]

type PrintOptionsForm = class (Form);

Namespace: C1.Win.C1TrueDBGrid

Assembly: C1.Win.C1TrueDBGrid.2 (in C1.Win.C1TrueDBGrid.2.dll)

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


PrintOptionsForm Members

PrintOptionsForm Members

PrintOptionsForm overview

Public Constructors

PrintOptionsForm Constructor

Creates a new instance of the PrintOptionsFrom class.

Protected Methods

Dispose

Overloaded. Overriden. Called when the class is being disposed.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


PrintOptionsForm Constructor

PrintOptionsForm Constructor

Creates a new instance of the PrintOptionsFrom class.

[Visual Basic]

Public Function New()

[C#]

public PrintOptionsForm()

[Delphi]

public constructor Create();

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


PrintOptionsForm Methods

PrintOptionsForm Methods

The methods of the PrintOptionsForm class are listed here. For a complete list of PrintOptionsForm class members, see the PrintOptionsForm Members topic.

Protected Methods

Dispose

Overloaded. Overriden. Called when the class is being disposed.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


PrintOptionsForm.Dispose Method

PrintOptionsForm.Dispose Method

Called when the class is being disposed.

[Visual Basic]

Overrides Protected Sub Dispose( _

ByVal disposing As Boolean _

)

[C#]

override protected void Dispose(

bool disposing

);

[Delphi]

strict protected procedure Dispose(

disposing: Boolean

); overload; override;

Parameters

disposing

True to cleanup.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


PrintPreviewWinSettings Class

PrintPreviewWinSettings Class

The object used to specify the characteristics of the print preview window.

For a list of all members of this type, see PrintPreviewWinSettings Members.

System.Object

C1.Win.C1TrueDBGrid.PrintPreviewWinSettings

[Visual Basic]

Public Class PrintPreviewWinSettings

[C#]

public class PrintPreviewWinSettings

[Delphi]

type PrintPreviewWinSettings = class;

Namespace: C1.Win.C1TrueDBGrid

Assembly: C1.Win.C1TrueDBGrid.2 (in C1.Win.C1TrueDBGrid.2.dll)

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


PrintPreviewWinSettings Members

PrintPreviewWinSettings Members

PrintPreviewWinSettings overview

Public Properties

AllowSizing | Gets or sets a value indicating whether the end user has the ability to size the preview window.
Caption | Gets or sets the caption of the preview window.
Location | Gets or sets the location of the preview window.
NavigationPaneDockingStyle | Gets or sets the position and manner in which the control is docked in the navigation page.
Size | Gets or sets the size of the form.
ToolBars | Gets or sets a value indicating the visibiity of toolbars.
UIStrings | Gets the array of user interface strings.
ZoomFactor | Gets or sets the zoom factor for print preview.

Protected Methods

ResetUIStrings

Resets the array of UIStrings back to the default locale.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


PrintPreviewWinSettings Properties

PrintPreviewWinSettings Properties

The properties of the PrintPreviewWinSettings class are listed here. For a complete list of PrintPreviewWinSettings class members, see the PrintPreviewWinSettings Members topic.

Public Properties

AllowSizing | Gets or sets a value indicating whether the end user has the ability to size the preview window.
Caption | Gets or sets the caption of the preview window.
Location | Gets or sets the location of the preview window.
NavigationPaneDockingStyle | Gets or sets the position and manner in which the control is docked in the navigation page.
Size | Gets or sets the size of the form.
ToolBars | Gets or sets a value indicating the visibiity of toolbars.
UIStrings | Gets the array of user interface strings.
ZoomFactor | Gets or sets the zoom factor for print preview.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


PrintPreviewWinSettings.AllowSizing Property

PrintPreviewWinSettings.AllowSizing Property

Gets or sets a value indicating whether the end user has the ability to size the preview window.

[Visual Basic]

Public Property AllowSizing As Boolean

[C#]

public bool AllowSizing {get;set;}

[Delphi]

public property AllowSizing: Boolean read get_AllowSizing write set_AllowSizing;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


PrintPreviewWinSettings.Caption Property

PrintPreviewWinSettings.Caption Property

Gets or sets the caption of the preview window.

[Visual Basic]

Public Property Caption As String

[C#]

public string Caption {get;set;}

[Delphi]

public property Caption: String read get_Caption write set_Caption;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


PrintPreviewWinSettings.Location Property

PrintPreviewWinSettings.Location Property

Gets or sets the location of the preview window.

[Visual Basic]

Public Property Location As Point

[C#]

public Point Location {get;set;}

[Delphi]

public property Location: Point read get_Location write set_Location;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


PrintPreviewWinSettings.NavigationPaneDockingStyle Property

PrintPreviewWinSettings.NavigationPaneDockingStyle Property

Gets or sets the position and manner in which the control is docked in the navigation page.

[Visual Basic]

Public Property NavigationPaneDockingStyle As DockStyle

[C#]

public DockStyle NavigationPaneDockingStyle {get;set;}

[Delphi]

public property NavigationPaneDockingStyle: DockStyle read get_NavigationPaneDockingStyle write set_NavigationPaneDockingStyle;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


PrintPreviewWinSettings.Size Property

PrintPreviewWinSettings.Size Property

Gets or sets the size of the form.

[Visual Basic]

Public Property Size As Size

[C#]

public Size Size {get;set;}

[Delphi]

public property Size: Size read get_Size write set_Size;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


PrintPreviewWinSettings.ToolBars Property

PrintPreviewWinSettings.ToolBars Property

Gets or sets a value indicating the visibility of toolbars.

[Visual Basic]

Public Property ToolBars As Boolean

[C#]

public bool ToolBars {get;set;}

[Delphi]

public property ToolBars: Boolean read get_ToolBars write set_ToolBars;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


PrintPreviewWinSettings.UIStrings Property

PrintPreviewWinSettings.UIStrings Property

Gets the array of user interface strings.

[Visual Basic]

Public ReadOnly Property UIStrings As UIStrings

[C#]

public UIStrings UIStrings {get;}

[Delphi]

public property UIStrings: UIStrings read get_UIStrings;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


PrintPreviewWinSettings.ZoomFactor Property

PrintPreviewWinSettings.ZoomFactor Property

Gets or sets the zoom factor for print preview.

[Visual Basic]

Public Property ZoomFactor As Double

[C#]

public double ZoomFactor {get;set;}

[Delphi]

public property ZoomFactor: Double read get_ZoomFactor write set_ZoomFactor;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


PrintPreviewWinSettings Methods

PrintPreviewWinSettings Methods

The methods of the PrintPreviewWinSettings class are listed here. For a complete list of PrintPreviewWinSettings class members, see the PrintPreviewWinSettings Members topic.

Protected Methods

ResetUIStrings

Resets the array of UIStrings back to the default locale.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


PrintPreviewWinSettings.ResetUIStrings Method

PrintPreviewWinSettings.ResetUIStrings Method

Resets the array of UIStrings back to the default locale.

[Visual Basic]

Protected Sub ResetUIStrings()

[C#]

protected void ResetUIStrings()

[Delphi]

strict protected procedure ResetUIStrings();

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


RelationState Enumeration

RelationState Enumeration

Defined the relationship of a column.

[Visual Basic]

Public Enum RelationState

[C#]

public enum RelationState

[Delphi]

type RelationState = (Child, None, Parent);

Namespace: C1.Win.C1TrueDBGrid

Assembly: C1.Win.C1TrueDBGrid.2 (in C1.Win.C1TrueDBGrid.2.dll)

Members

Member name | Description
Child | Column is the child.
None | Column is not related.
Parent | Column is the parent.

See Also

C1.Win.C1TrueDBGrid Namespace

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


RowColChangeEventArgs Class

RowColChangeEventArgs Class

Provides data for the RowColChange event.

For a list of all members of this type, see RowColChangeEventArgs Members.

System.Object

System.EventArgs

C1.Win.C1TrueDBGrid.RowColChangeEventArgs

[Visual Basic]

Public Class RowColChangeEventArgs

Inherits EventArgs

[C#]

public class RowColChangeEventArgs : EventArgs

[Delphi]

type RowColChangeEventArgs = class (EventArgs);

Namespace: C1.Win.C1TrueDBGrid

Assembly: C1.Win.C1TrueDBGrid.2 (in C1.Win.C1TrueDBGrid.2.dll)

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


RowColChangeEventArgs Members

RowColChangeEventArgs Members

RowColChangeEventArgs overview

Public Properties

LastCol | The previous column index of the DisplayColumns collection.
LastRow | The previous row index.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


RowColChangeEventArgs Properties

RowColChangeEventArgs Properties

The properties of the RowColChangeEventArgs class are listed here. For a complete list of RowColChangeEventArgs class members, see the RowColChangeEventArgs Members topic.

Public Properties

LastCol | The previous column index of the DisplayColumns collection.
LastRow | The previous row index.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


RowColChangeEventArgs.LastCol Property

RowColChangeEventArgs.LastCol Property

The previous column index of the DisplayColumns collection.

[Visual Basic]

Public ReadOnly Property LastCol As Integer

[C#]

public int LastCol {get;}

[Delphi]

public property LastCol: Int32 read get_LastCol;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


RowColChangeEventArgs.LastRow Property

RowColChangeEventArgs.LastRow Property

The previous row index.

[Visual Basic]

Public ReadOnly Property LastRow As Integer

[C#]

public int LastRow {get;}

[Delphi]

public property LastRow: Int32 read get_LastRow;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


RowColChangeEventHandler Delegate

RowColChangeEventHandler Delegate

Raised after the current Row or Column changes.

[Visual Basic]

Public Delegate Sub RowColChangeEventHandler( _

ByVal sender As Object, _

ByVal e As RowColChangeEventArgs _

)

[C#]

public delegate void RowColChangeEventHandler(

object sender,

RowColChangeEventArgs e

);

[Delphi]

type RowColChangeEventHandler = procedure (

sender: Object;

e: RowColChangeEventArgs

) of object;

Namespace: C1.Win.C1TrueDBGrid

Assembly: C1.Win.C1TrueDBGrid.2 (in C1.Win.C1TrueDBGrid.2.dll)

See Also

C1.Win.C1TrueDBGrid Namespace

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


RowSelectorEnum Enumeration

RowSelectorEnum Enumeration

Specifies which rows are to be previewed/printed.

[Visual Basic]

Public Enum RowSelectorEnum

[C#]

public enum RowSelectorEnum

[Delphi]

type RowSelectorEnum = (AllRows, CurrentRow, SelectedRows);

Namespace: C1.Win.C1TrueDBGrid

Assembly: C1.Win.C1TrueDBGrid.2 (in C1.Win.C1TrueDBGrid.2.dll)

Remarks

Use the members of this enumeration to access the value of the PrintPreview methods in the C1TrueDBGrid class.

Members

Member name | Description
AllRows | All rows are to be previewed/printed.
CurrentRow | Only the current row will be previewed/printed.
SelectedRows | Only selected rows will be previewed/printed.

See Also

C1.Win.C1TrueDBGrid Namespace

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


RowSizingEnum Enumeration

RowSizingEnum Enumeration

Specifies how rows can be resized.

[Visual Basic]

Public Enum RowSizingEnum

[C#]

public enum RowSizingEnum

[Delphi]

type RowSizingEnum = (AllRows, IndividualRows, None);

Namespace: C1.Win.C1TrueDBGrid

Assembly: C1.Win.C1TrueDBGrid.2 (in C1.Win.C1TrueDBGrid.2.dll)

Remarks

Use the members of this enumeration to set the value of the AllowRowSizing property in the C1TrueDBGrid, C1TrueDBDropdown and Split classes.

Members

Member name | Description
AllRows | All rows will be sized to the same height or width.
IndividualRows | Rows can be sized indepentently.
None | Row can not be resized.

See Also

C1.Win.C1TrueDBGrid Namespace

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


RowTypeEnum Enumeration

RowTypeEnum Enumeration

Identifies the type of row.

[Visual Basic]

Public Enum RowTypeEnum

[C#]

public enum RowTypeEnum

[Delphi]

type RowTypeEnum = (ChildRow, CollapsedGroupRow, DataRow, ExpandedGroupRow, FooterRow);

Namespace: C1.Win.C1TrueDBGrid

Assembly: C1.Win.C1TrueDBGrid.2 (in C1.Win.C1TrueDBGrid.2.dll)

Remarks

Use the members of this enumeration to query the value of the RowType property in the ViewRow class.

Members

Member name | Description
ChildRow | Row is a childrow.
CollapsedGroupRow | Row is a collapsed group row.
DataRow | Row is a datarow.
ExpandedGroupRow | Row is an expanded group row.
FooterRow | Row is a footerrow.

See Also

C1.Win.C1TrueDBGrid Namespace

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ScrollBarEnum Enumeration

ScrollBarEnum Enumeration

Identifies the type of scrollbar.

[Visual Basic]

Public Enum ScrollBarEnum

[C#]

public enum ScrollBarEnum

[Delphi]

type ScrollBarEnum = (Horizontal, Vertical);

Namespace: C1.Win.C1TrueDBGrid

Assembly: C1.Win.C1TrueDBGrid.2 (in C1.Win.C1TrueDBGrid.2.dll)

Remarks

This enumeration identifies which scrollbar is being scrolled for the FetchScrollTips event.

Members

Member name | Description
Horizontal | The Horizontal scrollbar.
Vertical | The Vertical scrollbar.

See Also

C1.Win.C1TrueDBGrid Namespace

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ScrollBarStyleEnum Enumeration

ScrollBarStyleEnum Enumeration

Specifies the visibility of ScrollBars.

[Visual Basic]

Public Enum ScrollBarStyleEnum

[C#]

public enum ScrollBarStyleEnum

[Delphi]

type ScrollBarStyleEnum = (Always, Automatic, None);

Namespace: C1.Win.C1TrueDBGrid

Assembly: C1.Win.C1TrueDBGrid.2 (in C1.Win.C1TrueDBGrid.2.dll)

Remarks

Use the members of this enumeration to set the style of the HBar and VBar object.

Members

Member name | Description
Always | ScrollBars are always displayed.
Automatic | ScrollBars are displayed only if the object's contents extend beyond its borders.
None | ScrollBars are never displayed.

See Also

C1.Win.C1TrueDBGrid Namespace

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


SelectedColumnCollection Class

SelectedColumnCollection Class

Contains a collection of C1DataColumn objects that represent columns that are selected.

For a list of all members of this type, see SelectedColumnCollection Members.

System.Object

System.Collections.CollectionBase

C1.Win.C1TrueDBGrid.C1DataColumnCollection

C1.Win.C1TrueDBGrid.SelectedColumnCollection

[Visual Basic]

Public Class SelectedColumnCollection

Inherits C1DataColumnCollection

[C#]

public class SelectedColumnCollection : C1DataColumnCollection

[Delphi]

type SelectedColumnCollection = class (C1DataColumnCollection);

Namespace: C1.Win.C1TrueDBGrid

Assembly: C1.Win.C1TrueDBGrid.2 (in C1.Win.C1TrueDBGrid.2.dll)

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


SelectedColumnCollection Members

SelectedColumnCollection Members

SelectedColumnCollection overview

Public Properties

Item (inherited from C1DataColumnCollection)

Overloaded. Gets the specified C1DataColumn from the collection at the specified index.

Public Methods

Add | Overriden. Adds a C1DataColumn to the end of the collection.
Clear | Removes all elements from the collection.
Insert | Overriden. Inserts a C1DataColumn at the specified index.
RemoveAt | Removes the C1DataColumn at the specified index.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


SelectedColumnCollection Properties

SelectedColumnCollection Properties

The properties of the SelectedColumnCollection class are listed here. For a complete list of SelectedColumnCollection class members, see the SelectedColumnCollection Members topic.

Public Properties

Item (inherited from C1DataColumnCollection)

Overloaded. Gets the specified C1DataColumn from the collection at the specified index.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


SelectedColumnCollection Methods

SelectedColumnCollection Methods

The methods of the SelectedColumnCollection class are listed here. For a complete list of SelectedColumnCollection class members, see the SelectedColumnCollection Members topic.

Public Methods

Add | Overriden. Adds a C1DataColumn to the end of the collection.
Clear | Removes all elements from the collection.
Insert | Overriden. Inserts a C1DataColumn at the specified index.
RemoveAt | Removes the C1DataColumn at the specified index.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


SelectedColumnCollection.Add Method

SelectedColumnCollection.Add Method

Adds a C1DataColumn to the end of the collection.

[Visual Basic]

Overrides Public Function Add( _

ByVal dc As C1DataColumn _

) As Integer

[C#]

override public int Add(

C1DataColumn dc

);

[Delphi]

public function Add(

dc: C1DataColumn

): Int32; override;

Parameters

dc

The C1DataColumn to add.

Return Value

The index at which the C1DataColumn has been added.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


SelectedColumnCollection.Clear Method

SelectedColumnCollection.Clear Method

Removes all elements from the collection.

[Visual Basic]

Public Sub Clear()

[C#]

new public void Clear()

[Delphi]

public procedure Clear();

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


SelectedColumnCollection.Insert Method

SelectedColumnCollection.Insert Method

Inserts a C1DataColumn at the specified index.

[Visual Basic]

Overrides Public Sub Insert( _

ByVal index As Integer, _

ByVal dc As C1DataColumn _

)

[C#]

override public void Insert(

int index,

C1DataColumn dc

);

[Delphi]

public procedure Insert(

index: Int32;

dc: C1DataColumn

); override;

Parameters

index

The zero-based index at which the C1DataColumn should be inserted.

dc

The C1DataColumn to insert.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


SelectedColumnCollection.RemoveAt Method

SelectedColumnCollection.RemoveAt Method

Removes the C1DataColumn at the specified index.

[Visual Basic]

Public Sub RemoveAt( _

ByVal index As Integer _

)

[C#]

new public void RemoveAt(

int index

);

[Delphi]

public procedure RemoveAt(

index: Int32

);

Parameters

index

The zero-based index of the row to remove.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


SelectedRowCollection Class

SelectedRowCollection Class

Represents a collection of Selected rows.

For a list of all members of this type, see SelectedRowCollection Members.

System.Object

System.Collections.CollectionBase

C1.Win.C1TrueDBGrid.SelectedRowCollection

[Visual Basic]

Public Class SelectedRowCollection

Inherits CollectionBase

[C#]

public class SelectedRowCollection : CollectionBase

[Delphi]

type SelectedRowCollection = class (CollectionBase);

Namespace: C1.Win.C1TrueDBGrid

Assembly: C1.Win.C1TrueDBGrid.2 (in C1.Win.C1TrueDBGrid.2.dll)

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


SelectedRowCollection Members

SelectedRowCollection Members

SelectedRowCollection overview

Public Properties

Item

Gets or sets the specified Row index from the collection.

Public Methods

Add | Overloaded. Adds a row to the end of the collection.
Clear | Overloaded. Removes all elements from the collection.
IndexOf | Gets the index of the specified row.
Insert | Overloaded. Inserts a row at the specified index.
RemoveAt | Overloaded. Removes the row at the specified index.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


SelectedRowCollection Properties

SelectedRowCollection Properties

The properties of the SelectedRowCollection class are listed here. For a complete list of SelectedRowCollection class members, see the SelectedRowCollection Members topic.

Public Properties

Item

Gets or sets the specified Row index from the collection.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


SelectedRowCollection.Item Property

SelectedRowCollection.Item Property

Gets or sets the specified Row index from the collection.

[Visual Basic]

Public Default Property Item( _

ByVal index As Integer _

) As Integer

[C#]

public int this[

int index

] {get;set;}

[Delphi]

public property Item[

index: Int32

]: Int32 read get_Item write set_Item;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


SelectedRowCollection Methods

SelectedRowCollection Methods

The methods of the SelectedRowCollection class are listed here. For a complete list of SelectedRowCollection class members, see the SelectedRowCollection Members topic.

Public Methods

Add | Overloaded. Adds a row to the end of the collection.
Clear | Overloaded. Removes all elements from the collection.
IndexOf | Gets the index of the specified row.
Insert | Overloaded. Inserts a row at the specified index.
RemoveAt | Overloaded. Removes the row at the specified index.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


SelectedRowCollection.Add Method

SelectedRowCollection.Add Method

Adds a row to the end of the collection.

[Visual Basic]

Public Function Add( _

ByVal row As Integer _

) As Integer

[C#]

public int Add(

int row

);

[Delphi]

public function Add(

row: Int32

): Int32;

Parameters

row

Row number to add.

Return Value

The index at which the row has been added.

Example

The follow code adds a row to the SelectedRowCollection:

· Visual Basic

· C#

· Delphi

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


SelectedRowCollection.Clear Method

SelectedRowCollection.Clear Method

Removes all elements from the collection.

[Visual Basic]

Public Sub Clear()

[C#]

new public void Clear()

[Delphi]

public procedure Clear();

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


SelectedRowCollection.IndexOf Method

SelectedRowCollection.IndexOf Method

Gets the index of the specified row.

[Visual Basic]

Public Function IndexOf( _

ByVal row As Integer _

) As Integer

[C#]

public int IndexOf(

int row

);

[Delphi]

public function IndexOf(

row: Int32

): Int32;

Parameters

row

The row to index.

Return Value

The index of the row.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


SelectedRowCollection.Insert Method

SelectedRowCollection.Insert Method

Inserts a row at the specified index.

[Visual Basic]

Public Sub Insert( _

ByVal index As Integer, _

ByVal row As Integer _

)

[C#]

public void Insert(

int index,

int row

);

[Delphi]

public procedure Insert(

index: Int32;

row: Int32

);

Parameters

index

The zero-based index at which row should be inserted.

row

The row to insert.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


SelectedRowCollection.RemoveAt Method

SelectedRowCollection.RemoveAt Method

Removes the row at the specified index.

[Visual Basic]

Public Sub RemoveAt( _

ByVal index As Integer _

)

[C#]

new public void RemoveAt(

int index

);

[Delphi]

public procedure RemoveAt(

index: Int32

);

Parameters

index

The zero-based index of the row to remove.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


SizeModeEnum Enumeration

SizeModeEnum Enumeration

Specifies the sizing mode for splits.

[Visual Basic]

Public Enum SizeModeEnum

[C#]

public enum SizeModeEnum

[Delphi]

type SizeModeEnum = (Exact, NumberOfColumns, Scalable);

Namespace: C1.Win.C1TrueDBGrid

Assembly: C1.Win.C1TrueDBGrid.2 (in C1.Win.C1TrueDBGrid.2.dll)

Remarks

Use the members of this enumeration to set the value of the SplitSizeMode property.

Members

Member name | Description
Exact | The SplitSize indicates the size of the split in pixels.
NumberOfColumns | The SplitSize indicates the number of columns displayed in the split.
Scalable | The SplitSize indicates the relative size of the split with respect to other scalable splits.

See Also

C1.Win.C1TrueDBGrid Namespace

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


SortDirEnum Enumeration

SortDirEnum Enumeration

Specifies the glyph used to denote a sort direction in the column header.

[Visual Basic]

Public Enum SortDirEnum

[C#]

public enum SortDirEnum

[Delphi]

type SortDirEnum = (Ascending, Descending, None);

Namespace: C1.Win.C1TrueDBGrid

Assembly: C1.Win.C1TrueDBGrid.2 (in C1.Win.C1TrueDBGrid.2.dll)

Remarks

Use the members of this enumeration to set the style of the SortDirection property in the C1DataColumn class.

Members

Member name | Description
Ascending | Column is sorted in ascending order.
Descending | Column is sorted in descending order.
None | Column is not sorted.

See Also

C1.Win.C1TrueDBGrid Namespace

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Split Class

Split Class

Represents a horizontal or vertical pane to display and edit data.

For a list of all members of this type, see Split Members.

System.Object

C1.Win.C1TrueDBGrid.BaseGrid.View

C1.Win.C1TrueDBGrid.Split

C1.Win.C1TrueDBGrid.DropdownView

[Visual Basic]

Public Class Split

Inherits View

[C#]

public class Split : View

[Delphi]

type Split = class (View);

Namespace: C1.Win.C1TrueDBGrid

Assembly: C1.Win.C1TrueDBGrid.2 (in C1.Win.C1TrueDBGrid.2.dll)

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Split Members

Split Members

Split overview

Public Properties

AllowColMove | Gets or sets a value indicating the ability to move columns.
AllowColSelect | Gets or sets a value indicating the ability to select columns.
AllowFocus | Gets or sets a value indicating whether the split can recieve focus.
AllowHorizontalSizing | Gets or sets a value indicating whether a user is allowed to resize horizontal splits.
AllowRowSelect | Gets or sets a value indicating the ability to select rows.
AllowRowSizing | Gets or sets how interactive row resizing is performed.
AllowVerticalSizing | Gets or sets a value indicating whether a user is allowed to resize vertical splits.
AlternatingRowStyle | Gets or sets a value indicating whether the split uses the OddRowStyle for odd-numbered rows and EvenRowStyle for even-numbered rows.
BorderStyle (inherited from View) | Controls the appearance of the border rendered for a split. Determines how the borders of a split is rendered.
Caption | Gets or sets the caption.
CaptionHeight | Gets or sets the height of the caption.
CaptionStyle | Gets or sets the Style object that controls the appearance of the caption area.
ColumnCaptionHeight | Gets or sets the height of the column captions.
ColumnFooterHeight | Gets or sets the height of column footers.
CurrentCellVisible | Gets or sets a value indicating the visibility of the current cell in a split.
DisplayColumns | Gets a collection of C1DisplayColumn objects.
EditorStyle | Gets or sets the Style object that controls the appearance of the cell editor within a grid.
EvenRowStyle | Gets or sets the Style object that controls the appearance of an even-numbered row when using AlternatingRows.
ExtendRightColumn | Gets or sets a value that determines how the last column will extend to fill the dead area of the split.
FetchRowStyles | Gets or sets a value indicating whether the FetchRowStyle event will be raised.
FilterActive | Gets or sets a value indicating whether the filter bar has focus.
FilterBar | Gets or sets a value indicating the visibility of the FilterBar.
FilterBarStyle | Gets or sets the Style object that controls the appearance of the FilterBar.
FilterBorderStyle | Controls the appearance of the border between the filterbar and the body of the grid.
FirstRow | Gets or sets the row index for the first visible row in a split.
FooterStyle | Gets or sets the Style object that controls the appearance of column footers.
HeadingStyle | Gets or sets the Style object that controls the appearance of the grids column headers.
Height | Gets or sets the height of a split.
HighLightRowStyle | Gets or sets the Style object that controls the current row/cell when the MarqueeStyle is set to Highlight Row/Cell.
HorizontalOffset | Gets or sets the position of the Horizontal scrollbar.
HorizontalScrollGroup | Gets or sets the group which synchronizes horizontal scrolling between splits.
HScrollBar | Gets the HBar object that controls the appearance of the horizontal scrollbar.
InactiveStyle | Gets or sets the Style object that controls the grids caption when it doesn't have focus.
LeftCol | Gets or sets the left most visible column for a split.
Locked | Gets or sets a value indicating if the cells of a split can be edited.
MarqueeStyle | Gets or sets the MarqueeStyle for a Split.
MinHeight | Gets or sets the minimum height that a split can be interactively resized.
MinWidth | Gets or sets the minimum width that a split can be interactively resized.
Name | Gets or sets the name of a split.
OddRowStyle | Gets or sets the Style object that controls the appearance of an odd-numbered row when using AlternatingRows.
RecordSelectors | Gets or sets a value indicating the visibility of row headers for Split.
RecordSelectorStyle | Gets or sets the Style object that controls the appearance of the RecordSelectors.
RecordSelectorWidth | Gets or sets the width of the row headers.
Rows | Gets the collection of Rows displayed in the Split.
SelectedStyle | Gets or sets the Style object that controls the appearance of selected rows and columns.
SplitSize | Gets or sets the size of a split.
SplitSizeMode | Gets or sets a value indicating how the SplitSize property is used to determine the actual size of a split.
SpringMode | Gets or sets a value that determines how columns will resize when the grid is resized.
Style | Gets or sets the root Style object for the Split.
VerticalOffset | Gets or sets the position of the Vertical scrollbar.
VerticalScrollGroup | Gets or sets the group which synchronizes verticall scrolling between splits.
VScrollBar | Gets the VBar object that controls the appearance of the vertical scrollbar.

Public Methods

AddCellStyle | Controls the Style used to change the appearance for cells meeting the specified condition.
AddRegexCellStyle | Controls the Style used to change the appearance of cells according to their contents.
ClearCellStyle | Removes a cell condition established with a previous call to the AddCellStyle method.
ClearRegexCellStyle | Overloaded. Removes a cell condition established with a previous call to the AddCellStyle method.
Dispose | Overloaded. Overriden. Called when the class is being disposed.
GetCellBounds | Returns the Rectangle for the given Row and Column.
ToString (inherited from View) | Returns the string that represents the current object.

Protected Methods

OnGetCellRange

Returns the upper and lower bounds for a merged column.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Split Properties

Split Properties

The properties of the Split class are listed here. For a complete list of Split class members, see the Split Members topic.

Public Properties

AllowColMove | Gets or sets a value indicating the ability to move columns.
AllowColSelect | Gets or sets a value indicating the ability to select columns.
AllowFocus | Gets or sets a value indicating whether the split can recieve focus.
AllowHorizontalSizing | Gets or sets a value indicating whether a user is allowed to resize horizontal splits.
AllowRowSelect | Gets or sets a value indicating the ability to select rows.
AllowRowSizing | Gets or sets how interactive row resizing is performed.
AllowVerticalSizing | Gets or sets a value indicating whether a user is allowed to resize vertical splits.
AlternatingRowStyle | Gets or sets a value indicating whether the split uses the OddRowStyle for odd-numbered rows and EvenRowStyle for even-numbered rows.
BorderStyle (inherited from View) | Controls the appearance of the border rendered for a split. Determines how the borders of a split is rendered.
Caption | Gets or sets the caption.
CaptionHeight | Gets or sets the height of the caption.
CaptionStyle | Gets or sets the Style object that controls the appearance of the caption area.
ColumnCaptionHeight | Gets or sets the height of the column captions.
ColumnFooterHeight | Gets or sets the height of column footers.
CurrentCellVisible | Gets or sets a value indicating the visibility of the current cell in a split.
DisplayColumns | Gets a collection of C1DisplayColumn objects.
EditorStyle | Gets or sets the Style object that controls the appearance of the cell editor within a grid.
EvenRowStyle | Gets or sets the Style object that controls the appearance of an even-numbered row when using AlternatingRows.
ExtendRightColumn | Gets or sets a value that determines how the last column will extend to fill the dead area of the split.
FetchRowStyles | Gets or sets a value indicating whether the FetchRowStyle event will be raised.
FilterActive | Gets or sets a value indicating whether the filter bar has focus.
FilterBar | Gets or sets a value indicating the visibility of the FilterBar.
FilterBarStyle | Gets or sets the Style object that controls the appearance of the FilterBar.
FilterBorderStyle | Controls the appearance of the border between the filterbar and the body of the grid.
FirstRow | Gets or sets the row index for the first visible row in a split.
FooterStyle | Gets or sets the Style object that controls the appearance of column footers.
HeadingStyle | Gets or sets the Style object that controls the appearance of the grids column headers.
Height | Gets or sets the height of a split.
HighLightRowStyle | Gets or sets the Style object that controls the current row/cell when the MarqueeStyle is set to Highlight Row/Cell.
HorizontalOffset | Gets or sets the position of the Horizontal scrollbar.
HorizontalScrollGroup | Gets or sets the group which synchronizes horizontal scrolling between splits.
HScrollBar | Gets the HBar object that controls the appearance of the horizontal scrollbar.
InactiveStyle | Gets or sets the Style object that controls the grids caption when it doesn't have focus.
LeftCol | Gets or sets the left most visible column for a split.
Locked | Gets or sets a value indicating if the cells of a split can be edited.
MarqueeStyle | Gets or sets the MarqueeStyle for a Split.
MinHeight | Gets or sets the minimum height that a split can be interactively resized.
MinWidth | Gets or sets the minimum width that a split can be interactively resized.
Name | Gets or sets the name of a split.
OddRowStyle | Gets or sets the Style object that controls the appearance of an odd-numbered row when using AlternatingRows.
RecordSelectors | Gets or sets a value indicating the visibility of row headers for Split.
RecordSelectorStyle | Gets or sets the Style object that controls the appearance of the RecordSelectors.
RecordSelectorWidth | Gets or sets the width of the row headers.
Rows | Gets the collection of Rows displayed in the Split.
SelectedStyle | Gets or sets the Style object that controls the appearance of selected rows and columns.
SplitSize | Gets or sets the size of a split.
SplitSizeMode | Gets or sets a value indicating how the SplitSize property is used to determine the actual size of a split.
SpringMode | Gets or sets a value that determines how columns will resize when the grid is resized.
Style | Gets or sets the root Style object for the Split.
VerticalOffset | Gets or sets the position of the Vertical scrollbar.
VerticalScrollGroup | Gets or sets the group which synchronizes verticall scrolling between splits.
VScrollBar | Gets the VBar object that controls the appearance of the vertical scrollbar.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Split.AllowColMove Property

Split.AllowColMove Property

Gets or sets a value indicating the ability to move columns.

[Visual Basic]

Public Property AllowColMove As Boolean

[C#]

public bool AllowColMove {get;set;}

[Delphi]

public property AllowColMove: Boolean read get_AllowColMove write set_AllowColMove;

Remarks

If True, the user can move columns.

If False (the default), the user cannot move columns.

Use the AllowColMove property to control whether the user can move columns by dragging the column header to the desired location. Any change in column order causes a ColMove event.

If AllowColMove is set to True, and the DataView property is set to Group, a grouping area is added to the grid. Columns can be added or dragged to this area at run time.

See Column Grouping for more information.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Split.AllowColSelect Property

Split.AllowColSelect Property

Gets or sets a value indicating the ability to select columns.

[Visual Basic]

Public Property AllowColSelect As Boolean

[C#]

public bool AllowColSelect {get;set;}

[Delphi]

public property AllowColSelect: Boolean read get_AllowColSelect write set_AllowColSelect;

Remarks

If True (the default), the user can select columns.

If False, the user cannot select columns.

Use the AllowColSelect property to control whether the user can select columns by clicking within the column header area. Setting this property to False suppresses highlighting when the user clicks a column header, which is useful for applications that respond to the HeadClick event.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Split.AllowFocus Property

Split.AllowFocus Property

Gets or sets a value indicating whether the split can recieve focus.

[Visual Basic]

Public Property AllowFocus As Boolean

[C#]

public bool AllowFocus {get;set;}

[Delphi]

public property AllowFocus: Boolean read get_AllowFocus write set_AllowFocus;

Remarks

If True (the default), the user will be able to interactively select the object, giving it focus.

If False, the user will not be able to interactively select the object. When clicked, the object will not receive focus and the control (or grid column) that previously had focus will retain it.

For C1DisplayColumn objects, setting AllowFocus to True enables cells within the object to receive focus. If set to False, there is no way to change the focus to a cell within the object. However, if an object already has the focus, setting AllowFocus to False will not give focus to another split, column, or control.

If a cell in a column which does not allow focus is clicked, and the cell is in a row other than the current row, then the row is changed, but the column with the focus retains it.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Split.AllowHorizontalSizing Property

Split.AllowHorizontalSizing Property

Gets or sets a value indicating whether a user is allowed to resize horizontal splits.

[Visual Basic]

Public Property AllowHorizontalSizing As Boolean

[C#]

public bool AllowHorizontalSizing {get;set;}

[Delphi]

public property AllowHorizontalSizing: Boolean read get_AllowHorizontalSizing write set_AllowHorizontalSizing;

Remarks

If True, then the user is able to resize horizontal splits at run-time.

If False, then the user is prevented from resizing horizontal splits at run-time.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Split.AllowRowSelect Property

Split.AllowRowSelect Property

Gets or sets a value indicating the ability to select rows.

[Visual Basic]

Public Property AllowRowSelect As Boolean

[C#]

public bool AllowRowSelect {get;set;}

[Delphi]

public property AllowRowSelect: Boolean read get_AllowRowSelect write set_AllowRowSelect;

Remarks

If True (the default), the user can select rows.

If False, the user cannot select rows.

Use the AllowRowSelect property to control whether the user can select rows by clicking the record selector buttons. By setting this property to False, record selection can be disabled without hiding the record selectors altogether, since you may want to use the record selectors to provide visual feedback when the current row is modified.

Note: The user cannot select rows if the RecordSelectors property is set to False for all splits, even if AllowRowSelect is True.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Split.AllowRowSizing Property

Split.AllowRowSizing Property

Gets or sets how interactive row resizing is performed.

[Visual Basic]

Public Property AllowRowSizing As RowSizingEnum

[C#]

public RowSizingEnum AllowRowSizing {get;set;}

[Delphi]

public property AllowRowSizing: RowSizingEnum read get_AllowRowSizing write set_AllowRowSizing;

Remarks

Note: RecordSelectors must be visible in a split in order for the user to resize rows interactively in that split. If RecordSelectors are disabled for all splits in a C1TrueDBGrid control, the user cannot resize rows interactively in that grid.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Split.AllowVerticalSizing Property

Split.AllowVerticalSizing Property

Gets or sets a value indicating whether a user is allowed to resize vertical splits.

[Visual Basic]

Public Property AllowVerticalSizing As Boolean

[C#]

public bool AllowVerticalSizing {get;set;}

[Delphi]

public property AllowVerticalSizing: Boolean read get_AllowVerticalSizing write set_AllowVerticalSizing;

Remarks

If True, then the user is able to resize vertical splits in the grid.

If False, then the user is restricted from resizing vertical splits.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Split.AlternatingRowStyle Property

Split.AlternatingRowStyle Property

Gets or sets a value indicating whether the split uses the OddRowStyle for odd-numbered rows and EvenRowStyle for even-numbered rows.

[Visual Basic]

Public Property AlternatingRowStyle As Boolean

[C#]

public bool AlternatingRowStyle {get;set;}

[Delphi]

public property AlternatingRowStyle: Boolean read get_AlternatingRowStyle write set_AlternatingRowStyle;

Remarks

If True, OddRowStyle and EvenRowStyle properties control the appearance of rows within the specified object.

If False (the default), the Style property controls the display of rows within the specified object.

At design time, you can change the colors and fonts used to render odd (even) rows by modifying the built-in OddRow (EvenRow) style using the Styles property page.

At run time, change the colors and fonts used to render odd (even) rows by modifying the Style object returned by the OddRowStyle (EvenRowStyle) property.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Split.Caption Property

Split.Caption Property

Gets or sets the caption.

[Visual Basic]

Public Property Caption As String

[C#]

public string Caption {get;set;}

[Delphi]

public property Caption: String read get_Caption write set_Caption;

Remarks

For a C1TrueDBGrid control, this property determines the text displayed in the caption bar at the top of the grid.

Setting the Caption property to an empty string for a C1TrueDBGrid control hides its caption bar.

For a C1DataColumn object, this property determines the text displayed in the object's heading area.

Setting the Caption property to an empty string for a C1DataColumn object clears the text in the column's heading area but does not hide the heading. Column captions are only displayed if the grid's ColumnHeaders property is set to True.

Setting the Caption property to an empty string for a Split class object hides the heading area, even if other splits have non-empty captions.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Split.CaptionHeight Property

Split.CaptionHeight Property

Gets or sets the height of the caption.

[Visual Basic]

Public Property CaptionHeight As Integer

[C#]

public int CaptionHeight {get;set;}

[Delphi]

public property CaptionHeight: Int32 read get_CaptionHeight write set_CaptionHeight;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Split.CaptionStyle Property

Split.CaptionStyle Property

Gets or sets the Style object that controls the appearance of the caption area.

[Visual Basic]

Public Property CaptionStyle As Style

[C#]

public Style CaptionStyle {get;set;}

[Delphi]

public property CaptionStyle: Style read get_CaptionStyle write set_CaptionStyle;

Remarks

This property sets or returns the Style object that controls the appearance of a TDBGrid control's caption bar or a Split object's heading area. By default, this is the built-in Caption style.

The value of the Caption property is not affected by changes to the CaptionStyle property.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Split.ColumnCaptionHeight Property

Split.ColumnCaptionHeight Property

Gets or sets the height of the column captions.

[Visual Basic]

Public Property ColumnCaptionHeight As Integer

[C#]

public int ColumnCaptionHeight {get;set;}

[Delphi]

public property ColumnCaptionHeight: Int32 read get_ColumnCaptionHeight write set_ColumnCaptionHeight;

Remarks

Sets the height for the columns captions in pixels. The ColumnFooterHeight property sets the associated property for the footers.

Example

The following code set the ColumnCaptionHeight property to two lines:

· Visual Basic

· C#

· Delphi

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Split.ColumnFooterHeight Property

Split.ColumnFooterHeight Property

Gets or sets the height of column footers.

[Visual Basic]

Public Property ColumnFooterHeight As Integer

[C#]

public int ColumnFooterHeight {get;set;}

[Delphi]

public property ColumnFooterHeight: Int32 read get_ColumnFooterHeight write set_ColumnFooterHeight;

Remarks

Sets the height for the columns footers in pixels. The ColumnCaptionHeight property sets the associated property for the headers.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Split.CurrentCellVisible Property

Split.CurrentCellVisible Property

Gets or sets a value indicating the visibility of the current cell in a split.

[Visual Basic]

Public Property CurrentCellVisible As Boolean

[C#]

public bool CurrentCellVisible {get;set;}

[Delphi]

public property CurrentCellVisible: Boolean read get_CurrentCellVisible write set_CurrentCellVisible;

Remarks

This property returns True if the current cell (indicated by the Bookmark and Col properties) is visible within the displayed area of a grid or split. It returns False if the cell is not visible.

Setting the CurrentCellVisible property to True causes the grid to scroll so that the current cell is brought into view. If a grid contains multiple splits, then the current cell becomes visible in each split.

In all cases, setting this property to False is meaningless and is ignored.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Split.DisplayColumns Property

Split.DisplayColumns Property

Gets a collection of C1DisplayColumn objects.

[Visual Basic]

Public ReadOnly Property DisplayColumns As C1DisplayColumnCollection

[C#]

public C1DisplayColumnCollection DisplayColumns {get;}

[Delphi]

public property DisplayColumns: C1DisplayColumnCollection read get_DisplayColumns;

Remarks

This Split property returns its collection of DisplayColumns. This collection can be also modified in the C1DisplayColumnCollection editor.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Split.EditorStyle Property

Split.EditorStyle Property

Gets or sets the Style object that controls the appearance of the cell editor within a grid.

[Visual Basic]

Public Property EditorStyle As Style

[C#]

public Style EditorStyle {get;set;}

[Delphi]

public property EditorStyle: Style read get_EditorStyle write set_EditorStyle;

Remarks

This property returns the Style object that controls the appearance of the cell editor within a grid.

Note: The EditorStyle property only applies when the floating editor marquee (MarqueeStyle = 6) is not in effect.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Split.EvenRowStyle Property

Split.EvenRowStyle Property

Gets or sets the Style object that controls the appearance of an even-numbered row when using AlternatingRows.

[Visual Basic]

Public Property EvenRowStyle As Style

[C#]

public Style EvenRowStyle {get;set;}

[Delphi]

public property EvenRowStyle: Style read get_EvenRowStyle write set_EvenRowStyle;

Remarks

This property sets or returns the Style object that controls the appearance of an even-numbered row in a grid or split where the AlternatingRowStyle property is set to True. By default, this is the built-in EvenRow style.

To change the appearance of odd-numbered rows, set the OddRowStyle property.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Split.ExtendRightColumn Property

Split.ExtendRightColumn Property

Gets or sets a value that determines how the last column will extend to fill the dead area of the split.

[Visual Basic]

Public Property ExtendRightColumn As Boolean

[C#]

public bool ExtendRightColumn {get;set;}

[Delphi]

public property ExtendRightColumn: Boolean read get_ExtendRightColumn write set_ExtendRightColumn;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Split.FetchRowStyles Property

Split.FetchRowStyles Property

Gets or sets a value indicating whether the FetchRowStyle event will be raised.

[Visual Basic]

Public Property FetchRowStyles As Boolean

[C#]

public bool FetchRowStyles {get;set;}

[Delphi]

public property FetchRowStyles: Boolean read get_FetchRowStyles write set_FetchRowStyles;

Remarks

If True, the FetchRowStyle event will be raised whenever the grid is about to display a row of data.

If False (the default), the FetchRowStyle event is not raised.

Set this value to True when you need to perform complex per-row formatting operations that can only be done using the FetchRowStyle event. For example, to apply fonts and/or colors to all rows that satisfy certain criteria, then set the FetchRowStyles property to True and write code for the FetchRowStyle event.

Note: To display every other row in a different color or font, set the AlternatingRowStyle property to True.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Split.FilterActive Property

Split.FilterActive Property

Gets or sets a value indicating whether the filter bar has focus.

[Visual Basic]

Public Property FilterActive As Boolean

[C#]

public bool FilterActive {get;set;}

[Delphi]

public property FilterActive: Boolean read get_FilterActive write set_FilterActive;

Remarks

This property returns True if the user is currently editing within the filter bar. Use the Col property to identify the filter column being edited.

Setting this property to True initiates editing in the filter bar.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Split.FilterBar Property

Split.FilterBar Property

Gets or sets a value indicating the visibility of the FilterBar.

[Visual Basic]

Overridable Public Property FilterBar As Boolean

[C#]

virtual public bool FilterBar {get;set;}

[Delphi]

public property FilterBar: Boolean read get_FilterBar write set_FilterBar;

Remarks

When set to True, the grid displays a row of data under the column headers in which the user can type. Use the FilterButtonClick and FilterChange events to implement custom operations such as incremental search or recordset filtering.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Split.FilterBarStyle Property

Split.FilterBarStyle Property

Gets or sets the Style object that controls the appearance of the FilterBar.

[Visual Basic]

Public Property FilterBarStyle As Style

[C#]

public Style FilterBarStyle {get;set;}

[Delphi]

public property FilterBarStyle: Style read get_FilterBarStyle write set_FilterBarStyle;

Remarks

This property returns the Style object that controls the appearance of the FilterBar cells within a grid or split.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Split.FilterBorderStyle Property

Split.FilterBorderStyle Property

Controls the appearance of the border between the filterbar and the body of the grid.

[Visual Basic]

Public Property FilterBorderStyle As Border3DStyle

[C#]

public Border3DStyle FilterBorderStyle {get;set;}

[Delphi]

public property FilterBorderStyle: Border3DStyle read get_FilterBorderStyle write set_FilterBorderStyle;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Split.FirstRow Property

Split.FirstRow Property

Gets or sets the row index for the first visible row in a split.

[Visual Basic]

Public Property FirstRow As Integer

[C#]

public int FirstRow {get;set;}

[Delphi]

public property FirstRow: Int32 read get_FirstRow write set_FirstRow;

Remarks

For a C1TrueDBGrid or C1TrueDBDropdown control, setting the FirstRow property causes the grid to scroll so that the specified row becomes the topmost row. If a grid contains multiple splits, then the topmost row or column changes in each split, even if the splits have different HorizontalScrollGroup or VerticalScrollGroup property settings.

For a Split object, setting the FirstRow property causes the specified row to become the topmost row for that split only.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Split.FooterStyle Property

Split.FooterStyle Property

Gets or sets the Style object that controls the appearance of column footers.

[Visual Basic]

Public Property FooterStyle As Style

[C#]

public Style FooterStyle {get;set;}

[Delphi]

public property FooterStyle: Style read get_FooterStyle write set_FooterStyle;

Remarks

This property returns the Style object that controls the appearance of column footings within a grid, column, or split. By default, this is the built-in Footing style.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Split.HeadingStyle Property

Split.HeadingStyle Property

Gets or sets the Style object that controls the appearance of the grids column headers.

[Visual Basic]

Public Property HeadingStyle As Style

[C#]

public Style HeadingStyle {get;set;}

[Delphi]

public property HeadingStyle: Style read get_HeadingStyle write set_HeadingStyle;

Remarks

This property returns the Style object that controls the appearance of column headings within a grid, column, or split. By default, this is the built-in Heading style.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Split.Height Property

Split.Height Property

Gets or sets the height of a split.

[Visual Basic]

Public Property Height As Integer

[C#]

public int Height {get;set;}

[Delphi]

public property Height: Int32 read get_Height write set_Height;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Split.HighLightRowStyle Property

Split.HighLightRowStyle Property

Gets or sets the Style object that controls the current row/cell when the MarqueeStyle is set to Highlight Row/Cell.

[Visual Basic]

Public Property HighLightRowStyle As Style

[C#]

public Style HighLightRowStyle {get;set;}

[Delphi]

public property HighLightRowStyle: Style read get_HighLightRowStyle write set_HighLightRowStyle;

Remarks

This property sets or returns the Style object that controls the appearance of a highlighted row or cell marquee. By default, this is the built-in HighlightRow style.

The HighlightRowStyle value is only used when one of the following MarqueeStyle settings is in effect: Highlight Cell, Highlight Row, or HighlightRow, RaiseCell.

The value of the MarqueeStyle property is not affected by changes to the HighlightRowStyle property.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Split.HorizontalOffset Property

Split.HorizontalOffset Property

Gets or sets the position of the Horizontal scrollbar.

[Visual Basic]

Public Property HorizontalOffset As Integer

[C#]

public int HorizontalOffset {get;set;}

[Delphi]

public property HorizontalOffset: Int32 read get_HorizontalOffset write set_HorizontalOffset;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Split.HorizontalScrollGroup Property

Split.HorizontalScrollGroup Property

Gets or sets the group which synchronizes horizontal scrolling between splits.

[Visual Basic]

Public Property HorizontalScrollGroup As Integer

[C#]

public int HorizontalScrollGroup {get;set;}

[Delphi]

public property HorizontalScrollGroup: Int32 read get_HorizontalScrollGroup write set_HorizontalScrollGroup;

Remarks

This property is used to synchronize horizontal scrolling between splits. All splits with the same ScrollGroup setting will be synchronized when horizontal scrolling occurs within any one of them. Splits belonging to different groups can scroll independently, allowing different splits to display different parts of the database.

Note: Setting the FirstRow property for one split affects all other splits in the same group, keeping the group synchronized.

Newly created splits have a ScrollGroup value of 1.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Split.HScrollBar Property

Split.HScrollBar Property

Gets the HBar object that controls the appearance of the horizontal scrollbar.

[Visual Basic]

Public ReadOnly Property HScrollBar As HBar

[C#]

public HBar HScrollBar {get;}

[Delphi]

public property HScrollBar: HBar read get_HScrollBar;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Split.InactiveStyle Property

Split.InactiveStyle Property

Gets or sets the Style object that controls the grids caption when it doesn't have focus.

[Visual Basic]

Public Property InactiveStyle As Style

[C#]

public Style InactiveStyle {get;set;}

[Delphi]

public property InactiveStyle: Style read get_InactiveStyle write set_InactiveStyle;

Remarks

This property returns the Style object that controls the appearance of column headings within a grid or split when another object has focus.

Note: The inactive style is only used when the grid's FlatStyle property is set to Flat. If the FlatStyle property is set to the default value of Standard, then the headings do not change when a grid or split receives or loses focus.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Split.LeftCol Property

Split.LeftCol Property

Gets or sets the left most visible column for a split.

[Visual Basic]

Public Property LeftCol As Integer

[C#]

public int LeftCol {get;set;}

[Delphi]

public property LeftCol: Int32 read get_LeftCol write set_LeftCol;

Remarks

For a C1TrueDBGrid or C1TrueDBDropdown control, setting the LeftCol property causes the grid to scroll so that the specified column becomes the leftmost column. If a grid contains multiple splits, then the leftmost column changes in each split.

For a Split object, setting the LeftCol property causes the specified column to become the leftmost column for that split only.

Use the LeftCol property in code to scroll a grid or split horizontally. Use the FirstRow property to determine the bookmark of the first visible row in a grid or split.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Split.Locked Property

Split.Locked Property

Gets or sets a value indicating if the cells of a split can be edited.

[Visual Basic]

Public Property Locked As Boolean

[C#]

public bool Locked {get;set;}

[Delphi]

public property Locked: Boolean read get_Locked write set_Locked;

Remarks

If True, the user cannot modify data in the column or split.

If False (the default), the user can modify data in the column or split.

For Style objects, the Locked property controls the editability of the object to which the style is applied. It does not control the editability of the style object itself.

The value of the Locked property is inherited from the parent style (if any) unless explicitly overridden.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Split.MarqueeStyle Property

Split.MarqueeStyle Property

Gets or sets the MarqueeStyle for a Split.

[Visual Basic]

Public Property MarqueeStyle As MarqueeEnum

[C#]

public MarqueeEnum MarqueeStyle {get;set;}

[Delphi]

public property MarqueeStyle: MarqueeEnum read get_MarqueeStyle write set_MarqueeStyle;

Remarks

This property determines how the current row and cell are highlighted within a grid or split.

Note: If a grid contains multiple splits, then setting its MarqueeStyle property has the same effect as setting the MarqueeStyle property of each split individually.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Split.MinHeight Property

Split.MinHeight Property

Gets or sets the minimum height that a split can be interactively resized.

[Visual Basic]

Public Property MinHeight As Integer

[C#]

public int MinHeight {get;set;}

[Delphi]

public property MinHeight: Int32 read get_MinHeight write set_MinHeight;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Split.MinWidth Property

Split.MinWidth Property

Gets or sets the minimum width that a split can be interactively resized.

[Visual Basic]

Public Property MinWidth As Integer

[C#]

public int MinWidth {get;set;}

[Delphi]

public property MinWidth: Int32 read get_MinWidth write set_MinWidth;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Split.Name Property

Split.Name Property

Gets or sets the name of a split.

[Visual Basic]

Public Property Name As String

[C#]

public string Name {get;set;}

[Delphi]

public property Name: String read get_Name write set_Name;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Split.OddRowStyle Property

Split.OddRowStyle Property

Gets or sets the Style object that controls the appearance of an odd-numbered row when using AlternatingRows.

[Visual Basic]

Public Property OddRowStyle As Style

[C#]

public Style OddRowStyle {get;set;}

[Delphi]

public property OddRowStyle: Style read get_OddRowStyle write set_OddRowStyle;

Remarks

This property sets or returns the Style object that controls the appearance of an odd-numbered row in a grid or split where the AlternatingRowStyle property is set to True. By default, this is the built-in OddRow style.

To change the appearance of even-numbered rows, set the EvenRowStyle property.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Split.RecordSelectors Property

Split.RecordSelectors Property

Gets or sets a value indicating the visibility of row headers for Split.

[Visual Basic]

Public Property RecordSelectors As Boolean

[C#]

public bool RecordSelectors {get;set;}

[Delphi]

public property RecordSelectors: Boolean read get_RecordSelectors write set_RecordSelectors;

Remarks

If True (the default), record selectors are displayed at the left edge of the grid or split.

If False, record selectors are not displayed.

If a grid contains multiple splits, then setting its RecordSelectors property has the same effect as setting the RecordSelectors property of each split individually.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Split.RecordSelectorStyle Property

Split.RecordSelectorStyle Property

Gets or sets the Style object that controls the appearance of the RecordSelectors.

[Visual Basic]

Public Property RecordSelectorStyle As Style

[C#]

public Style RecordSelectorStyle {get;set;}

[Delphi]

public property RecordSelectorStyle: Style read get_RecordSelectorStyle write set_RecordSelectorStyle;

Remarks

This property returns the Style object that controls the appearance of RecordSelectors within a grid or split.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Split.RecordSelectorWidth Property

Split.RecordSelectorWidth Property

Gets or sets the width of the row headers.

[Visual Basic]

Public Property RecordSelectorWidth As Integer

[C#]

public int RecordSelectorWidth {get;set;}

[Delphi]

public property RecordSelectorWidth: Int32 read get_RecordSelectorWidth write set_RecordSelectorWidth;

Remarks

The RecordSelectorWidth property returns or sets the width of the RecordSelectors based on the coordinate system of the grid's container.

The RecordSelectorWidth returns to default when set to 0. The default width of the record selector column is equal to the width of the vertical scroll bar.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Split.Rows Property

Split.Rows Property

Gets the collection of Rows displayed in the Split.

[Visual Basic]

Public ReadOnly Property Rows As ViewRowList

[C#]

public ViewRowList Rows {get;}

[Delphi]

public property Rows: ViewRowList read get_Rows;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Split.SelectedStyle Property

Split.SelectedStyle Property

Gets or sets the Style object that controls the appearance of selected rows and columns.

[Visual Basic]

Public Property SelectedStyle As Style

[C#]

public Style SelectedStyle {get;set;}

[Delphi]

public property SelectedStyle: Style read get_SelectedStyle write set_SelectedStyle;

Remarks

This property returns or sets the Style object that controls the appearance of selected rows and columns within a grid or split. By default, this is the built-in Selected style.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Split.SplitSize Property

Split.SplitSize Property

Gets or sets the size of a split.

[Visual Basic]

Public Property SplitSize As Integer

[C#]

public int SplitSize {get;set;}

[Delphi]

public property SplitSize: Int32 read get_SplitSize write set_SplitSize;

Remarks

The meaning of the value returned by this property is determined by the split's SplitSizeMode property setting.

If SplitSizeMode is set to the default value of 0 - Scalable, then the value returned by the SplitSize property is an integer indicating the relative size of the split with respect to other scalable splits.

If SplitSizeMode is set to 1 - Exact, then the value returned by the SplitSize property is a floating point number indicating the exact size of the split in terms of the coordinate system of the grid's container.

If SplitSizeMode is set to 2 - Number of Columns, then the value returned by the SplitSize property is an integer indicating the number of columns displayed in the split.

Note: Note that when there is only one split (the grid's default behavior), the split spans the entire width of the grid, the SplitSizeMode property is always Scalable, and the SplitSize property is always 1. Setting either of these properties has no effect when there is only one split. If there are multiple splits, and all but one is removed, the SplitSizeMode and SplitSize properties of the remaining split automatically revert to 0 and 1, respectively.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Split.SplitSizeMode Property

Split.SplitSizeMode Property

Gets or sets a value indicating how the SplitSize property is used to determine the actual size of a split.

[Visual Basic]

Public Property SplitSizeMode As SizeModeEnum

[C#]

public SizeModeEnum SplitSizeMode {get;set;}

[Delphi]

public property SplitSizeMode: SizeModeEnum read get_SplitSizeMode write set_SplitSizeMode;

Remarks

If set to 0 - Scalable (the default), then the value returned by the SplitSize property is an integer indicating the relative size of the split with respect to other scalable splits. For example, if a grid contains 3 scalable splits with SplitSize properties equal to 1, 2, and 3, then the size of each split would be 1/6, 1/3, and 1/2 of the total grid width, respectively.

If set to 1 - Exact, then the value returned by the SplitSize property is a floating point number indicating the exact size of the split in terms of the coordinate system of the grid's container. This setting allows the size of the split to be adjusted so that it always has the same width, even if new splits are added or existing splits are removed.

If set to 2 - Number of Columns, then the value returned by the SplitSize property is an integer indicating the number of columns displayed in the split, and the split will adjust its width to display the number of full columns specified by the SplitSize property. For example, if SplitSize is set to 2, and the user scrolls the split horizontally, then the width of the split will change so that 2 full columns are displayed, regardless of how wide the columns are.

Note: Consider a grid containing both scalable splits and splits with a fixed number of columns. If a split with a fixed number of columns is scrolled horizontally, the total width remaining for the scalable splits may change because grid columns are generally of different widths. However, the ratios of the sizes of the scalable splits remain the same as specified by their SplitSize properties.

Note that when there is only one split (the grid's default behavior), the split spans the entire width of the grid, the SplitSizeMode property is always 0 - Scalable, and the SplitSize property is always 1. Setting either of these properties has no effect when there is only one split. If there are multiple splits, and all but one is removed, the SplitSizeMode and SplitSize properties of the remaining split automatically revert to 0 and 1, respectively.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Split.SpringMode Property

Split.SpringMode Property

Gets or sets a value that determines how columns will resize when the grid is resized.

[Visual Basic]

Public Property SpringMode As Boolean

[C#]

public bool SpringMode {get;set;}

[Delphi]

public property SpringMode: Boolean read get_SpringMode write set_SpringMode;

Remarks

When this property is set to True and the grid is horizontally resized, the column widths for visible columns will expand and/or shrink proportionally.

When set to False (the default), column widths do not change as the grid is horizontally resized.

Note: Control the minimum width on a per column basis by using the MinWidth property of individual C1DataColumn objects.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Split.Style Property

Split.Style Property

Gets or sets the root Style object for the Split.

[Visual Basic]

Public Property Style As Style

[C#]

public Style Style {get;set;}

[Delphi]

public property Style: Style read get_Style write set_Style;

Remarks

This property returns or sets the Style object that controls the normal appearance of a cell within a grid, column, or split. By default, this is the built-in Normal style.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Split.VerticalOffset Property

Split.VerticalOffset Property

Gets or sets the position of the Vertical scrollbar.

[Visual Basic]

Public Property VerticalOffset As Integer

[C#]

public int VerticalOffset {get;set;}

[Delphi]

public property VerticalOffset: Int32 read get_VerticalOffset write set_VerticalOffset;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Split.VerticalScrollGroup Property

Split.VerticalScrollGroup Property

Gets or sets the group which synchronizes vertical scrolling between splits.

[Visual Basic]

Public Property VerticalScrollGroup As Integer

[C#]

public int VerticalScrollGroup {get;set;}

[Delphi]

public property VerticalScrollGroup: Int32 read get_VerticalScrollGroup write set_VerticalScrollGroup;

Remarks

This property is used to synchronize vertical scrolling between splits. All splits with the same ScrollGroup setting will be synchronized when vertical scrolling occurs within any one of them. Splits belonging to different groups can scroll independently, allowing different splits to display different parts of the database.

Note: Newly created splits have a ScrollGroup value of 1.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Split.VScrollBar Property

Split.VScrollBar Property

Gets the VBar object that controls the appearance of the vertical scrollbar.

[Visual Basic]

Public ReadOnly Property VScrollBar As VBar

[C#]

public VBar VScrollBar {get;}

[Delphi]

public property VScrollBar: VBar read get_VScrollBar;

Remarks

This property returns or sets the VBar object that controls the appearance of the vertical scrollbar.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Split Methods

Split Methods

The methods of the Split class are listed here. For a complete list of Split class members, see the Split Members topic.

Public Methods

AddCellStyle | Controls the Style used to change the appearance for cells meeting the specified condition.
AddRegexCellStyle | Controls the Style used to change the appearance of cells according to their contents.
ClearCellStyle | Removes a cell condition established with a previous call to the AddCellStyle method.
ClearRegexCellStyle | Overloaded. Removes a cell condition established with a previous call to the AddCellStyle method.
Dispose | Overloaded. Overriden. Called when the class is being disposed.
GetCellBounds | Returns the Rectangle for the given Row and Column.
ToString (inherited from View) | Returns the string that represents the current object.

Protected Methods

OnGetCellRange

Returns the upper and lower bounds for a merged column.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Split.AddCellStyle Method

Split.AddCellStyle Method

Controls the Style used to change the appearance for cells meeting the specified condition.

[Visual Basic]

Public Sub AddCellStyle( _

ByVal condition As CellStyleFlag, _

ByVal style As Style _

)

[C#]

public void AddCellStyle(

CellStyleFlag condition,

Style style

);

[Delphi]

public procedure AddCellStyle(

condition: CellStyleFlag;

style: Style

);

Parameters

condition

Combination of one or more CellStyleFlag enumerations.

style

Style object that specifies appearance attributes.

Remarks

This method allows the font and color of cells within a grid, column, or split to be controlled according to the status values (CellStyleFlag enumeration) specified by the condition argument.

Add the first four values together to specify multiple cell conditions. For example, a cell status value of 9 (CellStyleFlag.CurrentCell + CellStyleFlag.SelectedRow) denotes a current cell within a selected row. Also a cell status value of 0 (CellStyleFlag.NormalCell) can be used to refer to only those cells without any of the four basic cell conditions.

The style argument specifies the attributes that will override the default font and color characteristics for cells within an object. For example, the following code causes updated cells to be displayed in red:

· Visual Basic

· C#

· Delphi

Each time the AddCellStyle method is invoked, the specified cell condition is added to the list of existing conditions. Hence, by repeated use of this method it is possible to set up multiple conditions to affect the appearance of a grid, column, or split.

Note: If a cell condition already exists for a particular condition value, the new style setting replaces the existing one.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Split.AddRegexCellStyle Method

Split.AddRegexCellStyle Method

Controls the Style used to change the appearance of cells according to their contents.

[Visual Basic]

Public Sub AddRegexCellStyle( _

ByVal condition As CellStyleFlag, _

ByVal style As Style, _

ByVal regex As String _

)

[C#]

public void AddRegexCellStyle(

CellStyleFlag condition,

Style style,

string regex

);

[Delphi]

public procedure AddRegexCellStyle(

condition: CellStyleFlag;

style: Style;

regex: String

);

Parameters

condition

Combination of one or more CellStyleFlag enumerations.

style

Style object that specifies appearance attributes.

regex

A regular expression string.

Remarks

This method allows you to control the font and color of cells within a grid, column, or split according to their contents. The status values (CellStyleFlag enumeration) specified by the condition argument determine which cells are affected.

Add the first four values together to specify multiple cell conditions. For example, a cell status value of (CellStyleFlag.CurrentCell + CellStyleFlag.SelectedRow) denotes a current cell within a selected row. Use a cell status value of (CellStyleFlag.NormalCell) to refer to only those cells without any of the four basic cell conditions. To designate that a cell condition should apply to all cells regardless of status, use a cell status value of CellStyleFlag.AllCells.

The regex argument is a regular expression string that describes the pattern matching to be performed on cell contents. The regular expressions supported by True DBGrid are a subset of standard Unix regular expression syntax:

p*

Any pattern followed by an asterisk matches zero or more occurrences of that pattern. For example, ab*c matches ac, abc, and abbcy (partial match).

p+

Any pattern followed by a plus sign matches one or more occurrences of that pattern. For example, ab+c matches abc and abbcy, but not ac.

[list]

A list of case-sensitive characters enclosed in brackets matches any one of those characters in the given position in the string. Character ranges can be used, as in [abcd], which is equivalent to [a-d]. Multiple ranges can also be used. For example, [A-Za-z0-9] matches any letter or digit. Bracketed patterns can also be combined with either the * or + operators. The pattern [A-Z]+ matches a sequence of one or more uppercase letters.

[^list]

If a list starts with a caret, it matches any character except those specified in the list.

. (period)

A period represents any single character.

^p

A caret at the beginning of a pattern forces a match to occur at the start of a cell. Otherwise, the pattern can match anywhere within a cell.

p$

A dollar sign at the end of a pattern forces a match to occur at the end of a cell. Otherwise, the pattern can match anywhere within a cell.

\c

Any character preceded by a backslash represents itself, unless enclosed in brackets, in which case the backslash is interpreted literally.

Any other character represents itself and will be compared with respect to case.

The style argument specifies the attributes that will override the default font and color characteristics for cells within an object. For example, the following code causes normal cells containing the letters "SQL" to be displayed in bold:

· Visual Basic

· C#

· Delphi

Each time the AddRegexCellStyle method is invoked, the specified cell condition is added to the list of existing conditions. Hence, by repeated use of this method it is possible to set up multiple conditions to affect the appearance of a grid, column, or split.

Note: If a cell condition already exists for a particular pair of condition and regex values, the new style setting replaces the existing one.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Split.ClearCellStyle Method

Split.ClearCellStyle Method

Removes a cell condition established with a previous call to the AddCellStyle method.

[Visual Basic]

Public Sub ClearCellStyle( _

ByVal condition As CellStyleFlag _

)

[C#]

public void ClearCellStyle(

CellStyleFlag condition

);

[Delphi]

public procedure ClearCellStyle(

condition: CellStyleFlag

);

Parameters

condition

Combination of one or more CellStyleFlag enumerations.

Remarks

The ClearCellStyle method removes a cell condition established with a previous call to the AddCellStyle method for the object in question. If no such cell condition exists, then calling this method has no effect.

If the condition argument is CellStyleFlag.AllCells, then all non-regex cell conditions are removed, regardless of status.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Split.ClearRegexCellStyle Method

Split.ClearRegexCellStyle Method

Overload List

Removes a cell condition established with a previous call to the AddCellStyle method.

[Visual Basic] Overloads Public Sub ClearRegexCellStyle(CellStyleFlag)

[C#] public void ClearRegexCellStyle(CellStyleFlag);

[Delphi] public procedure ClearRegexCellStyle(CellStyleFlag); overload;

Removes a cell condition established with a previous call to the AddRegexCellStyle method.

[Visual Basic] Overloads Public Sub ClearRegexCellStyle(CellStyleFlag, String)

[C#] public void ClearRegexCellStyle(CellStyleFlag, string);

[Delphi] public procedure ClearRegexCellStyle(CellStyleFlag; String); overload;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Split.ClearRegexCellStyle Method (CellStyleFlag)

Split.ClearRegexCellStyle Method (CellStyleFlag)

Previous Next

Removes a cell condition established with a previous call to the AddCellStyle method.

[Visual Basic]

Overloads Public Sub ClearRegexCellStyle( _

ByVal condition As CellStyleFlag _

)

[C#]

public void ClearRegexCellStyle(

CellStyleFlag condition

);

[Delphi]

public procedure ClearRegexCellStyle(

condition: CellStyleFlag

); overload;

Parameters

condition

Combination of one or more CellStyleFlag enumerations.

Remarks

The ClearRegexCellStyle method removes a cell condition established with a previous call to the AddRegexCellStyle method for the object in question. If no such cell condition exists, then calling this method has no effect.

If regex is omitted, then all cell conditions for any regular expression matching the condition argument are removed. If condition is CellStyleFlag.AllCells, then all regex cell conditions are removed, regardless of status or expression.

If regex is supplied, then the single cell condition matching both arguments is removed. However, if condition is CellStyleFlag.AllCells, then all cell conditions for the specified regular expression are removed, regardless of status.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Split.ClearRegexCellStyle Method (CellStyleFlag, String)

Split.ClearRegexCellStyle Method (CellStyleFlag, String)

Previous Next

Removes a cell condition established with a previous call to the AddRegexCellStyle method.

[Visual Basic]

Overloads Public Sub ClearRegexCellStyle( _

ByVal condition As CellStyleFlag, _

ByVal regex As String _

)

[C#]

public void ClearRegexCellStyle(

CellStyleFlag condition,

string regex

);

[Delphi]

public procedure ClearRegexCellStyle(

condition: CellStyleFlag;

regex: String

); overload;

Parameters

condition

Combination of one or more CellStyleFlag enumerations.

regex

A regular expression string.

Remarks

The ClearRegexCellStyle method removes a cell condition established with a previous call to the AddRegexCellStyle method for the object in question. If no such cell condition exists, then calling this method has no effect.

If regex is omitted, then all cell conditions for any regular expression matching the condition argument are removed. If condition is CellStyleFlag.AllCells, then all regex cell conditions are removed, regardless of status or expression.

If regex is supplied, then the single cell condition matching both arguments is removed. However, if condition is CellStyleFlag.AllCells, then all cell conditions for the specified regular expression are removed, regardless of status.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Split.Dispose Method

Split.Dispose Method

Overload List

Called when the class is being disposed.

[Visual Basic] Overloads Overrides Public Sub Dispose(Boolean)

[C#] override public void Dispose(bool);

[Delphi] public procedure Dispose(Boolean); overload; override;

[Visual Basic] Overloads Overridable Public Sub Dispose()

[C#] virtual public void Dispose();

[Delphi] public procedure Dispose(); overload; virtual;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Split.Dispose Method (Boolean)

Split.Dispose Method (Boolean)

Previous Next

Called when the class is being disposed.

[Visual Basic]

Overloads Overrides Public Sub Dispose( _

ByVal disposing As Boolean _

)

[C#]

override public void Dispose(

bool disposing

);

[Delphi]

public procedure Dispose(

disposing: Boolean

); overload; override;

Parameters

disposing

True to cleanup.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Split.GetCellBounds Method

Split.GetCellBounds Method

Returns the Rectangle for the given Row and Column.

[Visual Basic]

Overridable Public Function GetCellBounds( _

ByVal Row As Integer, _

ByVal Col As Integer _

) As Rectangle

[C#]

virtual public Rectangle GetCellBounds(

int Row,

int Col

);

[Delphi]

public function GetCellBounds(

Row: Int32;

Col: Int32

): Rectangle; virtual;

Parameters

Row

Visible row number.

Col

Visible column index.

Return Value

The rectangle for the given row and column.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Split.OnGetCellRange Method

Split.OnGetCellRange Method

Returns the upper and lower bounds for a merged column.

[Visual Basic]

Overridable Protected Function OnGetCellRange( _

ByVal row As Integer, _

ByVal col As Integer _

) As Split.CellRange

[C#]

virtual protected Split.CellRange OnGetCellRange(

int row,

int col

);

[Delphi]

strict protected function OnGetCellRange(

row: Int32;

col: Int32

): CellRange; virtual;

Parameters

row

Starting row.

col

Starting colum.

Return Value

The CellRange object that defines the rows and columns for a merged cell.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


SplitCollection Class

SplitCollection Class

Represents a collection of Split objects.

For a list of all members of this type, see SplitCollection Members.

System.Object

System.Collections.CollectionBase

C1.Win.C1TrueDBGrid.SplitCollection

[Visual Basic]

Public Class SplitCollection

Inherits CollectionBase

[C#]

public class SplitCollection : CollectionBase

[Delphi]

type SplitCollection = class (CollectionBase);

Namespace: C1.Win.C1TrueDBGrid

Assembly: C1.Win.C1TrueDBGrid.2 (in C1.Win.C1TrueDBGrid.2.dll)

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


SplitCollection Members

SplitCollection Members

SplitCollection overview

Public Properties

ColCount | Gets the number of horizontal splits in the collection.
Item | Overloaded. Gets the specified Split object from the collection.
RowCount | Gets the number of vertical splits in the collection.

Public Methods

IndexOf

Gets the index if the specified Split.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


SplitCollection Properties

SplitCollection Properties

The properties of the SplitCollection class are listed here. For a complete list of SplitCollection class members, see the SplitCollection Members topic.

Public Properties

ColCount | Gets the number of horizontal splits in the collection.
Item | Overloaded. Gets the specified Split object from the collection.
RowCount | Gets the number of vertical splits in the collection.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


SplitCollection.ColCount Property

SplitCollection.ColCount Property

Gets the number of horizontal splits in the collection.

[Visual Basic]

Public ReadOnly Property ColCount As Integer

[C#]

public int ColCount {get;}

[Delphi]

public property ColCount: Int32 read get_ColCount;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


SplitCollection.Item Property

SplitCollection.Item Property

Overload List

Gets the specified Split object from the collection.

[Visual Basic] Overloads Public Default Property Item(Integer) As Split

[C#] public Split this[int]{get;set;}

[Delphi] public property Item[index: Int32]: Split read get_Item write set_Item;

[Visual Basic] Overloads Public Default Property Item(Integer, Integer) As Split

[C#] public Split this[int, int]{get;set;}

[Delphi] public property Item[row: Int32]: Split read get_Item write set_Item;

Gets the specified Split object from the collection.

[Visual Basic] Overloads Public Default ReadOnly Property Item(String) As Split

[C#] public Split this[string]{get;}

[Delphi] public property Item[name: String]: Split read get_Item;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


SplitCollection.Item Property (Int32)

SplitCollection.Item Property (Int32)

Previous Next

Gets the specified Split object from the collection.

[Visual Basic]

Public Default Property Item( _

ByVal index As Integer _

) As Split

[C#]

public Split this[

int index

] {get;set;}

[Delphi]

public property Item[

index: Int32

]: Split read get_Item write set_Item;

Remarks

This is the indexer for the collection.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


SplitCollection.Item Property (Int32, Int32)

SplitCollection.Item Property (Int32, Int32)

Previous Next

[Visual Basic]

Public Default Property Item( _

ByVal row As Integer, _

ByVal col As Integer _

) As Split

[C#]

public Split this[

int row,

int col

] {get;set;}

[Delphi]

public property Item[

row: Int32;

col: Int32

]: Split read get_Item write set_Item;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


SplitCollection.Item Property (String)

SplitCollection.Item Property (String)

Previous Next

Gets the specified Split object from the collection.

[Visual Basic]

Public Default ReadOnly Property Item( _

ByVal name As String _

) As Split

[C#]

public Split this[

string name

] {get;}

[Delphi]

public property Item[

name: String

]: Split read get_Item;

Remarks

This is the indexer for the collection.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


SplitCollection.RowCount Property

SplitCollection.RowCount Property

Gets the number of vertical splits in the collection.

[Visual Basic]

Public ReadOnly Property RowCount As Integer

[C#]

public int RowCount {get;}

[Delphi]

public property RowCount: Int32 read get_RowCount;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


SplitCollection Methods

SplitCollection Methods

The methods of the SplitCollection class are listed here. For a complete list of SplitCollection class members, see the SplitCollection Members topic.

Public Methods

IndexOf

Gets the index if the specified Split.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


SplitCollection.IndexOf Method

SplitCollection.IndexOf Method

Gets the index of the specified Split.

[Visual Basic]

Public Function IndexOf( _

ByVal v As View _

) As Integer

[C#]

public int IndexOf(

View v

);

[Delphi]

public function IndexOf(

v: View

): Int32;

Parameters

v

The Split to index.

Return Value

The index of the specified Split.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


SplitEventArgs Class

SplitEventArgs Class

Provides data for the FirstRowChange and LeftColChange events.

For a list of all members of this type, see SplitEventArgs Members.

System.Object

System.EventArgs

C1.Win.C1TrueDBGrid.SplitEventArgs

[Visual Basic]

Public Class SplitEventArgs

Inherits EventArgs

[C#]

public class SplitEventArgs : EventArgs

[Delphi]

type SplitEventArgs = class (EventArgs);

Namespace: C1.Win.C1TrueDBGrid

Assembly: C1.Win.C1TrueDBGrid.2 (in C1.Win.C1TrueDBGrid.2.dll)

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


SplitEventArgs Members

SplitEventArgs Members

SplitEventArgs overview

Public Properties

SplitIndex

Indicates the position of the Split in the Splits collection.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


SplitEventArgs Properties

SplitEventArgs Properties

The properties of the SplitEventArgs class are listed here. For a complete list of SplitEventArgs class members, see the SplitEventArgs Members topic.

Public Properties

SplitIndex

Indicates the position of the Split in the Splits collection.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


SplitEventArgs.SplitIndex Property

SplitEventArgs.SplitIndex Property

Indicates the position of the Split in the Splits collection.

[Visual Basic]

Public ReadOnly Property SplitIndex As Integer

[C#]

public int SplitIndex {get;}

[Delphi]

public property SplitIndex: Int32 read get_SplitIndex;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


SplitEventHandler Delegate

SplitEventHandler Delegate

Raised when Split specific actions are performed.

[Visual Basic]

Public Delegate Sub SplitEventHandler( _

ByVal sender As Object, _

ByVal e As SplitEventArgs _

)

[C#]

public delegate void SplitEventHandler(

object sender,

SplitEventArgs e

);

[Delphi]

type SplitEventHandler = procedure (

sender: Object;

e: SplitEventArgs

) of object;

Namespace: C1.Win.C1TrueDBGrid

Assembly: C1.Win.C1TrueDBGrid.2 (in C1.Win.C1TrueDBGrid.2.dll)

See Also

C1.Win.C1TrueDBGrid Namespace

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1.Win.C1TrueDBGrid.Style Class

C1.Win.C1TrueDBGrid.Style Class

Represents an object used to render grid elements.

For a list of all members of this type, see Style Members.

System.Object

C1.Win.C1TrueDBGrid.Style

[Visual Basic]

Public Class Style

Implements IDisposable

[C#]

public class Style : IDisposable

[Delphi]

type Style = class (TObject, IDisposable);

Namespace: C1.Win.C1TrueDBGrid

Assembly: C1.Win.C1TrueDBGrid.2 (in C1.Win.C1TrueDBGrid.2.dll)

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1.Win.C1TrueDBGrid.Style Members

C1.Win.C1TrueDBGrid.Style Members

Style overview

Public Constructors

C1.Win.C1TrueDBGrid.Style Constructor

Creates a new instance of this object.

Public Properties

Alpha | Controls the opacity of the background brush when rendering.
BackColor | Gets or sets the background color associated with a Style.
BackColor2 | Controls the rendering of the style using a LinearGradient when used with the BackColor and GradientMode properties.
BackgroundImage | Gets or sets the background image associated with a Style.
BackgroundPictureDrawMode | Gets or sets the rendering method for a BackgroundImage.
Borders | Gets the GridBorders associated with this Style.
Font | Gets or sets the Font associated with a Style.
ForeColor | Gets or sets the foreground color associated with a Style.
ForegroundImage | Gets or sets the foreground image associated with a style.
ForeGroundPicturePosition | Gets or sets the position that the ForegroundImage is rendered.
GammaCorrection | Gets or sets a value indicating whether gamma correction is enabled for the style when using LinearGradient rendering.
GradientMode | Controls the rendering of the style using a LinearGradient when used with the BackColor and BackColor2 properties.
HorizontalAlignment | Gets or sets the horizontal text alignment.
Locked | Gets or sets a value indicating whether data entry is permitted for the assocated object.
Name | Gets or sets the name of the Style.
Padding | Gets or sets the spacing between cell content and its edges.
Trimming | Gets or sets the trim characters for a string that does not completely fit into a layout shape.
VerticalAlignment | Gets or sets the vertical text alignment.
WrapText | Gets or sets a value indicating whether text is word-wrapped when it does not fit into a layout shape.

Public Methods

Dispose | Overloaded. Called when the class is being disposed.
Render | Renders the given string using the style properties.
Reset | Resets all specialized attributes.
ResetBackColor | Reset BackColor to its default value.
ResetBackgroundImage | Resets the BackgroundImage to its default value.
ResetBackgroundPictureDrawMode | Resets BackgroundPictureDrawMode to its default value.
ResetFont | Resets Font to its default value.
ResetForeColor | Resets ForeColor to its default value.
ResetForegroundImage | Resets ForegroundImage to its default value.
ResetForeGroundPicturePosition | Resets ForeGroundImagePosition to its default value.
ResetHorizontalAlignment | Resets HorizontalAlignment to its default value.
ResetLocked | Resets Locked to its default value.
ResetTrimming | Resets Trimming to its default value.
ResetVerticalAlignment | Resets VerticalAlignment to its default value.
ResetWrapText | Resets WrapText to its default value.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1.Win.C1TrueDBGrid.Style Constructor

C1.Win.C1TrueDBGrid.Style Constructor

Creates a new instance of this object.

[Visual Basic]

Public Function New()

[C#]

public Style()

[Delphi]

public constructor Create(); overload;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1.Win.C1TrueDBGrid.Style Properties

C1.Win.C1TrueDBGrid.Style Properties

The properties of the Style class are listed here. For a complete list of Style class members, see the C1.Win.C1TrueDBGrid.Style Members topic.

Public Properties

Alpha | Controls the opacity of the background brush when rendering.
BackColor | Gets or sets the background color associated with a Style.
BackColor2 | Controls the rendering of the style using a LinearGradient when used with the BackColor and GradientMode properties.
BackgroundImage | Gets or sets the background image associated with a Style.
BackgroundPictureDrawMode | Gets or sets the rendering method for a BackgroundImage.
Borders | Gets the GridBorders associated with this Style.
Font | Gets or sets the Font associated with a Style.
ForeColor | Gets or sets the foreground color associated with a Style.
ForegroundImage | Gets or sets the foreground image associated with a style.
ForeGroundPicturePosition | Gets or sets the position that the ForegroundImage is rendered.
GammaCorrection | Gets or sets a value indicating whether gamma correction is enabled for the style when using LinearGradient rendering.
GradientMode | Controls the rendering of the style using a LinearGradient when used with the BackColor and BackColor2 properties.
HorizontalAlignment | Gets or sets the horizontal text alignment.
Locked | Gets or sets a value indicating whether data entry is permitted for the assocated object.
Name | Gets or sets the name of the Style.
Padding | Gets or sets the spacing between cell content and its edges.
Trimming | Gets or sets the trim characters for a string that does not completely fit into a layout shape.
VerticalAlignment | Gets or sets the vertical text alignment.
WrapText | Gets or sets a value indicating whether text is word-wrapped when it does not fit into a layout shape.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1.Win.C1TrueDBGrid.Style.Alpha Property

C1.Win.C1TrueDBGrid.Style.Alpha Property

Controls the opacity of the background brush when rendering.

[Visual Basic]

Public Property Alpha As Integer

[C#]

public int Alpha {get;set;}

[Delphi]

public property Alpha: Int32 read get_Alpha write set_Alpha;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1.Win.C1TrueDBGrid.Style.BackColor Property

C1.Win.C1TrueDBGrid.Style.BackColor Property

Gets or sets the background color associated with a Style.

[Visual Basic]

Public Property BackColor As Color

[C#]

public Color BackColor {get;set;}

[Delphi]

public property BackColor: Color read get_BackColor write set_BackColor;

Remarks

This property controls the background color of an object. Colors may be specified as RGB values or system default colors.

The background color of a grid, column, or split is determined by its Style property setting. For these objects, the BackColor property is a shortcut to the BackColor member of the Style property.

For Style objects, the value of the BackColor property is inherited from the parent style (if any) unless explicitly overridden.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1.Win.C1TrueDBGrid.Style.BackColor2 Property

C1.Win.C1TrueDBGrid.Style.BackColor2 Property

Controls the rendering of the style using a LinearGradient when used with the BackColor and GradientMode properties.

[Visual Basic]

Public Property BackColor2 As Color

[C#]

public Color BackColor2 {get;set;}

[Delphi]

public property BackColor2: Color read get_BackColor2 write set_BackColor2;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1.Win.C1TrueDBGrid.Style.BackgroundImage Property

C1.Win.C1TrueDBGrid.Style.BackgroundImage Property

Gets or sets the background image associated with a Style.

[Visual Basic]

Public Property BackgroundImage As Image

[C#]

public Image BackgroundImage {get;set;}

[Delphi]

public property BackgroundImage: Image read get_BackgroundImage write set_BackgroundImage;

Remarks

This property sets or returns the background bitmap of a style object. If a style has no background bitmap, then this property returns a null.

Assign a bitmap to the BackgroundImage property in code at run time:

· Visual Basic

· C#

· Delphi

Note: Use the BackgroundPictureDrawMode property to control how the background bitmap is displayed when the style is applied to an object.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1.Win.C1TrueDBGrid.Style.BackgroundPictureDrawMode Property

C1.Win.C1TrueDBGrid.Style.BackgroundPictureDrawMode Property

Gets or sets the rendering method for a BackgroundImage.

[Visual Basic]

Public Property BackgroundPictureDrawMode As BackgroundPictureDrawModeEnum

[C#]

public BackgroundPictureDrawModeEnum BackgroundPictureDrawMode {get;set;}

[Delphi]

public property BackgroundPictureDrawMode: BackgroundPictureDrawModeEnum read get_BackgroundPictureDrawMode write set_BackgroundPictureDrawMode;

Remarks

This property determines how a style's background bitmap is displayed when the style is applied to a data cell, header, footer, or caption bar.

Note: Use the BackgroundImage property to specify a background bitmap for a style.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1.Win.C1TrueDBGrid.Style.Borders Property

C1.Win.C1TrueDBGrid.Style.Borders Property

Gets the GridBorders associated with this Style.

[Visual Basic]

Public ReadOnly Property Borders As GridBorders

[C#]

public GridBorders Borders {get;}

[Delphi]

public property Borders: GridBorders read get_Borders;

Remarks

Every Style has a Borders property that allows the cell borders for the cells with that applied style to be altered. The five properties that make up the GridBorders object set the line width for each side of the cell and set its line style. In addition, it also lets the setting of the color of the cell border to any color within .NET.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1.Win.C1TrueDBGrid.Style.Font Property

C1.Win.C1TrueDBGrid.Style.Font Property

Gets or sets the Font associated with a Style.

[Visual Basic]

Public Property Font As Font

[C#]

public Font Font {get;set;}

[Delphi]

public property Font: Font read get_Font write set_Font;

Remarks

This property returns or sets the font object associated with a style.

For Style objects, the value of the Font property is inherited from the parent style (if any) unless explicitly overridden.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1.Win.C1TrueDBGrid.Style.ForeColor Property

C1.Win.C1TrueDBGrid.Style.ForeColor Property

Gets or sets the foreground color associated with a Style.

[Visual Basic]

Public Property ForeColor As Color

[C#]

public Color ForeColor {get;set;}

[Delphi]

public property ForeColor: Color read get_ForeColor write set_ForeColor;

Remarks

This property controls the foreground color of an object. Colors may be specified as RGB values or system default colors.

For Style objects, the value of the ForeColor property is inherited from the parent style (if any) unless explicitly overridden.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1.Win.C1TrueDBGrid.Style.ForegroundImage Property

C1.Win.C1TrueDBGrid.Style.ForegroundImage Property

Gets or sets the foreground image associated with a style.

[Visual Basic]

Public Property ForegroundImage As Image

[C#]

public Image ForegroundImage {get;set;}

[Delphi]

public property ForegroundImage: Image read get_ForegroundImage write set_ForegroundImage;

Remarks

This property sets or returns the foreground bitmap of a style object. If a style has no foreground bitmap, then this property returns null.

Change a style's foreground bitmap at design time using the Style Factory property page. Or, assign a bitmap to the ForeGroundImage property in code at run time:

· Visual Basic

· C#

· Delphi

Note: Use the ForeGroundPicturePosition property to control the placement of the bitmap relative to the cell or heading text when the style is applied to an object.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1.Win.C1TrueDBGrid.Style.ForeGroundPicturePosition Property

C1.Win.C1TrueDBGrid.Style.ForeGroundPicturePosition Property

Gets or sets the position that the ForegroundImage is rendered.

[Visual Basic]

Public Property ForeGroundPicturePosition As ForeGroundPicturePositionEnum

[C#]

public ForeGroundPicturePositionEnum ForeGroundPicturePosition {get;set;}

[Delphi]

public property ForeGroundPicturePosition: ForeGroundPicturePositionEnum read get_ForeGroundPicturePosition write set_ForeGroundPicturePosition;

Remarks

This property determines where a style's foreground bitmap is displayed when the style is applied to a data cell, header, footer, or caption bar.

Note: Use the ForegroundImage property to specify a foreground bitmap for a style.

Example

The following code sets the ForeGroundPicturePosition property to LeftOfText:

· Visual Basic

· C#

· Delphi

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1.Win.C1TrueDBGrid.Style.GammaCorrection Property

C1.Win.C1TrueDBGrid.Style.GammaCorrection Property

Gets or sets a value indicating whether gamma correction is enabled for the style when using LinearGradient rendering.

[Visual Basic]

Public Property GammaCorrection As Boolean

[C#]

public bool GammaCorrection {get;set;}

[Delphi]

public property GammaCorrection: Boolean read get_GammaCorrection write set_GammaCorrection;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1.Win.C1TrueDBGrid.Style.GradientMode Property

C1.Win.C1TrueDBGrid.Style.GradientMode Property

Controls the rendering of the style using a LinearGradient when used with the BackColor and BackColor2 properties.

[Visual Basic]

Public Property GradientMode As GradientModeEnum

[C#]

public GradientModeEnum GradientMode {get;set;}

[Delphi]

public property GradientMode: GradientModeEnum read get_GradientMode write set_GradientMode;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1.Win.C1TrueDBGrid.Style.HorizontalAlignment Property

C1.Win.C1TrueDBGrid.Style.HorizontalAlignment Property

Gets or sets the horizontal text alignment.

[Visual Basic]

Public Property HorizontalAlignment As AlignHorzEnum

[C#]

public AlignHorzEnum HorizontalAlignment {get;set;}

[Delphi]

public property HorizontalAlignment: AlignHorzEnum read get_HorizontalAlignment write set_HorizontalAlignment;

Remarks

The HorizontalAlignment property returns or sets a value that determines the horizontal alignment of the values in a grid column or style object.

For data cells, the setting General means that text will be left-aligned and numbers will be right-aligned. This setting is only useful in bound mode, where the grid can query the data source to determine the data types of individual columns.

For column headers and footers, the setting General means that the alignment of the column's data cells should be used. Thus, if a column's data cells, headers, and footers all use general alignment, then the underlying data type determines the alignment for all aspects of the column's display.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1.Win.C1TrueDBGrid.Style.Locked Property

C1.Win.C1TrueDBGrid.Style.Locked Property

Gets or sets a value indicating whether data entry is permitted for the assocated object.

[Visual Basic]

Public Property Locked As Boolean

[C#]

public bool Locked {get;set;}

[Delphi]

public property Locked: Boolean read get_Locked write set_Locked;

Remarks

If True, the user cannot modify data in the column or split.

If False (the default), the user can modify data in the column or split.

For Style objects, the Locked property controls the editability of the object to which the style is applied. It does not control the editability of the style object itself.

The value of the Locked property is inherited from the parent style (if any) unless explicitly overridden.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1.Win.C1TrueDBGrid.Style.Name Property

C1.Win.C1TrueDBGrid.Style.Name Property

Gets or sets the name of the Style.

[Visual Basic]

Public Property Name As String

[C#]

public string Name {get;set;}

[Delphi]

public property Name: String read get_Name write set_Name;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1.Win.C1TrueDBGrid.Style.Padding Property

C1.Win.C1TrueDBGrid.Style.Padding Property

Gets or sets the spacing between cell content and its edges.

[Visual Basic]

Public Property Padding As Margins

[C#]

public Margins Padding {get;set;}

[Delphi]

public property Padding: Margins read get_Padding write set_Padding;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1.Win.C1TrueDBGrid.Style.Trimming Property

C1.Win.C1TrueDBGrid.Style.Trimming Property

Gets or sets the trim characters for a string that does not completely fit into a layout shape.

[Visual Basic]

Public Property Trimming As StringTrimming

[C#]

public StringTrimming Trimming {get;set;}

[Delphi]

public property Trimming: StringTrimming read get_Trimming write set_Trimming;

Remarks

Determines how a word gets trimmed if it exceeds the rectangle layout area. The StringTrimming enumeration object is located within .NET’s System.Drawing namespace.

Note: See Microsoft’s .NET documentation for more information.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1.Win.C1TrueDBGrid.Style.VerticalAlignment Property

C1.Win.C1TrueDBGrid.Style.VerticalAlignment Property

Gets or sets the vertical text alignment.

[Visual Basic]

Public Property VerticalAlignment As AlignVertEnum

[C#]

public AlignVertEnum VerticalAlignment {get;set;}

[Delphi]

public property VerticalAlignment: AlignVertEnum read get_VerticalAlignment write set_VerticalAlignment;

Remarks

This property returns or sets a value that determines the vertical alignment of data when the style is applied to a data cell, header, footer, or caption bar.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1.Win.C1TrueDBGrid.Style.WrapText Property

C1.Win.C1TrueDBGrid.Style.WrapText Property

Gets or sets a value indicating whether text is word-wrapped when it does not fit into a layout shape.

[Visual Basic]

Public Property WrapText As Boolean

[C#]

public bool WrapText {get;set;}

[Delphi]

public property WrapText: Boolean read get_WrapText write set_WrapText;

Remarks

If True, a line break occurs before words that would otherwise be partially displayed.

If False (the default), no line break occurs and text is clipped at the cell's right edge.

For Style objects, the value of the WrapText property is inherited from the parent style (if any) unless explicitly overridden.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1.Win.C1TrueDBGrid.Style Methods

C1.Win.C1TrueDBGrid.Style Methods

The methods of the Style class are listed here. For a complete list of Style class members, see the C1.Win.C1TrueDBGrid.Style Members topic.

Public Methods

Dispose | Overloaded. Called when the class is being disposed.
Render | Renders the given string using the style properties.
Reset | Resets all specialized attributes.
ResetBackColor | Reset BackColor to its default value.
ResetBackgroundImage | Resets the BackgroundImage to its default value.
ResetBackgroundPictureDrawMode | Resets BackgroundPictureDrawMode to its default value.
ResetFont | Resets Font to its default value.
ResetForeColor | Resets ForeColor to its default value.
ResetForegroundImage | Resets ForegroundImage to its default value.
ResetForeGroundPicturePosition | Resets ForeGroundImagePosition to its default value.
ResetHorizontalAlignment | Resets HorizontalAlignment to its default value.
ResetLocked | Resets Locked to its default value.
ResetTrimming | Resets Trimming to its default value.
ResetVerticalAlignment | Resets VerticalAlignment to its default value.
ResetWrapText | Resets WrapText to its default value.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1.Win.C1TrueDBGrid.Style.Dispose Method

C1.Win.C1TrueDBGrid.Style.Dispose Method

Overload List

Called when the class is being disposed.

[Visual Basic] Overloads Overridable Public Sub Dispose() Implements IDisposable.Dispose

[C#] virtual public void Dispose();

[Delphi] public procedure Dispose(); overload; virtual;

Called when the class is being disposed.

[Visual Basic] Overloads Overridable Public Sub Dispose(Boolean)

[C#] virtual public void Dispose(bool);

[Delphi] public procedure Dispose(Boolean); overload; virtual;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1.Win.C1TrueDBGrid.Style.Dispose Method ()

C1.Win.C1TrueDBGrid.Style.Dispose Method ()

Previous Next

Called when the class is being disposed.

[Visual Basic]

Overloads Overridable Public Sub Dispose() Implements IDisposable.Dispose

[C#]

virtual public void Dispose()

[Delphi]

public procedure Dispose(); overload; virtual;

Implements

IDisposable.Dispose

See Also

C1.Win.C1TrueDBGrid.Style Class | C1.Win.C1TrueDBGrid.Style Members | C1.Win.C1TrueDBGrid Namespace | C1.Win.C1TrueDBGrid.Style.Dispose Overload List


C1.Win.C1TrueDBGrid.Style.Dispose Method (Boolean)

C1.Win.C1TrueDBGrid.Style.Dispose Method (Boolean)

Previous Next

Called when the class is being disposed.

[Visual Basic]

Overloads Overridable Public Sub Dispose( _

ByVal disposing As Boolean _

)

[C#]

virtual public void Dispose(

bool disposing

);

[Delphi]

public procedure Dispose(

disposing: Boolean

); overload; virtual;

Parameters

disposing

True to cleanup.

See Also

C1.Win.C1TrueDBGrid.Style Class | C1.Win.C1TrueDBGrid.Style Members | C1.Win.C1TrueDBGrid Namespace | C1.Win.C1TrueDBGrid.Style.Dispose Overload List


C1.Win.C1TrueDBGrid.Style.Render Method

C1.Win.C1TrueDBGrid.Style.Render Method

Renders the given string using the style properties.

[Visual Basic]

Public Sub Render( _

ByVal g As Graphics, _

ByVal r As Rectangle, _

ByVal s As String _

)

[C#]

public void Render(

Graphics g,

Rectangle r,

string s

);

[Delphi]

public procedure Render(

g: Graphics;

r: Rectangle;

s: String

);

Parameters

g

Graphics object to render to.

r

Rectangle to render in.

s

String to render.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1.Win.C1TrueDBGrid.Style.Reset Method

C1.Win.C1TrueDBGrid.Style.Reset Method

Resets all specialized attributes.

[Visual Basic]

Public Sub Reset()

[C#]

public void Reset()

[Delphi]

public procedure Reset();

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1.Win.C1TrueDBGrid.Style.ResetBackColor Method

C1.Win.C1TrueDBGrid.Style.ResetBackColor Method

Reset BackColor to its default value.

[Visual Basic]

Public Sub ResetBackColor()

[C#]

public void ResetBackColor()

[Delphi]

public procedure ResetBackColor();

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1.Win.C1TrueDBGrid.Style.ResetBackgroundImage Method

C1.Win.C1TrueDBGrid.Style.ResetBackgroundImage Method

Resets the BackgroundImage to its default value.

[Visual Basic]

Public Sub ResetBackgroundImage()

[C#]

public void ResetBackgroundImage()

[Delphi]

public procedure ResetBackgroundImage();

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1.Win.C1TrueDBGrid.Style.ResetBackgroundPictureDrawMode Method

C1.Win.C1TrueDBGrid.Style.ResetBackgroundPictureDrawMode Method

Previous Next

Resets BackgroundPictureDrawMode to its default value.

[Visual Basic]

Public Sub ResetBackgroundPictureDrawMode()

[C#]

public void ResetBackgroundPictureDrawMode()

[Delphi]

public procedure ResetBackgroundPictureDrawMode();

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1.Win.C1TrueDBGrid.Style.ResetFont Method

C1.Win.C1TrueDBGrid.Style.ResetFont Method

Resets Font to its default value.

[Visual Basic]

Public Sub ResetFont()

[C#]

public void ResetFont()

[Delphi]

public procedure ResetFont();

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1.Win.C1TrueDBGrid.Style.ResetForeColor Method

C1.Win.C1TrueDBGrid.Style.ResetForeColor Method

Resets ForeColor to its default value.

[Visual Basic]

Public Sub ResetForeColor()

[C#]

public void ResetForeColor()

[Delphi]

public procedure ResetForeColor();

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1.Win.C1TrueDBGrid.Style.ResetForegroundImage Method

C1.Win.C1TrueDBGrid.Style.ResetForegroundImage Method

Resets ForegroundImage to its default value.

[Visual Basic]

Public Sub ResetForegroundImage()

[C#]

public void ResetForegroundImage()

[Delphi]

public procedure ResetForegroundImage();

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1.Win.C1TrueDBGrid.Style.ResetForeGroundPicturePosition Method

C1.Win.C1TrueDBGrid.Style.ResetForeGroundPicturePosition Method

Previous Next

Resets ForeGroundImagePosition to its default value.

[Visual Basic]

Public Sub ResetForeGroundPicturePosition()

[C#]

public void ResetForeGroundPicturePosition()

[Delphi]

public procedure ResetForeGroundPicturePosition();

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1.Win.C1TrueDBGrid.Style.ResetHorizontalAlignment Method

C1.Win.C1TrueDBGrid.Style.ResetHorizontalAlignment Method

Resets HorizontalAlignment to its default value.

[Visual Basic]

Public Sub ResetHorizontalAlignment()

[C#]

public void ResetHorizontalAlignment()

[Delphi]

public procedure ResetHorizontalAlignment();

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1.Win.C1TrueDBGrid.Style.ResetLocked Method

C1.Win.C1TrueDBGrid.Style.ResetLocked Method

Resets Locked to its default value.

[Visual Basic]

Public Sub ResetLocked()

[C#]

public void ResetLocked()

[Delphi]

public procedure ResetLocked();

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1.Win.C1TrueDBGrid.Style.ResetTrimming Method

C1.Win.C1TrueDBGrid.Style.ResetTrimming Method

Resets Trimming to its default value.

[Visual Basic]

Public Sub ResetTrimming()

[C#]

public void ResetTrimming()

[Delphi]

public procedure ResetTrimming();

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1.Win.C1TrueDBGrid.Style.ResetVerticalAlignment Method

C1.Win.C1TrueDBGrid.Style.ResetVerticalAlignment Method

Resets VerticalAlignment to its default value.

[Visual Basic]

Public Sub ResetVerticalAlignment()

[C#]

public void ResetVerticalAlignment()

[Delphi]

public procedure ResetVerticalAlignment();

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1.Win.C1TrueDBGrid.Style.ResetWrapText Method

C1.Win.C1TrueDBGrid.Style.ResetWrapText Method

Resets WrapText to its default value.

[Visual Basic]

Public Sub ResetWrapText()

[C#]

public void ResetWrapText()

[Delphi]

public procedure ResetWrapText();

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


TabActionEnum Enumeration

TabActionEnum Enumeration

Specifies how focus is handled when the Tab key is entered.

[Visual Basic]

Public Enum TabActionEnum

[C#]

public enum TabActionEnum

[Delphi]

type TabActionEnum = (ColumnNavigation, ControlNavigation, GridNavigation);

Namespace: C1.Win.C1TrueDBGrid

Assembly: C1.Win.C1TrueDBGrid.2 (in C1.Win.C1TrueDBGrid.2.dll)

Remarks

Use the members of this enumeration to set the value of the TabAction property in the C1TrueDBGrid class.

Members

Member name | Description
ColumnNavigation | The tab key moves the current cell to the next or previous column. However, if this action would cause the current row to change, then the next or previous control on the form receives focus.
ControlNavigation | The tab key moves to the next or previous control on the form.
GridNavigation | The tab key moves the current cell to the next or previous column. The behavior of the tab key at row boundaries is determined by the WrapCellPointer property. When this setting is used, the tab key never results in movement to another control.

See Also

C1.Win.C1TrueDBGrid Namespace

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


UIStrings Class

UIStrings Class

For a list of all members of this type, see UIStrings Members.

System.Object

C1.Win.C1TrueDBGrid.UIStrings

[Visual Basic]

Public Class UIStrings

[C#]

public class UIStrings

[Delphi]

type UIStrings = class;

Namespace: C1.Win.C1TrueDBGrid

Assembly: C1.Win.C1TrueDBGrid.2 (in C1.Win.C1TrueDBGrid.2.dll)

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


UIStrings Members

UIStrings Members

UIStrings overview

Public Properties

Count | Returns the number of elements contained in the collection.
Item | Gets or sets the string value for the specified key.

Public Methods

Add | Overloaded. Adds a string to the collection, specifying the ordinal.
AddInOrder | Adds a string to the collection, preserving the order.
GetDescription | Returns the item description.
GetKeyAt | Returns the key of an item with the specified index.
GetValueAt | Gets the string by its index.
IsDefault | Returns True if the string is equal to its default value.
Reset | Overloaded. Sets all strings in collection to their default values.
SetValueAt | Sets the string by its index.
ShouldSerialize | Returns True if there is any non-default string in the collection.

Public Events

CollectionChanged | Occurs when the collection has been changed.
ItemAdded | Occurs when a new item added to the collection.
ItemChanged | Occurs when an item changed in the collection.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


UIStrings Properties

UIStrings Properties

The properties of the UIStrings class are listed here. For a complete list of UIStrings class members, see the UIStrings Members topic.

Public Properties

Count | Returns the number of elements contained in the collection.
Item | Gets or sets the string value for the specified key.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


UIStrings.Count Property

UIStrings.Count Property

Returns the number of elements contained in the collection.

[Visual Basic]

Public ReadOnly Property Count As Integer

[C#]

public int Count {get;}

[Delphi]

public property Count: Int32 read get_Count;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


UIStrings.Item Property

UIStrings.Item Property

Gets or sets the string value for the specified key.

[Visual Basic]

Public Default Property Item( _

ByVal key As Object _

) As String

[C#]

public string this[

object key

] {get;set;}

[Delphi]

public property Item[

key: Object

]: String read get_Item write set_Item;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


UIStrings Methods

UIStrings Methods

The methods of the UIStrings class are listed here. For a complete list of UIStrings class members, see the UIStrings Members topic.

Public Methods

Add | Overloaded. Adds a string to the collection, specifying the ordinal.
AddInOrder | Adds a string to the collection, preserving the order.
GetDescription | Returns the item description.
GetKeyAt | Returns the key of an item with the specified index.
GetValueAt | Gets the string by its index.
IsDefault | Returns True if the string is equal to its default value.
Reset | Overloaded. Sets all strings in collection to their default values.
SetValueAt | Sets the string by its index.
ShouldSerialize | Returns True if there is any non-default string in the collection.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


UIStrings.Add Method

UIStrings.Add Method

Overload List

Adds a string to the collection, specifying the ordinal.

[Visual Basic] Overloads Public Sub Add(Object, Integer, String, String)

[C#] public void Add(object, int, string, string);

[Delphi] public procedure Add(Object; Int32; String; String); overload;

Adds a string to the collection in alphabetical order.

[Visual Basic] Overloads Public Sub Add(Object, String, String)

[C#] public void Add(object, string, string);

[Delphi] public procedure Add(Object; String; String); overload;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


UIStrings.Add Method (Object, Int32, String, String)

UIStrings.Add Method (Object, Int32, String, String)

Previous Next

Adds a string to the collection, specifying the ordinal.

[Visual Basic]

Overloads Public Sub Add( _

ByVal key As Object, _

ByVal ordinal As Integer, _

ByVal value As String, _

ByVal description As String _

)

[C#]

public void Add(

object key,

int ordinal,

string value,

string description

);

[Delphi]

public procedure Add(

key: Object;

ordinal: Int32;

value: String;

description: String

); overload;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


UIStrings.Add Method (Object, String, String)

UIStrings.Add Method (Object, String, String)

Previous Next

Adds a string to the collection in alphabetical order.

[Visual Basic]

Overloads Public Sub Add( _

ByVal key As Object, _

ByVal value As String, _

ByVal description As String _

)

[C#]

public void Add(

object key,

string value,

string description

);

[Delphi]

public procedure Add(

key: Object;

value: String;

description: String

); overload;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


UIStrings.AddInOrder Method

UIStrings.AddInOrder Method

Adds a string to the collection, preserving the order.

[Visual Basic]

Public Sub AddInOrder( _

ByVal key As Object, _

ByVal value As String, _

ByVal description As String _

)

[C#]

public void AddInOrder(

object key,

string value,

string description

);

[Delphi]

public procedure AddInOrder(

key: Object;

value: String;

description: String

);

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


UIStrings.GetDescription Method

UIStrings.GetDescription Method

Returns the item description.

[Visual Basic]

Public Function GetDescription( _

ByVal key As Object _

) As String

[C#]

public string GetDescription(

object key

);

[Delphi]

public function GetDescription(

key: Object

): String;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


UIStrings.GetKeyAt Method

UIStrings.GetKeyAt Method

Returns the key of an item with the specified index.

[Visual Basic]

Public Function GetKeyAt( _

ByVal index As Integer _

) As Object

[C#]

public object GetKeyAt(

int index

);

[Delphi]

public function GetKeyAt(

index: Int32

): Object;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


UIStrings.GetValueAt Method

UIStrings.GetValueAt Method

Gets the string by its index.

[Visual Basic]

Public Function GetValueAt( _

ByVal index As Integer _

) As String

[C#]

public string GetValueAt(

int index

);

[Delphi]

public function GetValueAt(

index: Int32

): String;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


UIStrings.IsDefault Method

UIStrings.IsDefault Method

Returns True if the string is equal to its default value.

[Visual Basic]

Public Function IsDefault( _

ByVal key As Object _

) As Boolean

[C#]

public bool IsDefault(

object key

);

[Delphi]

public function IsDefault(

key: Object

): Boolean;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


UIStrings.Reset Method

UIStrings.Reset Method

Overload List

Sets all strings in collection to their default values.

[Visual Basic] Overloads Public Sub Reset()

[C#] public void Reset();

[Delphi] public procedure Reset(); overload;

Sets the string to its default value.

[Visual Basic] Overloads Public Sub Reset(Object)

[C#] public void Reset(object);

[Delphi] public procedure Reset(Object); overload;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


UIStrings.Reset Method ()

UIStrings.Reset Method ()

Previous Next

Sets all strings in collection to their default values.

[Visual Basic]

Overloads Public Sub Reset()

[C#]

public void Reset()

[Delphi]

public procedure Reset(); overload;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


UIStrings.Reset Method (Object)

UIStrings.Reset Method (Object)

Previous Next

Sets the string to its default value.

[Visual Basic]

Overloads Public Sub Reset( _

ByVal key As Object _

)

[C#]

public void Reset(

object key

);

[Delphi]

public procedure Reset(

key: Object

); overload;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


UIStrings.SetValueAt Method

UIStrings.SetValueAt Method

Sets the string by its index.

[Visual Basic]

Public Sub SetValueAt( _

ByVal index As Integer, _

ByVal value As String _

)

[C#]

public void SetValueAt(

int index,

string value

);

[Delphi]

public procedure SetValueAt(

index: Int32;

value: String

);

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


UIStrings.ShouldSerialize Method

UIStrings.ShouldSerialize Method

Returns True if there is any non-default string in the collection.

[Visual Basic]

Public Function ShouldSerialize() As Boolean

[C#]

public bool ShouldSerialize()

[Delphi]

public function ShouldSerialize(): Boolean;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


UIStrings Events

UIStrings Events

The events of the UIStrings class are listed here. For a complete list of UIStrings class members, see the UIStrings Members topic.

Public Events

CollectionChanged | Occurs when the collection has been changed.
ItemAdded | Occurs when a new item added to the collection.
ItemChanged | Occurs when an item changed in the collection.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


UIStrings.CollectionChanged Event

UIStrings.CollectionChanged Event

Occurs when the collection has been changed.

[Visual Basic]

Public Event CollectionChanged As EventHandler

[C#]

public event EventHandler CollectionChanged

[Delphi]

public property CollectionChanged: EventHandler read remove_CollectionChanged write add_CollectionChanged;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


UIStrings.ItemAdded Event

UIStrings.ItemAdded Event

Occurs when a new item added to the collection.

[Visual Basic]

Public Event ItemAdded As UIStringsItemEventHandler

[C#]

public event UIStringsItemEventHandler ItemAdded

[Delphi]

public property ItemAdded: UIStringsItemEventHandler read remove_ItemAdded write add_ItemAdded;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


UIStrings.ItemChanged Event

UIStrings.ItemChanged Event

Occurs when an item changed in the collection.

[Visual Basic]

Public Event ItemChanged As UIStringsItemEventHandler

[C#]

public event UIStringsItemEventHandler ItemChanged

[Delphi]

public property ItemChanged: UIStringsItemEventHandler read remove_ItemChanged write add_ItemChanged;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


UIStringsItemEventArgs Class

UIStringsItemEventArgs Class

For a list of all members of this type, see UIStringsItemEventArgs Members.

System.Object

System.EventArgs

C1.Win.C1TrueDBGrid.UIStringsItemEventArgs

[Visual Basic]

Public Class UIStringsItemEventArgs

Inherits EventArgs

[C#]

public class UIStringsItemEventArgs : EventArgs

[Delphi]

type UIStringsItemEventArgs = class (EventArgs);

Namespace: C1.Win.C1TrueDBGrid

Assembly: C1.Win.C1TrueDBGrid.2 (in C1.Win.C1TrueDBGrid.2.dll)

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


UIStringsItemEventArgs Members

UIStringsItemEventArgs Members

UIStringsItemEventArgs overview

Public Properties

Description | The description provided for the item.
IsDefault | True if the value is equal to the default string.
Key | The key of the item being added or changed.
Value | The new string value.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


UIStringsItemEventArgs Properties

UIStringsItemEventArgs Properties

The properties of the UIStringsItemEventArgs class are listed here. For a complete list of UIStringsItemEventArgs class members, see the UIStringsItemEventArgs Members topic.

Public Properties

Description | The description provided for the item.
IsDefault | True if the value is equal to the default string.
Key | The key of the item being added or changed.
Value | The new string value.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


UIStringsItemEventArgs.Description Property

UIStringsItemEventArgs.Description Property

The description provided for the item.

[Visual Basic]

Public ReadOnly Property Description As String

[C#]

public string Description {get;}

[Delphi]

public property Description: String read get_Description;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


UIStringsItemEventArgs.IsDefault Property

UIStringsItemEventArgs.IsDefault Property

True if the value is equal to the default string.

[Visual Basic]

Public ReadOnly Property IsDefault As Boolean

[C#]

public bool IsDefault {get;}

[Delphi]

public property IsDefault: Boolean read get_IsDefault;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


UIStringsItemEventArgs.Key Property

UIStringsItemEventArgs.Key Property

The key of the item being added or changed.

[Visual Basic]

Public ReadOnly Property Key As Object

[C#]

public object Key {get;}

[Delphi]

public property Key: Object read get_Key;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


UIStringsItemEventArgs.Value Property

UIStringsItemEventArgs.Value Property

The new string value.

[Visual Basic]

Public ReadOnly Property Value As String

[C#]

public string Value {get;}

[Delphi]

public property Value: String read get_Value;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


UnboundColumnFetchEventArgs Class

UnboundColumnFetchEventArgs Class

Provides data for the UnboundColumnFetch event.

For a list of all members of this type, see UnboundColumnFetchEventArgs Members.

System.Object

System.EventArgs

C1.Win.C1TrueDBGrid.UnboundColumnFetchEventArgs

[Visual Basic]

Public Class UnboundColumnFetchEventArgs

Inherits EventArgs

[C#]

public class UnboundColumnFetchEventArgs : EventArgs

[Delphi]

type UnboundColumnFetchEventArgs = class (EventArgs);

Namespace: C1.Win.C1TrueDBGrid

Assembly: C1.Win.C1TrueDBGrid.2 (in C1.Win.C1TrueDBGrid.2.dll)

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


UnboundColumnFetchEventArgs Members

UnboundColumnFetchEventArgs Members

UnboundColumnFetchEventArgs overview

Public Properties

Col | Indicates the position in the Columns collection.
Column | The C1DataColumn object.
Row | The index of the row.
Value | Gets or sets the value of the Column.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


UnboundColumnFetchEventArgs Properties

UnboundColumnFetchEventArgs Properties

The properties of the UnboundColumnFetchEventArgs class are listed here. For a complete list of UnboundColumnFetchEventArgs class members, see the UnboundColumnFetchEventArgs Members topic.

Public Properties

Col | Indicates the position in the Columns collection.
Column | The C1DataColumn object.
Row | The index of the row.
Value | Gets or sets the value of the Column.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


UnboundColumnFetchEventArgs.Col Property

UnboundColumnFetchEventArgs.Col Property

Indicates the position in the Columns collection.

[Visual Basic]

Public ReadOnly Property Col As Integer

[C#]

public int Col {get;}

[Delphi]

public property Col: Int32 read get_Col;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


UnboundColumnFetchEventArgs.Column Property

UnboundColumnFetchEventArgs.Column Property

The C1DataColumn object.

[Visual Basic]

Public ReadOnly Property Column As C1DataColumn

[C#]

public C1DataColumn Column {get;}

[Delphi]

public property Column: C1DataColumn read get_Column;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


UnboundColumnFetchEventArgs.Row Property

UnboundColumnFetchEventArgs.Row Property

The index of the row.

[Visual Basic]

Public ReadOnly Property Row As Integer

[C#]

public int Row {get;}

[Delphi]

public property Row: Int32 read get_Row;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


UnboundColumnFetchEventArgs.Value Property

UnboundColumnFetchEventArgs.Value Property

Gets or sets the value of the Column.

[Visual Basic]

Public Property Value As String

[C#]

public string Value {get;set;}

[Delphi]

public property Value: String read get_Value write set_Value;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


UnboundColumnFetchEventHandler Delegate

UnboundColumnFetchEventHandler Delegate

Raised when an unbound column needs to be rendered.

[Visual Basic]

Public Delegate Sub UnboundColumnFetchEventHandler( _

ByVal sender As Object, _

ByVal e As UnboundColumnFetchEventArgs _

)

[C#]

public delegate void UnboundColumnFetchEventHandler(

object sender,

UnboundColumnFetchEventArgs e

);

[Delphi]

type UnboundColumnFetchEventHandler = procedure (

sender: Object;

e: UnboundColumnFetchEventArgs

) of object;

Namespace: C1.Win.C1TrueDBGrid

Assembly: C1.Win.C1TrueDBGrid.2 (in C1.Win.C1TrueDBGrid.2.dll)

See Also

C1.Win.C1TrueDBGrid Namespace

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ValueItem Class

ValueItem Class

Represents an object that defines a value/display value pair.

For a list of all members of this type, see ValueItem Members.

System.Object

C1.Win.C1TrueDBGrid.ValueItem

[Visual Basic]

Public Class ValueItem

[C#]

public class ValueItem

[Delphi]

type ValueItem = class;

Namespace: C1.Win.C1TrueDBGrid

Assembly: C1.Win.C1TrueDBGrid.2 (in C1.Win.C1TrueDBGrid.2.dll)

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ValueItem Members

ValueItem Members

ValueItem overview

Public Constructors

ValueItem Constructor

Initializes a new instance of the ValueItem class.

Public Properties

DisplayValue | Gets or sets the display value of this item.
Value | Gets or sets the raw (untranslated) value of this item.

Public Methods

ToString

Overriden. Returns a string that represents the current object.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ValueItem Constructor

ValueItem Constructor

Overload List

Initializes a new instance of the ValueItem class.

[Visual Basic] Public Function New()

[C#] public ValueItem();

[Delphi] public constructor Create(); overload;

Initializes a new instance of the ValueItem class.

[Visual Basic] Public Function New(String, Object)

[C#] public ValueItem(string, object);

[Delphi] public constructor Create(String; Object); overload;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ValueItem Constructor ()

ValueItem Constructor ()

Previous Next

Initializes a new instance of the ValueItem class.

[Visual Basic]

Public Function New()

[C#]

public ValueItem()

[Delphi]

public constructor Create(); overload;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ValueItem Constructor (String, Object)

ValueItem Constructor (String, Object)

Previous Next

Initializes a new instance of the ValueItem class.

[Visual Basic]

Public Function New( _

ByVal value As String, _

ByVal displayValue As Object _

)

[C#]

public ValueItem(

string value,

object displayValue

);

[Delphi]

public constructor Create(

value: String;

displayValue: Object

); overload;

Parameters

value

Underlying data value.

displayValue

Translated value.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ValueItem Properties

ValueItem Properties

The properties of the ValueItem class are listed here. For a complete list of ValueItem class members, see the ValueItem Members topic.

Public Properties

DisplayValue | Gets or sets the display value of this item.
Value | Gets or sets the raw (untranslated) value of this item.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ValueItem.DisplayValue Property

ValueItem.DisplayValue Property

Gets or sets the display value of this item.

[Visual Basic]

Public Property DisplayValue As Object

[C#]

public object DisplayValue {get;set;}

[Delphi]

public property DisplayValue: Object read get_DisplayValue write set_DisplayValue;

Remarks

The DisplayValue property may be set to a string that specifies the mapping between the underlying data value and its displayed representation.

If the DisplayValue property is not explicitly set, it returns the same result as the Value property.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ValueItem.Value Property

ValueItem.Value Property

Gets or sets the raw (untranslated) value of this item.

[Visual Basic]

Public Property Value As String

[C#]

public string Value {get;set;}

[Delphi]

public property Value: String read get_Value write set_Value;

Remarks

This property returns or sets the underlying data value for a member of a ValueItems collection.

The DisplayValue property returns the translated data value for a value item.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ValueItem Methods

ValueItem Methods

The methods of the ValueItem class are listed here. For a complete list of ValueItem class members, see the ValueItem Members topic.

Public Methods

ToString

Overriden. Returns a string that represents the current object.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ValueItem.ToString Method

ValueItem.ToString Method

Returns a string that represents the current object.

[Visual Basic]

Overrides Public Function ToString() As String

[C#]

override public string ToString()

[Delphi]

public function ToString(): String; override;

Return Value

A string that represents the current object.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ValueItemCollection Class

ValueItemCollection Class

Represents a collection of ValueItem objects.

For a list of all members of this type, see ValueItemCollection Members.

System.Object

System.Collections.CollectionBase

C1.Win.C1TrueDBGrid.ValueItemCollection

[Visual Basic]

Public Class ValueItemCollection

Inherits CollectionBase

[C#]

public class ValueItemCollection : CollectionBase

[Delphi]

type ValueItemCollection = class (CollectionBase);

Namespace: C1.Win.C1TrueDBGrid

Assembly: C1.Win.C1TrueDBGrid.2 (in C1.Win.C1TrueDBGrid.2.dll)

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ValueItemCollection Members

ValueItemCollection Members

ValueItemCollection overview

Public Properties

Item

Gets or sets the specified ValueItem from the collection at the specified index.

Public Methods

Add | Adds a ValueItem to the end of the collection.
IndexOf | Gets the index of the specified ValueItem.
Insert | Inserts a ValueItem at the specified index.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ValueItemCollection Properties

ValueItemCollection Properties

The properties of the ValueItemCollection class are listed here. For a complete list of ValueItemCollection class members, see the ValueItemCollection Members topic.

Public Properties

Item

Gets or sets the specified ValueItem from the collection at the specified index.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ValueItemCollection.Item Property

ValueItemCollection.Item Property

Gets or sets the specified ValueItem from the collection at the specified index.

[Visual Basic]

Public Default Property Item( _

ByVal index As Integer _

) As ValueItem

[C#]

public ValueItem this[

int index

] {get;set;}

[Delphi]

public property Item[

index: Int32

]: ValueItem read get_Item write set_Item;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ValueItemCollection Methods

ValueItemCollection Methods

The methods of the ValueItemCollection class are listed here. For a complete list of ValueItemCollection class members, see the ValueItemCollection Members topic.

Public Methods

Add | Adds a ValueItem to the end of the collection.
IndexOf | Gets the index of the specified ValueItem.
Insert | Inserts a ValueItem at the specified index.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ValueItemCollection.Add Method

ValueItemCollection.Add Method

Adds a ValueItem to the end of the collection.

[Visual Basic]

Public Function Add( _

ByVal vi As ValueItem _

) As Integer

[C#]

public int Add(

ValueItem vi

);

[Delphi]

public function Add(

vi: ValueItem

): Int32;

Parameters

vi

The ValueItem to add.

Return Value

The index at which the ValueItem has been added.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ValueItemCollection.IndexOf Method

ValueItemCollection.IndexOf Method

Gets the index of the specified ValueItem.

[Visual Basic]

Public Function IndexOf( _

ByVal vi As ValueItem _

) As Integer

[C#]

public int IndexOf(

ValueItem vi

);

[Delphi]

public function IndexOf(

vi: ValueItem

): Int32;

Parameters

vi

The ValueItem to search.

Return Value

The index of the ValueItem.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ValueItemCollection.Insert Method

ValueItemCollection.Insert Method

Inserts a ValueItem at the specified index.

[Visual Basic]

Public Sub Insert( _

ByVal index As Integer, _

ByVal vi As ValueItem _

)

[C#]

public void Insert(

int index,

ValueItem vi

);

[Delphi]

public procedure Insert(

index: Int32;

vi: ValueItem

);

Parameters

index

The zero-based index at which the ValueItem should be inserted.

vi

The ValueItem to insert.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ValueItems Class

ValueItems Class

Represents an object that defines how cells are rendered.

For a list of all members of this type, see ValueItems Members.

System.Object

C1.Win.C1TrueDBGrid.ValueItems

[Visual Basic]

Public Class ValueItems

[C#]

public class ValueItems

[Delphi]

type ValueItems = class;

Namespace: C1.Win.C1TrueDBGrid

Assembly: C1.Win.C1TrueDBGrid.2 (in C1.Win.C1TrueDBGrid.2.dll)

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ValueItems Members

ValueItems Members

ValueItems overview

Public Properties

AnnotatePicture | Gets or sets a value indicating whether both Value and Display Value are rendenered when Display value is an image.
CycleOnClick | Gets or sets a value indicating whether users can cycle through ValueItem by clicking on a cell.
DefaultItem | Gets or sets the index of the default ValueItem or -1 for no default.
MaxComboItems | Gets or sets the maximum number of visible rows in the combobox.
Presentation | Gets or sets the method in which cells are rendered.
Translate | Gets or sets a value indicating whether data values are translated using matching ValueItem.
Validate | Gets or sets a value indicating whether values entered by the user must match on of the ValueItem objects.
Values | Gets the collection of Value/Display Value pairs.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ValueItems Properties

ValueItems Properties

The properties of the ValueItems class are listed here. For a complete list of ValueItems class members, see the ValueItems Members topic.

Public Properties

AnnotatePicture | Gets or sets a value indicating whether both Value and Display Value are rendenered when Display value is an image.
CycleOnClick | Gets or sets a value indicating whether users can cycle through ValueItem by clicking on a cell.
DefaultItem | Gets or sets the index of the default ValueItem or -1 for no default.
MaxComboItems | Gets or sets the maximum number of visible rows in the combobox.
Presentation | Gets or sets the method in which cells are rendered.
Translate | Gets or sets a value indicating whether data values are translated using matching ValueItem.
Validate | Gets or sets a value indicating whether values entered by the user must match on of the ValueItem objects.
Values | Gets the collection of Value/Display Value pairs.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ValueItems.AnnotatePicture Property

ValueItems.AnnotatePicture Property

Gets or sets a value indicating whether both Value and Display Value are rendenered when Display value is an image.

[Visual Basic]

Public Property AnnotatePicture As Boolean

[C#]

public bool AnnotatePicture {get;set;}

[Delphi]

public property AnnotatePicture: Boolean read get_AnnotatePicture write set_AnnotatePicture;

Remarks

This property determines whether the column associated with a ValueItem can display both text and graphics in a single cell.

If True, both text and graphics are displayed in a cell when all of the following conditions are met:

· The Presentation property of the ValueItems object is set to any value except Radio Button.

· The Translate property of the ValueItems object is set to True.

· The underlying data value for a cell matches the Value property of a ValueItem member.

· The corresponding DisplayValue contains a bitmap, not text.

If False (the default), matching cells are rendered as the Value or DisplayValue setting, depending upon the value of the Translate property.

When both text and graphics are displayed, the horizontal placement of the bitmap with respect to the cell text is determined by the HorizontalAlignment and ForeGroundPicturePosition properties of the column's Style object. For example, if HorizontalAlignment is set to Center, and ForeGroundPicturePosition is set to Left, the bitmap is placed at the left edge of the cell, and the cell text is centered in the remaining space. For more information, see Displaying foreground pictures.

When editing, the editor uses all space available in the text portion of the cell. If the Presentation property is set to one of the combo box options, the bitmap will not change until editing is completed.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ValueItems.CycleOnClick Property

ValueItems.CycleOnClick Property

Gets or sets a value indicating whether users can cycle through ValueItem by clicking on a cell.

[Visual Basic]

Public Property CycleOnClick As Boolean

[C#]

public bool CycleOnClick {get;set;}

[Delphi]

public property CycleOnClick: Boolean read get_CycleOnClick write set_CycleOnClick;

Remarks

This property determines whether the user can cycle through the ValueItem objects contained in a column's ValueItems object by clicking on the current cell.

If True, the user can click on the current cell to display the next available item. If the last value item is displayed, then clicking displays the first item in the list.

If False (the default), then the mouse operates as usual within the associated column.

Note: The CycleOnClick property has no effect when the MarqueeStyle property is set to Floating Editor.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ValueItems.DefaultItem Property

ValueItems.DefaultItem Property

Gets or sets the index of the default ValueItem or -1 for no default.

[Visual Basic]

Public Property DefaultItem As Integer

[C#]

public int DefaultItem {get;set;}

[Delphi]

public property DefaultItem: Int32 read get_DefaultItem write set_DefaultItem;

Remarks

This property returns or sets the zero-based index of the default item for a ValueItems object associated with a column. The default value for this property is -1, which is used to indicate that there is no default item.

Use the DefaultItem property to provide an alternate display for data values not present in the ValueItems object.

When the DefaultItem property is set to a valid collection index (an integer between 0 and Count – 1 inclusive), then the corresponding ValueItem is displayed when the grid encounters a value that is not present in the ValueItems object.

When the DefaultItem property is set to -1, then the grid will not substitute a ValueItem when it encounters a value that is not present in the ValueItems object.

A trappable error will occur if you attempt to set this property to an invalid value.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ValueItems.MaxComboItems Property

ValueItems.MaxComboItems Property

Gets or sets the maximum number of visible rows in the combobox.

[Visual Basic]

Public Property MaxComboItems As Integer

[C#]

public int MaxComboItems {get;set;}

[Delphi]

public property MaxComboItems: Int32 read get_MaxComboItems write set_MaxComboItems;

Remarks

This property controls the maximum number of items to be displayed in the built-in combo box. The default value for this property is 5.

When the Presentation property of a column's ValueItems object is set to either of the combo box options (sorted or unsorted), the MaxComboItems property determines the combo box height in terms of the number of value items displayed.

If the total number of value items is less than or equal to MaxComboItems, then all value items will be shown. If the total number of value items exceeds MaxComboItems, only MaxComboItems will be shown, but a scroll bar will appear at the right edge of the drop-down combo to allow users to bring the other value items into view.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ValueItems.Presentation Property

ValueItems.Presentation Property

Gets or sets the method in which cells are rendered.

[Visual Basic]

Public Property Presentation As PresentationEnum

[C#]

public PresentationEnum Presentation {get;set;}

[Delphi]

public property Presentation: PresentationEnum read get_Presentation write set_Presentation;

Remarks

This property determines how the members of a ValueItems collection are displayed within the associated column.

Use the ValueItems property to access the ValueItems collection for a C1DataColumn object.

Note: If using setting Check Box with Boolean data, it is not necessary to add any members to the ValueItems collection, as Boolean values are handled automatically.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ValueItems.Translate Property

ValueItems.Translate Property

Gets or sets a value indicating whether data values are translated using matching ValueItem.

[Visual Basic]

Public Property Translate As Boolean

[C#]

public bool Translate {get;set;}

[Delphi]

public property Translate: Boolean read get_Translate write set_Translate;

Remarks

This property determines whether a column's underlying data values are automatically displayed in an alternate form as specified by the ValueItem objects contained in a column's ValueItems collection.

If True, data values that match the Value property of a ValueItem are displayed using the corresponding DisplayValue setting. The DisplayValue property may contain either text or graphics.

If False (the default), no translation is performed.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ValueItems.Validate Property

ValueItems.Validate Property

Gets or sets a value indicating whether values entered by the user must match on of the ValueItem objects.

[Visual Basic]

Public Property Validate As Boolean

[C#]

public bool Validate {get;set;}

[Delphi]

public property Validate: Boolean read get_Validate write set_Validate;

Remarks

This property determines whether values entered by the user must match one of the ValueItem objects contained in a column's ValueItems collection.

If True, the grid automatically validates the user's input when the current cell is changed. If the cell contents do not match the DisplayValue setting of one of the ValueItem objects, then focus remains on the current cell and its prior contents are restored.

If False (the default), the grid performs no validation. However, the BeforeColUpdate event can still be used to validate the user's changes.

The BeforeColUpdate event will not be executed for a column if both of the following are true:

1. The associated ValueItems collection contains at least one ValueItem.

2. The Validate property of the ValueItems collection is set to True.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ValueItems.Values Property

ValueItems.Values Property

Gets the collection of Value/Display Value pairs.

[Visual Basic]

Public Property Values As ValueItemCollection

[C#]

public ValueItemCollection Values {get;set;}

[Delphi]

public property Values: ValueItemCollection read get_Values write set_Values;

Remarks

This property provides access to the DisplayValue, and Value pairs that make up the ValueItems object. This collection can also be modified at design-time through the ValueItems collection editor. The ValueItemsCollection Editor is available through the C1TrueDBGrid Designer.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1.Win.C1TrueDBGrid.BaseGrid Namespace

C1.Win.C1TrueDBGrid.BaseGrid Namespace

C1.Win.C1TrueDBGrid.BaseGrid Hierarchy

Classes

Class | Description
Frame | Summary description for BaseGridFrame.
View | Base class for splits.
ViewRow | Represents a row in a split.
ViewRowList | Represents a collection of ViewRow objects.

See Also

C1.Win.C1TrueDBGrid.2 Assembly

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Frame Class

Frame Class

Summary description for BaseGridFrame.

For a list of all members of this type, see Frame Members.

System.Object

System.MarshalByRefObject

System.ComponentModel.Component

System.Windows.Forms.Control

C1.Win.C1TrueDBGrid.BaseGrid.Frame

C1.Win.C1TrueDBGrid.C1TrueDBDropdown

C1.Win.C1TrueDBGrid.C1TrueDBGrid

[Visual Basic]

MustInherit Public Class Frame

Inherits Control

Implements ISupportInitialize

[C#]

public abstract class Frame : Control , ISupportInitialize

[Delphi]

type Frame = class abstract (Control, ISupportInitialize);

Namespace: C1.Win.C1TrueDBGrid.BaseGrid

Assembly: C1.Win.C1TrueDBGrid.2 (in C1.Win.C1TrueDBGrid.2.dll)

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Frame Members

Frame Members

Frame overview

Public Properties

AllowFilter | Gets or sets a value indicating the ability of the grid to automatically filter data.
AllowSort | Gets or sets a value indicating the ability of the grid to automatically sort data when a column header is clicked.
BorderStyle | Gets or sets the border for the control.
Caption | Gets or sets the grid's caption.
CaptionHeight | Gets or sets the height of the grid's caption.
DataMember | Gets or sets the specific data member in a multimember data source that the grid binds to.
DataSource | Gets or sets the source containing a list of values used to populate the items within the control.
DoubleBuffer | Gets or sets a value indicating whether the control should use an off-screen buffer when painting to redue flicker.
FlatStyle | Gets or sets the general appearance of 3D elements for the entire grid.
RowHeight | Gets or sets the height of grid rows.
ScrollTrack | Gets or sets a value that controls how the grid scrolls when the scroll thumb is moved.
SplitDividerSize | Controls the height and width of split dividers.

Public Methods

AddRow | Overloaded. Adds data to an unbound grid.
AddRows | Adds count empty rows to the grid.
BeginInit | ISupportInitialize interface.
Delete | Overloaded. Removes the given row from the grid.
EndInit | ISupportInitialize interface.
SetDataBinding | Binds the grid at runtime.

Protected Constructors

Frame Constructor

Ctor for the split container class.

Protected Properties

CreateParams | Overriden. Allows us to set the borderstyle.
RowPosition | Gets the current position from the currency manager.

Protected Methods

Dispose | Overloaded. Overriden. Called when the class is being disposed.
initializeStyles | Initializes root and named styles.
IsInputChar | Overriden. Inherited from Control.
IsInputKey | Overriden. Inherited from Control.
On_AddNew | Raised when a new row is added.
On_Init | Raised when the grid is initialized.
On_Scroll | Raised when the grid scrolls.
OnAfterColEdit | Raised after a column has been edited.
OnAfterColUpdate | Raised after the datasource has been updated for a column.
OnAfterDelete | Raised after a row has been deleted.
OnAfterFilter | Raised after the datasource has been filtered.
OnAfterInsert | Raised after a row has been inserted.
OnAfterSort | Raised after the datasource has been sorted.
OnAfterUpdate | Raised after a row has been updated.
OnBackColorChanged | Overriden. Inherited from Control.
OnBeforeClose | Rasied before a child grid is closed.
OnBeforeColEdit | Raised before a column edit.
OnBeforeColUpdate | Raised before a column has been updated.
OnBeforeDelete | Raised before a row is deleted.
OnBeforeInsert | Raised before a row is inserted.
OnBeforeOpen | Raised before a child grid is displayed.
OnBeforeRowColChange | Raised before a row or column currency is changed.
OnBeforeUpdate | Raised before a row is updated.
OnBindingContextChanged | Overriden. Raised when the Binding Context changes.
OnButtonClick | Raised when a button in a cell has been clicked.
OnChange | Raised when the grids cell content has been modified.
OnClick | Overriden. Inherited from Control.
OnColEdit | Raised when a column has been edited.
OnCollapse | Raised when a band is collasped in a hierarchical grid.
OnColMove | Raised when a column is dragged.
OnColResize | Raised when a column has been resized.
OnComboSelect | Raised when a value in the combobox has been selected.
OnCursorChanged | Overriden. Inherited from Control.
OnDataSourceChanged | Raised when the datasource is changed.
OnDoubleClick | Overriden. Inherited from Control.
OnEnter | Overriden. Inherited from Control.
OnError | Raised when the grid encounters an error through the UI.
OnExpand | Raised when a band is expanded in a hierarchical grid.
OnFetchCellStyle | Raised when a custom style is to be used for rendering a cell.
OnFetchCellTips | Raised when a cell tip is to be displayed.
OnFetchGroupCellStyle | Raised when a custom style is to be used for renderind a grouped cell.
OnFetchRowStyle | Raised when a custom style is to be used for a row.
OnFetchScrollTips | Raised when scroll tips are to be displayed.
OnFilter | Raised when AllowFilter is False.
OnFilterButtonClick | Raised when a button in the filter bar is clicked.
OnFilterChange | Raised when a filter condition has changed.
OnFirstRowChange | Raised when the top row has changed.
OnFontChanged | Overriden. Inherited from Control.
OnFootClick | Raised when a column footer has been clicked.
OnFormatText | Raised when a cell value needs custom formatting.
OnGotFocus | Overriden. Inherited from Control.
OnGroupAggregate | Raised when custom aggregates are used for a grouped grid.
OnGroupColMove | Raised when a grouped column is moved.
OnGroupHeadClick | Raised when a column header in the grouping area is clicked.
OnGroupText | Raised when custom values are to be used for the group text.
OnHeadClick | Raised when a column header has been clicked.
OnKeyDown | Overriden. Inherited from Control.
OnKeyPress | Overriden. Inherited from Control.
OnKeyUp | Overriden. Inherited from Control.
OnLeave | Overriden. Inherited from Control.
OnLeftColChange | Raised when the left column has changed.
OnLostFocus | Overriden. Inherited from Control.
OnMouseDown | Overriden. Inherited from Control.
OnMouseLeave | Overriden. Inherited from Control.
OnMouseMove | Overriden. Inherited from Control.
OnMouseUp | Overriden. Inherited from Control.
OnMouseWheel | Overriden. Inherited from Control.
OnOwnerDrawCell | Raised when a cell has to be rendered.
OnOwnerDrawCellPrint | Raised when a cell has to be printed.
OnOwnerDrawPageFooter | Raised when a Page footer needs to be printed.
OnOwnerDrawPageHeader | Raised when Page header needs to be printed.
OnPaint | Overriden. Inherited from Control.
OnQueryContinueDrag | Overriden. Inherited from Control.
OnResize | Overriden. Inherited from Control.
OnRightToLeftChanged | Overriden. Inherited from Control.
OnRowColChange | Raised after a row or column currency has been changed.
OnRowResize | Raised before a row is resized.
OnSelChange | Raised when a selection has changed.
OnSizeChanged | Overriden. Inherited from Control.
OnSort | Raised when the datasource is sorted by clicking the column header.
OnSplitChange | Raised when split currency has changed.
OnUnboundColumnFetch | Raised to fetch data for an unbound column.
OnValidating | Overriden. Inherited from Control.
OnValueItemError | Raised when a value item is selected that's not in the ValueItems collection.
OnVisibleChanged | Overriden. Inherited from Control.
SetDataSource | Called when the datasource changes.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Frame Constructor

Frame Constructor

Ctor for the split container class.

[Visual Basic]

Protected Function New()

[C#]

protected Frame()

[Delphi]

strict protected constructor Create();

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Frame Properties

Frame Properties

The properties of the Frame class are listed here. For a complete list of Frame class members, see the Frame Members topic.

Public Properties

AllowFilter | Gets or sets a value indicating the ability of the grid to automatically filter data.
AllowSort | Gets or sets a value indicating the ability of the grid to automatically sort data when a column header is clicked.
BorderStyle | Gets or sets the border for the control.
Caption | Gets or sets the grid's caption.
CaptionHeight | Gets or sets the height of the grid's caption.
DataMember | Gets or sets the specific data member in a multimember data source that the grid binds to.
DataSource | Gets or sets the source containing a list of values used to populate the items within the control.
DoubleBuffer | Gets or sets a value indicating whether the control should use an off-screen buffer when painting to redue flicker.
FlatStyle | Gets or sets the general appearance of 3D elements for the entire grid.
RowHeight | Gets or sets the height of grid rows.
ScrollTrack | Gets or sets a value that controls how the grid scrolls when the scroll thumb is moved.
SplitDividerSize | Controls the height and width of split dividers.

Protected Properties

CreateParams | Overriden. Allows us to set the borderstyle.
RowPosition | Gets the current position from the currency manager.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Frame.AllowFilter Property

Frame.AllowFilter Property

Gets or sets a value indicating the ability of the grid to automatically filter data.

[Visual Basic]

Public Property AllowFilter As Boolean

[C#]

public bool AllowFilter {get;set;}

[Delphi]

public property AllowFilter: Boolean read get_AllowFilter write set_AllowFilter;

Remarks

If True, and if the Filter Bar is active, the grid will automatically filter data.

If False, the grid will fire the Filter event.

If the FilterBar property is true and the user attempts to filter column data, the grid will automatically filter the column data according to the value in the Filter Bar.

If False, the Filter event allows the application to filter the data.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Frame.AllowSort Property

Frame.AllowSort Property

Gets or sets a value indicating the ability of the grid to automatically sort data when a column header is clicked.

[Visual Basic]

Public Property AllowSort As Boolean

[C#]

public bool AllowSort {get;set;}

[Delphi]

public property AllowSort: Boolean read get_AllowSort write set_AllowSort;

Remarks

If True, and if the DataView property is set to GroupBy, the grid will automatically filter column data upon grouping action.

If False, the grid will fire the Sort event.

If the DataView property is set to GroupBy and the user attempts to drag a column header into the grouping area, the grid will automatically sort the column data.

If False, the Sort event allows the application to sort the data.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Frame.BorderStyle Property

Frame.BorderStyle Property

Gets or sets the border for the control.

[Visual Basic]

Public Property BorderStyle As BorderStyle

[C#]

public BorderStyle BorderStyle {get;set;}

[Delphi]

public property BorderStyle: BorderStyle read get_BorderStyle write set_BorderStyle;

Remarks

This property determines whether a C1TrueDBGrid control has a border.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Frame.Caption Property

Frame.Caption Property

Gets or sets the grid's caption.

[Visual Basic]

Public Property Caption As String

[C#]

public string Caption {get;set;}

[Delphi]

public property Caption: String read get_Caption write set_Caption;

Remarks

For a C1TrueDBGrid control, this property determines the text displayed in the caption bar at the top of the grid.

Setting the Caption property to an empty string for a C1TrueDBGrid control hides its caption bar.

For a C1DataColumn object, this property determines the text displayed in the object's heading area.

Setting the Caption property to an empty string for a C1DataColumn object clears the text in the column's heading area but does not hide the heading. Column captions are only displayed if the grid's ColumnHeaders property is set to True.

Setting the Caption property to an empty string for a Split object hides the heading area, even if other splits have non-empty captions.

Example

The following code sets the Caption property for the grid, the first column, and the first split:

· Visual Basic

· C#

· Delphi

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Frame.CaptionHeight Property

Frame.CaptionHeight Property

Gets or sets the height of the grid's caption.

[Visual Basic]

Public Property CaptionHeight As Integer

[C#]

public int CaptionHeight {get;set;}

[Delphi]

public property CaptionHeight: Int32 read get_CaptionHeight write set_CaptionHeight;

Remarks

This property requires that the Caption property of the grid has a value.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Frame.CreateParams Property

Frame.CreateParams Property

Allows us to set the borderstyle.

[Visual Basic]

Overrides Protected ReadOnly Property CreateParams As CreateParams

[C#]

override protected CreateParams CreateParams {get;}

[Delphi]

strict protected property CreateParams: CreateParams read get_CreateParams;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Frame.DataMember Property

Frame.DataMember Property

Gets or sets the specific data member in a multimember data source that the grid binds to.

[Visual Basic]

Public Property DataMember As String

[C#]

public string DataMember {get;set;}

[Delphi]

public property DataMember: String read get_DataMember write set_DataMember;

Remarks

This property returns or sets the name of the data member used to populate the grid. Typically, a data member represents a database table or query.

A bound DataSource can expose multiple sets of data that consumers can bind to. Each set of data is called a data member, and is identified by a unique string.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Frame.DataSource Property

Frame.DataSource Property

Gets or sets the source containing a list of values used to populate the items within the control.

[Visual Basic]

Public Property DataSource As Object

[C#]

public object DataSource {get;set;}

[Delphi]

public property DataSource: Object read get_DataSource write set_DataSource;

Remarks

The DataSource property specifies the data control used to bind a C1TrueDBGrid or C1TrueDBDropdown control to a database.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Frame.DoubleBuffer Property

Frame.DoubleBuffer Property

Gets or sets a value indicating whether the control should use an off-screen buffer when painting to redue flicker.

[Visual Basic]

Public Property DoubleBuffer As Boolean

[C#]

public bool DoubleBuffer {get;set;}

[Delphi]

public property DoubleBuffer: Boolean read get_DoubleBuffer write set_DoubleBuffer;

Remarks

Member of C1.Win.C1TrueDBGrid.BaseGrid.

Setting this value to False may cause the grid to flicker when the control is painting.

You may want to set DoubleBuffer to False to increase performance when deploying applications that run on terminal servers.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Frame.FlatStyle Property

Frame.FlatStyle Property

Gets or sets the general appearance of 3D elements for the entire grid.

[Visual Basic]

Public Property FlatStyle As FlatModeEnum

[C#]

public FlatModeEnum FlatStyle {get;set;}

[Delphi]

public property FlatStyle: FlatModeEnum read get_FlatStyle write set_FlatStyle;

Remarks

The FlatStyle property sets the general appearance of the whole grid. The default setting for this property is FlatModeEnum.Standard. The Standard FlatStyle gives the grid’s column headers and recordselectors an inset three-dimensional look.

The FlatModeEnum.Flat setting takes away all three-dimensional features of the grid and gives it a plain flat appearance.

The FlatModeEnum.PopUp setting for this property looks similar to the Flat FlatStyle, but when the user drags the cursor over a column heading or recordselector, they become three-dimensional and appear to pop up.

The FlatModeEnum.System setting for this property draws 3D items using XP Themes.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Frame.RowHeight Property

Frame.RowHeight Property

Gets or sets the height of grid rows.

[Visual Basic]

Public Property RowHeight As Integer

[C#]

public int RowHeight {get;set;}

[Delphi]

public property RowHeight: Int32 read get_RowHeight write set_RowHeight;

Remarks

This property returns or sets the height of all grid rows.

The default value depends upon the character height of the current font.

A setting of 0 causes the grid to readjust its display so that each row occupies a single line of text in the current font. Therefore, the following statements will set the row height so that exactly two lines of text are shown in each row:

· Visual Basic

· C#

· Delphi

If the control's AllowRowSizing property is set to IndividualRows, then the user can adjust the RowHeight property at run time by dragging the row divider between any pair of record selectors.

Note: Increasing the RowHeight property does not wrap cell text at column boundaries unless the column Style’s WrapText property is True.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Frame.RowPosition Property

Frame.RowPosition Property

Gets the current position from the currency manager.

[Visual Basic]

Protected ReadOnly Property RowPosition As Integer

[C#]

protected int RowPosition {get;}

[Delphi]

strict protected property RowPosition: Int32 read get_RowPosition;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Frame.ScrollTrack Property

Frame.ScrollTrack Property

Gets or sets a value that controls how the grid scrolls when the scroll thumb is moved.

[Visual Basic]

Public Property ScrollTrack As Boolean

[C#]

public bool ScrollTrack {get;set;}

[Delphi]

public property ScrollTrack: Boolean read get_ScrollTrack write set_ScrollTrack;

Remarks

If True, moving the scrollbar thumb causes the grid’s display to update with new data. If False (the default), moving the scrollbar thumb does not change the display. If the ScrollTrack property is True, moving the scrollbar thumb causes the grid to scroll.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Frame.SplitDividerSize Property

Frame.SplitDividerSize Property

Controls the height and width of split dividers.

[Visual Basic]

Public Property SplitDividerSize As Size

[C#]

public Size SplitDividerSize {get;set;}

[Delphi]

public property SplitDividerSize: Size read get_SplitDividerSize write set_SplitDividerSize;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Frame Methods

Frame Methods

The methods of the Frame class are listed here. For a complete list of Frame class members, see the Frame Members topic.

Public Methods

AddRow | Overloaded. Adds data to an unbound grid.
AddRows | Adds count empty rows to the grid.
BeginInit | ISupportInitialize interface.
Delete | Overloaded. Removes the given row from the grid.
EndInit | ISupportInitialize interface.
SetDataBinding | Binds the grid at runtime.

Protected Methods

Dispose | Overloaded. Overriden. Called when the class is being disposed.
initializeStyles | Initializes root and named styles.
IsInputChar | Overriden. Inherited from Control.
IsInputKey | Overriden. Inherited from Control.
On_AddNew | Raised when a new row is added.
On_Init | Raised when the grid is initialized.
On_Scroll | Raised when the grid scrolls.
OnAfterColEdit | Raised after a column has been edited.
OnAfterColUpdate | Raised after the datasource has been updated for a column.
OnAfterDelete | Raised after a row has been deleted.
OnAfterFilter | Raised after the datasource has been filtered.
OnAfterInsert | Raised after a row has been inserted.
OnAfterSort | Raised after the datasource has been sorted.
OnAfterUpdate | Raised after a row has been updated.
OnBackColorChanged | Overriden. Inherited from Control.
OnBeforeClose | Rasied before a child grid is closed.
OnBeforeColEdit | Raised before a column edit.
OnBeforeColUpdate | Raised before a column has been updated.
OnBeforeDelete | Raised before a row is deleted.
OnBeforeInsert | Raised before a row is inserted.
OnBeforeOpen | Raised before a child grid is displayed.
OnBeforeRowColChange | Raised before a row or column currency is changed.
OnBeforeUpdate | Raised before a row is updated.
OnBindingContextChanged | Overriden. Raised when the Binding Context changes.
OnButtonClick | Raised when a button in a cell has been clicked.
OnChange | Raised when the grids cell content has been modified.
OnClick | Overriden. Inherited from Control.
OnColEdit | Raised when a column has been edited.
OnCollapse | Raised when a band is collasped in a hierarchical grid.
OnColMove | Raised when a column is dragged.
OnColResize | Raised when a column has been resized.
OnComboSelect | Raised when a value in the combobox has been selected.
OnCursorChanged | Overriden. Inherited from Control.
OnDataSourceChanged | Raised when the datasource is changed.
OnDoubleClick | Overriden. Inherited from Control.
OnEnter | Overriden. Inherited from Control.
OnError | Raised when the grid encounters an error through the UI.
OnExpand | Raised when a band is expanded in a hierarchical grid.
OnFetchCellStyle | Raised when a custom style is to be used for rendering a cell.
OnFetchCellTips | Raised when a cell tip is to be displayed.
OnFetchGroupCellStyle | Raised when a custom style is to be used for renderind a grouped cell.
OnFetchRowStyle | Raised when a custom style is to be used for a row.
OnFetchScrollTips | Raised when scroll tips are to be displayed.
OnFilter | Raised when AllowFilter is false.
OnFilterButtonClick | Raised when a button in the filter bar is clicked.
OnFilterChange | Raised when a filter condition has changed.
OnFirstRowChange | Raised when the top row has changed.
OnFontChanged | Overriden. Inherited from Control.
OnFootClick | Raised when a column footer has been clicked.
OnFormatText | Raised when a cell value needs custom formatting.
OnGotFocus | Overriden. Inherited from Control.
OnGroupAggregate | Raised when custom aggregates are used for a grouped grid.
OnGroupColMove | Raised when a grouped column is moved.
OnGroupHeadClick | Raised when a column header in the grouping area is clicked.
OnGroupText | Raised when custom values are to be used for the group text.
OnHeadClick | Raised when a column header has been clicked.
OnKeyDown | Overriden. Inherited from Control.
OnKeyPress | Overriden. Inherited from Control.
OnKeyUp | Overriden. Inherited from Control.
OnLeave | Overriden. Inherited from Control.
OnLeftColChange | Raised when the left column has changed.
OnLostFocus | Overriden. Inherited from Control.
OnMouseDown | Overriden. Inherited from Control.
OnMouseLeave | Overriden. Inherited from Control.
OnMouseMove | Overriden. Inherited from Control.
OnMouseUp | Overriden. Inherited from Control.
OnMouseWheel | Overriden. Inherited from Control.
OnOwnerDrawCell | Raised when a cell has to be rendered.
OnOwnerDrawCellPrint | Raised when a cell has to be printed.
OnOwnerDrawPageFooter | Raised when a Page footer needs to be printed.
OnOwnerDrawPageHeader | Raised when Page header needs to be printed.
OnPaint | Overriden. Inherited from Control.
OnQueryContinueDrag | Overriden. Inherited from Control.
OnResize | Overriden. Inherited from Control.
OnRightToLeftChanged | Overriden. Inherited from Control.
OnRowColChange | Raised after a row or column currency has been changed.
OnRowResize | Raised before a row is resized.
OnSelChange | Raised when a selection has changed.
OnSizeChanged | Overriden. Inherited from Control.
OnSort | Raised when the datasource is sorted by clicking the column header.
OnSplitChange | Raised when split currency has changed.
OnUnboundColumnFetch | Raised to fetch data for an unbound column.
OnValidating | Overriden. Inherited from Control.
OnValueItemError | Raised when a value item is selected that's not in the ValueItems collection.
OnVisibleChanged | Overriden. Inherited from Control.
SetDataSource | Called when the datasource changes.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Frame.AddRow Method

Frame.AddRow Method

Overload List

Adds data to an unbound grid.

[Visual Basic] Overloads Overridable Public Function AddRow(String) As Integer

[C#] virtual public int AddRow(string);

[Delphi] public function AddRow(String) : Int32; overload; virtual;

Adds data to an unbound grid.

[Visual Basic] Overloads Overridable Public Function AddRow(String, Char) As Integer

[C#] virtual public int AddRow(string, char);

[Delphi] public function AddRow(String; Char) : Int32; overload; virtual;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Frame.AddRow Method (String)

Frame.AddRow Method (String)

Previous Next

Adds data to an unbound grid.

[Visual Basic]

Overloads Overridable Public Function AddRow( _

ByVal data As String _

) As Integer

[C#]

virtual public int AddRow(

string data

);

[Delphi]

public function AddRow(

data: String

): Int32; overload; virtual;

Return Value

The index of the row added.

Remarks

Column data is delemited by ';'.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Frame.AddRow Method (String, Char)

Frame.AddRow Method (String, Char)

Previous Next

Adds data to an unbound grid.

[Visual Basic]

Overloads Overridable Public Function AddRow( _

ByVal data As String, _

ByVal separator As Char _

) As Integer

[C#]

virtual public int AddRow(

string data,

char separator

);

[Delphi]

public function AddRow(

data: String;

separator: Char

): Int32; overload; virtual;

Return Value

The index of the row added.

Remarks

Column data is delemited by the separator argument.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Frame.AddRows Method

Frame.AddRows Method

Adds count empty rows to the grid.

[Visual Basic]

Overridable Public Function AddRows( _

ByVal count As Integer _

) As Integer

[C#]

virtual public int AddRows(

int count

);

[Delphi]

public function AddRows(

count: Int32

): Int32; virtual;

Return Value

The index of the first row that was added.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Frame.BeginInit Method

Frame.BeginInit Method

ISupportInitialize interface.

[Visual Basic]

Overridable Public Sub BeginInit() Implements ISupportInitialize.BeginInit

[C#]

virtual public void BeginInit()

[Delphi]

public procedure BeginInit(); virtual;

Implements

ISupportInitialize.BeginInit

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Frame.Delete Method

Frame.Delete Method

Overload List

Removes the given row from the grid.

[Visual Basic] Overloads Public Sub Delete(Integer)

[C#] public void Delete(int);

[Delphi] public procedure Delete(Int32); overload;

Removes count rows from the grid starting at the given index.

[Visual Basic] Overloads Public Sub Delete(Integer, Integer)

[C#] public void Delete(int, int);

[Delphi] public procedure Delete(Int32; Int32); overload;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Frame.Delete Method (Int32)

Frame.Delete Method (Int32)

Previous Next

Removes the given row from the grid.

[Visual Basic]

Overloads Public Sub Delete( _

ByVal index As Integer _

)

[C#]

public void Delete(

int index

);

[Delphi]

public procedure Delete(

index: Int32

); overload;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Frame.Delete Method (Int32, Int32)

Frame.Delete Method (Int32, Int32)

Previous Next

Removes count rows from the grid starting at the given index.

[Visual Basic]

Overloads Public Sub Delete( _

ByVal index As Integer, _

ByVal count As Integer _

)

[C#]

public void Delete(

int index,

int count

);

[Delphi]

public procedure Delete(

index: Int32;

count: Int32

); overload;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Frame.Dispose Method

Frame.Dispose Method

Called when the class is being disposed.

[Visual Basic]

Overrides Protected Sub Dispose( _

ByVal disposing As Boolean _

)

[C#]

override protected void Dispose(

bool disposing

);

[Delphi]

strict protected procedure Dispose(

disposing: Boolean

); overload; override;

Parameters

disposing

True to cleanup.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Frame.EndInit Method

Frame.EndInit Method

ISupportInitialize interface.

[Visual Basic]

Overridable Public Sub EndInit() Implements ISupportInitialize.EndInit

[C#]

virtual public void EndInit()

[Delphi]

public procedure EndInit(); virtual;

Implements

ISupportInitialize.EndInit

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Frame.initializeStyles Method

Frame.initializeStyles Method

Initializes root and named styles.

[Visual Basic]

Overridable Protected Sub initializeStyles()

[C#]

virtual protected void initializeStyles()

[Delphi]

strict protected procedure initializeStyles(); virtual;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Frame.IsInputChar Method

Frame.IsInputChar Method

Inherited from Control.

[Visual Basic]

Overrides Protected Function IsInputChar( _

ByVal charCode As Char _

) As Boolean

[C#]

override protected bool IsInputChar(

char charCode

);

[Delphi]

strict protected function IsInputChar(

charCode: Char

): Boolean; override;

Parameters

charCode

The character to test.

Return Value

True if the character should be sent directly to the control and not preprocessed, False otherwise.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Frame.IsInputKey Method

Frame.IsInputKey Method

Inherited from Control.

[Visual Basic]

Overrides Protected Function IsInputKey( _

ByVal keyData As Keys _

) As Boolean

[C#]

override protected bool IsInputKey(

Keys keyData

);

[Delphi]

strict protected function IsInputKey(

keyData: Keys

): Boolean; override;

Parameters

keyData

One of the System.Windows.Forms.Keys values.

Return Value

True if the specified key is a regular input key, False otherwise.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Frame.On_AddNew Method

Frame.On_AddNew Method

Raised when a new row is added.

[Visual Basic]

Overridable Protected Sub On_AddNew( _

ByVal e As EventArgs _

)

[C#]

virtual protected void On_AddNew(

EventArgs e

);

[Delphi]

strict protected procedure On_AddNew(

e: EventArgs

); virtual;

Parameters

e

A System.EventArgs that contains the event data.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Frame.On_Init Method

Frame.On_Init Method

Raised when the grid is initialized.

[Visual Basic]

Overridable Protected Sub On_Init( _

ByVal e As EventArgs _

)

[C#]

virtual protected void On_Init(

EventArgs e

);

[Delphi]

strict protected procedure On_Init(

e: EventArgs

); virtual;

Parameters

e

A System.EventArgs that contains the event data.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Frame.On_Scroll Method

Frame.On_Scroll Method

Raised when the grid scrolls.

[Visual Basic]

Overridable Protected Sub On_Scroll( _

ByVal e As CancelEventArgs _

)

[C#]

virtual protected void On_Scroll(

CancelEventArgs e

);

[Delphi]

strict protected procedure On_Scroll(

e: CancelEventArgs

); virtual;

Parameters

e

A CancelEventArgs that contains the event data.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Frame.OnAfterColEdit Method

Frame.OnAfterColEdit Method

Raised after a column has been edited.

[Visual Basic]

Overridable Protected Sub OnAfterColEdit( _

ByVal e As ColEventArgs _

)

[C#]

virtual protected void OnAfterColEdit(

ColEventArgs e

);

[Delphi]

strict protected procedure OnAfterColEdit(

e: ColEventArgs

); virtual;

Parameters

e

A ColEventArgs that contains the event data.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Frame.OnAfterColUpdate Method

Frame.OnAfterColUpdate Method

Raised after the datasource has been updated for a column.

[Visual Basic]

Overridable Protected Sub OnAfterColUpdate( _

ByVal e As ColEventArgs _

)

[C#]

virtual protected void OnAfterColUpdate(

ColEventArgs e

);

[Delphi]

strict protected procedure OnAfterColUpdate(

e: ColEventArgs

); virtual;

Parameters

e

A ColEventArgs that contains the event data.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Frame.OnAfterDelete Method

Frame.OnAfterDelete Method

Raised after a row has been deleted.

[Visual Basic]

Overridable Protected Sub OnAfterDelete( _

ByVal e As EventArgs _

)

[C#]

virtual protected void OnAfterDelete(

EventArgs e

);

[Delphi]

strict protected procedure OnAfterDelete(

e: EventArgs

); virtual;

Parameters

e

A System.EventArgs that contains the event data.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Frame.OnAfterFilter Method

Frame.OnAfterFilter Method

Raised after the datasource has been filtered.

[Visual Basic]

Overridable Protected Sub OnAfterFilter( _

ByVal e As FilterEventArgs _

)

[C#]

virtual protected void OnAfterFilter(

FilterEventArgs e

);

[Delphi]

strict protected procedure OnAfterFilter(

e: FilterEventArgs

); virtual;

Parameters

e

A FilterEventArgs that contains the event data.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Frame.OnAfterInsert Method

Frame.OnAfterInsert Method

Raised after a row has been inserted.

[Visual Basic]

Overridable Protected Sub OnAfterInsert( _

ByVal e As EventArgs _

)

[C#]

virtual protected void OnAfterInsert(

EventArgs e

);

[Delphi]

strict protected procedure OnAfterInsert(

e: EventArgs

); virtual;

Parameters

e

A System.EventArgs that contains the event data.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Frame.OnAfterSort Method

Frame.OnAfterSort Method

Raised after the datasource has been sorted.

[Visual Basic]

Overridable Protected Sub OnAfterSort( _

ByVal e As FilterEventArgs _

)

[C#]

virtual protected void OnAfterSort(

FilterEventArgs e

);

[Delphi]

strict protected procedure OnAfterSort(

e: FilterEventArgs

); virtual;

Parameters

e

A FilterEventArgs that contains the event data.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Frame.OnAfterUpdate Method

Frame.OnAfterUpdate Method

Raised after a row has been updated.

[Visual Basic]

Overridable Protected Sub OnAfterUpdate( _

ByVal e As EventArgs _

)

[C#]

virtual protected void OnAfterUpdate(

EventArgs e

);

[Delphi]

strict protected procedure OnAfterUpdate(

e: EventArgs

); virtual;

Parameters

e

A System.EventArgs that contains the event data.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Frame.OnBackColorChanged Method

Frame.OnBackColorChanged Method

Inherited from Control.

[Visual Basic]

Overrides Protected Sub OnBackColorChanged( _

ByVal e As EventArgs _

)

[C#]

override protected void OnBackColorChanged(

EventArgs e

);

[Delphi]

strict protected procedure OnBackColorChanged(

e: EventArgs

); override;

Parameters

e

A System.EventArgs that contains the event data.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Frame.OnBeforeClose Method

Frame.OnBeforeClose Method

Rasied before a child grid is closed.

[Visual Basic]

Overridable Protected Sub OnBeforeClose( _

ByVal e As CancelEventArgs _

)

[C#]

virtual protected void OnBeforeClose(

CancelEventArgs e

);

[Delphi]

strict protected procedure OnBeforeClose(

e: CancelEventArgs

); virtual;

Parameters

e

A CancelEventArgs that contains the event data.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Frame.OnBeforeColEdit Method

Frame.OnBeforeColEdit Method

Raised before a column edit.

[Visual Basic]

Overridable Protected Sub OnBeforeColEdit( _

ByVal e As BeforeColEditEventArgs _

)

[C#]

virtual protected void OnBeforeColEdit(

BeforeColEditEventArgs e

);

[Delphi]

strict protected procedure OnBeforeColEdit(

e: BeforeColEditEventArgs

); virtual;

Parameters

e

A BeforeColEditEventArgs that contains the event data.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Frame.OnBeforeColUpdate Method

Frame.OnBeforeColUpdate Method

Raised before a column has been updated.

[Visual Basic]

Overridable Protected Sub OnBeforeColUpdate( _

ByVal e As BeforeColUpdateEventArgs _

)

[C#]

virtual protected void OnBeforeColUpdate(

BeforeColUpdateEventArgs e

);

[Delphi]

strict protected procedure OnBeforeColUpdate(

e: BeforeColUpdateEventArgs

); virtual;

Parameters

e

A BeforeColUpdateEventArgs that contains the event data.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Frame.OnBeforeDelete Method

Frame.OnBeforeDelete Method

Raised before a row is deleted.

[Visual Basic]

Overridable Protected Sub OnBeforeDelete( _

ByVal e As CancelEventArgs _

)

[C#]

virtual protected void OnBeforeDelete(

CancelEventArgs e

);

[Delphi]

strict protected procedure OnBeforeDelete(

e: CancelEventArgs

); virtual;

Parameters

e

A CancelEventArgs that contains the event data.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Frame.OnBeforeInsert Method

Frame.OnBeforeInsert Method

Raised before a row is inserted.

[Visual Basic]

Overridable Protected Sub OnBeforeInsert( _

ByVal e As CancelEventArgs _

)

[C#]

virtual protected void OnBeforeInsert(

CancelEventArgs e

);

[Delphi]

strict protected procedure OnBeforeInsert(

e: CancelEventArgs

); virtual;

Parameters

e

A CancelEventArgs that contains the event data.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Frame.OnBeforeOpen Method

Frame.OnBeforeOpen Method

Raised before a child grid is displayed.

[Visual Basic]

Overridable Protected Sub OnBeforeOpen( _

ByVal e As CancelEventArgs _

)

[C#]

virtual protected void OnBeforeOpen(

CancelEventArgs e

);

[Delphi]

strict protected procedure OnBeforeOpen(

e: CancelEventArgs

); virtual;

Parameters

e

A CancelEventArgs that contains the event data.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Frame.OnBeforeRowColChange Method

Frame.OnBeforeRowColChange Method

Raised before a row or column currency is changed.

[Visual Basic]

Overridable Protected Sub OnBeforeRowColChange( _

ByVal e As CancelEventArgs _

)

[C#]

virtual protected void OnBeforeRowColChange(

CancelEventArgs e

);

[Delphi]

strict protected procedure OnBeforeRowColChange(

e: CancelEventArgs

); virtual;

Parameters

e

A CancelEventArgs that contains the event data.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Frame.OnBeforeUpdate Method

Frame.OnBeforeUpdate Method

Raised before a row is updated.

[Visual Basic]

Overridable Protected Sub OnBeforeUpdate( _

ByVal e As CancelEventArgs _

)

[C#]

virtual protected void OnBeforeUpdate(

CancelEventArgs e

);

[Delphi]

strict protected procedure OnBeforeUpdate(

e: CancelEventArgs

); virtual;

Parameters

e

A CancelEventArgs that contains the event data.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Frame.OnBindingContextChanged Method

Frame.OnBindingContextChanged Method

Raised when the Binding Context changes.

[Visual Basic]

Overrides Protected Sub OnBindingContextChanged( _

ByVal e As EventArgs _

)

[C#]

override protected void OnBindingContextChanged(

EventArgs e

);

[Delphi]

strict protected procedure OnBindingContextChanged(

e: EventArgs

); override;

Parameters

e

A System.EventArgs that contains the event data.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Frame.OnButtonClick Method

Frame.OnButtonClick Method

Raised when a button in a cell has been clicked.

[Visual Basic]

Overridable Protected Sub OnButtonClick( _

ByVal e As ColEventArgs _

)

[C#]

virtual protected void OnButtonClick(

ColEventArgs e

);

[Delphi]

strict protected procedure OnButtonClick(

e: ColEventArgs

); virtual;

Parameters

e

A ColEventArgs that contains the event data.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Frame.OnChange Method

Frame.OnChange Method

Raised when the grids cell content has been modified.

[Visual Basic]

Overridable Protected Sub OnChange( _

ByVal e As EventArgs _

)

[C#]

virtual protected void OnChange(

EventArgs e

);

[Delphi]

strict protected procedure OnChange(

e: EventArgs

); virtual;

Parameters

e

A System.EventArgs that contains the event data.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Frame.OnClick Method

Frame.OnClick Method

Inherited from Control.

[Visual Basic]

Overrides Protected Sub OnClick( _

ByVal e As EventArgs _

)

[C#]

override protected void OnClick(

EventArgs e

);

[Delphi]

strict protected procedure OnClick(

e: EventArgs

); override;

Parameters

e

A System.EventArgs that contains the event data.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Frame.OnColEdit Method

Frame.OnColEdit Method

Raised when a column has been edited.

[Visual Basic]

Overridable Protected Sub OnColEdit( _

ByVal e As ColEventArgs _

)

[C#]

virtual protected void OnColEdit(

ColEventArgs e

);

[Delphi]

strict protected procedure OnColEdit(

e: ColEventArgs

); virtual;

Parameters

e

A ColEventArgs that contains the event data.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Frame.OnCollapse Method

Frame.OnCollapse Method

Raised when a band is collasped in a hierarchical grid.

[Visual Basic]

Overridable Protected Sub OnCollapse( _

ByVal e As BandEventArgs _

)

[C#]

virtual protected void OnCollapse(

BandEventArgs e

);

[Delphi]

strict protected procedure OnCollapse(

e: BandEventArgs

); virtual;

Parameters

e

A BandEventArgs that contains the event data.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Frame.OnColMove Method

Frame.OnColMove Method

Raised when a column is dragged.

[Visual Basic]

Overridable Protected Sub OnColMove( _

ByVal e As ColMoveEventArgs _

)

[C#]

virtual protected void OnColMove(

ColMoveEventArgs e

);

[Delphi]

strict protected procedure OnColMove(

e: ColMoveEventArgs

); virtual;

Parameters

e

A ColMoveEventArgs that contains the event data.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Frame.OnColResize Method

Frame.OnColResize Method

Raised when a column has been resized.

[Visual Basic]

Overridable Protected Sub OnColResize( _

ByVal e As ColResizeEventArgs _

)

[C#]

virtual protected void OnColResize(

ColResizeEventArgs e

);

[Delphi]

strict protected procedure OnColResize(

e: ColResizeEventArgs

); virtual;

Parameters

e

A ColResizeEventArgs that contains the event data.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Frame.OnComboSelect Method

Frame.OnComboSelect Method

Raised when a value in the combobox has been selected.

[Visual Basic]

Overridable Protected Sub OnComboSelect( _

ByVal e As ColEventArgs _

)

[C#]

virtual protected void OnComboSelect(

ColEventArgs e

);

[Delphi]

strict protected procedure OnComboSelect(

e: ColEventArgs

); virtual;

Parameters

e

A ColEventArgs that contains the event data.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Frame.OnCursorChanged Method

Frame.OnCursorChanged Method

Inherited from Control.

[Visual Basic]

Overrides Protected Sub OnCursorChanged( _

ByVal e As EventArgs _

)

[C#]

override protected void OnCursorChanged(

EventArgs e

);

[Delphi]

strict protected procedure OnCursorChanged(

e: EventArgs

); override;

Parameters

e

A System.EventArgs that contains the event data.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Frame.OnDataSourceChanged Method

Frame.OnDataSourceChanged Method

Raised when the datasource is changed.

[Visual Basic]

Overridable Protected Sub OnDataSourceChanged( _

ByVal e As EventArgs _

)

[C#]

virtual protected void OnDataSourceChanged(

EventArgs e

);

[Delphi]

strict protected procedure OnDataSourceChanged(

e: EventArgs

); virtual;

Parameters

e

A System.EventArgs that contains the event data.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Frame.OnDoubleClick Method

Frame.OnDoubleClick Method

Inherited from Control.

[Visual Basic]

Overrides Protected Sub OnDoubleClick( _

ByVal e As EventArgs _

)

[C#]

override protected void OnDoubleClick(

EventArgs e

);

[Delphi]

strict protected procedure OnDoubleClick(

e: EventArgs

); override;

Parameters

e

A System.EventArgs that contains the event data.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Frame.OnEnter Method

Frame.OnEnter Method

Inherited from Control.

[Visual Basic]

Overrides Protected Sub OnEnter( _

ByVal e As EventArgs _

)

[C#]

override protected void OnEnter(

EventArgs e

);

[Delphi]

strict protected procedure OnEnter(

e: EventArgs

); override;

Parameters

e

A System.EventArgs that contains the event data.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Frame.OnError Method

Frame.OnError Method

Raised when the grid encounters an error through the UI.

[Visual Basic]

Overridable Protected Sub OnError( _

ByVal e As ErrorEventArgs _

)

[C#]

virtual protected void OnError(

ErrorEventArgs e

);

[Delphi]

strict protected procedure OnError(

e: ErrorEventArgs

); virtual;

Parameters

e

A ErrorEventArgs that contains the event data.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Frame.OnExpand Method

Frame.OnExpand Method

Raised when a band is expanded in a hierarchical grid.

[Visual Basic]

Overridable Protected Sub OnExpand( _

ByVal e As BandEventArgs _

)

[C#]

virtual protected void OnExpand(

BandEventArgs e

);

[Delphi]

strict protected procedure OnExpand(

e: BandEventArgs

); virtual;

Parameters

e

A BandEventArgs that contains the event data.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Frame.OnFetchCellStyle Method

Frame.OnFetchCellStyle Method

Raised when a custom style is to be used for rendering a cell.

[Visual Basic]

Overridable Protected Sub OnFetchCellStyle( _

ByVal e As FetchCellStyleEventArgs _

)

[C#]

virtual protected void OnFetchCellStyle(

FetchCellStyleEventArgs e

);

[Delphi]

strict protected procedure OnFetchCellStyle(

e: FetchCellStyleEventArgs

); virtual;

Parameters

e

A FetchCellStyleEventArgs that contains the event data.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Frame.OnFetchCellTips Method

Frame.OnFetchCellTips Method

Raised when a cell tip is to be displayed.

[Visual Basic]

Overridable Protected Sub OnFetchCellTips( _

ByVal e As FetchCellTipsEventArgs _

)

[C#]

virtual protected void OnFetchCellTips(

FetchCellTipsEventArgs e

);

[Delphi]

strict protected procedure OnFetchCellTips(

e: FetchCellTipsEventArgs

); virtual;

Parameters

e

A FetchCellTipsEventArgs that contains the event data.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Frame.OnFetchGroupCellStyle Method

Frame.OnFetchGroupCellStyle Method

Raised when a custom style is to be used for renderind a grouped cell.

[Visual Basic]

Overridable Protected Sub OnFetchGroupCellStyle( _

ByVal e As FetchCellStyleEventArgs _

)

[C#]

virtual protected void OnFetchGroupCellStyle(

FetchCellStyleEventArgs e

);

[Delphi]

strict protected procedure OnFetchGroupCellStyle(

e: FetchCellStyleEventArgs

); virtual;

Parameters

e

A FetchCellStyleEventArgs that contains the event data.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Frame.OnFetchRowStyle Method

Frame.OnFetchRowStyle Method

Raised when a custom style is to be used for a row.

[Visual Basic]

Overridable Protected Sub OnFetchRowStyle( _

ByVal e As FetchRowStyleEventArgs _

)

[C#]

virtual protected void OnFetchRowStyle(

FetchRowStyleEventArgs e

);

[Delphi]

strict protected procedure OnFetchRowStyle(

e: FetchRowStyleEventArgs

); virtual;

Parameters

e

A FetchRowStyleEventArgs that contains the event data.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Frame.OnFetchScrollTips Method

Frame.OnFetchScrollTips Method

Raised when scroll tips are to be displayed.

[Visual Basic]

Overridable Protected Sub OnFetchScrollTips( _

ByVal e As FetchScrollTipsEventArgs _

)

[C#]

virtual protected void OnFetchScrollTips(

FetchScrollTipsEventArgs e

);

[Delphi]

strict protected procedure OnFetchScrollTips(

e: FetchScrollTipsEventArgs

); virtual;

Parameters

e

A FetchScrollTipsEventArgs that contains the event data.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Frame.OnFilter Method

Frame.OnFilter Method

Raised when AllowFilter is False.

[Visual Basic]

Overridable Protected Sub OnFilter( _

ByVal e As FilterEventArgs _

)

[C#]

virtual protected void OnFilter(

FilterEventArgs e

);

[Delphi]

strict protected procedure OnFilter(

e: FilterEventArgs

); virtual;

Parameters

e

A FilterEventArgs that contains the event data.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Frame.OnFilterButtonClick Method

Frame.OnFilterButtonClick Method

Raised when a button in the filter bar is clicked.

[Visual Basic]

Overridable Protected Sub OnFilterButtonClick( _

ByVal e As ColEventArgs _

)

[C#]

virtual protected void OnFilterButtonClick(

ColEventArgs e

);

[Delphi]

strict protected procedure OnFilterButtonClick(

e: ColEventArgs

); virtual;

Parameters

e

A ColEventArgs that contains the event data.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Frame.OnFilterChange Method

Frame.OnFilterChange Method

Raised when a filter condition has changed.

[Visual Basic]

Overridable Protected Sub OnFilterChange( _

ByVal e As EventArgs _

)

[C#]

virtual protected void OnFilterChange(

EventArgs e

);

[Delphi]

strict protected procedure OnFilterChange(

e: EventArgs

); virtual;

Parameters

e

A System.EventArgs that contains the event data.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Frame.OnFirstRowChange Method

Frame.OnFirstRowChange Method

Raised when the top row has changed.

[Visual Basic]

Overridable Protected Sub OnFirstRowChange( _

ByVal e As SplitEventArgs _

)

[C#]

virtual protected void OnFirstRowChange(

SplitEventArgs e

);

[Delphi]

strict protected procedure OnFirstRowChange(

e: SplitEventArgs

); virtual;

Parameters

e

A SplitEventArgs that contains the event data.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Frame.OnFontChanged Method

Frame.OnFontChanged Method

Inherited from Control.

[Visual Basic]

Overrides Protected Sub OnFontChanged( _

ByVal e As EventArgs _

)

[C#]

override protected void OnFontChanged(

EventArgs e

);

[Delphi]

strict protected procedure OnFontChanged(

e: EventArgs

); override;

Parameters

e

A System.EventArgs that contains the event data.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Frame.OnFootClick Method

Frame.OnFootClick Method

Raised when a column footer has been clicked.

[Visual Basic]

Overridable Protected Sub OnFootClick( _

ByVal e As ColEventArgs _

)

[C#]

virtual protected void OnFootClick(

ColEventArgs e

);

[Delphi]

strict protected procedure OnFootClick(

e: ColEventArgs

); virtual;

Parameters

e

A ColEventArgs that contains the event data.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Frame.OnFormatText Method

Frame.OnFormatText Method

Raised when a cell value needs custom formatting.

[Visual Basic]

Overridable Protected Sub OnFormatText( _

ByVal e As FormatTextEventArgs _

)

[C#]

virtual protected void OnFormatText(

FormatTextEventArgs e

);

[Delphi]

strict protected procedure OnFormatText(

e: FormatTextEventArgs

); virtual;

Parameters

e

A FormatTextEventArgs that contains the event data.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Frame.OnGotFocus Method

Frame.OnGotFocus Method

Inherited from Control.

[Visual Basic]

Overrides Protected Sub OnGotFocus( _

ByVal e As EventArgs _

)

[C#]

override protected void OnGotFocus(

EventArgs e

);

[Delphi]

strict protected procedure OnGotFocus(

e: EventArgs

); override;

Parameters

e

A System.EventArgs that contains the event data.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Frame.OnGroupAggregate Method

Frame.OnGroupAggregate Method

Raised when custom aggregates are used for a grouped grid.

[Visual Basic]

Overridable Protected Sub OnGroupAggregate( _

ByVal e As GroupTextEventArgs _

)

[C#]

virtual protected void OnGroupAggregate(

GroupTextEventArgs e

);

[Delphi]

strict protected procedure OnGroupAggregate(

e: GroupTextEventArgs

); virtual;

Parameters

e

A GroupTextEventArgs that contains the event data.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Frame.OnGroupColMove Method

Frame.OnGroupColMove Method

Raised when a grouped column is moved.

[Visual Basic]

Overridable Protected Sub OnGroupColMove( _

ByVal e As GroupColMoveEventArgs _

)

[C#]

virtual protected void OnGroupColMove(

GroupColMoveEventArgs e

);

[Delphi]

strict protected procedure OnGroupColMove(

e: GroupColMoveEventArgs

); virtual;

Parameters

e

A GroupColMoveEventArgs that contains the event data.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Frame.OnGroupHeadClick Method

Frame.OnGroupHeadClick Method

Raised when a column header in the grouping area is clicked.

[Visual Basic]

Overridable Protected Sub OnGroupHeadClick( _

ByVal e As GroupColEventArgs _

)

[C#]

virtual protected void OnGroupHeadClick(

GroupColEventArgs e

);

[Delphi]

strict protected procedure OnGroupHeadClick(

e: GroupColEventArgs

); virtual;

Parameters

e

A GroupColEventArgs that contains the event data.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Frame.OnGroupText Method

Frame.OnGroupText Method

Raised when custom values are to be used for the group text.

[Visual Basic]

Overridable Protected Sub OnGroupText( _

ByVal e As GroupTextEventArgs _

)

[C#]

virtual protected void OnGroupText(

GroupTextEventArgs e

);

[Delphi]

strict protected procedure OnGroupText(

e: GroupTextEventArgs

); virtual;

Parameters

e

A GroupTextEventArgs that contains the event data.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Frame.OnHeadClick Method

Frame.OnHeadClick Method

Raised when a column header has been clicked.

[Visual Basic]

Overridable Protected Sub OnHeadClick( _

ByVal e As ColEventArgs _

)

[C#]

virtual protected void OnHeadClick(

ColEventArgs e

);

[Delphi]

strict protected procedure OnHeadClick(

e: ColEventArgs

); virtual;

Parameters

e

A ColEventArgs that contains the event data.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Frame.OnKeyDown Method

Frame.OnKeyDown Method

Inherited from Control.

[Visual Basic]

Overrides Protected Sub OnKeyDown( _

ByVal e As KeyEventArgs _

)

[C#]

override protected void OnKeyDown(

KeyEventArgs e

);

[Delphi]

strict protected procedure OnKeyDown(

e: KeyEventArgs

); override;

Parameters

e

A System.Windows.Forms.KeyEventArgs that contains the event data.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Frame.OnKeyPress Method

Frame.OnKeyPress Method

Inherited from Control.

[Visual Basic]

Overrides Protected Sub OnKeyPress( _

ByVal e As KeyPressEventArgs _

)

[C#]

override protected void OnKeyPress(

KeyPressEventArgs e

);

[Delphi]

strict protected procedure OnKeyPress(

e: KeyPressEventArgs

); override;

Parameters

e

A System.Windows.Forms.KeyPressEventArgs that contains the event data.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Frame.OnKeyUp Method

Frame.OnKeyUp Method

Inherited from Control.

[Visual Basic]

Overrides Protected Sub OnKeyUp( _

ByVal e As KeyEventArgs _

)

[C#]

override protected void OnKeyUp(

KeyEventArgs e

);

[Delphi]

strict protected procedure OnKeyUp(

e: KeyEventArgs

); override;

Parameters

e

A System.Windows.Forms.KeyEventArgs that contains the event data.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Frame.OnLeave Method

Frame.OnLeave Method

Inherited from Control.

[Visual Basic]

Overrides Protected Sub OnLeave( _

ByVal e As EventArgs _

)

[C#]

override protected void OnLeave(

EventArgs e

);

[Delphi]

strict protected procedure OnLeave(

e: EventArgs

); override;

Parameters

e

A System.EventArgs that contains the event data.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Frame.OnLeftColChange Method

Frame.OnLeftColChange Method

Raised when the left column has changed.

[Visual Basic]

Overridable Protected Sub OnLeftColChange( _

ByVal e As SplitEventArgs _

)

[C#]

virtual protected void OnLeftColChange(

SplitEventArgs e

);

[Delphi]

strict protected procedure OnLeftColChange(

e: SplitEventArgs

); virtual;

Parameters

e

A SplitEventArgs that contains the event data.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Frame.OnLostFocus Method

Frame.OnLostFocus Method

Inherited from Control.

[Visual Basic]

Overrides Protected Sub OnLostFocus( _

ByVal e As EventArgs _

)

[C#]

override protected void OnLostFocus(

EventArgs e

);

[Delphi]

strict protected procedure OnLostFocus(

e: EventArgs

); override;

Parameters

e

A System.EventArgs that contains the event data.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Frame.OnMouseDown Method

Frame.OnMouseDown Method

Inherited from Control.

[Visual Basic]

Overrides Protected Sub OnMouseDown( _

ByVal e As MouseEventArgs _

)

[C#]

override protected void OnMouseDown(

MouseEventArgs e

);

[Delphi]

strict protected procedure OnMouseDown(

e: MouseEventArgs

); override;

Parameters

e

A System.Windows.Forms.MouseEventArgs that contains the event data.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Frame.OnMouseLeave Method

Frame.OnMouseLeave Method

Inherited from Control.

[Visual Basic]

Overrides Protected Sub OnMouseLeave( _

ByVal e As EventArgs _

)

[C#]

override protected void OnMouseLeave(

EventArgs e

);

[Delphi]

strict protected procedure OnMouseLeave(

e: EventArgs

); override;

Parameters

e

A System.EventArgs that contains the event data.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Frame.OnMouseMove Method

Frame.OnMouseMove Method

Inherited from Control.

[Visual Basic]

Overrides Protected Sub OnMouseMove( _

ByVal e As MouseEventArgs _

)

[C#]

override protected void OnMouseMove(

MouseEventArgs e

);

[Delphi]

strict protected procedure OnMouseMove(

e: MouseEventArgs

); override;

Parameters

e

A System.Windows.Forms.MouseEventArgs that contains the event data.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Frame.OnMouseUp Method

Frame.OnMouseUp Method

Inherited from Control.

[Visual Basic]

Overrides Protected Sub OnMouseUp( _

ByVal e As MouseEventArgs _

)

[C#]

override protected void OnMouseUp(

MouseEventArgs e

);

[Delphi]

strict protected procedure OnMouseUp(

e: MouseEventArgs

); override;

Parameters

e

A System.Windows.Forms.MouseEventArgs that contains the event data.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Frame.OnMouseWheel Method

Frame.OnMouseWheel Method

Inherited from Control.

[Visual Basic]

Overrides Protected Sub OnMouseWheel( _

ByVal e As MouseEventArgs _

)

[C#]

override protected void OnMouseWheel(

MouseEventArgs e

);

[Delphi]

strict protected procedure OnMouseWheel(

e: MouseEventArgs

); override;

Parameters

e

A System.Windows.Forms.MouseEventArgs that contains the event data.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Frame.OnOwnerDrawCell Method

Frame.OnOwnerDrawCell Method

Raised when a cell has to be rendered.

[Visual Basic]

Overridable Protected Sub OnOwnerDrawCell( _

ByVal e As OwnerDrawCellEventArgs _

)

[C#]

virtual protected void OnOwnerDrawCell(

OwnerDrawCellEventArgs e

);

[Delphi]

strict protected procedure OnOwnerDrawCell(

e: OwnerDrawCellEventArgs

); virtual;

Parameters

e

An OwnerDrawCellEventArgs that contains the event data.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Frame.OnOwnerDrawCellPrint Method

Frame.OnOwnerDrawCellPrint Method

Raised when a cell has to be printed.

[Visual Basic]

Overridable Protected Sub OnOwnerDrawCellPrint( _

ByVal e As OwnerDrawCellEventArgs _

)

[C#]

virtual protected void OnOwnerDrawCellPrint(

OwnerDrawCellEventArgs e

);

[Delphi]

strict protected procedure OnOwnerDrawCellPrint(

e: OwnerDrawCellEventArgs

); virtual;

Parameters

e

An OwnerDrawCellEventArgs that contains the event data.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Frame.OnOwnerDrawPageFooter Method

Frame.OnOwnerDrawPageFooter Method

Raised when a Page footer needs to be printed.

[Visual Basic]

Overridable Protected Sub OnOwnerDrawPageFooter( _

ByVal e As OwnerDrawPageEventArgs _

)

[C#]

virtual protected void OnOwnerDrawPageFooter(

OwnerDrawPageEventArgs e

);

[Delphi]

strict protected procedure OnOwnerDrawPageFooter(

e: OwnerDrawPageEventArgs

); virtual;

Parameters

e

A System.EventArgs that contains the event data.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Frame.OnOwnerDrawPageHeader Method

Frame.OnOwnerDrawPageHeader Method

Raised when Page header needs to be printed.

[Visual Basic]

Overridable Protected Sub OnOwnerDrawPageHeader( _

ByVal e As OwnerDrawPageEventArgs _

)

[C#]

virtual protected void OnOwnerDrawPageHeader(

OwnerDrawPageEventArgs e

);

[Delphi]

strict protected procedure OnOwnerDrawPageHeader(

e: OwnerDrawPageEventArgs

); virtual;

Parameters

e

An OwnerDrawPageEventArgs that contains the event data.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Frame.OnPaint Method

Frame.OnPaint Method

Inherited from Control.

[Visual Basic]

Overrides Protected Sub OnPaint( _

ByVal e As PaintEventArgs _

)

[C#]

override protected void OnPaint(

PaintEventArgs e

);

[Delphi]

strict protected procedure OnPaint(

e: PaintEventArgs

); override;

Parameters

e

A System.Windows.Forms.PaintEventArgs that contains the event data.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Frame.OnQueryContinueDrag Method

Frame.OnQueryContinueDrag Method

Inherited from Control.

[Visual Basic]

Overrides Protected Sub OnQueryContinueDrag( _

ByVal e As QueryContinueDragEventArgs _

)

[C#]

override protected void OnQueryContinueDrag(

QueryContinueDragEventArgs e

);

[Delphi]

strict protected procedure OnQueryContinueDrag(

e: QueryContinueDragEventArgs

); override;

Parameters

e

A System.Windows.Forms.QueryContinueDragEventArgs that contains the event data.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Frame.OnResize Method

Frame.OnResize Method

Inherited from Control.

[Visual Basic]

Overrides Protected Sub OnResize( _

ByVal e As EventArgs _

)

[C#]

override protected void OnResize(

EventArgs e

);

[Delphi]

strict protected procedure OnResize(

e: EventArgs

); override;

Parameters

e

A System.EventArgs that contains the event data.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Frame.OnRightToLeftChanged Method

Frame.OnRightToLeftChanged Method

Inherited from Control.

[Visual Basic]

Overrides Protected Sub OnRightToLeftChanged( _

ByVal e As EventArgs _

)

[C#]

override protected void OnRightToLeftChanged(

EventArgs e

);

[Delphi]

strict protected procedure OnRightToLeftChanged(

e: EventArgs

); override;

Parameters

e

A System.EventArgs that contains the event data.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Frame.OnRowColChange Method

Frame.OnRowColChange Method

Raised after a row or column currency has been changed.

[Visual Basic]

Overridable Protected Sub OnRowColChange( _

ByVal e As RowColChangeEventArgs _

)

[C#]

virtual protected void OnRowColChange(

RowColChangeEventArgs e

);

[Delphi]

strict protected procedure OnRowColChange(

e: RowColChangeEventArgs

); virtual;

Parameters

e

A RowColChangeEventArgs that contains the event data.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Frame.OnRowResize Method

Frame.OnRowResize Method

Raised before a row is resized.

[Visual Basic]

Overridable Protected Sub OnRowResize( _

ByVal e As CancelEventArgs _

)

[C#]

virtual protected void OnRowResize(

CancelEventArgs e

);

[Delphi]

strict protected procedure OnRowResize(

e: CancelEventArgs

); virtual;

Parameters

e

A CancelEventArgs that contains the event data.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Frame.OnSelChange Method

Frame.OnSelChange Method

Raised when a selection has changed.

[Visual Basic]

Overridable Protected Sub OnSelChange( _

ByVal e As CancelEventArgs _

)

[C#]

virtual protected void OnSelChange(

CancelEventArgs e

);

[Delphi]

strict protected procedure OnSelChange(

e: CancelEventArgs

); virtual;

Parameters

e

A CancelEventArgs that contains the event data.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Frame.OnSizeChanged Method

Frame.OnSizeChanged Method

Inherited from Control.

[Visual Basic]

Overrides Protected Sub OnSizeChanged( _

ByVal e As EventArgs _

)

[C#]

override protected void OnSizeChanged(

EventArgs e

);

[Delphi]

strict protected procedure OnSizeChanged(

e: EventArgs

); override;

Parameters

e

A System.EventArgs that contains the event data.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Frame.OnSort Method

Frame.OnSort Method

Raised when the datasource is sorted by clicking the column header.

[Visual Basic]

Overridable Protected Sub OnSort( _

ByVal e As FilterEventArgs _

)

[C#]

virtual protected void OnSort(

FilterEventArgs e

);

[Delphi]

strict protected procedure OnSort(

e: FilterEventArgs

); virtual;

Parameters

e

A FilterEventArgs that contains the event data.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Frame.OnSplitChange Method

Frame.OnSplitChange Method

Raised when split currency has changed.

[Visual Basic]

Overridable Protected Sub OnSplitChange( _

ByVal e As EventArgs _

)

[C#]

virtual protected void OnSplitChange(

EventArgs e

);

[Delphi]

strict protected procedure OnSplitChange(

e: EventArgs

); virtual;

Parameters

e

A System.EventArgs that contains the event data.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Frame.OnUnboundColumnFetch Method

Frame.OnUnboundColumnFetch Method

Raised to fetch data for an unbound column.

[Visual Basic]

Overridable Protected Sub OnUnboundColumnFetch( _

ByVal e As UnboundColumnFetchEventArgs _

)

[C#]

virtual protected void OnUnboundColumnFetch(

UnboundColumnFetchEventArgs e

);

[Delphi]

strict protected procedure OnUnboundColumnFetch(

e: UnboundColumnFetchEventArgs

); virtual;

Parameters

e

An UnboundColumnFetchEventArgs that contains the event data.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Frame.OnValidating Method

Frame.OnValidating Method

Inherited from Control.

[Visual Basic]

Overrides Protected Sub OnValidating( _

ByVal e As CancelEventArgs _

)

[C#]

override protected void OnValidating(

CancelEventArgs e

);

[Delphi]

strict protected procedure OnValidating(

e: CancelEventArgs

); override;

Parameters

e

A System.ComponentModel.CancelEventArgs that contains the event data.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Frame.OnValueItemError Method

Frame.OnValueItemError Method

Raised when a value item is selected that's not in the ValueItems collection.

[Visual Basic]

Overridable Protected Sub OnValueItemError( _

ByVal e As ColEventArgs _

)

[C#]

virtual protected void OnValueItemError(

ColEventArgs e

);

[Delphi]

strict protected procedure OnValueItemError(

e: ColEventArgs

); virtual;

Parameters

e

A ColEventArgs that contains the event data.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Frame.OnVisibleChanged Method

Frame.OnVisibleChanged Method

Inherited from Control.

[Visual Basic]

Overrides Protected Sub OnVisibleChanged( _

ByVal e As EventArgs _

)

[C#]

override protected void OnVisibleChanged(

EventArgs e

);

[Delphi]

strict protected procedure OnVisibleChanged(

e: EventArgs

); override;

Parameters

e

An System.EventArgs that contains the event data.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Frame.SetDataBinding Method

Frame.SetDataBinding Method

Overload List

Binds the grid at runtime.

[Visual Basic] Overloads Public Sub SetDataBinding(Object, String)

[C#] public void SetDataBinding(object, string);

[Delphi] public procedure SetDataBinding(Object; String); overload;

Binds the grid at runtime.

[Visual Basic] Overloads Public Sub SetDataBinding(Object, String, Boolean)

[C#] public void SetDataBinding(object, string, bool);

[Delphi] public procedure SetDataBinding(Object; String; Boolean); overload;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Frame.SetDataBinding Method (Object, String)

Frame.SetDataBinding Method (Object, String)

Previous Next

Binds the grid at runtime.

[Visual Basic]

Overloads Public Sub SetDataBinding( _

ByVal dataSource As Object, _

ByVal dataMember As String _

)

[C#]

public void SetDataBinding(

object dataSource,

string dataMember

);

[Delphi]

public procedure SetDataBinding(

dataSource: Object;

dataMember: String

); overload;

Parameters

dataSource

Source of the data.

dataMember

The table to bind to within the object returned by the DataSource property.

Remarks

The call to SetDataBinding(object dataSource, string dataMember) assumes False for the holdFields arguments.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Frame.SetDataBinding Method (Object, String, Boolean)

Frame.SetDataBinding Method (Object, String, Boolean)

Previous Next

Binds the grid at runtime.

[Visual Basic]

Overloads Public Sub SetDataBinding( _

ByVal dataSource As Object, _

ByVal dataMember As String, _

ByVal holdFields As Boolean _

)

[C#]

public void SetDataBinding(

object dataSource,

string dataMember,

bool holdFields

);

[Delphi]

public procedure SetDataBinding(

dataSource: Object;

dataMember: String;

holdFields: Boolean

); overload;

Parameters

dataSource

Source of the data.

dataMember

The table to bind to within the object returned by the DataSource property.

holdFields

True to preserve design time layout.

Remarks

The call to SetDataBinding(object dataSource, string dataMember) assumes False for the holdFields arguments.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Frame.SetDataSource Method

Frame.SetDataSource Method

Called when the datasource changes.

[Visual Basic]

Overridable Protected Sub SetDataSource( _

ByVal datasource As Object, _

ByVal newDisplayMember As BindingMemberInfo, _

ByVal force As Boolean _

)

[C#]

virtual protected void SetDataSource(

object datasource,

BindingMemberInfo newDisplayMember,

bool force

);

[Delphi]

strict protected procedure SetDataSource(

datasource: Object;

newDisplayMember: BindingMemberInfo;

force: Boolean

); virtual;

Parameters

datasource

The new datasource.

newDisplayMember

The new datamember.

force

True to force a new binding.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


View Class

View Class

Base class for splits.

For a list of all members of this type, see View Members.

System.Object

C1.Win.C1TrueDBGrid.BaseGrid.View

C1.Win.C1TrueDBGrid.Split

[Visual Basic]

Public Class View

Implements ca, IDisposable

[C#]

public class View : ca, IDisposable

[Delphi]

type View = class (TObject,(TObject, ca, IDisposable);

Namespace: C1.Win.C1TrueDBGrid.BaseGrid

Assembly: C1.Win.C1TrueDBGrid.2 (in C1.Win.C1TrueDBGrid.2.dll)

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


View Members

View Members

View overview

Public Properties

BorderStyle

Controls the appearance of the border rendered for a split.

Public Methods

Dispose | Overloaded. Releases the resources used by the view.
ToString | Overriden. Returns the string that represents the current object.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


View Properties

View Properties

The properties of the View class are listed here. For a complete list of View class members, see the View Members topic.

Public Properties

BorderStyle

Controls the appearance of the border rendered for a split.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


View.BorderStyle Property

View.BorderStyle Property

Controls the appearance of the border rendered for a split.

[Visual Basic]

Public Property BorderStyle As Border3DStyle

[C#]

public Border3DStyle BorderStyle {get;set;}

[Delphi]

public property BorderStyle: Border3DStyle read get_BorderStyle write set_BorderStyle;

Remarks

Note: This is a split specific property. It only affects the borders for the given split. To get specific types of appearances for the split borders you need to examine the borders of adjacent splits. For example, the 3D look is created by setting the BorderStyle = Border3DStyle.Sunken.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


View Methods

View Methods

The methods of the View class are listed here. For a complete list of View class members, see the View Members topic.

Public Methods

Dispose | Overloaded. Releases the resources used by the view.
ToString | Overriden. Returns the string that represents the current object.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


View.Dispose Method

View.Dispose Method

Overload List

Releases the resources used by the view.

[Visual Basic] Overloads Overridable Public Sub Dispose() Implements IDisposable.Dispose

[C#] virtual public void Dispose();

[Delphi] public procedure Dispose(); overload; virtual;

Releases the resources used by the view.

[Visual Basic] Overloads Overridable Public Sub Dispose(Boolean)

[C#] virtual public void Dispose(bool);

[Delphi] public procedure Dispose(Boolean); overload; virtual;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


View.Dispose Method ()

View.Dispose Method ()

Previous Next

Releases the resources used by the view.

[Visual Basic]

Overloads Overridable Public Sub Dispose() Implements IDisposable.Dispose

[C#]

virtual public void Dispose()

[Delphi]

public procedure Dispose(); overload; virtual;

Implements

IDisposable.Dispose

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


View.Dispose Method (Boolean)

View.Dispose Method (Boolean)

Previous Next

Releases the resources used by the view.

[Visual Basic]

Overloads Overridable Public Sub Dispose( _

ByVal disposing As Boolean _

)

[C#]

virtual public void Dispose(

bool disposing

);

[Delphi]

public procedure Dispose(

disposing: Boolean

); overload; virtual;

Parameters

disposing

True to cleanup.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


View.ToString Method

View.ToString Method

Returns the string that represents the current object.

[Visual Basic]

Overrides Public Function ToString() As String

[C#]

override public string ToString()

[Delphi]

public function ToString(): String; override;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ViewRow Class

ViewRow Class

Represents a row in a split.

For a list of all members of this type, see ViewRow Members.

System.Object

C1.Win.C1TrueDBGrid.BaseGrid.ViewRow

C1.Win.C1TrueDBGrid.GroupRow

[Visual Basic]

Public Class ViewRow

[C#]

public class ViewRow

[Delphi]

type ViewRow = class;

Namespace: C1.Win.C1TrueDBGrid.BaseGrid

Assembly: C1.Win.C1TrueDBGrid.2 (in C1.Win.C1TrueDBGrid.2.dll)

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ViewRow Members

ViewRow Members

ViewRow overview

Public Properties

Height | Gets or sets the height of a row.
RowType | Gets the type of row.
Visible | Gets or sets the visiblity of a row.
Width | Gets or sets the width of a row.

Public Methods

AutoSize

Adjust the size of the row to fully display cell data.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ViewRow Properties

ViewRow Properties

The properties of the ViewRow class are listed here. For a complete list of ViewRow class members, see the ViewRow Members topic.

Public Properties

Height | Gets or sets the height of a row.
RowType | Gets the type of row.
Visible | Gets or sets the visiblity of a row.
Width | Gets or sets the width of a row.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ViewRow.Height Property

ViewRow.Height Property

Gets or sets the height of a row.

[Visual Basic]

Public Property Height As Integer

[C#]

public int Height {get;set;}

[Delphi]

public property Height: Int32 read get_Height write set_Height;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ViewRow.RowType Property

ViewRow.RowType Property

Gets the type of row.

[Visual Basic]

Overridable Public ReadOnly Property RowType As RowTypeEnum

[C#]

virtual public RowTypeEnum RowType {get;}

[Delphi]

public property RowType: RowTypeEnum read get_RowType;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ViewRow.Visible Property

ViewRow.Visible Property

Gets or sets the visiblity of a row.

[Visual Basic]

Public Property Visible As Boolean

[C#]

public bool Visible {get;set;}

[Delphi]

public property Visible: Boolean read get_Visible write set_Visible;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ViewRow.Width Property

ViewRow.Width Property

Gets or sets the width of a row.

[Visual Basic]

Public Property Width As Integer

[C#]

public int Width {get;set;}

[Delphi]

public property Width: Int32 read get_Width write set_Width;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ViewRow Methods

ViewRow Methods

The methods of the ViewRow class are listed here. For a complete list of ViewRow class members, see the ViewRow Members topic.

Public Methods

AutoSize

Adjust the size of the row to fully display cell data.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ViewRow.AutoSize Method

ViewRow.AutoSize Method

Adjust the size of the row to fully display cell data.

[Visual Basic]

Public Sub AutoSize()

[C#]

public void AutoSize()

[Delphi]

public procedure AutoSize();

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ViewRowList Class

ViewRowList Class

Represents a collection of ViewRow objects.

For a list of all members of this type, see ViewRowList Members.

System.Object

System.Collections.CollectionBase

C1.Win.C1TrueDBGrid.BaseGrid.ViewRowList

[Visual Basic]

Public Class ViewRowList

Inherits CollectionBase

[C#]

public class ViewRowList : CollectionBase

[Delphi]

type ViewRowList = class (CollectionBase);

Namespace: C1.Win.C1TrueDBGrid.BaseGrid

Assembly: C1.Win.C1TrueDBGrid.2 (in C1.Win.C1TrueDBGrid.2.dll)

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ViewRowList Members

ViewRowList Members

ViewRowList overview

Public Properties

Item

Gets or sets the ViewRow at the specified index.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ViewRowList Properties

ViewRowList Properties

The properties of the ViewRowList class are listed here. For a complete list of ViewRowList class members, see the ViewRowList Members topic.

Public Properties

Item

Gets or sets the ViewRow at the specified index.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ViewRowList.Item Property

ViewRowList.Item Property

Gets or sets the ViewRow at the specified index.

[Visual Basic]

Public Default Property Item( _

ByVal index As Integer _

) As ViewRow

[C#]

public ViewRow this[

int index

] {get;set;}

[Delphi]

public property Item[

index: Int32

]: ViewRow read get_Item write set_Item;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1.Win.C1TrueDBGrid.Util Namespace

C1.Win.C1TrueDBGrid.Util Namespace

C1.Win.C1TrueDBGrid.Util Hierarchy

Classes

Class | Description
C1.Win.C1TrueDBGrid.Util.GridLines | Represents the line used for row and column dividers.
GridLinesTypeConverter | TypeConverter for the GridLines object.
HBar | Represents a horizontal scrollbar.
SBar | Base class for the grid's scrollbars
VBar | Represents a vertical scrollbar.

See Also

C1.Win.C1TrueDBGrid.2 Assembly

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1.Win.C1TrueDBGrid.Util.GridLines Class

C1.Win.C1TrueDBGrid.Util.GridLines Class

Represents the line used for row and column dividers.

For a list of all members of this type, see GridLines Members.

System.Object

C1.Win.C1TrueDBGrid.Util.GridLines

[Visual Basic]

Public Class GridLines

[C#]

public class GridLines

[Delphi]

type GridLines = class;

Namespace: C1.Win.C1TrueDBGrid.Util

Assembly: C1.Win.C1TrueDBGrid.2 (in C1.Win.C1TrueDBGrid.2.dll)

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1.Win.C1TrueDBGrid.Util.GridLines Members

C1.Win.C1TrueDBGrid.Util.GridLines Members

GridLines overview

Public Constructors

C1.Win.C1TrueDBGrid.Util.GridLines Constructor

Creates a new instance of this object.

Public Properties

Color | Gets or sets the color of lines used for row and column dividers.
Style | Gets or sets the style of lines used for row and column dividers.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1.Win.C1TrueDBGrid.Util.GridLines Constructor

C1.Win.C1TrueDBGrid.Util.GridLines Constructor

Creates a new instance of this object.

[Visual Basic]

Public Function New()

[C#]

public GridLines()

[Delphi]

public constructor Create(); overload;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1.Win.C1TrueDBGrid.Util.GridLines Properties

C1.Win.C1TrueDBGrid.Util.GridLines Properties

The properties of the GridLines class are listed here. For a complete list of GridLines class members, see the C1.Win.C1TrueDBGrid.Util.GridLines Members topic.

Public Properties

Color | Gets or sets the color of lines used for row and column dividers.
Style | Gets or sets the style of lines used for row and column dividers.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1.Win.C1TrueDBGrid.Util.GridLines.Color Property

C1.Win.C1TrueDBGrid.Util.GridLines.Color Property

Gets or sets the color of lines used for row and column dividers.

[Visual Basic]

Public Property Color As Color

[C#]

public Color Color {get;set;}

[Delphi]

public property Color: Color read get_Color write set_Color;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1.Win.C1TrueDBGrid.Util.GridLines.Style Property

C1.Win.C1TrueDBGrid.Util.GridLines.Style Property

Gets or sets the style of lines used for row and column dividers.

[Visual Basic]

Public Property Style As LineStyleEnum

[C#]

public LineStyleEnum Style {get;set;}

[Delphi]

public property Style: LineStyleEnum read get_Style write set_Style;

Remarks

One of the GridLines two properties. This sets either the grid’s column or row lines to the style specified by LineStyleEnum.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


GridLinesTypeConverter Class

GridLinesTypeConverter Class

TypeConverter for the GridLines object.

For a list of all members of this type, see GridLinesTypeConverter Members.

System.Object

System.ComponentModel.TypeConverter

System.ComponentModel.ExpandableObjectConverter

C1.Win.C1TrueDBGrid.Util.GridLinesTypeConverter

[Visual Basic]

Public Class GridLinesTypeConverter

Inherits ExpandableObjectConverter

[C#]

public class GridLinesTypeConverter : ExpandableObjectConverter

[Delphi]

type GridLinesTypeConverter = class (ExpandableObjectConverter);

Namespace: C1.Win.C1TrueDBGrid.Util

Assembly: C1.Win.C1TrueDBGrid.2 (in C1.Win.C1TrueDBGrid.2.dll)

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


GridLinesTypeConverter Members

GridLinesTypeConverter Members

GridLinesTypeConverter overview

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


HBar Class

HBar Class

Represents a horizontal scrollbar.

For a list of all members of this type, see HBar Members.

System.Object

C1.Win.C1TrueDBGrid.Util.SBar

C1.Win.C1TrueDBGrid.Util.HBar

[Visual Basic]

Public Class HBar

Inherits SBar

[C#]

public class HBar : SBar

[Delphi]

type HBar = class (SBar);

Namespace: C1.Win.C1TrueDBGrid.Util

Assembly: C1.Win.C1TrueDBGrid.2 (in C1.Win.C1TrueDBGrid.2.dll)

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


HBar Members

HBar Members

HBar overview

Public Constructors

HBar Constructor

Initializes a new instance of the VBar class.

Public Properties

Height | Gets or sets the height of the horizontal scrollbar.
Style (inherited from SBar) | Gets or sets the visibility of the scrollbars.
Visible (inherited from SBar) | Gets or sets a value indicating whether the scrollbar is displayed.

Public Methods

ToString

Overriden. Returns a string the represents the current object.

Protected Methods

OnScroll

Overriden. Overloaded. Occurs when the scroll box has been moved by either a mouse or keyboard action.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


HBar Constructor

HBar Constructor

Initializes a new instance of the VBar class.

[Visual Basic]

Public Function New( _

ByVal owner As View _

)

[C#]

public HBar(

View owner

);

[Delphi]

public constructor Create(

owner: View

);

Parameters

owner

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


HBar Properties

HBar Properties

The properties of the HBar class are listed here. For a complete list of HBar class members, see the HBar Members topic.

Public Properties

Height | Gets or sets the height of the horizontal scrollbar.
Style (inherited from SBar) | Gets or sets the visibility of the scrollbars.
Visible (inherited from SBar) | Gets or sets a value indicating whether the scrollbar is displayed.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


HBar.Height Property

HBar.Height Property

Gets or sets the height of the horizontal scrollbar.

[Visual Basic]

Public Property Height As Integer

[C#]

public int Height {get;set;}

[Delphi]

public property Height: Int32 read get_Height write set_Height;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


HBar Methods

HBar Methods

The methods of the HBar class are listed here. For a complete list of HBar class members, see the HBar Members topic.

Public Methods

ToString

Overriden. Returns a string the represents the current object.

Protected Methods

OnScroll

Overriden. Overloaded. Occurs when the scroll box has been moved by either a mouse or keyboard action.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


HBar.OnScroll Method

HBar.OnScroll Method

Overloaded. Occurs when the scroll box has been moved by either a mouse or keyboard action.

[Visual Basic]

Overrides Protected Sub OnScroll( _

ByVal sender As Object, _

ByVal e As ScrollEventArgs _

)

[C#]

override protected void OnScroll(

object sender,

ScrollEventArgs e

);

[Delphi]

strict protected procedure OnScroll(

sender: Object;

e: ScrollEventArgs

); override;

Parameters

sender

e

A System.Windows.Forms.ScrollEventArgs that contains the event data.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


HBar.ToString Method

HBar.ToString Method

Returns a string that represents the current object.

[Visual Basic]

Overrides Public Function ToString() As String

[C#]

override public string ToString()

[Delphi]

public function ToString(): String; override;

Return Value

A string that represents the current object.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


SBar Class

SBar Class

Base class for the grid's scrollbars

For a list of all members of this type, see SBar Members.

System.Object

C1.Win.C1TrueDBGrid.Util.SBar

C1.Win.C1TrueDBGrid.Util.HBar

C1.Win.C1TrueDBGrid.Util.VBar

[Visual Basic]

Public Class SBar

Implements IDisposable

[C#]

public class SBar : IDisposable

[Delphi]

type SBar = class (TObject, IDisposable);

Namespace: C1.Win.C1TrueDBGrid.Util

Assembly: C1.Win.C1TrueDBGrid.2 (in C1.Win.C1TrueDBGrid.2.dll)

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


SBar Members

SBar Members

SBar overview

Public Constructors

SBar Constructor

Initializes a new instance of the SBar class.

Public Properties

Style | Gets or sets the visibility of the scrollbars.
Visible | Gets or sets a value indicating whether the scrollbar is displayed.

Public Methods

Dispose

Overloaded. Releases the resources used by the class.

Protected Methods

OnScroll

Occurs when the scroll box has been moved by either a mouse or keyboard action.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


SBar Constructor

SBar Constructor

Initializes a new instance of the SBar class.

[Visual Basic]

Public Function New( _

ByVal owner As View, _

ByVal sbar As ScrollBar _

)

[C#]

public SBar(

View owner,

ScrollBar sbar

);

[Delphi]

public constructor Create(

owner: View;

sbar: ScrollBar

);

Parameters

owner

sbar

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


SBar Properties

SBar Properties

The properties of the SBar class are listed here. For a complete list of SBar class members, see the SBar Members topic.

Public Properties

Style | Gets or sets the visibility of the scrollbars.
Visible | Gets or sets a value indicating whether the scrollbar is displayed.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


SBar.Style Property

SBar.Style Property

Gets or sets the visibility of the scrollbars.

[Visual Basic]

Public Property Style As ScrollBarStyleEnum

[C#]

public ScrollBarStyleEnum Style {get;set;}

[Delphi]

public property Style: ScrollBarStyleEnum read get_Style write set_Style;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


SBar.Visible Property

SBar.Visible Property

Gets or sets a value indicating whether the scrollbar is displayed.

[Visual Basic]

Public Property Visible As Boolean

[C#]

public bool Visible {get;set;}

[Delphi]

public property Visible: Boolean read get_Visible write set_Visible;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


SBar Methods

SBar Methods

The methods of the SBar class are listed here. For a complete list of SBar class members, see the SBar Members topic.

Public Methods

Dispose

Overloaded. Releases the resources used by the class.

Protected Methods

OnScroll

Occurs when the scroll box has been moved by either a mouse or keyboard action.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


SBar.Dispose Method

SBar.Dispose Method

Overloaded. Releases the resources used by the class.

[Visual Basic]

Overridable Public Sub Dispose( _

ByVal disposing As Boolean _

)

[C#]

virtual public void Dispose(

bool disposing

);

[Delphi]

public procedure Dispose(

disposing: Boolean

); virtual;

Parameters

disposing

True to cleanup.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


SBar.OnScroll Method

SBar.OnScroll Method

Occurs when the scroll box has been moved by either a mouse or keyboard action.

[Visual Basic]

Overridable Protected Sub OnScroll( _

ByVal sender As Object, _

ByVal e As ScrollEventArgs _

)

[C#]

virtual protected void OnScroll(

object sender,

ScrollEventArgs e

);

[Delphi]

strict protected procedure OnScroll(

sender: Object;

e: ScrollEventArgs

); virtual;

Parameters

sender

e

A System.Windows.Forms.ScrollEventArgs that contains the event data.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


VBar Class

VBar Class

Represents a vertical scrollbar.

For a list of all members of this type, see VBar Members.

System.Object

C1.Win.C1TrueDBGrid.Util.SBar

C1.Win.C1TrueDBGrid.Util.VBar

[Visual Basic]

Public Class VBar

Inherits SBar

[C#]

public class VBar : SBar

[Delphi]

type VBar = class (SBar);

Namespace: C1.Win.C1TrueDBGrid.Util

Assembly: C1.Win.C1TrueDBGrid.2 (in C1.Win.C1TrueDBGrid.2.dll)

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


VBar Members

VBar Members

VBar overview

Public Constructors

VBar Constructor

Initializes a new instance of the VBar class.

Public Properties

Style (inherited from SBar) | Gets or sets the visibility of the scrollbars.
Visible (inherited from SBar) | Gets or sets a value indicating whether the scrollbar is displayed.
Width | Gets or sets the width of the vertical scrollbar.

Public Methods

ToString

Overriden. Returns a string the represents the current object.

Protected Methods

OnScroll

Overriden. Overloaded. Occurs when the scroll box has been moved by either a mouse or keyboard action.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


VBar Constructor

VBar Constructor

Initializes a new instance of the VBar class.

[Visual Basic]

Public Function New( _

ByVal owner As View _

)

[C#]

public VBar(

View owner

);

[Delphi]

public constructor Create(

owner: View

);

Parameters

owner

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


VBar Properties

VBar Properties

The properties of the VBar class are listed here. For a complete list of VBar class members, see the VBar Members topic.

Public Properties

Style (inherited from SBar) | Gets or sets the visibility of the scrollbars.
Visible (inherited from SBar) | Gets or sets a value indicating whether the scrollbar is displayed.
Width | Gets or sets the width of the vertical scrollbar.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


VBar.Width Property

VBar.Width Property

Gets or sets the width of the vertical scrollbar.

[Visual Basic]

Public Property Width As Integer

[C#]

public int Width {get;set;}

[Delphi]

public property Width: Int32 read get_Width write set_Width;

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


VBar Methods

VBar Methods

The methods of the VBar class are listed here. For a complete list of VBar class members, see the VBar Members topic.

Public Methods

ToString

Overriden. Returns a string the represents the current object.

Protected Methods

OnScroll

Overriden. Overloaded. Occurs when the scroll box has been moved by either a mouse or keyboard action.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


VBar.OnScroll Method

VBar.OnScroll Method

Overloaded. Occurs when the scroll box has been moved by either a mouse or keyboard action.

[Visual Basic]

Overrides Protected Sub OnScroll( _

ByVal sender As Object, _

ByVal e As ScrollEventArgs _

)

[C#]

override protected void OnScroll(

object sender,

ScrollEventArgs e

);

[Delphi]

strict protected procedure OnScroll(

sender: Object;

e: ScrollEventArgs

); override;

Parameters

sender

e

A System.Windows.Forms.ScrollEventArgs that contains the event data.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


VBar.ToString Method

VBar.ToString Method

Returns a string that represents the current object.

[Visual Basic]

Overrides Public Function ToString() As String

[C#]

override public string ToString()

[Delphi]

public function ToString(): String; override;

Return Value

A string that represents the current object.

See Also

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


3D vs Flat Display2 - C#

C#

C1.Win.C1trueDBGrid.C1DisplayColumn C ;

for each(C in this.C1trueDBGrid1.Splits[0].DisplayColumns)

{

C.ColumnDivider.Style – LineStyleEnum.Inset ;

}


3D vs Flat Display2 - Delphi

Delphi

var i: Integer;
C: C1TrueDBGrid.C1DisplayColumn;

for i := 0 to Self.C1TrueDBGrid1.Splits[0].DisplayColumns.Count-1 do

begin

C := Self.C1TrueDBGrid1.Splits[0].DisplayColumns[i];

C.ColumnDivider.Style := LineStyleEnum.Inset;

end;


3D vs Flat Display2 - Visual Basic

Visual Basic

Dim C As C1.Win.C1TrueDBGrid.C1DisplayColumn

For Each C In Me.C1TrueDBGrid1.Splits(0).DisplayColumns

C.ColumnDivider.Style = LineStyleEnum.Inset

Next


3D vs Flat Display3 - C#

C#

this.C1trueDBGrid1.Styles["Normal"].BackColor = System.Drawing.Color.Gray ;


3D vs Flat Display3 - Delphi

Delphi

Self.C1TrueDBGrid1.Styles['Normal'].BackColor := System.Drawing.Color.Gray;


3D vs Flat Display3 - Visual Basic

Visual Basic

Me.C1TrueDBGrid1.Styles("Normal").BackColor = System.Drawing.Color.Gray


3D vs Flat Display - C#

C#

this.C1trueDBGrid1.RowDivider.Style = LineStyleEnum.Inset ;


3D vs Flat Display - Delphi

Delphi

Self.C1TrueDBGrid1.RowDivider.Style := LineStyleEnum.Inset;


3D vs Flat Display - Visual Basic

Visual Basic

Me.C1TrueDBGrid1.RowDivider.Style = LineStyleEnum.Inset


Accessing the Values of the Selected Rows in the Grid - C#

C#

int row;

foreach (int row in this.C1TrueDBGrid1.SelectedRows)

{

Debug.WriteLine(this.C1TrueDBGrid1.Columns(0).CellValue(row));

}


Accessing the Values of the Selected Rows in the Grid - C#2

C#

int row;

foreach (int row in this.C1TrueDBGrid1.SelectedRows)

{

Debug.WriteLine(this.C1TrueDBGrid1(row, 0).ToString());

}


Accessing the Values of the Selected Rows in the Grid - C#3

C#

int row;

foreach (int row in this.C1TrueDBGrid1.SelectedRows)

{

Debug.WriteLine(this.C1TrueDBGrid1(row, 0).ToString());

}


Accessing the Values of the Selected Rows in the Grid - Delphi

Delphi

var row: Integer;

for row := 0 to Self.C1TrueDBGrid1.SelectedRows.Count-1 do
begin
Debug.WriteLine(Self.C1TrueDBGrid1.Columns[0].CellValue(row));

end;


Accessing the Values of the Selected Rows in the Grid - Delphi2

Delphi

Var row: Integer;

for row := 0 to Self.C1TrueDBGrid1.SelectedRows.Count-1 do
begin
Debug.WriteLine(Self.C1TrueDBGrid1[row, 0].ToString);

end;


Accessing the Values of the Selected Rows in the Grid - Delphi3

Delphi

Var row: Integer;

for row := 0 to Self.C1TrueDBGrid1.SelectedRows.Count-1 do
begin
Debug.WriteLine(Self.C1TrueDBGrid1[row, 4].ToString);
end;


Accessing the Values of the Selected Rows in the Grid - Visual Basic

Visual Basic

Dim row As Integer

For Each row In Me.C1TrueDBGrid1.SelectedRows

Debug.WriteLine(Me.C1TrueDBGrid1.Columns(0).CellValue(row))

Next


Accessing the Values of the Selected Rows in the Grid - Visual Basic2

Visual Basic

Dim row As Integer

For Each row In Me.C1TrueDBGrid1.SelectedRows

Debug.WriteLine(Me.C1TrueDBGrid1(row, 0).ToString())

Next


Accessing the Values of the Selected Rows in the Grid - Visual Basic3

Visual Basic

Dim row As Integer

For Each row In Me.C1TrueDBGrid1.SelectedRows

Debug.WriteLine(Me.C1TrueDBGrid1(row, 4).ToString())

Next


AddCellStyle Method (C1DisplayColumn) - C#

C#

C1.Win.C1TrueDBGrid.Style S = new C1.Win.C1TrueDBGrid.Style();

S.ForeColor = System.Drawing.Color.Red;

C1TrueDBGrid1.AddCellStyle(C1.Win.C1TrueDBGRid.CellStyleFlag.UpdatedCell, S)


AddCellStyle Method (C1DisplayColumn) - Delphi

Delphi

var S: C1.Win.C1TrueDBGrid.Style;

S := C1.Win.C1TrueDBGrid.Style.Create;

S.ForeColor := System.Drawing.Color.Red;

C1TrueDBGrid1.AddCellStyle(C1.Win.C1TrueDBGRid.CellStyleFlag.UpdatedCell, S);


AddCellStyle Method (C1DisplayColumn) - Visual Basic

Visual Basic

Dim S As New C1.Win.C1TrueDBGrid.Style()

S.ForeColor = System.Drawing.Color.Red

C1TrueDBGrid1.AddCellStyle(C1.Win.C1TrueDBGRid.CellStyleFlag.UpdatedCell, S)


AddCellStyle Method (C1TrueDBDropDown) - C#

C#

C1.Win.C1TrueDBGrid.Style S = new C1.Win.C1TrueDBGrid.Style();

S.ForeColor = System.Drawing.Color.Red;

C1TrueDBGrid1.AddCellStyle(C1.Win.C1TrueDBGRid.CellStyleFlag.UpdatedCell, S);


AddCellStyle Method (C1TrueDBDropDown) - Delphi

Delphi

var S: C1.Win.C1TrueDBGrid.Style;

S := C1.Win.C1TrueDBGrid.Style.Create;

S.ForeColor := System.Drawing.Color.Red;

C1TrueDBGrid1.AddCellStyle(C1.Win.C1TrueDBGrid.CellStyleFlag.UpdatedCell, S);


AddCellStyle Method (C1TrueDBDropDown) - Visual Basic

Visual Basic

Dim S As New C1.Win.C1TrueDBGrid.Style()

S.ForeColor = System.Drawing.Color.Red

C1TrueDBGrid1.AddCellStyle(C1.Win.C1TrueDBGRid.CellStyleFlag.UpdatedCell, S)


AddCellStyle Method (C1TrueDBGrid) - C#

C#

C1.Win.C1TrueDBGrid.Style S = new C1.Win.C1TrueDBGrid.Style();

S.ForeColor = System.Drawing.Color.Red;

C1TrueDBGrid1.AddCellStyle C1.Win.C1TrueDBGRid.CellStyleFlag.UpdatedCell, S;


AddCellStyle Method (C1TrueDBGrid) - Delphi

Delphi

var S: C1.Win.C1TrueDBGrid.Style;

S := C1.Win.C1TrueDBGrid.Style.Create;

S.ForeColor := System.Drawing.Color.Red;

C1TrueDBGrid1.AddCellStyle(C1.Win.C1TrueDBGRid.CellStyleFlag.UpdatedCell, S);


AddCellStyle Method (C1TrueDBGrid) - Visual Basic

Visual Basic

Dim S As New C1.Win.C1TrueDBGrid.Style()

S.ForeColor = System.Drawing.Color.Red

C1TrueDBGrid1.AddCellStyle C1.Win.C1TrueDBGRid.CellStyleFlag.UpdatedCell, S


AddCellStyle Method (Split) - C#

C#

C1.Win.C1TrueDBGrid.Style S = new C1.Win.C1TrueDBGrid.Style();

S.ForeColor = System.Drawing.Color.Red;

C1TrueDBGrid1.AddCellStyle(C1.Win.C1TrueDBGRid.CellStyleFlag.UpdatedCell, S);


AddCellStyle Method (Split) - Delphi

Delphi

var S: C1.Win.C1TrueDBGrid.Style;

S := C1.Win.C1TrueDBGrid.Style.Create;

S.ForeColor := System.Drawing.Color.Red;

C1TrueDBGrid1.AddCellStyle(C1.Win.C1TrueDBGRid.CellStyleFlag.UpdatedCell, S);


AddCellStyle Method (Split) - Visual Basic

Visual Basic

Dim S As New C1.Win.C1TrueDBGrid.Style()

S.ForeColor = System.Drawing.Color.Red

C1TrueDBGrid1.AddCellStyle(C1.Win.C1TrueDBGRid.CellStyleFlag.UpdatedCell, S)


Adding a New Row to C1TrueDBGrid - C#

C#

C1TrueDBGrid1.MoveLast();

C1TrueDBGrid1.Row = C1TrueDBGrid1.Row + 1;

C1TrueDBGrid1.Select();

C1TrueDBGrid1.Columns(0).Text = "New Row";

C1TrueDBGrid1.Columns(1).Text = "New Row";

C1TrueDBGrid1.Columns(2).Text = "New Row";

C1TrueDBGrid1.UpdateData();


Adding a New Row to C1TrueDBGrid - Delphi

Delphi

C1TrueDBGrid1.MoveLast;

C1TrueDBGrid1.Row := C1TrueDBGrid1.Row + 1;

C1TrueDBGrid1.Select;

C1TrueDBGrid1.Columns[0].Text := 'New Row';

C1TrueDBGrid1.Columns[1].Text := 'New Row';

C1TrueDBGrid1.Columns[2].Text := 'New Row';

C1TrueDBGrid1.UpdateData;


Adding a New Row to C1TrueDBGrid - Visual Basic

Visual Basic

C1TrueDBGrid1.MoveLast()

' Move to the Addnew Row

C1TrueDBGrid1.Row = C1TrueDBGrid1.Row + 1

C1TrueDBGrid1.Select()

' Assign values to columns

C1TrueDBGrid1.Columns(0).Text = "New Row"

C1TrueDBGrid1.Columns(1).Text = "New Row"

C1TrueDBGrid1.Columns(2).Text = "New Row"

' Update data to the dataset

C1TrueDBGrid1.UpdateData()


Adding Custom Error Checking to C1TrueDBGrid - C#

C#

CurrencyManager cm;

cm = (CurrencyManager)(this.BindingContext[this.c1TrueDBGrid1.DataSource, this.c1TrueDBGrid1.DataMember]);

dv = (System.Data.DataView[])cm.List;

System.Data.DataRow dr = (System.Data.DataRow)this.c1TrueDBGrid1[this.c1TrueDBGrid1.Row];


Adding Custom Error Checking to C1TrueDBGrid - C#2

C#

private void c1TrueDBGrid1_Error(object sender,

C1.Win.C1TrueDBGrid.ErrorEventArgs e)

{

if (c1TrueDBGrid1.Columns[c1TrueDBGrid1.Col].DataField ==

"CategoryID")

{

e.Handled = true;

MessageBox.Show("Your User Friendly Message");

}

else

{

e.Handled = false;

MessageBox.Show("Enter a string");

}

}


Adding Custom Error Checking to C1TrueDBGrid - Delphi

Delphi

Type TDataViewArray: array of System.Data.DataView;

Var dv: TDataViewArray;
cm: CurrencyManager;
dr: System.Data.DataRow;
cm := CurrencyManager(Self.BindingContext[this.c1TrueDBGrid1.DataSource, this.c1TrueDBGrid1.DataMember]);

dv := TDataViewArray(cm.List);

dr := System.Data.DataRow(this.c1TrueDBGrid1[this.c1TrueDBGrid1.Row]);


Adding Custom Error Checking to C1TrueDBGrid - Delphi2

Delphi

procedure TForm1.c1TrueDBGrid1_Error(sender: object; e:

C1.Win.C1TrueDBGrid.ErrorEventArgs);

begin

if (c1TrueDBGrid1.Columns[c1TrueDBGrid1.Col].DataField = 'CategoryID')

then

begin

e.Handled := true;

MessageBox.Show('Your User Friendly Message');

end

else

begin

e.Handled := false;

MessageBox.Show('Enter a string');

end;

end;


Adding Custom Error Checking to C1TrueDBGrid - Visual Basic

Visual Basic

Private Sub C1TrueDBGrid1_Error(ByVal sender As Object, ByVal e As C1.Win.C1TrueDBGrid.ErrorEventArgs) Handles C1TrueDBGrid1.Error

e.Handled = True

End Sub


Adding Custom Error Checking to C1TrueDBGrid - Visual Basic2

Visual Basic

Private Sub C1TrueDBGrid1_Error(ByVal sender As Object, ByVal e As

C1.Win.C1TrueDBGrid.ErrorEventArgs) Handles C1TrueDBGrid1.Error

If C1TrueDBGrid1.Columns(C1TrueDBGrid1.Col).DataField = "CategoryID" Then

e.Handled = True

MessageBox.Show("Your User Friendly Message")

Else

e.Handled = False

MessageBox.Show("Enter a string")

End If

End Sub


Adding Members2 - C#

C#

// Create a Split object with index 1

C1TrueDBGrid.ValueItem S;

this.TrueDBGrid1.Columns[0].ValueItems.Insert[1, S];


Adding Members2 - Delphi

Delphi

// Create a Split object with index 1

var S: C1TrueDBGrid.ValueItem;

Self.TrueDBGrid1.Columns[0].ValueItems.Insert(1, S);


Adding Members2 - Visual Basic

Visual Basic

' Create a Split object with index 1

Dim S As C1TrueDBGrid.ValueItem

Me.TrueDBGrid1.Columns(0).ValueItems.Insert(1, S)


Adding Members - C#

C#

// Create a ValueItem object

C1TrueDBGrid.ValueItem v = new C1TrueDBGrid.ValueItem();

this.C1TrueDBGrid1.Columns(0).ValueItems.Values.Add(v);


Adding Members - Delphi

Delphi

// Create a ValueItem object

var S: C1TrueDBGrid.ValueItem;

Self.C1TrueDBGrid1.Columns[0].ValueItems.Values.Add(S);


Adding Members - Visual Basic

Visual Basic

' Create a ValueItem object

Dim v As C1TrueDBGrid.ValueItem = new C1TrueDbGrid.ValueItem()

Me.C1TrueDBGrid1.Columns(0).ValueItems.Values.Add(v)


AddRegexCellStyle Method (C1DisplayColumn) - C#

C#

C1.Win.C1TrueDBGrid.Style S = new C1.Win.C1TrueDBGrid.Style();

FontfntFont =new Font(S.Font.Name, S.Font.Size, FontStyle.Bold);

S.Font = fntFont

C1TrueDBGrid1.AddRegexCellStyle(CellStyleFlag.NormalCell, S, "SQL")


AddRegexCellStyle Method (C1DisplayColumn) - Delphi

Delphi

var S: C1.Win.C1TrueDBGrid.Style;
fntFont: Font;

S := C1.Win.C1TrueDBGrid.Style.Create;

fntFont := Font.Create(S.Font.Name, S.Font.Size, FontStyle.Bold);

S.Font := fntFont;

C1TrueDBGrid1.AddRegexCellStyle(CellStyleFlag.NormalCell, S,'SQL');


AddRegexCellStyle Method (C1DisplayColumn) - Visual Basic

Visual Basic

Dim S As New C1.Win.C1TrueDBGrid.Style()

Dim fntFont As New Font(S.Font.Name, S.Font.Size, FontStyle.Bold)
S.Font = fntFont
C1TrueDBGrid1.AddRegexCellStyle(CellStyleFlag.NormalCell, S, "SQL")


AddRegexCellStyle Method (C1TrueDBDropDown) - C#

C#

C1.Win.C1TrueDBGrid.Style S = new C1.Win.C1TrueDBGrid.Style();

Font fntFont = new Font(S.Font.Name, S.Font.Size, FontStyle.Bold);

S.Font = fntFont

C1TrueDBGrid1.AddRegexCellStyle(CellStyleFlag.NormalCell, S, "SQL") ;


AddRegexCellStyle Method (C1TrueDBDropDown) - Delphi

Delphi

var S: C1.Win.C1TrueDBGrid.Style;
fntFont: Font;

S := C1.Win.C1TrueDBGrid.Style.Create;

fntFont := Font.Create(S.Font.Name, S.Font.Size, FontStyle.Bold);

S.Font := fntFont;
C1TrueDBGrid1.AddRegexCellStyle(CellStyleFlag.NormalCell, S,'SQL');


AddRegexCellStyle Method (C1TrueDBDropDown) - Visual Basic

Visual Basic

Dim S As New C1.Win.C1TrueDBGrid.Style()

Dim fntFont As New Font(S.Font.Name, S.Font.Size, FontStyle.Bold)
S.Font = fntFont

C1TrueDBGrid1.AddRegexCellStyle(CellStyleFlag.NormalCell, S, "SQL")


AddRegexCellStyle Method (C1TrueDBGrid) - C#

C#

C1.Win.C1TrueDBGrid.Style S = new C1.Win.C1TrueDBGrid.Style();

Font fntFont = new Font(S.Font.Name, S.Font.Size, FontStyle.Bold);

S.Font = fntFont;

C1TrueDBGrid1.AddRegexCellStyle(CellStyleFlag.NormalCell, S, "SQL");


AddRegexCellStyle Method (C1TrueDBGrid) - Delphi

Delphi

var S: C1.Win.C1TrueDBGrid.Style;

fntFont: Font;

S := C1.Win.C1TrueDBGrid.Style.Create;

fntFont := Font.Create(S.Font.Name, S.Font.Size, FontStyle.Bold);

S.Font := fntFont;
C1TrueDBGrid1.AddRegexCellStyle(CellStyleFlag.NormalCell, S, 'SQL');


AddRegexCellStyle Method (C1TrueDBGrid) - Visual Basic

Visual Basic

Dim S As New C1.Win.C1TrueDBGrid.Style()

Dim fntFont As New Font(S.Font.Name, S.Font.Size, FontStyle.Bold)

S.Font = fntFont

C1TrueDBGrid1.AddRegexCellStyle(CellStyleFlag.NormalCell, S, "SQL")


AddRegexCellStyle Method (Split) - C#

C#

C1.Win.C1TrueDBGrid.Style S = new C1.Win.C1TrueDBGrid.Style();

Font fntFont = new Font(S.Font.Name, S.Font.Size, FontStyle.Bold);

S.Font = fntFont;

C1TrueDBGrid1.AddRegexCellStyle(CellStyleFlag.NormalCell, S, "SQL") ;


AddRegexCellStyle Method (Split) - Delphi

Delphi

var S: C1.Win.C1TrueDBGrid.Style;
fntFont: Font;

S := C1.Win.C1TrueDBGrid.Style.Create;
fntFont := Font.Create(S.Font.Name, S.Font.Size, FontStyle.Bold);

S.Font := fntFont;

C1TrueDBGrid1.AddRegexCellStyle(CellStyleFlag.NormalCell, S,'SQL');


AddRegexCellStyle Method (Split) - Visual Basic

Visual Basic

Dim S As New C1.Win.C1TrueDBGrid.Style()

Dim fntFont As New Font(S.Font.Name, S.Font.Size, FontStyle.Bold)

S.Font = fntFont
C1TrueDBGrid1.AddRegexCellStyle(CellStyleFlag.NormalCell, S, "SQL")


Adjusting the Height of All Grid Rows - C#

C#

this.C1trueDBGrid1.RowHeight = 0;

this.C1trueDBGrid1.RowHeight = 3 * this.C1trueDBGrid1.RowHeight;


Adjusting the Height of All Grid Rows - Delphi

Delphi

Self.C1TrueDBGrid1.RowHeight := 0;

Self.C1TrueDBGrid1.RowHeight := 3 * Me.C1TrueDBGrid1.RowHeight;


Adjusting the Height of All Grid Rows - Visual Basic

Visual Basic

Me.C1TrueDBGrid1.RowHeight = 0

Me.C1TrueDBGrid1.RowHeight = 3 * Me.C1TrueDBGrid1.RowHeight


Anonymous Style Inheritance2- C#

C#

Font myfont;

myfont = new Font (this.C1TrueDBGrid1.Splits[0].Styles["Normal"].Font, FontStyle.Bold);

this.C1TrueDBGrid1.Splits[0].Styles["Normal"].Font = myfont;


Anonymous Style Inheritance2- Delphi

Delphi

var myfont: Font;

myfont := Font.Create(Self.C1TrueDBGrid1.Splits[0].Styles['Normal'].Font, FontStyle.Bold);

Self.C1TrueDBGrid1.Splits[0].Styles['Normal'].Font := myfont;


Anonymous Style Inheritance2- Visual Basic

Visual Basic

Dim myfont As Font

myfont = New Font (Me.C1TrueDBGrid1.Splits(0).Styles("Normal").Font, FontStyle.Bold)

Me.C1TrueDBGrid1.Splits(0).Styles("Normal").Font = myfont


Anonymous Style Inheritance3- C#

C#

Font myfont;

Font myfont1;

Font myfont2;

Font myfont3;

myfont = new Font (this.C1TrueDBGrid1.Splits[0].Styles.Font, FontStyle.Bold);

this.C1TrueDBGrid1.Splits[0].Styles["Normal"].Font = myfont;

myfont1 = new Font (this.C1TrueDBGrid1.Splits[0].CaptionStyle.Font, FontStyle.Bold);

this.C1TrueDBGrid1.Splits[0].CaptionStyle.Font = myfont1;

myfont2 = new Font (this.C1TrueDBGrid1.Splits[0].HeadingStyle.Font, FontStyle.Bold);

this.C1TrueDBGrid1.Splits[0].HeadingStyle.Font = myfont2;

myfont3 = new Font (this.C1TrueDBGrid1.Splits[0].FooterStyle.Font, FontStyle.Bold);

this.C1TrueDBGrid1.Splits[0].FooterStyle.Font = myfont3;


Anonymous Style Inheritance3- Delphi

Delphi

var myfont: Font;
myfont1: Font;
myfont2: Font;
myfont3: Font;

myfont := Font.Create (Self.C1TrueDBGrid1.Splits[0].Styles.Font, FontStyle.Bold);

Self.C1TrueDBGrid1.Splits[0].Styles['Normal'].Font := myfont;

myfont1 := Font.Create(Self.C1TrueDBGrid1.Splits(0).CaptionStyle.Font, FontStyle.Bold);

Self.C1TrueDBGrid1.Splits[0].CaptionStyle.Font := myfont1;

myfont2 := Font.Create(Self.C1TrueDBGrid1.Splits[0].HeadingStyle.Font, FontStyle.Bold);

Self.C1TrueDBGrid1.Splits[0].HeadingStyle.Font := myfont2;

myfont3 := Font.Create(Self.C1TrueDBGrid1.Splits[0].FooterStyle.Font, FontStyle.Bold);

Self.C1TrueDBGrid1.Splits[0].FooterStyle.Font := myfont3;


Anonymous Style Inheritance3- Visual Basic

Visual Basic

Dim myfont As Font

Dim myfont1 As Font

Dim myfont2 As Font

Dim myfont3 As Font

myfont = New Font (Me.C1TrueDBGrid1.Splits(0).Styles.Font, FontStyle.Bold)

Me.C1TrueDBGrid1.Splits(0).Styles("Normal").Font = myfont

myfont1 = New Font (Me.C1TrueDBGrid1.Splits(0).CaptionStyle.Font, FontStyle.Bold)

Me.C1TrueDBGrid1.Splits(0).CaptionStyle.Font = myfont1

myfont2 = New Font (Me.C1TrueDBGrid1.Splits(0).HeadingStyle.Font, FontStyle.Bold)

Me.C1TrueDBGrid1.Splits(0).HeadingStyle.Font = myfont2

myfont3 = New Font (Me.C1TrueDBGrid1.Splits(0).FooterStyle.Font, FontStyle.Bold)

Me.C1TrueDBGrid1.Splits(0).FooterStyle.Font = myfont3


Anonymous Style Inheritance4- C#

C#

Font myfont;

myfont = new Font (this.C1TrueDBGrid1.Splits[0].DisplayColumns[0].Style.Font, FontStyle.Bold);

this.C1TrueDBGrid1.Splits[0].DisplayColumns[0].Style.Font = myfont;


Anonymous Style Inheritance4- Delphi

Delphi

var myfont: Font;

myfont := Font.Create(Self.C1TrueDBGrid1.Splits[0].DisplayColumns[0].Style.Font, FontStyle.Bold);

Self.C1TrueDBGrid1.Splits[0].DisplayColumns[0].Style.Font := myfont;


Anonymous Style Inheritance4- Visual Basic

Visual Basic

Dim myfont As Font

myfont = New Font (Me.C1TrueDBGrid1.Splits(0).DisplayColumns(0).Style.Font, FontStyle.Bold)

Me.C1TrueDBGrid1.Splits(0).DisplayColumns(0).Style.Font = myfont


Anonymous Style Inheritance5- C#

C#

Font myfont;

Font myfont1;

Font myfont2;

myfont = new Font (this.C1TrueDBGrid1.Splits[0].DisplayColumns[0].Style.Font, FontStyle.Bold);

this.C1TrueDBGrid1.Splits[0].DisplayColumns[0].Style.Font = myfont;

myfont1 = new Font (this.C1TrueDBGrid1.Splits[0].DisplayColumns[0].HeadingStyle.Font, FontStyle.Bold);

this.C1TrueDBGrid1.Splits[0].DisplayColumns[0].HeadingStyle.Font = myfont1;

myfont2 = new Font (this.C1TrueDBGrid1.Splits[0].DisplayColumns[0].FooterStyle.Font, FontStyle.Bold);

this.C1TrueDBGrid1.Splits[0].DisplayColumns[0].FooterStyle.Font = myfont2;


Anonymous Style Inheritance5- Delphi

Delphi

var myfont: Font;

myfont1: Font;

myfont2: Font;

myfont := Font.Create(Self.C1TrueDBGrid1.Splits[0].DisplayColumns[0].Style.Font, FontStyle.Bold);

Self.C1TrueDBGrid1.Splits[0].DisplayColumns[0].Style.Font := myfont;

myfont1 := Font.Create(Self.C1TrueDBGrid1.Splits[0].DisplayColumns[0].HeadingStyle.Font, FontStyle.Bold);

Self.C1TrueDBGrid1.Splits[0].DisplayColumns[0].HeadingStyle.Font := myfont1;

myfont2 := Font.Create(Self.C1TrueDBGrid1.Splits[0].DisplayColumns[0].FooterStyle.Font, FontStyle.Bold);

Self.C1TrueDBGrid1.Splits[0].DisplayColumns[0].FooterStyle.Font := myfont2;


Anonymous Style Inheritance5- Visual Basic

Visual Basic

Dim myfont As Font

Dim myfont1 As Font

Dim myfont2 As Font

myfont = New Font (Me.C1TrueDBGrid1.Splits(0).DisplayColumns(0).Style.Font, FontStyle.Bold)

Me.C1TrueDBGrid1.Splits(0).DisplayColumns(0).Style.Font = myfont

myfont1 = New Font (Me.C1TrueDBGrid1.Splits(0).DisplayColumns(0).HeadingStyle.Font, FontStyle.Bold)

Me.C1TrueDBGrid1.Splits(0).DisplayColumns(0).HeadingStyle.Font = myfont1

myfont2 = New Font (Me.C1TrueDBGrid1.Splits(0).DisplayColumns(0).FooterStyle.Font, FontStyle.Bold)

Me.C1TrueDBGrid1.Splits(0).DisplayColumns(0).FooterStyle.Font = myfont2


Anonymous Style Inheritance6- C#

C#

this.C1TrueDBGrid1.Style.BackColor = System.Drawing.Color.Gray;


Anonymous Style Inheritance6- Delphi

Delphi

Self.C1TrueDBGrid1.Style.BackColor := System.Drawing.Color.Gray;


Anonymous Style Inheritance6- Visual Basic

Visual Basic

Me.C1TrueDBGrid1.Style.BackColor = System.Drawing.Color.Gray


Anonymous Style Inheritance7- C#

C#

this.C1TrueDBGrid1.Splits[0].Style.BackColor = System.Drawing.Color.Gray;


Anonymous Style Inheritance7- Delphi

Delphi

Self.C1TrueDBGrid1.Splits(0).Style.BackColor := System.Drawing.Color.Gray;


Anonymous Style Inheritance7- Visual Basic

Visual Basic

Me.C1TrueDBGrid1.Splits(0).Style.BackColor = System.Drawing.Color.Gray


Anonymous Style Inheritance8- C#

C#

this.C1TrueDBGrid1.Splits[0].DisplayColumns[0].Style.BackColor = System.Drawing.Color.Gray;


Anonymous Style Inheritance8- Delphi

Delphi

Self.C1TrueDBGrid1.Splits[0].DisplayColumns[0].Style.BackColor := System.Drawing.Color.Gray;


Anonymous Style Inheritance8- Visual Basic

Visual Basic

Me.C1TrueDBGrid1.Splits(0).DisplayColumns(0).Style.BackColor = System.Drawing.Color.Gray


Anonymous Style Inheritance9- C#

C#

this.C1TrueDBGrid1.Splits[0].DisplayColumns[0].Style.HorizontalAlignment = AlignHorzEnum.Center;


Anonymous Style Inheritance9- Delphi

Delphi

Self.C1TrueDBGrid1.Splits[0].DisplayColumns[0].Style.HorizontalAlignment := AlignHorzEnum.Center;


Anonymous Style Inheritance9- Visual Basic

Visual Basic

Me.C1TrueDBGrid1.Splits(0).DisplayColumns(0).Style.HorizontalAlignment = AlignHorzEnum.Center


Anonymous Style Inheritance10- C#

C#

C1TrueDBGrid1.Splits[0].DisplayColumns[0].HeadingStyle.HorizontalAlignment = AlignHorzEnum.Near;

C1TrueDBGrid1.Splits[0].DisplayColumns[0].FooterStyle.HorizontalAlignment = AlignHorzEnum.Far;

C1TrueDBGrid1.Splits[0].DisplayColumns[0].Style.HorizontalAlignment = AlignHorzEnum.Center;


Anonymous Style Inheritance10- Delphi

Delphi

with Self.C1TrueDBGrid1.Splits[0].DisplayColumns[0] do
begin

HeadingStyle.HorizontalAlignment := AlignHorzEnum.Near;

FooterStyle.HorizontalAlignment := AlignHorzEnum.Far;

Style.HorizontalAlignment := AlignHorzEnum.Center;

end;


Anonymous Style Inheritance10- Visual Basic

Visual Basic

With Me.C1TrueDBGrid1.Splits(0).DisplayColumns(0)

.HeadingStyle.HorizontalAlignment = AlignHorzEnum.Near

.FooterStyle.HorizontalAlignment = AlignHorzEnum.Far

.Style.HorizontalAlignment = AlignHorzEnum.Center

End With


Anonymous Style Inheritance- C#

C#

Font myfont;

myfont = new Font (this.C1TrueDBGrid1.Styles["Normal"].Font, FontStyle.Bold);

this.C1TrueDBGrid1.Styles["Normal"].Font = myfont;


Anonymous Style Inheritance- Delphi

Delphi

var myfont: Font;

myfont := Font.Create(Self.C1TrueDBGrid1.Styles['Normal'].Font, FontStyle.Bold);

Self.C1TrueDBGrid1.Styles['Normal'].Font := myfont;


Anonymous Style Inheritance- Visual Basic

Visual Basic

Dim myfont As Font

myfont = New Font (Me.C1TrueDBGrid1.Styles("Normal").Font, FontStyle.Bold)

Me.C1TrueDBGrid1.Styles("Normal").Font = myfont


Applying Cell Styles by Contents- C#

C#

C1TrueDBGrid.Style S = new C1TrueDBGrid.Style();

Font myfont;

myfont = new Font (S.Font, FontStyle.Bold);

S.Font = myfont;

this.C1TrueDBGrid1.Columns[0].AddRegexCellStyle (CellStyleFlag.AllCells, S, "Windows");


Applying Cell Styles by Contents- Delphi

Delphi

var S: C1TrueDBGrid.Style;

myfont: Font;

S := C1TrueDBGrid.Style.Create;

myfont := Font.Create(S.Font, FontStyle.Bold);

S.Font := myfont;

Self.C1TrueDBGrid1.Columns[0].AddRegexCellStyle(CellStyleFlag.AllCells, S,'Windows');


Applying Cell Styles by Contents- Visual Basic

Visual Basic

Dim S As New C1TrueDBGrid.Style()

Dim myfont As Font

myfont = New Font (S.Font, FontStyle.Bold)

S.Font = myfont

Me.C1TrueDBGrid1.Columns(0).AddRegexCellStyle (CellStyleFlag.AllCells, S, "Windows")


Applying Cell Styles by Custom Criteria2- C#

C#

if ( N > 1000 ) e.CellStyle.Font.Italic = true

Font myfont;

myfont = new Font (e.CellStyle.Font, FontStyle.Italic);

if ( N > 1000 ) e.CellStyle.Font = myfont;


Applying Cell Styles by Custom Criteria2- Delphi

Delphi

If N > 1000 Then
e.CellStyle.Font.Italic := True;

var myfont: Font;

myfont := Font.Create(e.CellStyle.Font, FontStyle.Italic);

if N > 1000 then
e.CellStyle.Font := myfont;


Applying Cell Styles by Custom Criteria2- Visual Basic

Visual Basic

If N > 1000 Then e.CellStyle.Font.Italic = True

Dim myfont As Font
myfont = New Font (e.CellStyle.Font, FontStyle.Italic)
If N > 1000 Then e.CellStyle.Font = myfont


Applying Cell Styles by Custom Criteria3- C#

C#

private void C1TrueDBGrid1_FetchCellStyle( object sender, C1.Win.C1TrueDBGrid.FetchCellStyleEventArgs e)

switch (e.Col) { case 4:

long Col1, long Col2;

Col1 = (long)this.C1TrueDBGrid1[e.Row, 1]; Col2 = (long)this.C1TrueDBGrid1[e.Row, 2]; if ( Col1 - Col2 < 0 ) CellStyle.ForeColor = System.Drawing.Color.Red

break;

case 7:

string S;

S = this.C1TrueDBGrid1[e.Row, 7].ToString(); if ( S == TextBox1.Text ) {

Font myfont = new Font(CellStyle.Font, FontStyle.Bold);

CellStyle.Font = myfont;

}

break;

default:

Console.WriteLine ("FetchCellStyle not handled: " + e.Col);

}

}


Applying Cell Styles by Custom Criteria3- Delphi

Delphi

procedure TWinForm.C1TrueDBGrid1_FetchCellStyle(sender: System.Object; e: C1.Win.C1TrueDBGrid.FetchCellStyleEventArgs);

var

Col1, Col2: LongInt;
S: String;

begin
case e.Col of

4: begin
Col1 := LongInt(Self.C1TrueDBGrid1.Columns[1].CellText(e.Row));

Col2 := LongInt(Self.C1TrueDBGrid1.Columns[2].CellText(e.Row));

if Col1 - Col2 < 0 then
CellStyle.ForeColor := System.Drawing.Color.Red;

end;

7: begin
S := Self.C1TrueDBGrid1.Columns[7].CellText(e.Row);

if S := TextBox1.Text then

begin

Dim myfont := New Font(CellStyle.Font, FontStyle.Bold);

CellStyle.Font := myfont;

end;
end

else

Debug.WriteLine ('FetchCellStyle not handled: ');

end;

end;


Applying Cell Styles by Custom Criteria3- Visual Basic

Visual Basic

Private Sub C1TrueDBGrid1_FetchCellStyle(ByVal sender As Object, ByVal e As C1.Win.C1TrueDBGrid.FetchCellStyleEventArgs) Handles C1TrueDBGrid1.FetchCellSTyle

Select Case e.Col

Case 4

Dim Col1 As Long, Col2 As Long

Col1 = CLng(Me.C1TrueDBGrid1(e.Row, 1)) Col2 = CLng(Me.C1TrueDBGrid1(e.Row, 2))

If Col1 - Col2 < 0 Then CellStyle.ForeColor = System.Drawing.Color.Red

Case 7

Dim S As String

S = Me.C1TrueDBGrid1(e.Row, 7).ToString()

If S = TextBox1.Text Then
Dim myfont = New Font(CellStyle.Font, FontStyle.Bold)
CellStyle.Font = myfont
End If

Case Else

Debug.WriteLine ("FetchCellStyle not handled: " & e.Col)

End Select

End Sub


Applying Cell Styles by Custom Criteria4- C#

C#

private void TDBGrid1_FetchRowStyle( object sender, C1.Win.C1TrueDBGrid.FetchRowStyleEventArgs e)


Applying Cell Styles by Custom Criteria4- Delphi

Delphi

procedure TDBGrid1_FetchRowStyle(sender: System.Object; e: C1.Win.C1TrueDBGrid.FetchRowStyleEventArgs);


Applying Cell Styles by Custom Criteria4- Visual Basic

Visual Basic

Private Sub TDBGrid1_FetchRowStyle(ByVal sender As Object, ByVal e As C1.Win.C1TrueDBGrid.FetchRowStyleEventArgs) Handles C1TrueDBGrid1.FetchRowStyle


Applying Cell Styles by Custom Criteria- C#

C#

private void C1TrueDBGrid1_FetchCellStyle( object sender, C1.Win.C1TrueDBGrid.FetchCellStyleEventArgs e)

int N;

N = (int) this.C1TrueDBGrid1[e.Row, e.Col];

if ( N > 1000 ) e.CellStyle.ForeColor = System.Drawing.Color.Blue;


Applying Cell Styles by Custom Criteria- Delphi

Delphi

procedure TWinForm.C1TrueDBGrid1_FetchCellStyle(sender: System.Object, e: C1.Win.C1TrueDBGrid.FetchCellStyleEventArgs);

var N: Integer;

begin

N := Int32.Parse(Self.C1TrueDBGrid1.Columns[e.Col].CellText(e.Row));

if N > 1000 then
e.CellStyle.ForeColor := System.Drawing.Color.Blue;

end;


Applying Cell Styles by Custom Criteria- Visual Basic

Visual Basic

Private Sub C1TrueDBGrid1_FetchCellStyle(ByVal sender As Object, ByVal e As C1.Win.C1TrueDBGrid.FetchCellStyleEventArgs) Handles C1TrueDBGrid1.FetchCellSTyle

Dim N As Integer

N = Val(Me.C1TrueDBGrid1(e.Row, e.Col)

If N > 1000 Then e.CellStyle.ForeColor = System.Drawing.Color.Blue

End Sub


Applying Cell Styles by Status2- C#

C#

C1TrueDBGrid.Style S;

set S = this.C1TrueDBGrid1.Styles["RedBold"];

this.C1TrueDBGrid1.AddCellStyle (CellStyleFlag.CurrentCell, S);


Applying Cell Styles by Status2- Delphi

Delphi

var S: C1TrueDBGrid.Style;

S := Self.C1TrueDBGrid1.Styles['RedBold'];

Self.C1TrueDBGrid1.AddCellStyle(CellStyleFlag.CurrentCell, S);


Applying Cell Styles by Status2- Visual Basic

Visual Basic

Dim S As C1TrueDBGrid.Style

Set S = Me.C1TrueDBGrid1.Styles("RedBold")

Me.C1TrueDBGrid1.AddCellStyle (CellStyleFlag.CurrentCell, S)


Applying Cell Styles by Status3- C#

C#

this.C1TrueDBGrid1.AddCellStyle (CellStyleFlag.CurrentCell, "RedBold");


Applying Cell Styles by Status3- Delphi

Delphi

Self.C1TrueDBGrid1.AddCellStyle(CellStyleFlag.CurrentCell,'RedBold');


Applying Cell Styles by Status3- Visual Basic

Visual Basic

Me.C1TrueDBGrid1.AddCellStyle (CellStyleFlag.CurrentCell, "RedBold")


Applying Cell Styles by Status4- C#

C#

this.C1TrueDBGrid1.AddCellStyle (CellStyleFlag.CurrentCell | CellStyleFlag.UpdatedCell, this.C1TrueDBGrid1.Styles["RedBold"]);


Applying Cell Styles by Status4- Delphi

Delphi

Self.C1TrueDBGrid1.AddCellStyle(CellStyleFlag.CurrentCell and CellStyleFlag.UpdatedCell, Self.C1TrueDBGrid1.Styles['RedBold']);


Applying Cell Styles by Status4- Visual Basic

Visual Basic

Me.C1TrueDBGrid1.AddCellStyle (CellStyleFlag.CurrentCell + CellStyleFlag.UpdatedCell, Me.C1TrueDBGrid1.Styles("RedBold"))


Applying Cell Styles by Status- C#

C#

C1TrueDBGrid.Style S = new C1TrueDBGrid.Style();

Font myfont;

myfont = new Font(S.Font, FontStyle.Bold);

S.Font = myfont;

S.ForeColor = System.Drawing.Color.Red;

this.C1TrueDBGrid1.AddCellStyle (CellStyleFlag.CurrentCell, S);


Applying Cell Styles by Status- Delphi

Delphi

var S: C1TrueDBGrid.Style;

myfont: Font;

S := C1TrueDBGrid.Style.Create;

myfont := Font(S.Font, FontStyle.Bold);

S.Font := myfont;

S.ForeColor := System.Drawing.Color.Red;

Self.C1TrueDBGrid1.AddCellStyle(CellStyleFlag.CurrentCell, S);


Applying Cell Styles by Status- Visual Basic

Visual Basic

Dim S As New C1TrueDBGrid.Style()

Dim myfont As Font

myfont = New Font(S.Font, FontStyle.Bold)

S.Font = myfont

S.ForeColor = System.Drawing.Color.Red

Me.C1TrueDBGrid1.AddCellStyle (CellStyleFlag.CurrentCell, S)


BackgroundImage Property (C1TrueDBGrid) - C#

C#

this.C1TrueDBGrid1.BackgroundImage = System.Drawing.Image.FromFile("C:\Seaside.bmp");


BackgroundImage Property (C1TrueDBGrid) - Delphi

Delphi

Self.C1TrueDBGrid1.BackgroundImage := System.Drawing.Image.FromFile('C:\Seaside.bmp');


BackgroundImage Property (C1TrueDBGrid) - Visual Basic

Visual Basic

Me.C1TrueDBGrid1.BackgroundImage = System.Drawing.Image.FromFile("C:\Seaside.bmp")


BackgroundImage Property (Style) - C#

C#

this.C1TrueDBGrid1.HeadingStyle.BackgroundPicture = System.Drawing.Image.FromFile("C:\Seaside.bmp");


BackgroundImage Property (Style) - Delphi

Delphi

Self.C1TrueDBGrid1.HeadingStyle.BackgroundPicture := System.Drawing.Image.FromFile('C:\Seaside.bmp');


BackgroundImage Property (Style) - Visual Basic

Visual Basic

Me.C1TrueDBGrid1.HeadingStyle.BackgroundPicture = System.Drawing.Image.FromFile("C:\Seaside.bmp")


Bands Property - C#

C#

int n;

for ( n = 0 ; n < this.C1TrueTDBGrid1.Bands; n++)

{

this.C1TrueDBGrid1.ExpandBand(n);

}


Bands Property - Delphi

Delphi

var n: Integer;

for n := 0 To Self.C1TrueTDBGrid1.Bands – 1 do

Self.C1TrueDBGrid1.ExpandBand(n);


Bands Property - Visual Basic

Visual Basic

Dim n As Integer

For n = 0 To Me.C1TrueTDBGrid1.Bands – 1

Me.C1TrueDBGrid1.ExpandBand(n)

Next n


BeforeColUpdate Event (C1TrueDBDropDown) - C#

C#

e.Cancel = false;

C1TrueDBGrid1.Columns[e.ColIndex].Value = e.OldValue;


BeforeColUpdate Event (C1TrueDBDropDown) - Delphi

Delphi

e.Cancel := False;

C1TrueDBGrid1.Columns[e.ColIndex].Value := e.OldValue;


BeforeColUpdate Event (C1TrueDBDropDown) - Visual Basic

Visual Basic

e.Cancel = False

C1TrueDBGrid1.Columns(e.ColIndex).Value = e.OldValue


BeforeColUpdate Event (C1TrueDBGrid) - C#

C#

e.Cancel = false;

C1TrueDBGrid1.Columns[e.ColIndex].Value = e.OldValue;


BeforeColUpdate Event (C1TrueDBGrid) - Delphi

Delphi

e.Cancel := False;

C1TrueDBGrid1.Columns[e.ColIndex].Value := e.OldValue;


BeforeColUpdate Event (C1TrueDBGrid) - Visual Basic

Visual Basic

e.Cancel = False

C1TrueDBGrid1.Columns(e.ColIndex).Value = e.OldValue


ButtonPicture Property- C#

C#

this.C1TrueDBGrid1.Columns(1).ButtonPicture = System.Drawing.Image.FromFile("C:\Seaside.bmp")


ButtonPicture Property- Delphi

Delphi

Self.C1TrueDBGrid1.Columns[1].ButtonPicture := System.Drawing.Image.FromFile('C:\Seaside.bmp');


ButtonPicture Property- Visual Basic

Visual Basic

Me.C1TrueDBGrid1.Columns(1).ButtonPicture = System.Drawing.Image.FromFile("C:\Seaside.bmp")


C1DataColumn.FooterText Property - C#

C#

this.C1trueDBGrid1.Columns[0].FooterText = "Footer0";

this.C1trueDBGrid1.Columns[1].FooterText = "Footer1";


C1DataColumn.FooterText Property - Delphi

Delphi

Self.C1TrueDBGrid1.Columns[0].FooterText := 'Footer0';

Self.C1TrueDBGrid1.Columns[1].FooterText := 'Footer1';


C1DataColumn.FooterText Property - Visual Basic

Visual Basic

Me.C1TrueDBGrid1.Columns(0).FooterText = "Footer0"

Me.C1TrueDBGrid1.Columns(1).FooterText = "Footer1"


C1DataColumn.NumberFormat Property - C#

C#

this.C1TrueDBGrid1.Columns["HireDate"].NumberFormat = "Medium Date";


C1DataColumn.NumberFormat Property - Delphi

Delphi

Self.C1TrueDBGrid1.Columns['HireDate'].NumberFormat := 'Medium Date';


C1DataColumn.NumberFormat Property - Visual Basic

Visual Basic

Me.C1TrueDBGrid1.Columns("HireDate").NumberFormat = "Medium Date"


C1DataColumn Object - C#

C#

this.C1TrueDBGrid1.Columns[0].Caption = "Region";


C1DataColumn Object - Delphi

Delphi

Self.C1TrueDBGrid1.Columns[0].Caption := ''Region'';


C1DataColumn Object - Visual Basic

Visual Basic

Me.C1TrueDBGrid1.Columns(0).Caption = "Region"


C1DisplayColumn Class - C#

C#

this.C1TrueDBGrid1.Splits[0,0].DisplayColumns[0].ForeColor = System.Drawing.Color.Blue;


C1DisplayColumn Class - Delphi

Delphi

Self.C1TrueDBGrid1.Splits[0,0].DisplayColumns[0].ForeColor := System.Drawing.Color.Blue;


C1DisplayColumn Class - Visual Basic

Visual Basic

Me.C1TrueDBGrid1.Splits(0,0).DisplayColumns(0).ForeColor = System.Drawing.Color.Blue


C1TrueDBDropDown.ValueTranslate Property - C#

C#

this.C1TrueDBDropDown1.ValueTranslate = true;

this.C1TrueDBDropDown1.ListField = "TypeDesc";

this.C1TrueDBDropDown1.DataField = "TypeID";


C1TrueDBDropDown.ValueTranslate Property - Delphi

Delphi

Self.C1TrueDBDropDown1.ValueTranslate := True;

Self.C1TrueDBDropDown1.ListField := 'TypeDesc';

Self.C1TrueDBDropDown1.DataField := 'TypeID';


C1TrueDBDropDown.ValueTranslate Property - Visual Basic

Visual Basic

Me.C1TrueDBDropDown1.ValueTranslate = True

Me.C1TrueDBDropDown1.ListField = "TypeDesc"

Me.C1TrueDBDropDown1.DataField = "TypeID"


C1TrueDBGrid.FetchRowStyle - Delphi

Delphi

Procedure TForm1.C1TrueDBGrid1_FetchRowStyle(sender: object; e: C1.Win.C1TrueDBGrid.FetchRowStyleEventArgs);
var S: string;
begin

S := C1TrueDBGrid1.Columns['Country'].CellText(e.Row).ToString;

if (S <> 'Germany') then
e.CellStyle.BackColor := System.Drawing.Color.LemonChiffon;

end;


C1TrueDBGrid.FetchRowStyle Event - C#

C#

private void C1TrueDBGrid1_FetchRowStyle(object sender, C1.Win.C1TrueDBGrid.FetchRowStyleEventArgs e)

{

string S = C1TrueDBGrid1.Columns("Country").CellText(e.Row).ToString;

if (S != "Germany") {

e.CellStyle.BackColor = System.Drawing.Color.LemonChiffon;

}
}


C1TrueDBGrid.FetchRowStyle Event - Visual Basic

Visual Basic

Private Sub C1TrueDBGrid1_FetchRowStyle(ByVal sender As Object, ByVal e As C1.Win.C1TrueDBGrid.FetchRowStyleEventArgs) Handles C1TrueDBGrid1.FetchRowStyle

Dim S As String = C1TrueDBGrid1.Columns("Country").CellText(e.Row).ToString

If S <> "Germany" Then

e.CellStyle.BackColor = System.Drawing.Color.LemonChiffon

End If

End Sub


C1TrueDBGrid.FetchRowStyles Property - C#

C#

this.C1TrueDBGrid1.FetchRowStyles = true;


C1TrueDBGrid.FetchRowStyles Property - Delphi

Delphi

Self.C1TrueDBGrid1.FetchRowStyles := true;


C1TrueDBGrid.FetchRowStyles Property - Visual Basic

Visual Basic

Me.C1TrueDBGrid1.FetchRowStyles = True


C1TrueDBGrid.RowDivider Property - C#

C#

this.C1trueDBGrid1.RowDivider.Style = LineStyleEnum.Inset;


C1TrueDBGrid.RowDivider Property - Delphi

Delphi

Self.C1TrueDBGrid1.RowDivider.Style := LineStyleEnum.Inset;


C1TrueDBGrid.RowDivider Property - Visual Basic

Visual Basic

Me.C1TrueDBGrid1.RowDivider.Style = LineStyleEnum.Inset


C1.Win.C1TrueDBGrid.BaseGrid Hierarchy

C1.Win.C1TrueDBGrid.BaseGrid Hierarchy

System.Object

System.MarshalByRefObject

System.ComponentModel.Component

System.Windows.Forms.Control

C1.Win.C1TrueDBGrid.BaseGrid.Frame ---- System.ComponentModel.ISupportInitialize

C1.Win.C1TrueDBGrid.BaseGrid.View ---- ca, System.IDisposable

C1.Win.C1TrueDBGrid.BaseGrid.ViewRow

System.Collections.CollectionBase

C1.Win.C1TrueDBGrid.BaseGrid.ViewRowList

See Also

C1.Win.C1TrueDBGrid.BaseGrid Namespace

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1.Win.C1TrueDBGrid Hierarchy

C1.Win.C1TrueDBGrid Hierarchy

System.Object

System.EventArgs

C1.Win.C1TrueDBGrid.BandEventArgs

C1.Win.C1TrueDBGrid.BeforeColEditEventArgs

C1.Win.C1TrueDBGrid.BeforeColUpdateEventArgs

C1.Win.C1TrueDBGrid.CancelEventArgs

C1.Win.C1TrueDBGrid.ColEventArgs

C1.Win.C1TrueDBGrid.ColMoveEventArgs

C1.Win.C1TrueDBGrid.GroupColMoveEventArgs

C1.Win.C1TrueDBGrid.ColResizeEventArgs

C1.Win.C1TrueDBGrid.ErrorEventArgs

C1.Win.C1TrueDBGrid.FetchCellStyleEventArgs

C1.Win.C1TrueDBGrid.FetchCellTipsEventArgs

C1.Win.C1TrueDBGrid.FetchRowStyleEventArgs

C1.Win.C1TrueDBGrid.FetchScrollTipsEventArgs

C1.Win.C1TrueDBGrid.FilterEventArgs

C1.Win.C1TrueDBGrid.FormatTextEventArgs

C1.Win.C1TrueDBGrid.GroupColEventArgs

C1.Win.C1TrueDBGrid.GroupIntervalEventArgs

C1.Win.C1TrueDBGrid.GroupTextEventArgs

C1.Win.C1TrueDBGrid.OwnerDrawCellEventArgs

C1.Win.C1TrueDBGrid.OwnerDrawPageEventArgs

C1.Win.C1TrueDBGrid.RowColChangeEventArgs

C1.Win.C1TrueDBGrid.SplitEventArgs

C1.Win.C1TrueDBGrid.UIStringsItemEventArgs

C1.Win.C1TrueDBGrid.UnboundColumnFetchEventArgs

System.ComponentModel.TypeConverter

C1.Win.C1TrueDBGrid.baseTypeConverter

C1.Win.C1TrueDBGrid.BitmapTypeConverter

System.ComponentModel.ExpandableObjectConverter

C1.Win.C1TrueDBGrid.GenericTypeConverter

C1.Win.C1TrueDBGrid.C1DataColumn

C1.Win.C1TrueDBGrid.C1DropDataColumn

System.Collections.CollectionBase

C1.Win.C1TrueDBGrid.C1DataColumnCollection

C1.Win.C1TrueDBGrid.GroupedColumnCollection

C1.Win.C1TrueDBGrid.SelectedColumnCollection

C1.Win.C1TrueDBGrid.C1DisplayColumnCollection

C1.Win.C1TrueDBGrid.GridStyleCollection

C1.Win.C1TrueDBGrid.SelectedRowCollection

C1.Win.C1TrueDBGrid.SplitCollection

C1.Win.C1TrueDBGrid.ValueItemCollection

C1.Win.C1TrueDBGrid.C1DisplayColumn ---- System.IDisposable

C1.Win.C1TrueDBGrid.C1DropDisplayColumn

C1.Win.C1TrueDBGrid.C1OwnerDrawPrint

System.MarshalByRefObject

System.ComponentModel.Component

System.Windows.Forms.Control

C1.Win.C1TrueDBGrid.BaseGrid.Frame ---- System.ComponentModel.ISupportInitialize

C1.Win.C1TrueDBGrid.C1TrueDBDropdown ---- System.IComparable

C1.Win.C1TrueDBGrid.C1TrueDBGrid ---- a7

System.Windows.Forms.ScrollableControl

System.Windows.Forms.ContainerControl

System.Windows.Forms.Form

C1.Win.C1TrueDBGrid.C1PrintProgress

C1.Win.C1TrueDBGrid.DropDownForm ---- System.Windows.Forms.IMessageFilter

C1.Win.C1TrueDBGrid.PrintForm

C1.Win.C1TrueDBGrid.PrintOptionsForm

C1.Win.C1TrueDBGrid.BaseGrid.View ---- System.IDisposable, ca

C1.Win.C1TrueDBGrid.Split

C1.Win.C1TrueDBGrid.DropdownView

C1.Win.C1TrueDBGrid.BaseGrid.ViewRow

C1.Win.C1TrueDBGrid.GroupRow

C1.Win.C1TrueDBGrid.GridBorders

C1.Win.C1TrueDBGrid.GroupInfo

System.Exception

C1.Win.C1TrueDBGrid.PrintCancelException

C1.Win.C1TrueDBGrid.PrintInfo

C1.Win.C1TrueDBGrid.PrintPreviewWinSettings

C1.Win.C1TrueDBGrid.Style ---- System.IDisposable

C1.Win.C1TrueDBGrid.UIStrings

C1.Win.C1TrueDBGrid.ValueItem

C1.Win.C1TrueDBGrid.ValueItems

System.ValueType

System.[Enum]

C1.Win.C1TrueDBGrid.AddNewModeEnum

C1.Win.C1TrueDBGrid.AggregateEnum

C1.Win.C1TrueDBGrid.AlignHorzEnum

C1.Win.C1TrueDBGrid.AlignVertEnum

C1.Win.C1TrueDBGrid.BackgroundPictureDrawModeEnum

C1.Win.C1TrueDBGrid.BorderTypeEnum

C1.Win.C1TrueDBGrid.C1DisplayColumn.ColumnChangedEnum

C1.Win.C1TrueDBGrid.CellStyleFlag

C1.Win.C1TrueDBGrid.CellTipEnum

C1.Win.C1TrueDBGrid.ColumnMergeEnum

C1.Win.C1TrueDBGrid.DataViewEnum

C1.Win.C1TrueDBGrid.DirectionAfterEnterEnum

C1.Win.C1TrueDBGrid.DropdownWidthEnum

C1.Win.C1TrueDBGrid.ExposeCellModeEnum

C1.Win.C1TrueDBGrid.FlatModeEnum

C1.Win.C1TrueDBGrid.ForeGroundPicturePositionEnum

C1.Win.C1TrueDBGrid.GradientModeEnum

C1.Win.C1TrueDBGrid.GroupIntervalEnum

C1.Win.C1TrueDBGrid.GroupPositionEnum

C1.Win.C1TrueDBGrid.LineStyleEnum

C1.Win.C1TrueDBGrid.MarqueeEnum

C1.Win.C1TrueDBGrid.MultiSelectEnum

C1.Win.C1TrueDBGrid.OutlineModeEnum

C1.Win.C1TrueDBGrid.PointAtEnum

C1.Win.C1TrueDBGrid.PresentationEnum

C1.Win.C1TrueDBGrid.PrintInfo.ActionFlags

C1.Win.C1TrueDBGrid.PrintInfo.FillEmptyEnum

C1.Win.C1TrueDBGrid.PrintInfo.PageBreaksEnum

C1.Win.C1TrueDBGrid.PrintInfo.RowHeightEnum

C1.Win.C1TrueDBGrid.PrintInfo.WrapTextEnum

C1.Win.C1TrueDBGrid.RelationState

C1.Win.C1TrueDBGrid.RowSelectorEnum

C1.Win.C1TrueDBGrid.RowSizingEnum

C1.Win.C1TrueDBGrid.RowTypeEnum

C1.Win.C1TrueDBGrid.ScrollBarEnum

C1.Win.C1TrueDBGrid.ScrollBarStyleEnum

C1.Win.C1TrueDBGrid.SizeModeEnum

C1.Win.C1TrueDBGrid.SortDirEnum

C1.Win.C1TrueDBGrid.TabActionEnum

System.[Delegate]

System.MulticastDelegate

C1.Win.C1TrueDBGrid.BandEventHandler

C1.Win.C1TrueDBGrid.BeforeColEditEventHandler

C1.Win.C1TrueDBGrid.BeforeColUpdateEventHandler

C1.Win.C1TrueDBGrid.CancelEventHandler

C1.Win.C1TrueDBGrid.ColEventHandler

C1.Win.C1TrueDBGrid.ColMoveEventHandler

C1.Win.C1TrueDBGrid.ColResizeEventHandler

C1.Win.C1TrueDBGrid.ErrorEventHandler

C1.Win.C1TrueDBGrid.FetchCellStyleEventHandler

C1.Win.C1TrueDBGrid.FetchCellTipsEventHandler

C1.Win.C1TrueDBGrid.FetchRowStyleEventHandler

C1.Win.C1TrueDBGrid.FetchScrollTipsEventHandler

C1.Win.C1TrueDBGrid.FilterEventHandler

C1.Win.C1TrueDBGrid.FormatTextEventHandler

C1.Win.C1TrueDBGrid.GroupColEventHandler

C1.Win.C1TrueDBGrid.GroupColMoveEventHandler

C1.Win.C1TrueDBGrid.GroupTextEventHandler

C1.Win.C1TrueDBGrid.OwnerDrawCellEventHandler

C1.Win.C1TrueDBGrid.OwnerDrawPageEventHandler

C1.Win.C1TrueDBGrid.RowColChangeEventHandler

C1.Win.C1TrueDBGrid.SplitEventHandler

C1.Win.C1TrueDBGrid.UnboundColumnFetchEventHandler

See Also

C1.Win.C1TrueDBGrid Namespace

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1.Win.C1TrueDBGrid.Util Hierarchy

C1.Win.C1TrueDBGrid.Util Hierarchy

System.Object

C1.Win.C1TrueDBGrid.Util.GridLines

System.ComponentModel.TypeConverter

System.ComponentModel.ExpandableObjectConverter

C1.Win.C1TrueDBGrid.Util.GridLinesTypeConverter

C1.Win.C1TrueDBGrid.Util.SBar ---- System.IDisposable

C1.Win.C1TrueDBGrid.Util.HBar

C1.Win.C1TrueDBGrid.Util.VBar

See Also

C1.Win.C1TrueDBGrid.Util Namespace

Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Captions, Headers, and Footers - C#

C#

this.C1TrueDBGrid1.Caption = "Grid Caption";

this.C1TrueDBGrid1.Columns[0].Caption = "Column 0 Caption";

this.C1TrueDBGrid1.Splits[0].Caption = "Split 0 Caption";


Captions, Headers, and Footers - Delphi

Delphi

Self.C1TrueDBGrid1.Caption := 'Grid Caption';

Self.C1TrueDBGrid1.Columns[0].Caption := 'Column 0 Caption';

Self.C1TrueDBGrid1.Splits[0].Caption := 'Split 0 Caption';


Captions, Headers, and Footers - Visual Basic

Visual Basic

Me.C1TrueDBGrid1.Caption = "Grid Caption"

Me.C1TrueDBGrid1.Columns(0).Caption = "Column 0 Caption"

Me.C1TrueDBGrid1.Splits(0).Caption = "Split 0 Caption"


CellTop Property- C#

C#

Text1.Top = .Top + C1TrueDBGrid1.RowTop[3] + C1TrueDBGrid1.Columns[0].CellTop;


CellTop Property- Delphi

Delphi

with Self.C1TrueDBGrid1 do

Text1.Top := Top + RowTop[3] + Columns[0].CellTop;


CellTop Property- Visual Basic

Visual Basic

With Me.C1TrueDBGrid1

Text1.Top = .Top + .RowTop(3) + .Columns(0).CellTop

End With


Changing Cell Contents - C#

C#

private void C1TrueDBGrid1_BeforeColEdit( object sender, C1.Win.C1TrueDBGrid.BeforeColEditEventArgs e) C1TrueDBGrid1.BeforeColEdit {

C1.Win.C1DataColumn col = e.Column.DataColumn;

// if this isn't the "Done" column, or if the user

// clicked with the mouse, then simply continue.

if (col.DataField != "Done" || e.KeyChar == 0 ) return;

// Cancel normal editing and set the field to the

// proper result based upon KeyAscii. Beep if an

// invalid character was typed.

e.Cancel = true;

switch (e.KeyChar. .ToUpper()) {

case "Y";

Col.Value = -1;

break;

case "N";

Col.Value = 0;

default:;

Beep();

}

}


Changing Cell Contents - Delphi

Delphi

procedure TWinForm.C1TrueDBGrid1_BeforeColEdit(sender: System.Object; e: C1.Win.C1TrueDBGrid.BeforeColEditEventArgs);

begin

with Self.C1TrueDBGrid1.Columns[e.ColIndex] do

begin

// If this isn't the 'Done' column, or if the user

// clicked with the mouse, then simply continue.

if (DataField <> 'Done') Or (e.KeyChar = Char(0)) Then

Exit;

// Cancel normal editing and set the field to the

// proper result based upon KeyAscii. Beep if an

// invalid character was typed.

e.Cancel := True;

if (char.ToUpper(e.KeyChar) = 'Y') then

Value := -1;

else if (char.ToUpper(e.KeyChar) = 'N') then

Value := 0;

end;

end;


Changing Cell Contents - Visual Basic

Visual Basic

Private Sub C1TrueDBGrid1_BeforeColEdit(ByVal sender As Object, ByVal e As C1.Win.C1TrueDBGrid.BeforeColEditEventArgs) Handles C1TrueDBGrid1.BeforeColEdit

With Me.C1TrueDBGrid1.Columns(e.ColIndex)

' If this isn't the "Done" column, or if the user

' clicked with the mouse, then simply continue.

If .DataField <> "Done" Or e.KeyChar = Chr(0) Then Exit Sub

' Cancel normal editing and set the field to the

' proper result based upon KeyAscii. Beep if an

' invalid character was typed.

e.Cancel = True

Select Case UCase(e.KeyChar)

Case "Y"

.Value = -1

Case "N"

.Value = 0

Case Else

Beep()

End Select

End With

End Sub


Column Editing Events - C#

C#

private void C1trueDBGrid1_ColEdit(object sender, C1.Win.C1TrueDBGrid.ColEventArgs e)

{

switch(e.Columns.DataColumn.Caption) {

case "Code":

this.Label1.Text = "Enter 4-digit company code";

break;

Case "Description";

this.Label1.Text = "Enter full company name";

break;

}

}

private void C1TrueDBGrid1_AfterColEdit(object sender, C1.Win.C1TrueDBGrid.ColEventArgs e)

}

this.Label1.Text = ""; // Clear editing instructions

}


Column Editing Events - Delphi

Delphi

procedure TWinForm.C1TrueDBGrid1_ColEdit(sender: System.Object; e: C1.Win.C1TrueDBGrid.ColEventArgs);

var S: string;

begin

S := Self.C1TrueDBGrid1.Columns[e.ColIndex].Caption;

if (S = 'Code') then;

Self.Label1.Text := 'Enter 4-digit company code';

else if (S = 'Description') then

Self.Label1.Text := 'Enter full company name';

end;


Column Editing Events - Visual Basic

Visual Basic

Private Sub C1TrueDBGrid1_ColEdit(ByVal sender As Object, ByVal e As C1.Win.C1TrueDBGrid.ColEventArgs) Handles C1TrueDBGrid1.ColEdit

Select Case e.Columns.DataColumn.Caption

Case "Code"

Me.Label1.Text = "Enter 4-digit company code"

Case "Description"

Me.Label1.Text = "Enter full company name"

End Select

End Sub

Private Sub C1TrueDBGrid1_AfterColEdit (ByVal sender As Object, ByVal e As C1.Win.C1TrueDBGrid.ColEventArgs) Handles C1TrueDBGrid1.AfterColEdit

Me.Label1.Text = "" ' Clear editing instructions

End Sub


Column Footers - C#

C#

this.C1trueDBGrid1.Columns[0].FooterText = "Footer0" ;

this.C1trueDBGrid1.Columns[1].FooterText = "Footer1" ;


Column Footers - Delphi

Delphi

Self.C1TrueDBGrid1.Columns[0].FooterText := 'Footer0';

Self.C1TrueDBGrid1.Columns[1].FooterText := 'Footer1';


Column Footers - Visual Basic

Visual Basic

Me.C1TrueDBGrid1.Columns(0).FooterText = "Footer0"

Me.C1TrueDBGrid1.Columns(1).FooterText = "Footer1"


Context-Sensitive Help with CellTips - C#

C#

// General Declarations

C1.Win.C1TrueDBGrid.C1DataColumn DescCol;

private void Form1_Load( System.object sender, System.EventArgs e) base.Load

{

DescCol = this.C1TrueDBGrid1.Columns["Description"]

}

private void C1TrueDBGrid1_FetchCellTips( System.object sender, C1.Win.C1TrueDBGrid.FetchCellTipsEventArgs e) C1TrueDBGrid.FetchCellTips

{

e.CellTip = DescCol.CellText(e.Row);

}


Context-Sensitive Help with CellTips - Delphi

Delphi

var

DescCol: C1TrueDBGrid.C1DataColumn;

Procedure TWinForm.TWinForm_Load(sender: System.Object; e: System.EventArgs);

begin

DescCol := Self.C1TrueDBGrid1.Columns['Description'];

end;

procedure TWinForm.C1TrueDBGrid1_FetchCellTips(sender: System.Object; e: C1.Win.C1TrueDBGrid.FetchCellTipsEventArgs);

begin

e.CellTip := DescCol.CellText(e.Row);

end;


Context-Sensitive Help with CellTips - Visual Basic

Visual Basic

' General Declarations

Dim DescCol As C1.Win.C1TrueDBGrid.C1DataColumn

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

DescCol = Me.C1TrueDBGrid1.Columns("Description")

End Sub

Private Sub C1TrueDBGrid1_FetchCellTips(ByVal sender As System.Object, ByVal e As C1.Win.C1TrueDBGrid.FetchCellTipsEventArgs) Handles C1TrueDBGrid.FetchCellTips

e.CellTip = DescCol.CellText(e.Row)

End Sub


Creating and Removing Splits2- C#

C#

// set variable equal to the number of splits in C1TrueDBGrid1

variable = this.C1TrueDBGrid1.Splits.Count;


Creating and Removing Splits2- Delphi

Delphi

// Set variable equal to the number of splits in C1TrueDBGrid1

variable := Self.C1TrueDBGrid1.Splits.Count;


Creating and Removing Splits2- Visual Basic

Visual Basic

' Set variable equal to the number of splits in C1TrueDBGrid1

variable = Me.C1TrueDBGrid1.Splits.Count


Creating and Removing Splits3- C#

C#

for ( n = 0 ; n < this.C1TrueDBGrid1.Splits.Count; n++)

{

Console.WriteLine (this.C1TrueDBGrid1.Splits[n].Caption);

}


Creating and Removing Splits3- Visual Basic

Visual Basic

For n = 0 To Me.C1TrueDBGrid1.Splits.Count - 1

Debug.WriteLine (Me.C1TrueDBGrid1.Splits(n).Caption)

Next n


Creating and Removing Splits4- C#

C#

C1TrueDBGrid.Split S;

foreach ( S In this.C1TrueDBGrid1.Splits)

Console.WriteLine (S);

}


Creating and Removing Splits4- Delphi

Delphi

var S: C1TrueDBGrid.Split;

i: Integer;

for i := 0 to Self.C1TrueDBGrid1.Splits.Count-1 do
begin
S := C1TrueDBGrid1.Splits[i];

Debug.WriteLine(S.Caption);

end;


Creating and Removing Splits4- Visual Basic

Visual Basic

Dim S As C1TrueDBGrid.Split

For Each S In Me.C1TrueDBGrid1.Splits

Debug.WriteLine (S.Caption)

Next


Creating and Removing Splits- C#

C#

C1TrueDBGrid.Split S;

this.C1TrueDBGrid1.InsertVerticalSplit(7); // Create a split with index 7

this.C1TrueDBGrid1.RemoveVerticalSplit(5); // Remove the split with index 5


Creating and Removing Splits- Delphi

Delphi

Self.C1TrueDBGrid1.InsertVerticalSplit(7); // Create a split with index 7

Self.C1TrueDBGrid1.RemoveVerticalSplit(5); // Remove the split with index 5


Creating and Removing Splits - Delphi 3

Delphi

for n := 0 To Self.C1TrueDBGrid1.Splits.Count – 1 do

Debug.WriteLine (Self.C1TrueDBGrid1.Splits(n).Caption);


Creating and Removing Splits- Visual Basic

Visual Basic

Dim S As C1TrueDBGrid.Split

Me.C1TrueDBGrid1.InsertVerticalSplit(7) ' Create a split with index 7

Me.C1TrueDBGrid1.RemoveVerticalSplit(5) ' Remove the split with index 5


Creating and Resizing Splits2 - C#

C#

this.C1TrueDBGrid1.AllowHorizontalSplit = true;


Creating and Resizing Splits2 - Delphi

Delphi

Self.C1TrueDBGrid1.AllowHorizontalSplit := True;


Creating and Resizing Splits2 - Visual Basic

Visual Basic

Me.C1TrueDBGrid1.AllowHorizontalSplit = True


Creating and Resizing Splits - C#

C#

this.C1TrueDBGrid1.AllowVerticalSplit = true;


Creating and Resizing Splits - Delphi

Delphi

Self.C1TrueDBGrid1.AllowVerticalSplit := True;


Creating and Resizing Splits - Visual Basic

Visual Basic

Me.C1TrueDBGrid1.AllowVerticalSplit = True


Creating Unbound Columns2 - C#

C#

private void C1TrueDBGrid1_UnboundColumnFetch(object sender, C1.Win.C1TrueDBGrid.UnboundColumnFetchEventArgs e)


Creating Unbound Columns2 - Delphi

Delphi

procedure C1TrueDBGrid1_UnboundColumnFetch(sender: System.Object; e: C1.Win.C1TrueDBGrid.UnboundColumnFetchEventArgs);


Creating Unbound Columns2 - Visual Basic

Visual Basic

Private Sub C1TrueDBGrid1_UnboundColumnFetch(ByVal sender As Object, ByVal e As C1.Win.C1TrueDBGrid.UnboundColumnFetchEventArgs) Handles C1TrueDBGrid1.UnboundColumnFetch


Creating Unbound Columns - C#

C#

C1.Win.C1TrueDBGrid.C1DataColumn Col = new C1TrueDBGrid.C1DataColumn();

C1.Win.C1TrueDBGrid.C1DisplayColumn dc;

C1TrueDBGrid1.Columns.Insert(0, Col];

Col.Caption = "Unbound";

dc = C1TrueDBGrid1.Splits[0].DisplayColumns["Unbound");

//move newly added column to leftmost position in the grid

C1TrueDBGrid1.Splits[0].DisplayColumns.RemoveAt(C1TrueDBGrid1.Splits[0].DisplayColumns.IndexOf(dc]));

C1TrueDBGrid1.Splits[0].DisplayColumns.Insert(0, dc);

dc.Visible = true;

C1TrueDBGrid1.Rebind(true);


Creating Unbound Columns - Delphi

Delphi

var Col1: C1TrueDBGrid.C1DataColumn;

dc: C1.Win.C1TrueDBGrid.C1DisplayColumn;

with Self.C1TrueDBGrid1 do

begin

Columns.Insert(0, Col1);

Col.Caption := 'Unbound';

dc := Splits[0].DisplayColumns.Item['Unbound'];

// move newly added column to leftmost position in the grid;

Splits[0].DisplayColumns.RemoveAt(Splits[0].DisplayColumns.IndexOf(dc));

Splits[0].DisplayColumns.Insert(0, dc);

dc.Visible := True;

Rebind(True);

end;


Creating Unbound Columns - Visual Basic

Visual Basic

Dim Col As New C1.Win.C1TrueDBGrid.C1DataColumn
Dim dc As C1.Win.C1TrueDBGrid.C1DisplayColumn

With Me.C1TrueDBGrid1

.Columns.Insert(0, Col)

Col.Caption = "Unbound"
dc = .Splits(0).DisplayColumns.Item("Unbound")

'move newly added column to leftmost position in the grid

.Splits(0).DisplayColumns.RemoveAt(.Splits(0).DisplayColumns.IndexOf(dc))

.Splits(0).DisplayColumns.Insert(0, dc)

dc.Visible = True

.Rebind(True)

End With


Customizing the In-Cell Button Bitmap - C#

C#

this.C1TrueDBGrid1.Columns[0].DisplayColumns[0].ButtonPicture = System.Drawing.Image.FromFile("dollar.bmp");


Customizing the In-Cell Button Bitmap - Delphi

Delphi

Self.C1TrueDBGrid1.Columns[0].DisplayColumns[0].ButtonPicture := System.Drawing.Image.FromFile('dollar.bmp');


Customizing the In-Cell Button Bitmap - Visual Basic

Visual Basic

Me.C1TrueDBGrid1.Columns(0).DisplayColumns(0).ButtonPicture = System.Drawing.Image.FromFile("dollar.bmp")


Database Operations- C#

C#

AllowUpdate = true;

AllowDelete = false;

AllowAddNew = false;


Database Operations- Delphi

Delphi

AllowUpdate := True;

AllowDelete := False;

AllowAddNew := False;


Database Operations- Visual Basic

Visual Basic

AllowUpdate = True

AllowDelete = False

AllowAddNew = False


DataRow for a given row number- C#

C#

System.Data.DataView[][0] dv;

CurrencyManager cm;

private object cm = ((CurrencyManager)(this.BindingContext.Item(this.c1tdbgrid1.DataSource, this.c1tdbgrid1.DataMember)));

private object dv = cm.List;

System.Data.DataRow dr = this.c1tdbgrid1(this.c1tdbgrid1.Row);


DataRow for a given row number- Delphi

Delphi

c1TrueDBGrid1.Splits[0].DisplayColumns[1].HeadingStyle.ForegroundImage := bmp;

c1TrueDBGrid1.Splits[0].DisplayColumns[1].HeadingStyle.ForeGroundPicturePosition := C1.Win.C1TrueDBGrid.ForeGroundPicturePositionEnum.LeftOfText;


DataRow for a given row number- Visual Basic

Visual Basic

Dim dv As System.Data.DataView()

Dim cm As CurrencyManager

cm = CType(Me.BindingContext.Item(Me.c1tdbgrid1.DataSource,Me.c1tdbgrid1.DataMember), CurrencyManager)

dv = cm.List

Dim dr as System.Data.DataRow = Me.c1tdbgrid1(Me.c1tdbgrid1.Row)


Data-Sensitive Cell Merging2 - C#

C#

C1.Win.C1TrueDBGrid.Style s;

s = this.C1TrueDBGrid1.Splits[0].DisplayColumns["Country"].Style;

s.HorizontalAlignment = AlignHorzEnum.Center;

s.VerticalAlignment = AlignVertEnum.Center;


Data-Sensitive Cell Merging2 - Delphi

Delphi

with Self.C1TrueDBGrid1.Splits[0].DisplayColumns['Country'] do
begin

HorizontalAlignment := AlignHorzEnum.Center;

VerticalAlignment := AlignVertEnum.Center;

end;


Data-Sensitive Cell Merging2 - Visual Basic

Visual Basic

With Me.C1TrueDBGrid1.Splits(0).DisplayColumns("Country").Style

.HorizontalAlignment = AlignHorzEnum.Center

.VerticalAlignment = AlignVertEnum.Center

End With


Data-Sensitive Cell Merging - C#

C#

this.C1TrueDBGrid1.Splits[0].DisplayColumns["Country"].Merge = C1.Win.C1TrueDBGrid.ColumnMergeEnum.None;


Data-Sensitive Cell Merging - Delphi

Delphi

Self.C1TrueDBGrid1.Splits[0].DisplayColumns]['Country'].Merge := C1.Win.C1TrueDBGrid.ColumnMergeEnum.None;


Data-Sensitive Cell Merging - Visual Basic

Visual Basic

Me.C1TrueDBGrid1.Splits(0).DisplayColumns("Country").Merge = C1.Win.C1TrueDBGrid.ColumnMergeEnum.None


DefColWidth Property (C1TrueDBDropDown) - C#

C#

C1TrueDBGrid1.DefColWidth = this.C1TrueDBGrid1.Splits[0].DisplayColumns[0].Width;


DefColWidth Property (C1TrueDBDropDown) - Delphi

Delphi

C1TrueDBGrid1.DefColWidth := Self.C1TrueDBGrid1.Splits[0].DisplayColumns[0].Width;


DefColWidth Property (C1TrueDBDropDown) - Visual Basic

Visual Basic

C1TrueDBGrid1.DefColWidth = Me.C1TrueDBGrid1.Splits(0).DisplayColumns(0).Width


DefColWidth Property (C1TrueDBGrid) - C#

C#

C1TrueDBGrid1.DefColWidth = this.C1TrueDBGrid1.Splits[0].DisplayColumns[0].Width;


DefColWidth Property (C1TrueDBGrid) - Delphi

Delphi

C1TrueDBGrid1.DefColWidth := Self.C1TrueDBGrid1.Splits[0].DisplayColumns[0].Width;


DefColWidth Property (C1TrueDBGrid) - Visual Basic

Visual Basic

C1TrueDBGrid1.DefColWidth = Me.C1TrueDBGrid1.Splits(0).DisplayColumns(0).Width


Deleting a Record- C#

C#

private void C1TrueDBGrid1_SelChange( object sender, C1.Win.C1TrueDBGrid.CancelEventArgs e)

{

this.C1TrueDBGrid1.Focus();

}


Deleting a Record- Delphi

Delphi

procedure TWinForm.C1TrueDBGrid1_SelChange(sender: System.Object; e: C1.Win.C1TrueDBGrid.CancelEventArgs);

begin

Self.C1TrueDBGrid1.Focus;

end;


Deleting a Record- Visual Basic

Visual Basic

Private Sub C1TrueDBGrid1_SelChange(ByVal sender As Object, ByVal e As C1.Win.C1TrueDBGrid.CancelEventArgs) Handles C1TrueDBGrid1.SelChange

Me.C1TrueDBGrid1.Focus()

End Sub


Detecting In-Cell Button Clicks - C#

C#

private void C1TrueDBGrid1_ButtonClick( object sender, C1.Win.C1TrueDBGrid.ColEventArgs e)


Detecting In-Cell Button Clicks - Delphi

Delphi

procedure C1TrueDBGrid1_ButtonClick(sender: Object; e: C1.Win.C1TrueDBGrid.ColEventArgs);


Detecting In-Cell Button Clicks - Visual Basic

Visual Basic

Private Sub C1TrueDBGrid1_ButtonClick(ByVal sender As Object, ByVal e As C1.Win.C1TrueDBGrid.ColEventArgs) Handles C1TrueDBGrid1.ButtonClick


Disabling Editing in a Specified TrueDBGrid Cell - C#

C#

this.C1TrueDBGrid1.Splits[0].DisplayColumns[0].FetchStyle = true;


Disabling Editing in a Specified TrueDBGrid Cell - C#

C#

private void C1TrueDBGrid1_FetchCellStyle(object sender, C1.Win.C1TrueDBGrid.FetchCellStyleEventArgs e)

{

e.CellStyle.Locked = true;
}


Disabling Editing in a Specified TrueDBGrid Cell - Delphi

Delphi

Self.C1TrueDBGrid1.Splits[0].DisplayColumns[0].FetchStyle := true;


Disabling Editing in a Specified TrueDBGrid Cell - Delphi

Delphi

Procedure TForm1.C1TrueDBGrid1_FetchCellStyle(sender: object; e: C1.Win.C1TrueDBGrid.FetchCellStyleEventArgs);
begin

e.CellStyle.Locked := true;
end;


Disabling Editing in a Specified TrueDBGrid Cell - Visual Basic

Visual Basic

Me.C1TrueDBGrid1.Splits(0).DisplayColumns(0).FetchStyle = True


Disabling Editing in a Specified TrueDBGrid Cell - Visual Basic

Visual Basic

Private Sub C1TrueDBGrid1_FetchCellStyle(ByVal sender As Object, ByVal e As C1.Win.C1TrueDBGrid.FetchCellStyleEventArgs) Handles C1TrueDBGrid1.FetchCellStyle

e.CellStyle.Locked = True

End Sub


Displaying Allowable Values as Radio Buttons2 - C#

C#

this.C1TrueDBGrid1.Columns["Country"].ValueItems.DefaultItem = 5;


Displaying Allowable Values as Radio Buttons2 - Delphi

Delphi

With Self.C1TrueDBGrid1.Columns['Country']

DefaultItem := 5;


Displaying Allowable Values as Radio Buttons2 - Visual Basic

Visual Basic

Me.C1TrueDBGrid1.Columns("Country").ValueItems.DefaultItem = 5


Displaying Allowable Values as Radio Buttons - C#

C#

this.C1TrueDBGrid1.Columns["Country"].ValueItems.Presentation = PresentationEnum.RadioButton;


Displaying Allowable Values as Radio Buttons - Delphi

Delphi

with Self.C1TrueDBGrid1.Columns['Country'] do

Presentation := PresentationEnum.RadioButton;


Displaying Allowable Values as Radio Buttons - Visual Basic

Visual Basic

Me.C1TrueDBGrid1.Columns("Country").ValueItems.Presentation = PresentationEnum.RadioButton


Displaying Background Pictures2- C#

C#

// Give the grid a flat appearance and remove its record

// selectors, row dividers, and scroll bars. Assume that

// the ScaleMode of the containing form is in pixels.

C1TrueDBGrid1.InactiveStyle.ForeColor = System.Drawing.Color.White;

C1TrueDBGrid1.RecordSelectors = false;

C1TrueDBGrid1.RowDivider.Style = LineStyleEnum.None;

C1TrueDBGrid1.RowHeight = 16;

C1TrueDBGrid1.HScrollBar.Style = ScrollBarStyleEnum.None;

C1TrueDBGrid1.VScrolBar.Style = ScrollBarStyleEnum.None;

C1TrueDBGrid1.MarqueeStyle = MarqueeEnum.NoMarquee;

// set the background pattern to be used by data cells in

// the default split (so as not to disturb the Normal style).

C1TrueDBGrid1.Splits[0].Style.BackgroundImage = System.Drawing.Image.FromFile("paper.bmp");

C1TrueDBGrid1.Splits[0].Style.BackgroundPictureDrawMode = BackgroundPictureDrawModeEnum.Tile;

// Create an empty unbound column on the left to hold the

// binder rings. Remove its dividing lines and set the

// BackroundBitmap property of its Style object.

C1TrueDBGrid.C1DataColumn col = new C1TrueDBGrid.C1DataColumn();

this.C1TrueDBGrid.Columns.InsertAt(0, col);

C1TrueDBGrid.C1DisplayColumn C = this.C1TrueDBGrid1.Splits[0].DisplayColumns[col];

C.Width = 48;

C.Visible = true;

C.Style.BackgroundImage = System.Drawing.Image.FromFile["rings.bmp"];

C.HeaderDivider = false;

C.ColumnDivider.Style = LineStyleEnum.None;

this.C1TrueDBGrid1.Col = 0; // Scroll the unbound column into view

// Resize the Title column and remove its header dividers.

C = this.C1TrueDBGrid1.Splits[0].DisplayColumns["Title"]

;

C.Width = 380;

C.HeaderDivider = false;

// Use a small corner of the binder ring bitmap as the

// background of the column headers, and adjust the font

// and text color accordingly.

Font myfont;

C1TrueDBGrid1.HeadingStyle.BackgroundImage = System.Drawing.Image.FromFile("corner.bmp");

C1TrueDBGrid1.HeadingStyle.BackgroundPictureDrawMode = BackgroundPictureDrawModeEnum.Tile;

myfont = new Font(.Font, 10, FontStyle.Bold);

C1TrueDBGrid1.HeadingStyle.Font = myfont;

C1TrueDBGrid1.HeadingStyle.ForeColor = System.Drawing.Color.White;


Displaying Background Pictures2- Delphi

Delphi

var C: C1TrueDBGrid.C1DisplayColumn;

myfont: Font;

// Give the grid a flat appearance and remove its record

// selectors, row dividers, and scroll bars. Assume that

// the ScaleMode of the containing form is in pixels.

with Self.C1TrueDBGrid1 do
begin

InactiveStyle.ForeColor := System.Drawing.Color.White;

RecordSelectors := False;

RowDivider.Style := LineStyleEnum.None;

RowHeight := 16;

HScrollBar.Style := ScrollBarStyleEnum.None;

.VScrolBar.Style := ScrollBarStyleEnum.None;

MarqueeStyle := MarqueeEnum.NoMarquee;

end;

// Set the background pattern to be used by data cells in

// the default split (so as not to disturb the Normal style).

with Self.C1TrueDBGrid1.Splits[0].Style do
begin

BackgroundImage := System.Drawing.Image.FromFile('paper.bmp');

BackgroundPictureDrawMode := BackgroundPictureDrawModeEnum.Tile;

End With;

// Create an empty unbound column on the left to hold the

// binder rings. Remove its dividing lines and set the

// BackroundBitmap property of its Style object.

C := C1TrueDBGrid.C1DisplayColumn.Create;

Self.C1TrueDBGrid1.Splits[0].DisplayColumns.Insert(0, C);

with C do
begin

Width := 48;

Visible := True;

Style.BackgroundImage := System.Drawing.Image.FromFile('rings.bmp');

HeaderDivider := False;

ColumnDivider.Style := LineStyleEnum.None;

End With;

Self.C1TrueDBGrid1.Col := 0; // Scroll the unbound column into view

// Resize the Title column and remove its header dividers.

C := Self.C1TrueDBGrid1.Splits[0].DisplayColumns['Title'];

with C do
begin

Width := 380;

HeaderDivider := False;

end;

// Use a small corner of the binder ring bitmap as the

// background of the column headers, and adjust the font

// and text color accordingly.

with Self.C1TrueDBGrid1.HeadingStyle do
begin

BackgroundImage := System.Drawing.Image.FromFile('corner.bmp');

BackgroundPictureDrawMode := BackgroundPictureDrawModeEnum.Tile;

myfont := Font.Create(Font, 10, FontStyle.Bold);

Font := myfont;

ForeColor := System.Drawing.Color.White;

end;


Displaying Background Pictures2- Visual Basic

Visual Basic

' Give the grid a flat appearance and remove its record

' selectors, row dividers, and scroll bars.

With Me.C1TrueDBGrid1

.InactiveStyle.ForeColor = System.Drawing.Color.White

.RecordSelectors = False

.RowDivider.Style = LineStyleEnum.None

.RowHeight = 16

.HScrollBar.Style = ScrollBarStyleEnum.None

.VScrolBar.Style = ScrollBarStyleEnum.None

.MarqueeStyle = MarqueeEnum.NoMarquee

End With

' Set the background pattern to be used by data cells in

' the default split (so as not to disturb the Normal style).

With Me.C1TrueDBGrid1.Splits(0).Style

.BackgroundImage = System.Drawing.Image.FromFile("paper.bmp")

.BackgroundPictureDrawMode = BackgroundPictureDrawModeEnum.Tile

End With

' Create an empty unbound column on the left to hold the

' binder rings. Remove its dividing lines and set the

' BackroundBitmap property of its Style object.

Dim col as New C1TrueDBGrid.C1DataColumn()

Me.C1TrueDBGrid.Columns.InsertAt(0, col) Dim C As C1TrueDBGrid.C1DisplayColumn

C = Me.C1TrueDBGrid1.Splits(0).DisplayColumns(col)

With C

.Width = 48

.Visible = True

.Style.BackgroundImage = System.Drawing.Image.FromFile("rings.bmp")

.HeaderDivider = False

.ColumnDivider.Style = LineStyleEnum.None

End With

Me.C1TrueDBGrid1.Col = 0 ' Scroll the unbound column into view

' Resize the Title column and remove its header dividers.

Set C = Me.C1TrueDBGrid1.Splits(0).DisplayColumns("Title")

With C

.Width = 380

.HeaderDivider = False

End With

' Use a small corner of the binder ring bitmap as the

' background of the column headers, and adjust the font

' and text color accordingly.

Dim myfont As Font

With Me.C1TrueDBGrid1.HeadingStyle

.BackgroundImage = System.Drawing.Image.FromFile("corner.bmp")

.BackgroundPictureDrawMode = BackgroundPictureDrawModeEnum.Tile

myfont = New Font(.Font, 10, FontStyle.Bold)

.Font = myfont

.ForeColor = System.Drawing.Color.White

End With


Displaying Background Pictures- C#

C#

C1TrueDBGrid1.CaptionStyle.BackgroundImage = System.Drawing.Image.FromFile("gradient.bmp");

C1TrueDBGrid1.CaptionStyle.ForeColor = System.Drawing.Color.White;

C1TrueDBGrid1.CaptionStyle.Font = new Font(C1TrueDBGrid1.CaptionStyle.Font, FontStyle.Bold);


Displaying Background Pictures- Delphi

Delphi

var myfont: Font;

with Self.C1TrueDBGrid1.CaptionStyle do
begin

BackgroundImage := System.Drawing.Image.FromFile('gradient.bmp');

ForeColor := System.Drawing.Color.White;

myfont := Font.Create(Font, FontStyle.Bold);

Font := myfont;

end;


Displaying Background Pictures- Visual Basic

Visual Basic

With Me.C1TrueDBGrid1.CaptionStyle

.BackgroundImage = System.Drawing.Image.FromFile("gradient.bmp")

.ForeColor = System.Drawing.Color.White

.Font = New Font(.Font, FontStyle.Bold)

End With


Displaying Both Text and Pictures in a Cell2 - C#

C#

this.C1TrueDBGrid1.Columns["Country"].NumberFormat = "FormatText event";


Displaying Both Text and Pictures in a Cell2 - Delphi

Delphi

Self.C1TrueDBGrid1.Columns['Country'].NumberFormat := ‘FormatText event’;


Displaying Both Text and Pictures in a Cell2 - Visual Basic

Visual Basic

Me.C1TrueDBGrid1.Columns("Country").NumberFormat = "FormatText Event"


Displaying Both Text and Pictures in a Cell3 - C#

C#

private void C1TrueDBGrid1_FormatText( object sender, C1.Win.C1TrueDBGrid.FormatTextArgs e) C1TrueDBGrid1.FormatText

{

switch (e.value) {

case "CAN":

e.value = "Canada";

break;

case "UK":

e.value = "United Kingdom";

break;

case "USA":

e.value = "United States";

break;

case "JPN":

e.value = "Japan";

break;

case "AUS":

e.value = "Australia";

break;

}

}


Displaying Both Text and Pictures in a Cell3 - Delphi

Delphi

procedure TWinForm.C1TrueDBGrid1_FormatText(sender: System.Object; e: C1.Win.C1TrueDBGrid.FormatTextArgs);

begin

if (e.Value = 'CAN');

e.Value := 'Canada'

else if (e.Value = 'UK') then

e.Value := 'United Kingdom'

else if (e.Value = 'USA') then

e.Value := 'United States'

else if (e.Value = 'JPN') then

e.Value := 'Japan'

else if (e.Value = 'AUS') then

e.Value := 'Australia';

end;


Displaying Both Text and Pictures in a Cell3 - Visual Basic

Visual Basic

Private Sub C1TrueDBGrid1_FormatText(ByVal sender As Object, ByVal e As C1.Win.C1TrueDBGrid.FormatTextArgs) Handles C1TrueDBGrid1.FormatText

Select Case e.Value

Case "CAN"

e.Value = "Canada"

Case "UK"

e.Value = "United Kingdom"

Case "USA"

e.Value = "United States"

Case "JPN"

e.Value = "Japan"

Case "AUS"

e.Value = "Australia"

End Select

End Sub


Displaying Both Text and Pictures in a Cell - C#

C#

this.C1TrueDBGrid1.Columns["Country"].ValueItems..AnnotatePicture = true;


Displaying Both Text and Pictures in a Cell - Delphi

Delphi

With SelfC1TrueDBGrid1.Columns['Country'] do

AnnotatePicture := True;


Displaying Both Text and Pictures in a Cell - Visual Basic

Visual Basic

Me.C1TrueDBGrid1.Columns("Country").ValueItems.AnnotatePicture = True


Editing Unbound Columns - C#

C#

private void C1TrueDBGrid1_AfterColUpdate( object sender, C1.Win.C1TrueDBGrid.ColEventArgs e)

{

int row = this.C1TrueDBGrid1.Row;

Me.C1TrueDBGrid1[row, "Balance"] = -e.Column.DataColumn.Value;

}

}


Editing Unbound Columns - Delphi

Delphi

procedure TWinForm.C1TrueDBGrid1_AfterColUpdate(sender: System.Object; e: C1.Win.C1TrueDBGrid.ColEventArgs);

var

Cols: Columns;

S: string;

begin

Cols := Self.C1TrueDBGrid1.C1DataColumnCollection;

S := Cols[e.ColIndex].Caption;

if (S = 'Debit') then

Cols['Balance'].Value = -Cols[e.ColIndex].Value

else if (S = 'Credit') then

Cols['Balance'].Value = Cols[e.ColIndex].Value;

end;


Editing Unbound Columns - Visual Basic

Visual Basic

Private Sub C1TrueDBGrid1_AfterColUpdate(ByVal sender As Object, ByVal e As C1.Win.C1TrueDBGrid.ColEventArgs) Handles C1TrueDBGrid1.AfterColUpdate

Dim row as Integer = Me.C1TrueDBGrid1.Row

Me.C1TrueDBGrid1(row, "Balance") = -e.Column.DataColumn.Value

End Sub


EditMask Property- C#

C#

// set the mask so the user can enter a phone number,

// with optional area code, and a state in capitals.

this.C1TrueDBGrid.Columns(0).EditMask = "(###) 000-0000 St\ate\: >LL";


EditMask Property- Delphi

Delphi

// set the mask so the user can enter a phone number,

// with optional area code, and a state in capitals.

Self.C1TrueDBGrid.EditMask := '(###) 000-0000 St\ate\: >LL';


EditMask Property- Visual Basic

Visual Basic

' set the mask so the user can enter a phone number,

' with optional area code, and a state in capitals.

Me.C1TrueDBGrid.Columns(0).EditMask = "(###) 000-0000 St\ate\: >LL";


Enabling the In-Cell Button - C#

C#

this.C1TrueDBGrid1.Splits[0].DisplayColumns[0].Button = true;


Enabling the In-Cell Button - Delphi

Delphi

Self.C1TrueDBGrid1.Splits[0].DisplayColumns[0].Button := True;


Enabling the In-Cell Button - Visual Basic

Visual Basic

Me.C1TrueDBGrid1.Splits(0).DisplayColumns(0).Button = True


Enabling Wordwrap - C#

C#

C1.Win.C1trueDBGrid.C1DisplayColumn C;

for each(C in this.C1trueDBGrid1.Splits[0].DisplayColumns)

{

C.Style.WrapText = true;

}


Enabling Wordwrap - Delphi

Delphi

var C: C1TrueDBGrid.C1DisplayColumn;
i: Integer;

for i := 0 to Self.C1TrueDBGrid1.Splits[0].DisplayColumns.Count-1 do

begin

C := Self.C1TrueDBGrid1.Splits[0].DisplayColumns[i];

C.Style.WrapText := True;

end;


Enabling Wordwrap - Visual Basic

Visual Basic

Dim C As C1.Win.C1TrueDBGrid.C1DisplayColumn

For Each C In Me.C1TrueDBGrid1.Splits(0).DisplayColumns

C.Style.WrapText = True

Next


ForegroundImage Property (Style) - C#

C#

this.C1TrueBGrid1.HeadingStyle.ForegroundImage = System.Drawing.Image.FromFile("C:\Seaside.bmp");


ForegroundImage Property (Style) - Delphi

Delphi

Self.C1TrueBGrid1.HeadingStyle.ForegroundImage := System.Drawing.Image.FromFile('C:\Seaside.bmp');


ForegroundImage Property (Style) - Visual Basic

Visual Basic

Me.C1TrueBGrid1.HeadingStyle.ForegroundImage = System.Drawing.Image.FromFile("C:\Seaside.bmp")


Formatting C1TrueDBGrid - C#

C#

Font fntFont;


Formatting C1TrueDBGrid - C#2

C#

fntFont = new Font("Times New Roman",
this.C1truedbgrid1.Splits(0).DisplayColumns.Item("Country").Style.Font.Size,
FontStyle.Bold);

this.C1truedbgrid1.Splits(0).DisplayColumns.Item("Country").Style.Font = fntFont;


Formatting C1TrueDBGrid - Delphi

Delphi

Var fntFont: Font;


Formatting C1TrueDBGrid - Delphi2

Delphi

fntFont := Font.Create('Times New Roman', Self.C1truedbgrid1.Splits[0].DisplayColumns['Country'].Style.Font.Size, FontStyle.Bold);

Self.C1truedbgrid1.Splits[0].DisplayColumns['Country'].Style.Font := fntFont;


Formatting C1TrueDBGrid - Visual Basic

Visual Basic

Dim fntFont As Font


Formatting C1TrueDBGrid - Visual Basic2

Visual Basic

fntFont = New Font("Times New Roman", Me.C1truedbgrid1.Splits(0).DisplayColumns.Item("Country").Style.Font.Size, FontStyle.Bold)

Me.C1truedbgrid1.Splits(0).DisplayColumns.Item("Country").Style.Font = fntFont


Formatting with a Custom Event Handler2 - C#

C#

private void C1TrueDBGrid1_FormatText(object sender, C1.Win.C1TrueDBGrid.FormatTextEventArgs e)

string result;

if ( e.ColIndex = 0 ) {

// Determine how many X's

while ( e.Value >= 10 )

{

result = result + "X";

e.Value = e.Value - 10;

}

// Append "digits" 1-9

switch (e.Value) { case 1;

result = result + "I";

case 2;

result = result + "II";

case 3;

result = result + "III";

case 4;

result = result + "IV";

case 5;

result = result + "V";

case 6;

result = result + "VI";

case 7;

result = result + "VII";

case 8;

result = result + "VIII";

case 9;

result = result + "IX";

}

// Change the actual format

e.Value = result;

}

}


Formatting with a Custom Event Handler2 - Delphi

Delphi

procedure TWinForm.C1TrueDBGrid1_FormatText(sender: System.Object; e: C1.Win.C1TrueDBGrid.FormatTextEventArgs);

var res: string;

val: Integer;

begin

if e.ColIndex = 0 then

begin

res := '';

val := Int32.Parse(e.Value);

// Determine how many X's

while e.Value >= 10 do

begin

res := res + 'X';

val := val - 10;

end;

// Append "digits" 1-9

else if (val = 1) then

res := res + 'I';

else if (val = 2) then

res := res + 'II';

else if (val = 3) then

res := res + 'III';

else if (val = 4) then

res := res + 'IV';

else if (val = 5) then

res := res + 'V';

else if (val = 6) then

res := res + 'VI';

else if (val = 7) then

res := res + 'VII';

else if (val = 8) then

res := res + 'VIII';

else if (val = 9) then

res := res + 'IX';

// Change the actual format

e.Value := res;

end;

end;


Formatting with a Custom Event Handler2 - Visual Basic

Visual Basic

Private Sub C1TrueDBGrid1_FormatText(ByVal sender As Object, ByVal e As C1.Win.C1TrueDBGrid.FormatTextEventArgs) Handles C1TrueDBGrid1.FormatText

Dim result As String

If e.ColIndex = 0 Then

' Determine how many X's

While e.Value >= 10

result = result & "X"

e.Value = e.Value - 10

Wend

' Append "digits" 1-9

Select Case e.Value

Case 1

result = result & "I"

Case 2

result = result & "II"

Case 3

result = result & "III"

Case 4

result = result & "IV"

Case 5

result = result & "V"

Case 6

result = result & "VI"

Case 7

result = result & "VII"

Case 8

result = result & "VIII"

Case 9

result = result & "IX"

End Select

' Change the actual format

e.Value = result

End If

End Sub


Formatting with a Custom Event Handler - C#

C#

private void C1TrueDBGrid1_FormatText(object sender, C1.Win.C1TrueDBGrid.FormatTextArgs e)


Formatting with a Custom Event Handler - Delphi

Delphi

procedure C1TrueDBGrid1_FormatText(sender: System.Object; e: C1.Win.C1TrueDBGrid.FormatTextArgs);


Formatting with a Custom Event Handler - Visual Basic

Visual Basic

Private Sub C1TrueDBGrid1_FormatText(ByVal sender As Object, ByVal e As C1.Win.C1TrueDBGrid.FormatTextArgs) Handles C1TrueDBGrid1.FormatText


Formatting with an Input Mask - C#

C#

this.C1TrueDBGrid1.Columns("Phone").EditMask = "(###) ###-####";

this.C1TrueDBGrid1.Columns("Phone").NumberFormat = "Edit Mask";


Formatting with an Input Mask - Delphi

Delphi

with Self.C1TrueDBGrid1.Columns['Phone'] do
begin

EditMask := '(###) ###-####';

NumberFormat := 'Edit Mask';

end;


Formatting with an Input Mask - Visual Basic

Visual Basic

With Me.C1TrueDBGrid1.Columns("Phone")

.EditMask = "(###) ###-####"

.NumberFormat = "Edit Mask"

End With


Frame.Caption Property - C#

C#

this.C1TrueDBGrid1.Caption = "Grid Caption";

this.C1TrueDBGrid1.Columns[0].Caption = "Column 0 Caption";

this.C1TrueDBGrid1.Splits[0].Caption = "Split 0 Caption";


Frame.Caption Property - Delphi

Delphi

Self.C1TrueDBGrid1.Caption := 'Grid Caption';

Self.C1TrueDBGrid1.Columns[0].Caption := 'Column 0 Caption';

Self.C1TrueDBGrid1.Splits[0].Caption := 'Split 0 Caption';


Frame.Caption Property - Visual Basic

Visual Basic

Me.C1TrueDBGrid1.Caption = "Grid Caption"

Me.C1TrueDBGrid1.Columns(0).Caption = "Column 0 Caption"

Me.C1TrueDBGrid1.Splits(0).Caption = "Split 0 Caption"


Free Merge - C#

C#

// free merging

C1TrueDBGrid1.Splits(0).DisplayColumns(0).Merge = C1.Win.C1TrueDBGrid.ColumnMergeEnum.Free;

C1TrueDBGrid1.Splits(0).DisplayColumns(1).Merge = C1.Win.C1TrueDBGrid.ColumnMergeEnum.Free;

C1TrueDBGrid1.Splits(0).DisplayColumns(2).Merge = C1.Win.C1TrueDBGrid.ColumnMergeEnum.Free;

C1TrueDBGrid1.Splits(0).DisplayColumns(3).Merge = C1.Win.C1TrueDBGrid.ColumnMergeEnum.Free;

// setting all of the column's vertical alignment to Center

C1TrueDBGrid1.Splits(0).DisplayColumns(0).Style.VerticalAlignment = C1.Win.C1TrueDBGrid.AlignVertEnum.Center;

C1TrueDBGrid1.Splits(0).DisplayColumns(1).Style.VerticalAlignment = C1.Win.C1TrueDBGrid.AlignVertEnum.Center;

C1TrueDBGrid1.Splits(0).DisplayColumns(2).Style.VerticalAlignment = C1.Win.C1TrueDBGrid.AlignVertEnum.Center;

C1TrueDBGrid1.Splits(0).DisplayColumns(3).Style.VerticalAlignment = C1.Win.C1TrueDBGrid.AlignVertEnum.Center;


Free Merge - Delphi

Delphi

C1TrueDBGrid1.Splits(0).DisplayColumns(0).Merge := C1.Win.C1TrueDBGrid.ColumnMergeEnum.Free;

C1TrueDBGrid1.Splits(0).DisplayColumns(1).Merge := C1.Win.C1TrueDBGrid.ColumnMergeEnum.Free;

C1TrueDBGrid1.Splits(0).DisplayColumns(2).Merge := C1.Win.C1TrueDBGrid.ColumnMergeEnum.Free;

C1TrueDBGrid1.Splits(0).DisplayColumns(3).Merge := C1.Win.C1TrueDBGrid.ColumnMergeEnum.Free;

C1TrueDBGrid1.Splits(0).DisplayColumns(0).Style.VerticalAlignment := C1.Win.C1TrueDBGrid.AlignVertEnum.Center;

C1TrueDBGrid1.Splits(0).DisplayColumns(1).Style.VerticalAlignment := C1.Win.C1TrueDBGrid.AlignVertEnum.Center;

C1TrueDBGrid1.Splits(0).DisplayColumns(2).Style.VerticalAlignment := C1.Win.C1TrueDBGrid.AlignVertEnum.Center;

C1TrueDBGrid1.Splits(0).DisplayColumns(3).Style.VerticalAlignment := C1.Win.C1TrueDBGrid.AlignVertEnum.Center;


Free Merge - Visual Basic

Visual Basic

' free merging

C1TrueDBGrid1.Splits(0).DisplayColumns(0).Merge = C1.Win.C1TrueDBGrid.ColumnMergeEnum.Free

C1TrueDBGrid1.Splits(0).DisplayColumns(1).Merge = C1.Win.C1TrueDBGrid.ColumnMergeEnum.Free

C1TrueDBGrid1.Splits(0).DisplayColumns(2).Merge = C1.Win.C1TrueDBGrid.ColumnMergeEnum.Free

C1TrueDBGrid1.Splits(0).DisplayColumns(3).Merge = C1.Win.C1TrueDBGrid.ColumnMergeEnum.Free

' setting all of the column's vertical alignment to Center

C1TrueDBGrid1.Splits(0).DisplayColumns(0).Style.VerticalAlignment = C1.Win.C1TrueDBGrid.AlignVertEnum.Center

C1TrueDBGrid1.Splits(0).DisplayColumns(1).Style.VerticalAlignment = C1.Win.C1TrueDBGrid.AlignVertEnum.Center

C1TrueDBGrid1.Splits(0).DisplayColumns(2).Style.VerticalAlignment = C1.Win.C1TrueDBGrid.AlignVertEnum.Center

C1TrueDBGrid1.Splits(0).DisplayColumns(3).Style.VerticalAlignment = C1.Win.C1TrueDBGrid.AlignVertEnum.Center


GroupedText Property- C#

C#

GroupRow gr = c1tdbgrid.splits[0].Rows[0] as Grouprow;

if( gr != null )

Console.WriteLine("Row grouped on: " + gr.GroupedText);


GroupedText Property- Delphi

Delphi

var gr: GroupRow;

gr := C1TrueDBGrid1.Splits[0].Rows[0]
as GroupRow;

if (gr <> nil) then

Debug.WriteLine('Row grouped on: ' + gr.GroupedText);


GroupedText Property- Visual Basic

Visual Basic

Dim gr As GroupRow = c1tdbgrid.splits(0).Rows(0) as Grouprow

If Not gr Is Nothing Then

Debug.WriteLine("Row grouped on: " + gr.GroupedText)

End If


Group Rows By Alphabetical2 - C#

C#

// setting the GroupInfo.Interval of the ProductName column to Alphabetical

C1TrueDBGrid1.Columns["ProductName"].GroupInfo.Interval = C1.Win.C1TrueDBGrid.GroupIntervalEnum.Alphabetical;


Group Rows By Alphabetical2 - Delphi

Delphi

C1TrueDBGrid1.Columns['ProductName'].GroupInfo.Interval := C1.Win.C1TrueDBGrid.GroupIntervalEnum.Alphabetical;


Group Rows By Alphabetical2 - Visual Basic

Visual Basic

' setting the GroupInfo.Interval of the ProductName column to Alphabetical

C1TrueDBGrid1.Columns("ProductName").GroupInfo.Interval = C1.Win.C1TrueDBGrid.GroupIntervalEnum.Alphabetical


Group Rows By Alphabetical3 - C#

C#

// when grouping by ProductName, this column will still be visible

C1TrueDBGrid1.Columns["ProductName"].GroupInfo.ColumnVisible = True;


Group Rows By Alphabetical3 - Delphi

Delphi

C1TrueDBGrid1.Columns['ProductName'].GroupInfo.ColumnVisible := True;


Group Rows By Alphabetical3 - Visual Basic

Visual Basic

' when grouping by ProductName, this column will still be visible

C1TrueDBGrid1.Columns("ProductName").GroupInfo.ColumnVisible = True


Group Rows By Alphabetical - C#

C#

this.ProductsTableAdapter.Fill(this.Products._Products);


Group Rows By Alphabetical - Delphi

Delphi

Self.ProductsTableAdapter.Fill(Self.Products._Products);


Group Rows By Alphabetical - Visual Basic

Visual Basic

Me.ProductsTableAdapter.Fill(Me.Products._Products)


Group Rows By Custom2 - C#

C#

// setting the UnitPrice column to be displayed as currency

C1TrueDBGrid1.Columns["UnitPrice"].NumberFormat = "Currency";

// setting the GroupInfo.Interval of the grid to custom

C1TrueDBGrid1.Columns["UnitPrice"].GroupInfo.Interval = C1.Win.C1TrueDBGrid.GroupIntervalEnum.Custom;


Group Rows By Custom2 - Delphi

Delphi

C1TrueDBGrid1.Columns['UnitPrice'].NumberFormat := 'Currency';

C1TrueDBGrid1.Columns['UnitPrice'].GroupInfo.Interval := C1.Win.C1TrueDBGrid.GroupIntervalEnum.Custom;


Group Rows By Custom2 - Visual Basic

Visual Basic

' setting the UnitPrice column to be displayed as currency

C1TrueDBGrid1.Columns("UnitPrice").NumberFormat = "Currency"

' setting the GroupInfo.Interval of the grid to custom

C1TrueDBGrid1.Columns("UnitPrice").GroupInfo.Interval = C1.Win.C1TrueDBGrid.GroupIntervalEnum.Custom


Group Rows By Custom3 - C#

C#

// when grouping by UnitPrice, this column will still be visible

C1TrueDBGrid1.Columns["UnitPrice"].GroupInfo.ColumnVisible = true;


Group Rows By Custom3 - Delphi

Delphi

C1TrueDBGrid1.Columns[UnitPrice].GroupInfo.ColumnVisible := True;


Group Rows By Custom3 - Visual Basic

Visual Basic

' when grouping by UnitPrice, this column will still be visible

C1TrueDBGrid1.Columns("UnitPrice").GroupInfo.ColumnVisible = True


Group Rows By Custom4 - C#

C#

// getting the value from the current grid cell as a decimal

decimal p = ((decimal)this.C1TrueDBGrid1(e.Row,e.Col.DataColumn.DataField));

// assigning the custom grouping values

If (p > 0 && p < 10)

{

e.Value = "$0 - $9.99";

}

else if (p >= 10 && p < 20)

{

e.Value = "$10.00 - $19.99";

}

else if (p >= 20 && p < 40)

{

e.Value = "$20.00 – $39.99";

}

else if (p >= 40 && p < 60)

{

e.Value = "$40.00 - $59.99";

}

else if (p >= 60)

{

e.Value – "$60 and Greater";

}


Group Rows By Custom4 - Delphi

Delphi

p := (System.Decimal(Self.C1TrueDBGrid1(e.Row, e.Col.DataColumn.DataField)));

&If(((p > 0) and (p < 10)));

e.Value := '$0 - $9.99';

&If(((p >= 10) and (p < 20)));

e.Value := '$10 - $19.99';

&If(((p >= 20) and (p < 40)));

e.Value := '$20 - $39.99';

&If(((p >= 40) and (p < 60)));

e.Value := '$40 - $59.99';

&If(((p > 60)));

e.Value := '$60 and Greater';


Group Rows By Custom4 - Visual Basic

Visual Basic

' getting the value from the current grid cell as a Decmimal

Dim p As Decimal = CType(Me.C1TrueDBGrid1(e.Row, e.Col.DataColumn.DataField), Decimal)

' assigning the custom grouping values

If p > 0 And p < 10 Then

e.Value = "$0 - $9.99"

ElseIf p >= 10 And p < 20 Then

e.Value = "$10.00 - $19.99"

ElseIf p >= 20 And p < 40 Then

e.Value = "$20.00 - $39.99"

ElseIf p >= 40 And p < 60 Then

e.Value = "$40.00 - $59.99"

ElseIf p >= 60 Then

e.Value = "$60 And Greater"

End If


Group Rows By Custom - C#

C#

this.ProductsTableAdapter.Fill(this.Products._Products);


Group Rows By Custom - Delphi

Delphi

Self.ProductsTableAdapter.Fill(Self.Products._Products);


Group Rows By Custom - Visual Basic

Visual Basic

Me.ProductsTableAdapter.Fill(Me.Products._Products)


Group Rows By Date Value2 - C#

C#

// setting the GroupInfo.Interval of the grid to DateSpan

C1TrueDBGrid1.Columns["NextMeeting"].GroupInfo.Interval = C1.Win.C1TrueDBGrid.GroupIntervalEnum.DateSpan;


Group Rows By Date Value2 - Delphi

Delphi

C1TrueDBGrid1.Columns['NextMeeting'].GroupInfo.Interval := C1.Win.C1TrueDBGrid.GroupIntervalEnum.DateSpan;


Group Rows by Date Value2 - Visual Basic

Visual Basic

' setting the GroupInfo.Interval of the grid to DateSpan

C1TrueDBGrid1.Columns("NextMeeting").GroupInfo.Interval = C1.Win.C1TrueDBGrid.GroupIntervalEnum.DateSpan


Group Rows By Date Value3 - C#

C#

// when grouping by NextMeeting, this column will still be visible

C1TrueDBGrid1.Columns["NextMeeting"].GroupInfo.ColumnVisible = true;


Group Rows By Date Value3 - Delphi

Delphi

C1TrueDBGrid1.Columns['NextMeeting'].GroupInfo.ColumnVisible := True;


Group Rows by Date Value3 - Visual Basic

Visual Basic

' when grouping by NextMeeting, this column will still be visible

C1TrueDBGrid1.Columns("NextMeeting").GroupInfo.ColumnVisible = True


Group Rows By Date Value - C#

C#

this.EmployeesTableAdapter.Fill(this.Employees._Employees);


Group Rows By Date Value - Delphi

Delphi

Self.EmployeesTableAdapter.Fill(Self.Employees._Employees);


Group Rows by Date Value - Visual Basic

Visual Basic

Me.EmployeesTableAdapter.Fill(Me.Employees._Employees)


Group Rows By Year2 - C#

C#

// setting the GroupInfo.Interval of the HireDate column to Year

C1TrueDBGrid1.Columns["HireDate"].GroupInfo.Interval = C1.Win.C1TrueDBGrid.GroupIntervalEnum.Year;


Group Rows By Year2 - Delphi

Delphi

C1TrueDBGrid1.Columns['HireDate'].GroupInfo.Interval := C1.Win.C1TrueDBGrid.GroupIntervalEnum.Year;


Group Rows By Year2 - Visual Basic

Visual Basic

' setting the GroupInfo.Interval of the HireDate column to Year

C1TrueDBGrid1.Columns("HireDate").GroupInfo.Interval = C1.Win.C1TrueDBGrid.GroupIntervalEnum.Year


Group Rows By Year3 - C#

C#

// when grouping by HireDate, this column will still be visible

C1TrueDBGrid1.Columns["HireDate"].GroupInfo.ColumnVisible = True;


Group Rows By Year3 - Delphi

Delphi

C1TrueDBGrid1.Columns['HireDate'].GroupInfo.ColumnVisible := True;


Group Rows By Year3 - Visual Basic

Visual Basic

' when grouping by HireDate, this column will still be visible

C1TrueDBGrid1.Columns("HireDate").GroupInfo.ColumnVisible = True


Group Rows By Year - C#

C#

this.EmployeesTableAdapter.Fill(this.Employees._Employees);


Group Rows By Year - Delphi

Delphi

Self.EmployeesTableAdapter.Fill(Self.Employees._Employees);


Group Rows By Year - Visual Basic

Visual Basic

Me.EmployeesTableAdapter.Fill(Me.Employees._Employees)


Horizontal Scrolling and Fixed Columns2- C#

C#

// Make columns 0 and 1 invisible in splits 0 and 2

C1TrueDBGrid.C1DisplayColumnCollection Cols;

Cols = this.C1TrueDBGrid1.Splits[0].DisplayColumns;

Cols[0].Visible = false;

Cols[1].Visible = false;

Cols = this.C1TrueDBGrid1.Splits[2].DisplayColumns;

Cols[0]Visible = false;

Cols[1]Visible = false;


Horizontal Scrolling and Fixed Columns2- Delphi

Delphi

// Make columns 0 and 1 invisible in splits 0 and 2

var Cols: C1TrueDBGrid.C1DisplayColumnCollection;

Cols := Self.C1TrueDBGrid1.Splits[0].Columns;

Cols[0].Visible := False;

Cols[1].Visible := False;

Cols := Me.C1TrueDBGrid1.Splits[2].Columns;

Cols[0].Visible := False;

Cols[1].Visible := False;


Horizontal Scrolling and Fixed Columns2- Visual Basic

Visual Basic

' Make columns 0 and 1 invisible in splits 0 and 2

Dim Cols As C1TrueDBGrid.C1DisplayColumnCollection

Cols = Me.C1TrueDBGrid1.Splits(0).DisplayColumns

Cols(0).Visible = False

Cols(1).Visible = False

Cols = Me.C1TrueDBGrid1.Splits(2).DisplayColumns

Cols(0)Visible = False

Cols(1)Visible = False


Horizontal Scrolling and Fixed Columns- C#

C#

// Hide all columns in Splits[1] except for columns 0 and 1

C1TrueDBGrid.C1DisplayColumnCollection Cols;

C1TrueDBGrid.C1DisplayColumn C;

Cols = this.C1TrueDBGrid1.Splits[1].DisplayColumns

foreach (C In Cols)

C.Visible = false;

}

Cols(0).Visible = true;

Cols(1).Visible = true;

// Configure Splits[1] to display exactly two columns, and

// disable resizing

C1TrueDBGrid1.Splits[1].SplitSizeMode = SizeModeEnum.NumberOfColumns;

C1TrueDBGrid1.Splits[1].SplitSize = 2;

C1TrueDBGrid1.Splits[1].AllowHorizontalSizing = false;


Horizontal Scrolling and Fixed Columns- Delphi

Delphi

var Cols: C1TrueDBGrid.C1DisplayColumnCollection;

// Hide all columns in Splits(1) except for columns 0 and 1

Cols := Self.C1TrueDBGrid1.Splits[1].Columns;

for i := 0 to Cols.Count-1 do
Cols[i].Visible := False;

Cols[0].Visible := True;

Cols[1].Visible := True;

// Configure Splits(1) to display exactly two columns, and

// disable resizing

with Self.C1TrueDBGrid1.Splits[1] do
begin

SplitSizeMode := SizeModeEnum.NumberOfColumns;

SplitSize := 2;

AllowHorizontalSplit := False;

end;


Horizontal Scrolling and Fixed Columns- Visual Basic

Visual Basic

' Hide all columns in Splits(1) except for columns 0 and 1

Dim Cols As C1TrueDBGrid.C1DisplayColumnCollection

Dim C As C1TrueDBGrid.C1DisplayColumn

Cols = Me.C1TrueDBGrid1.Splits(1).DisplayColumns

For Each C In Cols

C.Visible = False

Next C

Cols(0).Visible = True

Cols(1).Visible = True

' Configure Splits(1) to display exactly two columns, and

' disable resizing

With Me.C1TrueDBGrid1.Splits(1)

.SplitSizeMode = SizeModeEnum.NumberOfColumns

.SplitSize = 2

.AllowHorizontalSizing = False

End With


Implementing Multiple Unbound Columns - C#

C#

Data.DataTable dtCopy; //Will be used as the Copy

private void Form1_Load( System.object sender, System.EventArgs e) {

dtCopy = this.DataSet11.Tables[0].Copy();

}

private void C1TrueDBGrid1_UnboundColumnFetch(object sender, C1.Win.C1TrueDBGrid.UnboundColumnFetchEventArgs e)

{

switch (e.Column.Caption;) {

case "Area";

// Calculate "Area" column of the grid

e.value = dtCopy.Rows[e.Row].Item["Length"] * dtCopy.Rows(e.Row).Item("Width");

break;

case "Perimeter";

// Calculate "Perimeter" column of the grid

e.value = 2 * (dtCopy.Rows[e.Row].Item["Length"] + dtCopy.Rows[e.Row].Item["Width"]);

break;

}

}


Implementing Multiple Unbound Columns - Delphi

Delphi

var dtCopy: System.Data.DataTable; // Will be used as the Copy

procedure TWinForm.Form1_Load(sender: System.Object; e: System.EventArgs);

begin

dtCopy := Self.DataSet11DsContacts1.Tables[0].Copy;

end;

procedure TWinForm.C1TrueDBGrid1_UnboundColumnFetch(sender: System.Object; e: C1.Win.C1TrueDBGrid.UnboundColumnFetchEventArgs);

var s: string;

begin

s := Self.C1TrueDBGrid1.Columns[e.Col].Caption;

if (s = 'Area') then //calculate "Area" column of the grid

e.Value := dtCopy.Rows[e.Row].Item['Length'] *
dtCopy.Rows[e.Row].Item['Width'];

else if (s = 'Perimeter') then //Calculate "Perimeter" column of the grid

e.Value := 2 * (dtCopy.Rows[e.Row].Item['Length'] +
dtCopy.Rows[e.Row].Item['Width']);

end;


Implementing Multiple Unbound Columns - Visual Basic

Visual Basic

Dim dtCopy As Data.DataTable 'Will be used as the Copy

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

dtCopy = Me.DataSet11.Tables(0).Copy()

End Sub

Private Sub C1TrueDBGrid1_UnboundColumnFetch(ByVal sender As System.Object, ByVal e As C1.Win.C1TrueDBGrid.UnboundColumnFetchEventArgs) Handles C1TrueDBGrid1.UnboundColumnFetch

Select Case e.Column.Caption

Case "Area"

'Calculate "Area" column of the grid

e.Value = dtCopy.Rows(e.Row).Item("Length") * dtCopy.Rows(e.Row).Item("Width")

Case "Perimeter"

Calculate "Perimeter" column of the grid

e.Value = 2 * (dtCopy.Rows(e.Row).Item("Length") + dtCopy.Rows(e.Row).Item("Width"))

End Select

End Sub


Modifying a Style Property Directly- C#

C#

Font myfont = new Font(this.C1TrueDBGrid1.Font, FontStyle.Bold);

this.C1TrueDBGrid1.CaptionStyle.Font = myfont;

this.C1TrueDBGrid1.Styles["Caption"].Font = myfont;


Modifying a Style Property Directly- Delphi

Delphi

var myfont: Font;

myfont := Font.Create(Self.C1TrueDBGrid1.Font, FontStyle.Bold);

Self.C1TrueDBGrid1.CaptionStyle.Font := myfont;

Self.C1TrueDBGrid1.Styles['Caption'].Font := myfont;


Modifying a Style Property Directly- Visual Basic

Visual Basic

Dim myfont As New Font(Me.C1TrueDBGrid1.Font, FontStyle.Bold)

Me.C1TrueDBGrid1.CaptionStyle.Font = myfont

Me.C1TrueDBGrid1.Styles("Caption").Font = myfont


Modifying Named Styles - C#

C#

this.C1TrueDBGrid1.Styles["Heading"].HorizontalAlignment = AlignHorzEnum.Center;


Modifying Named Styles - Delphi

Delphi

Self.C1TrueDBGrid1.Styles['Heading'].HorizontalAlignment = AlignHorzEnum.Center;


Modifying Named Styles - Visual Basic

Visual Basic

Me.C1TrueDBGrid1.Styles("Heading").HorizontalAlignment = AlignHorzEnum.Center


Moving Columns at Run-Time - C#

C#

dc as C1TrueDBGrid.C1DisplayColumn;

dc = this.C1TrueDBGrid1.Splits(0).DisplayColumns[1];

this.C1TrueDBGrid1.Splits[0].DisplayColumns.RemoveAt(1);

this.C1TrueDBGrid1.Splits[0].DisplayColumns.Insert(0, dc);


Moving Columns at Run-Time - Delphi

Delphi

var dc: C1TrueDBGrid.C1DataColumn;

dc := Self.C1TrueDBGrid1.Splits[0].DisplayColumns.Item[1];

Self.C1TrueDBGrid1.Splits[0].DisplayColumns.RemoveAt(1);

Self.C1TrueDBGrid1.Splits[0].DisplayColumns.Insert(0, dc);


Moving Columns at Run-Time - Visual Basic

Visual Basic

Dim dc as C1TrueDBGrid.C1DisplayColumn

dc = Me.C1TrueDBGrid1.Splits(0).DisplayColumns(1)

Me.C1TrueDBGrid1.Splits(0).DisplayColumns.RemoveAt(1)

Me.C1TrueDBGrid1.Splits(0).DisplayColumns.Insert(0, dc)


Multiple-line Headers and Footers - C#

C#

this.C1trueDBGrid1.Splits[0].ColumnCaptionHeitght = this.C1trueDBGrid1.Splits[0].ColumnCaptionHeight * 2;

this.C1trueDBGrid1.Columns[0].Caption = "First line\nSecond line";


Multiple-line Headers and Footers - Delphi

Delphi

With Self.C1TrueDBGrid1 do
begin

Splits[0].ColumnCaptionHeight := Splits[0].ColumnCaptionHeight * 2;

Columns[0].Caption := 'First line' + #13#10 + 'Second line';

end;


Multiple-line Headers and Footers - Visual Basic

Visual Basic

With Me.C1TrueDBGrid1

.Splits(0).ColumnCaptionHeight = .Splits(0).ColumnCaptionHeight * 2

.Columns(0).Caption = "First line" + vbCrLf + "Second line"

End With


Namespaces2- C#

C#

using C1Split = C1.Win.C1TrueDBGrid.Split;

using MySplit = MyProject.Split;

C1Split c1;

MySplit c2;


Namespaces2- Delphi

Delphi

uses C1.Win.C1TrueDBGrid, MyProject;

type C1Split = C1.WinC1TrueDBGrid.Split;

type TMySplit = MyProject.Split;

var c1: C1Split;

c2: TMySplit;


Namespaces2- Visual Basic

Visual Basic

Imports C1Split = C1.Win.C1TrueDBGrid.Split

Imports MySplit = MyProject.Split

Dim c1 As C1Split
Dim c2 As MySplit


Namespaces3- C#

C#

using C1.Win.C1TrueDBGrid;


Namespaces3- Delphi

Delphi

uses C1.Win.C1TrueDBGrid;


Namespaces3- Visual Basic

Visual Basic

imports C1.Win.C1TrueDBGrid


Namespaces- C#

C#

C1.Win.C1TrueDBGrid.C1TrueDBGrid tdbgrid;


Namespaces- Delphi

Delphi

var tdbgrid: C1.Win.C1TrueDBGrid.C1TrueDBGrid;


Namespaces- Visual Basic

Visual Basic

Dim tdbgrid As C1.Win.C1TrueDBGrid.C1TrueDBGrid


No Merge - C#

C#

C1TrueDBGrid1.Splits(0).DisplayColumns(0).Merge = C1.Win.C1TrueDBGrid.ColumnMergeEnum.None;

C1TrueDBGrid1.Splits(0).DisplayColumns(1).Merge = C1.Win.C1TrueDBGrid.ColumnMergeEnum.None;

C1TrueDBGrid1.Splits(0).DisplayColumns(2).Merge = C1.Win.C1TrueDBGrid.ColumnMergeEnum.None;

C1TrueDBGrid1.Splits(0).DisplayColumns(3).Merge = C1.Win.C1TrueDBGrid.ColumnMergeEnum.None


No Merge - Delphi

Delphi

C1TrueDBGrid1.Splits(0).DisplayColumns(0).Merge := C1.Win.C1TrueDBGrid.ColumnMergeEnum.None;

C1TrueDBGrid1.Splits(0).DisplayColumns(1).Merge := C1.Win.C1TrueDBGrid.ColumnMergeEnum.None;

C1TrueDBGrid1.Splits(0).DisplayColumns(2).Merge := C1.Win.C1TrueDBGrid.ColumnMergeEnum.None;

C1TrueDBGrid1.Splits(0).DisplayColumns(3).Merge := C1.Win.C1TrueDBGrid.ColumnMergeEnum.None;


No Merge - Visual Basic

Visual Basic

C1TrueDBGrid1.Splits(0).DisplayColumns(0).Merge = C1.Win.C1TrueDBGrid.ColumnMergeEnum.None

C1TrueDBGrid1.Splits(0).DisplayColumns(1).Merge = C1.Win.C1TrueDBGrid.ColumnMergeEnum.None

C1TrueDBGrid1.Splits(0).DisplayColumns(2).Merge = C1.Win.C1TrueDBGrid.ColumnMergeEnum.None

C1TrueDBGrid1.Splits(0).DisplayColumns(3).Merge = C1.Win.C1TrueDBGrid.ColumnMergeEnum.None


Numeric Field Formatting - C#

C#

this.C1TrueDBGrid1.Columns["HireDate"].NumberFormat = "Medium Date";


Numeric Field Formatting - Delphi

Delphi

Self.C1TrueDBGrid1.Columns['HireDate'].NumberFormat := 'Medium Date';


Numeric Field Formatting - Visual Basic

Visual Basic

Me.C1TrueDBGrid1.Columns("HireDate").NumberFormat = "Medium Date"


Owner-Drawn Cells2- C#

C#

private void C1TrueDBGrid1_OwnerDrawCell( object sender, C1.Win.C1TrueDBGrid.OwnerDrawCellEventArgs e)

{

if ( e.Col = 0 ) {

//

// create a gradient brush, blue to red

//

Point pt1, pt2;

pt1 = new Point[e.CellRect.X, e.CellRect.Y];

pt2 = new Point[e.CellRect.Right, e.CellRect.Y];

System.Drawing.Drawing2D.LinearGradientBrush linGrBrush;

linGrBrush = new System.Drawing.Drawing2D.LinearGradientBrush(pt1, pt2, Color.Blue, Color.Red);

RectangleF rt;

rt = new RectangleF(e.CellRect.X, e.CellRect.Y, e.CellRect.Width, e.CellRect.Height);

// fill the cell rectangle with the gradient

e.Graphics.FillRectangle(linGrBrush, e.CellRect);

Brush whiteBR;

whiteBR = new SolidBrush(Color.White);

// draw the text

C1.Win.C1TrueDBGrid.C1DisplayColumn dispCol;

dispCol = this.C1TrueDBGrid1.Splits[0].DisplayColumns[e.Col];

// center text horizontally

StringFormat sfmt = new StringFormat();

sfmt.Alignment = StringAlignment.Center;

// now draw it

e.Graphics.DrawString(dispCol.DataColumn.CellText[e.Row], dispCol.Style.Font, whiteBR, rt, sfmt);

whiteBR.Dispose();

// let the grid know that we handled the event

e.Handled = true;

}

}


Owner-Drawn Cells2- Delphi

Delphi

procedure TWinForm.C1TrueDBGrid1_OwnerDrawCell(sender: System.Object; e: C1.Win.C1TrueDBGrid.OwnerDrawCellEventArgs);

var pt1, pt2: Point;
linGrBrush: System.Drawing.Drawing2D.LinearGradientBrush;
rt: RectangleF;

whiteBR: Brush;
dispCol: C1.Win.C1TrueDBGrid.C1DisplayColumn;
sfmt: StringFormat;

begin

if e.Col = 0 then

begin

//

// create a gradient brush, blue to red

//

pt1 := Point.Create(e.CellRect.X, e.CellRect.Y);

pt2 := Point.Create(e.CellRect.Copy, e.CellRect.Y);

linGrBrush := System.Drawing.Drawing2D.LinearGradientBrush.Create(pt1, pt2, Color.Blue, Color.Red);

rt := RectangleF.Create(e.CellRect.X, e.CellRect.Y, e.CellRect.Width, e.CellRect.Height);

// fill the cell rectangle with the gradient

e.Graphics.FillRectangle(linGrBrush, e.CellRect);

whiteBR := SolidBrush.Create(Color.White);

// draw the text

dispCol := Self.C1TrueDBGrid1.Splits[0].DisplayColumns[e.Col];

// center text horizontally

sfmt := StringFormat.Create;

sfmt.Alignment := StringAlignment.Center;

// now draw it

e.Graphics.DrawString(dispCol.DataColumn.CellText(e.Row), dispCol.Style.Font, whiteBR, rt, sfmt);

whiteBR.Dispose;

// let the grid know that we handled the event

e.Handled := True;

end;

end;


Owner-Drawn Cells2- Visual Basic

Visual Basic

Private Sub C1TrueDBGrid1_OwnerDrawCell(ByVal sender As Object, ByVal e As C1.Win.C1TrueDBGrid.OwnerDrawCellEventArgs) Handles C1TrueDBGrid1.OwnerDrawCell

If e.Col = 0 Then

'

' create a gradient brush, blue to red

'

Dim pt1, pt2 As Point

pt1 = New Point(e.CellRect.X, e.CellRect.Y)

pt2 = New Point(e.CellRect.Right, e.CellRect.Y)

Dim linGrBrush As System.Drawing.Drawing2D.LinearGradientBrush

linGrBrush = New System.Drawing.Drawing2D.LinearGradientBrush(pt1, pt2, Color.Blue, Color.Red)

Dim rt As RectangleF

rt = New RectangleF(e.CellRect.X, e.CellRect.Y, e.CellRect.Width, e.CellRect.Height)

' fill the cell rectangle with the gradient

e.Graphics.FillRectangle(linGrBrush, e.CellRect)

Dim whiteBR As Brush

whiteBR = New SolidBrush(Color.White)

' draw the text

Dim dispCol As C1.Win.C1TrueDBGrid.C1DisplayColumn

dispCol = Me.C1TrueDBGrid1.Splits(0).DisplayColumns(e.Col)

' center text horizontally

Dim sfmt As New StringFormat()

sfmt.Alignment = StringAlignment.Center

' now draw it

e.Graphics.DrawString(dispCol.DataColumn.CellText(e.Row), dispCol.Style.Font, whiteBR, rt, sfmt)

whiteBR.Dispose()

' let the grid know that we handled the event

e.Handled = True

End If

End Sub


Owner-Drawn Cells- C#

C#

public struct RECT{

long Left;

long Top;

long Right;

long Bottom;

} struct


Owner-Drawn Cells- Delphi

Delphi

type RECT = record

Left: LongInt;

Top: LongInt;

Right: LongInt;

Bottom: LongInt;

end;


Owner-Drawn Cells- Visual Basic

Visual Basic

Public Structure RECT

Dim Left As Long

Dim Top As Long

Dim Right As Long

Dim Bottom As Long

End Structure


PageFooter Property2- C#

C#

this.C1TrueDBGrid1.PrintInfo.PageFooter ="\tPage: \g of group \G, \s of subpage \S, \p of page \P";


PageFooter Property2- Delphi

Delphi

Self.C1TrueDBGrid1.PrintInfo.PageFooter := '\tPage: \g of group \G, \s of subpage \S, \p of page \P';


PageFooter Property2- Visual Basic

Visual Basic

Me.C1TrueDBGrid1.PrintInfo.PageFooter = _

Chr(Keys.Tab) + "Page: \g of group \G, \s of subpage \S, \p of page \P"


PageFooter Property- C#

C#

this.C1TrueDBGrid1.PrintInfo.PageFooter = "\tCONFIDENTIAL";


PageFooter Property- Delphi

Delphi

Self.C1TrueDBGrid1.PrintInfo.PageFooter := '\tCONFIDENTIAL';


PageFooter Property- Visual Basic

Visual Basic

Me.C1TrueDBGrid1.PrintInfo.PageFooter = Chr(Keys.Tab) + "CONFIDENTIAL"


PageHeader Property2- C#

C#

this.C1TrueDBGrid1.PrintInfo.PageHeader=_

"\tPage:\g of group \G, \s of subpage \S, \p of page \P";


PageHeader Property2- Delphi

Delphi

Self.C1TrueDBGrid1.PrintInfo.PageHeader:= '\tPage:\g of group \G, \s of subpage \S, \p of page \P';


PageHeader Property2- Visual Basic

Visual Basic

Me.C1TrueDBGrid1.PrintInfo.PageHeader=_

Chr(Keys.Tab) + "Page:\g of group \G, \s of subpage \S, \p of page \P"


PageHeader Property- C#

C#

this.C1TrueDBGrid1.PrintInfo.PageHeader = DateTime.Now.ToString() + "\t\tPage\p";


PageHeader Property- Delphi

Delphi

Self.C1TrueDBGrid1.PrintInfo.PageHeader := DateTime.Now.ToString() + '\t\tPage\p';


PageHeader Property- Visual Basic

Visual Basic

Me.C1TrueDBGrid1.PrintInfo.PageHeader = CStr(Now) + Chr(Keys.Tab) + Chr(Keys.Tab) "Page\p"


PictureAddNewRow Property- C#

C#

this.C1TrueDBGrid1.PictureAddNewRow = System.Drawing.Image.FromFile("asterisk.bmp");


PictureAddNewRow Property- Delphi

Delphi

Self.C1TrueDBGrid1.PictureAddNewRow := System.Drawing.Image.FromFile('asterisk.bmp');


PictureAddNewRow Property- Visual Basic

Visual Basic

Me.C1TrueDBGrid1.PictureAddNewRow = System.Drawing.Image.FromFile("asterisk.bmp")


PictureCurrentRow Property- C#

C#

this.C1TrueDBGrid1.PictureCurrentRow = System.Drawing.Image.FromFile ("arrow.bmp");


PictureCurrentRow Property- Delphi

Delphi

Self.C1TrueDBGrid1.PictureCurrentRow := System.Drawing.Image.FromFile ('arrow.bmp');


PictureCurrentRow Property- Visual Basic

Visual Basic

Me.C1TrueDBGrid1.PictureCurrentRow = System.Drawing.Image.FromFile ("arrow.bmp")


PictureFilterBar Property- C#

C#

this.C1TrueDBGrid1.PictureFilterBar = System.Drawing.Image.FromFile ("funnel.bmp");


PictureFilterBar Property- Delphi

Delphi

Self.C1TrueDBGrid1.PictureFilterBar := System.Drawing.Image.FromFile ('funnel.bmp');


PictureFilterBar Property- Visual Basic

Visual Basic

Me.C1TrueDBGrid1.PictureFilterBar = System.Drawing.Image.FromFile ("funnel.bmp")


PictureFooterRow Property- C#

C#

this.C1TrueDBGrid1.PictureFooterRow = System.Drawing.Image.FromFile ("pattern.bmp");


PictureFooterRow Property- Delphi

Delphi

Self.C1TrueDBGrid1.PictureFooterRow := System.Drawing.Image.FromFile ('pattern.bmp');


PictureFooterRow Property- Visual Basic

Visual Basic

Me.C1TrueDBGrid1.PictureFooterRow = System.Drawing.Image.FromFile ("pattern.bmp")


PictureHeaderRow Property- C#

C#

this.C1TrueDBGrid1.PictureHeaderRow = System.Drawing.Image.FromFile("pattern.bmp");


PictureHeaderRow Property- Delphi

Delphi

Self.C1TrueDBGrid1.PictureHeaderRow := System.Drawing.Image.FromFile('pattern.bmp');


PictureHeaderRow Property- Visual Basic

Visual Basic

Me.C1TrueDBGrid1.PictureHeaderRow = System.Drawing.Image.FromFile("pattern.bmp")


PictureModifiedRow Property- C#

C#

this.C1TrueDBGrid1.PictureModifiedRow = System.Drawing.Image.FromFile("pencil.bmp");


PictureModifiedRow Property- Delphi

Delphi

Self.C1TrueDBGrid1.PictureModifiedRow := System.Drawing.Image.FromFile('pencil.bmp');


PictureModifiedRow Property- Visual Basic

Visual Basic

Me.C1TrueDBGrid1.PictureModifiedRow = System.Drawing.Image.FromFile("pencil.bmp")


PictureStandardRow Property- C#

C#

this.C1TrueDBGrid1.PictureStandardRow = System.Drawing.Image.FromFile("star.bmp");


PictureStandardRow Property- Delphi

Delphi

Self.C1TrueDBGrid1.PictureStandardRow := System.Drawing.Image.FromFile('star.bmp');


PictureStandardRow Property- Visual Basic

Visual Basic

Me.C1TrueDBGrid1.PictureStandardRow = System.Drawing.Image.FromFile("star.bmp")


Placing an Image in a Column Header - C#

C#

Bitmap bmp = new Bitmap("c:\\sort.bmp");


Placing an Image in a Column Header - C#2

C#

c1TrueDBGrid1.Splits[0].DisplayColumns[1].HeadingStyle.ForegroundImage = bmp;

c1TrueDBGrid1.Splits[0].DisplayColumns[1].HeadingStyle.ForeGroundPicturePosition = C1.Win.C1TrueDBGrid.ForeGroundPicturePositionEnum.LeftOfText;


Placing an Image in a Column Header - Delphi

Delphi

Var bmp: Bitmap;
bmp := Bitmap.Create('c:\sort.bmp');


Placing an Image in a Column Header - Delphi2

Delphi

c1TrueDBGrid1.Splits[0].DisplayColumns[1].HeadingStyle.ForegroundImage := bmp;

c1TrueDBGrid1.Splits[0].DisplayColumns[1].HeadingStyle.ForeGroundPicturePosition := C1.Win.C1TrueDBGrid.ForeGroundPicturePositionEnum.LeftOfText;


Placing an Image in a Column Header - Visual Basic

Visual Basic

Dim bmp As New Bitmap("c:\sort.bmp")


Placing an Image in a Column Header - Visual Basic2

Visual Basic

c1TrueDBGrid1.Splits(0).DisplayColumns(1).HeadingStyle.ForegroundImage = bmp

c1TrueDBGrid1.Splits(0).DisplayColumns(1).HeadingStyle.ForeGroundPicturePosition = C1.Win.C1TrueDBGrid.ForeGroundPicturePositionEnum.LeftOfText


Providing a Dropdown Edit Control - C#

C#

private void Form1_Load( System.object sender, System.EventArgs e) base.Load {

C1TrueDBGrid1.MarqueeStyle = MarqueeEnum.SolidCellBorder;

C1TrueDBGrid1.Splits[0].DisplayColumns["Comments"].Button = true;

C1TrueDBGrid1.EditDropDown = true; // Redundant since default = true

}

private void C1TrueDBGrid1_ButtonClick( object sender, C1.Win.C1TrueDBGrid.ColEventArgs e) C1TrueDBGrid1.ButtonClick {

this.C1TrueDBGrid1.EditActive = true; // Place the cell into edit mode

}


Providing a Dropdown Edit Control - Delphi

Delphi

procedure TWinForm.TWinForm_Load(sender: System.Object; e: System.EventArgs);

begin

with Self.C1TrueDBGrid1 do

begin

MarqueeStyle := MarqueeEnum.SolidCellBorder;

Splits[0].DisplayColumns['Comments'].Button := true;

EditDropDown := True // Redundant since default = True

end;

end;

procedure TWinForm.C1TrueDBGrid1_ButtonClick(sender: Object; e: C1.Win.C1TrueDBGrid.ColEventArgs);

begin

Self.C1TrueDBGrid1.EditActive := True; // Place the cell into edit mode

end;


Providing a Dropdown Edit Control - Visual Basic

Visual Basic

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

With Me.C1TrueDBGrid1

.MarqueeStyle = MarqueeEnum.SolidCellBorder

.Splits(0).DisplayColumns("Comments").Button = True

.EditDropDown = True ' Redundant since default = True

End With

End Sub

Private Sub C1TrueDBGrid1_ButtonClick(ByVal sender As Object, ByVal e As C1.Win.C1TrueDBGrid.ColEventArgs) Handles C1TrueDBGrid1.ButtonClick

Me.C1TrueDBGrid1.EditActive = True ' Place the cell into edit mode

End Sub


Referencing Splits and their Properties2- C#

C#

marquee = this.C1TrueDBGrid1.MarqueeStyle;

marquee = this.C1TrueDBGrid1.Splits[1].MarqueeStyle;

marquee = this.C1TrueDBGrid1.Splits[this.C1TrueDBGrid1.SplitIndex].MarqueeStyle;


Referencing Splits and their Properties2- Delphi

Delphi

marquee% := Self.C1TrueDBGrid1.MarqueeStyle;

marquee% := Self.C1TrueDBGrid1.Splits[1].MarqueeStyle;

marquee% := Self.C1TrueDBGrid1.Splits[Self.C1TrueDBGrid1.SplitIndex].MarqueeStyle;


Referencing Splits and their Properties2- Visual Basic

Visual Basic

marquee = Me.C1TrueDBGrid1.MarqueeStyle

marquee = Me.C1TrueDBGrid1.Splits(1).MarqueeStyle

marquee = Me.C1TrueDBGrid1.Splits(Me.C1TrueDBGrid1.SplitIndex).MarqueeStyle


Referencing Splits and their Properties3- C#

C#

this.C1TrueDBGrid1.MarqueeStyle = MarqueeEnum.SolidCellBorder;


Referencing Splits and their Properties3- Delphi

Delphi

Self.C1TrueDBGrid1.MarqueeStyle := MarqueeEnum.SolidCellBorder;


Referencing Splits and their Properties3- Visual Basic

Visual Basic

Me.C1TrueDBGrid1.MarqueeStyle = MarqueeEnum.SolidCellBorder


Referencing Splits and their Properties4- C#

C#

this.C1TrueDBGrid1.Splits[0].MarqueeStyle = MarqueeEnum.SolidCellBorder;

this.C1TrueDBGrid1.Splits[1].MarqueeStyle = MarqueeEnum.SolidCellBorder;


Referencing Splits and their Properties4- Delphi

Delphi

Self.C1TrueDBGrid1.Splits[0].MarqueeStyle := MarqueeEnum.SolidCellBorder;

Self.C1TrueDBGrid1.Splits[1].MarqueeStyle := MarqueeEnum.SolidCellBorder;


Referencing Splits and their Properties4- Visual Basic

Visual Basic

Me.C1TrueDBGrid1.Splits(0).MarqueeStyle = MarqueeEnum.SolidCellBorder

Me.C1TrueDBGrid1.Splits(1).MarqueeStyle = MarqueeEnum.SolidCellBorder


Referencing Splits and their Properties5- C#

C#

this.C1TrueDBGrid1.Splits[0].MarqueeStyle = MarqueeEnum.NoMarquee;

this.C1TrueDBGrid1.Splits[1].MarqueeStyle = MarqueeEnum.FloatingEditor;


Referencing Splits and their Properties5- Delphi

Delphi

Self.C1TrueDBGrid1.Splits[0].MarqueeStyle := MarqueeEnum.NoMarquee;

Self.C1TrueDBGrid1.Splits[1].MarqueeStyle := MarqueeEnum.FloatingEditor;


Referencing Splits and their Properties5- Visual Basic

Visual Basic

Me.C1TrueDBGrid1.Splits(0).MarqueeStyle = MarqueeEnum.NoMarquee

Me.C1TrueDBGrid1.Splits(1).MarqueeStyle = MarqueeEnum.FloatingEditor


Referencing Splits and their Properties- C#

C#

// Read the zero-based index of the current split

int idx = this.C1TrueDBGrid1.SplitIndex;

// set focus to the split with an index equal to Variable%

this.C1TrueDBGrid1.SplitIndex = idx;


Referencing Splits and their Properties- Delphi

Delphi

// Read the zero-based index of the current split

Variable% := Self.C1TrueDBGrid1.SplitIndex;

// Set focus to the split with an index equal to Variable%

Self.C1TrueDBGrid1.SplitIndex := Variable%;


Referencing Splits and their Properties- Visual Basic

Visual Basic

' Read the zero-based index of the current split

Dim idx as Integer = Me.C1TrueDBGrid1.SplitIndex

' Set focus to the split with an index equal to Variable%

Me.C1TrueDBGrid1.SplitIndex = idx


Removing Members - C#

C#

// Remove the Split object with index 1

this.TrueDBGrid1.Columns[0].ValueItems.Values.RemoveAt[1];


Removing Members - Delphi

Delphi

// Remove the Split object with index 1

Self.TrueDBGrid1.Columns[0].ValueItems.Values.RemoveAt(1);


Removing Members - Visual Basic

Visual Basic

' Remove the Split object with index 1

Me.TrueDBGrid1.Columns(0).ValueItems.Values.RemoveAt(1)


Rendering Cells as Command Buttons - C#

C#

this.C1TrueDBGrid1.Splits[0].DisplayColumns[0].ButtonText = true;


Rendering Cells as Command Buttons - Delphi

Delphi

Self.C1TrueDBGrid1.Splits[0].DisplayColumns[0].ButtonText := True;


Rendering Cells as Command Buttons - Visual Basic

Visual Basic

Me.C1TrueDBGrid1.Splits(0).DisplayColumns(0).ButtonText = True


Restricted Merge - C#

C#

// restricted merging

C1TrueDBGrid1.Splits(0).DisplayColumns(0).Merge = C1.Win.C1TrueDBGrid.ColumnMergeEnum.Restricted;

C1TrueDBGrid1.Splits(0).DisplayColumns(1).Merge = C1.Win.C1TrueDBGrid.ColumnMergeEnum.Restricted;

C1TrueDBGrid1.Splits(0).DisplayColumns(2).Merge = C1.Win.C1TrueDBGrid.ColumnMergeEnum.Restricted;

C1TrueDBGrid1.Splits(0).DisplayColumns(3).Merge = C1.Win.C1TrueDBGrid.ColumnMergeEnum.None;

// setting all of the column's veritcal allignment to Center

C1TrueDBGrid1.Splits(0).DisplayColumns(0).Style.VerticalAlignment = C1.Win.C1TrueDBGrid.AlignVertEnum.Center;

C1TrueDBGrid1.Splits(0).DisplayColumns(1).Style.VerticalAlignment = C1.Win.C1TrueDBGrid.AlignVertEnum.Center;

C1TrueDBGrid1.Splits(0).DisplayColumns(2).Style.VerticalAlignment = C1.Win.C1TrueDBGrid.AlignVertEnum.Center;

C1TrueDBGrid1.Splits(0).DisplayColumns(3).Style.VerticalAlignment = C1.Win.C1TrueDBGrid.AlignVertEnum.Center;


Restricted Merge - Delphi

Delphi

C1TrueDBGrid1.Splits(0).DisplayColumns(0).Merge := C1.Win.C1TrueDBGrid.ColumnMergeEnum.Restricted;

C1TrueDBGrid1.Splits(0).DisplayColumns(1).Merge := C1.Win.C1TrueDBGrid.ColumnMergeEnum.Restricted;

C1TrueDBGrid1.Splits(0).DisplayColumns(2).Merge := C1.Win.C1TrueDBGrid.ColumnMergeEnum.Restricted;

C1TrueDBGrid1.Splits(0).DisplayColumns(3).Merge := C1.Win.C1TrueDBGrid.ColumnMergeEnum.None;

C1TrueDBGrid1.Splits(0).DisplayColumns(0).Style.VerticalAlignment := C1.Win.C1TrueDBGrid.AlignVertEnum.Center;

C1TrueDBGrid1.Splits(0).DisplayColumns(1).Style.VerticalAlignment := C1.Win.C1TrueDBGrid.AlignVertEnum.Center;

C1TrueDBGrid1.Splits(0).DisplayColumns(2).Style.VerticalAlignment := C1.Win.C1TrueDBGrid.AlignVertEnum.Center;

C1TrueDBGrid1.Splits(0).DisplayColumns(3).Style.VerticalAlignment := C1.Win.C1TrueDBGrid.AlignVertEnum.Center;


Restricted Merge - Visual Basic

Visual Basic

' restricted merging

C1TrueDBGrid1.Splits(0).DisplayColumns(0).Merge = C1.Win.C1TrueDBGrid.ColumnMergeEnum.Restricted

C1TrueDBGrid1.Splits(0).DisplayColumns(1).Merge = C1.Win.C1TrueDBGrid.ColumnMergeEnum.Restricted

C1TrueDBGrid1.Splits(0).DisplayColumns(2).Merge = C1.Win.C1TrueDBGrid.ColumnMergeEnum.Restricted

C1TrueDBGrid1.Splits(0).DisplayColumns(3).Merge = C1.Win.C1TrueDBGrid.ColumnMergeEnum.None

' setting all of the column's veritcal allignment to Center

C1TrueDBGrid1.Splits(0).DisplayColumns(0).Style.VerticalAlignment = C1.Win.C1TrueDBGrid.AlignVertEnum.Center

C1TrueDBGrid1.Splits(0).DisplayColumns(1).Style.VerticalAlignment = C1.Win.C1TrueDBGrid.AlignVertEnum.Center

C1TrueDBGrid1.Splits(0).DisplayColumns(2).Style.VerticalAlignment = C1.Win.C1TrueDBGrid.AlignVertEnum.Center

C1TrueDBGrid1.Splits(0).DisplayColumns(3).Style.VerticalAlignment = C1.Win.C1TrueDBGrid.AlignVertEnum.Center


Restricting Cell Navigation- C#

C#

private void C1TrueDBGrid1_BeforeColUpdate( object sender, C1.Win.C1TrueDBGrid.BeforeColUpdateEventArgs e)

{

int CharCode;

if ( e.ColIndex == 1 ) {

// Data in Column 1 must start with upper case

CharCode = this.C1TrueDBGrid1.Columns[1].Text[0];

if ( CharCode > 64 && CharCode < 91 ) return;

// Display warning message for user

MessagBox.Show("Last name must start with upper case");

// Data validation fails, prohibit user from moving to

// another cell

e.Cancel = true;

}

}


Restricting Cell Navigation- Delphi

Delphi

procedure TWinForm.C1TrueDBGrid1_BeforeColUpdate(sender: System.Object; e: C1.Win.C1TrueDBGrid.BeforeColUpdateEventArgs);

var CharCode: Integer;
begin
if (e.ColIndex = 1) then
begin
// Data in Column 1 must start with upper case

CharCode := Integer(this.C1TrueDBGrid1.Columns[1].Text[0]);

if ( CharCode > 64 && CharCode < 91 ) then
Exit;

// Display warning message for user

MessageBox.Show('Last name must start with upper case');

// Data validation fails, prohibit user from moving to

// another cell

e.Cancel = true;

end;
end;


Restricting Cell Navigation- Visual Basic

Visual Basic

Private Sub C1TrueDBGrid1_BeforeColUpdate(ByVal sender As Object, ByVal e As C1.Win.C1TrueDBGrid.BeforeColUpdateEventArgs) Handles C1TrueDBGrid1.BeforeColUpdate

Dim CharCode As Integer

If e.ColIndex = 1 Then

' Data in Column 1 must start with upper case

CharCode = Asc(Me.C1TrueDBGrid1.Columns(1).Text)

If CharCode > 64 And CharCode < 91 Then Exit Sub

' Display warning message for user

MessageBox.Show("Last name must start with upper case")

' Data validation fails, prohibit user from moving to

' another cell

e.Cancel = True

End If

End Sub


RowHeight Property (C1TrueDBGrid) - C#

C#

this.C1TrueDBGrid1.RowHeight = 0;

this.C1TrueDBGrid1.RowHeight = this.C1TrueDBGrid1.RowHeight * 2;


RowHeight Property (C1TrueDBGrid) - Delphi

Delphi

Self.C1TrueDBGrid1.RowHeight := 0;

Self.C1TrueDBGrid1.RowHeight := Self.C1TrueDBGrid1.RowHeight * 2;


RowHeight Property (C1TrueDBGrid) - Visual Basic

Visual Basic

Me.C1TrueDBGrid1.RowHeight = 0

Me.C1TrueDBGrid1.RowHeight = Me.C1TrueDBGrid1.RowHeight * 2


SelectedRowCollection.Add Method - C#

C#

this.C1TrueDBGrid1.SelectedRows.Add(this.C1TrueDBGrid1.Bookmark);


SelectedRowCollection.Add Method - Delphi

Delphi

Self.C1TrueDBGrid1.SelectedRows.Add(Self.C1TrueDBGrid1.Bookmark);


SelectedRowCollection.Add Method - Visual Basic

Visual Basic

Me.C1TrueDBGrid1.SelectedRows.Add(Me.C1TrueDBGrid1.Bookmark)


Selecting a Row - C#

C#

this.C1TrueDBGrid1.SelectedRows.Add(this.C1TrueDBGrid1.Bookmark);


Selecting a Row - Delphi

Delphi

Self.C1TrueDBGrid1.SelectedRows.Add(Self.C1TrueDBGrid1.Bookmark);


Selecting a Row - Visual Basic

Visual Basic

Me.C1TrueDBGrid1.SelectedRows.Add(Me.C1TrueDBGrid1.Bookmark)


Selecting Columns - C#

C#

dc as C1TrueDBGrid.C1DataColumn;

dc = this.C1TrueDBGrid1.SelectedCols[0];

this.C1TrueDBGrid1.Splits[0].DisplayColumns[dc].Style.ForeColor = System.Drawing.Color.Red;


Selecting Columns - Delphi

Delphi

var dc: C1TrueDBGrid.C1DataColumn;

dc := Self.C1TrueDBGrid1.SelectedCols[0];

Self.C1TrueDBGrid1.Splits[0].DisplayColumns.Item[dc].Style.ForeColor := System.Drawing.Color.Red;


Selecting Columns - Visual Basic

Visual Basic

Dim dc as C1TrueDBGrid.C1DataColumn

dc = Me.C1TrueDBGrid1.SelectedCols(0)

Me.C1TrueDBGrid1.Splits(0).DisplayColumns(dc).Style.ForeColor = System.Drawing.Color.Red


Setting the Background Color of a Row - C#

C#

this.C1TrueDBGrid1.FetchRowStyles = true;


Setting the Background Color of a Row - C#2

C#

private void C1TrueDBGrid1_FetchRowStyle(object sender, C1.Win.C1TrueDBGrid.FetchRowStyleEventArgs e)

{

string S = C1TrueDBGrid1.Columns("Country").CellText(e.Row).ToString;

if (S != "Germany") {

e.CellStyle.BackColor = System.Drawing.Color.LemonChiffon;

}
}


Setting the Background Color of a Row - Delphi

Delphi

Self.C1TrueDBGrid1.FetchRowStyles := true;


Setting the Background Color of a Row - Delphi2

Delphi

Procedure TForm1.C1TrueDBGrid1_FetchRowStyle(sender: object; e: C1.Win.C1TrueDBGrid.FetchRowStyleEventArgs);
var S: string;
begin

S := C1TrueDBGrid1.Columns['Country'].CellText(e.Row).ToString;

if (S <> 'Germany') then
e.CellStyle.BackColor := System.Drawing.Color.LemonChiffon;

end;


Setting the Background Color of a Row - Visual Basic

Visual Basic

Me.C1TrueDBGrid1.FetchRowStyles = True


Setting the Background Color of a Row - Visual Basic2

Visual Basic

Private Sub C1TrueDBGrid1_FetchRowStyle(ByVal sender As Object, ByVal e As C1.Win.C1TrueDBGrid.FetchRowStyleEventArgs) Handles C1TrueDBGrid1.FetchRowStyle

Dim S As String = C1TrueDBGrid1.Columns("Country").CellText(e.Row).ToString

If S <> "Germany" Then

e.CellStyle.BackColor = System.Drawing.Color.LemonChiffon

End If

End Sub


Sizing and Scaling Splits2- C#

C#

this.C1TrueDBGrid1.Splits[0].SplitSize = 1; // Change relative size to 1

this.C1TrueDBGrid1.Splits[1].SplitSize = 2; // Change relative size to 2

this.C1TrueDBGrid1.Splits[2].SplitSize = 3; // Change relative size to 3


Sizing and Scaling Splits2- Delphi

Delphi

Self.C1TrueDBGrid1.Splits[0].SplitSize := 1; // Change relative size to 1

Self.C1TrueDBGrid1.Splits[1].SplitSize := 2; // Change relative size to 2

Self.C1TrueDBGrid1.Splits[2].SplitSize := 3; // Change relative size to 3


Sizing and Scaling Splits2- Visual Basic

Visual Basic

Me.C1TrueDBGrid1.Splits(0).SplitSize = 1 ' Change relative size to 1

Me.C1TrueDBGrid1.Splits(1).SplitSize = 2 ' Change relative size to 2

Me.C1TrueDBGrid1.Splits(2).SplitSize = 3 ' Change relative size to 3


Sizing and Scaling Splits3- C#

C#

Split0.SplitSizeMode = SizeModeEnum.Scalable;

Split0.SplitSize = 1;

Split1.SplitSizeMode = SizeModeEnum.Exact;

Split1.SplitSize = 2500;

Split2.SplitSizeMode = SizeModeEnum.Scalable;

Split2.SplitSize = 2;


Sizing and Scaling Splits3- Delphi

Delphi

Split0.SplitSizeMode := SizeModeEnum.Scalable;

Split0.SplitSize := 1;

Split1.SplitSizeMode := SizeModeEnum.Exact;

Split1.SplitSize := 2500;

Split2.SplitSizeMode := SizeModeEnum.Scalable;

Split2.SplitSize := 2;


Sizing and Scaling Splits3- Visual Basic

Visual Basic

Split0.SplitSizeMode = SizeModeEnum.Scalable

Split0.SplitSize = 1

Split1.SplitSizeMode = SizeModeEnum.Exact

Split1.SplitSize = 2500

Split2.SplitSizeMode = SizeModeEnum.Scalable

Split2.SplitSize = 2


Sizing and Scaling Splits- C#

C#

this.C1TrueDBGrid1.InsertHorizontalSplit(0); //Create Split on the left

this.C1TrueDBGrid1.InsertHorizontalSplit(0); //Create another


Sizing and Scaling Splits- Delphi

Delphi

Self.C1TrueDBGrid1.InsertHorizontalSplit(0); // Create Split on the left

Self.C1TrueDBGrid1.InsertHorizontalSplit(0); // Create another


Sizing and Scaling Splits- Visual Basic

Visual Basic

Me.C1TrueDBGrid1.InsertHorizontalSplit(0) 'Create Split on the left

Me.C1TrueDBGrid1.InsertHorizontalSplit(0) 'Create another


Specifying an Input Mask for a Column - C#

C#

// set the mask so the user can enter a phone number,

// with optional area code, and a state in capitals.

this.C1TrueDBGrid1.Columns[0].EditMask = "(###) 000-0000 St\ate\: >LL";


Specifying an Input Mask for a Column - Delphi

Delphi

// set the mask so the user can enter a phone number,

// with optional area code, and a state in capitals.

Self.C1TrueDBGrid1.Columns[0].EditMask := '(###) 000-0000 St\ate\: >LL';


Specifying an Input Mask for a Column - Visual Basic

Visual Basic

' set the mask so the user can enter a phone number,
' with optional area code, and a state in capitals.
Me.C1TrueDBGrid1.Columns(0).EditMask = "(###) 000-0000 St\ate\: >LL"


Specifying Text-to-Picture Translations - C#

C#

C1.Win.C1TrueDBGrid.ValueItemCollection v = this.C1TrueDBGrid.Columns["Country"].ValueItems.Values;

C1.Win.C1TrueDBGrid.ValueItem Item = new C1.Win.C1TrueDBGrid.ValueItem();

Item.value = "CAN";

Item.DisplayValue = System.Drawing.Image.FromFile["canada.bmp"];

v.Add[Item];

Item = new C1.Win.C1TrueDBGrid.ValueItem();

Item.value = "UK";

Item.DisplayValue = System.Drawing.Image.FromFile["uk.bmp"];

v.Add[Item];

Item = new C1.Win.C1TrueDBGrid.ValueItem();

Item.value = "USA";

Item.DisplayValue = System.Drawing.Image.FromFile["usa.bmp"];

v.Add[Item];

Item = new C1.Win.C1TrueDBGrid.ValueItem();

Item.value = "JPN";

Item.DisplayValue = System.Drawing.Image.FromFile["japan.bmp"];

v.Add[Item];

Item = new C1.Win.C1TrueDBGrid.ValueItem();

Item.value = "AUS";

Item.DisplayValue = System.Drawing.Image.FromFile["australia.bmp"];

v.Add[Item];

this.C1TrueDBGrid1.Columns["Country"].ValueItems.Translate = true;


Specifying Text-to-Picture Translations - Delphi

Delphi

var item1: C1TrueDBGrid.ValueItem;

with Self.C1TrueDBGrid1.Columns['Country'] do

begin

item1 := C1.Win.C1TrueDBGrid.ValueItem.Create;

item1.Value := 'CAN';

item1.DisplayValue := System.Drawing.Image.FromFile('canada.bmp');

Add(item1);

item1 := C1.Win.C1TrueDBGrid.ValueItem.Create;

item1.Value := 'UK';

item1.DisplayValue := System.Drawing.Image.FromFile('uk.bmp');

Add(item1);

item1 := C1.Win.C1TrueDBGrid.ValueItem.Create;

item1.Value := 'USA';

item1.DisplayValue := System.Drawing.Image.FromFile('us.bmp');

Add(item1);

item1 := C1.Win.C1TrueDBGrid.ValueItem.Create;

item1.Value := 'JPN';

item1.DisplayValue := System.Drawing.Image.FromFile('japan.bmp');

Add(item1);

item1 := C1.Win.C1TrueDBGrid.ValueItem.Create;

item1.Value := 'AUS';

item1.DisplayValue := System.Drawing.Image.FromFile('australia.bmp');

Add(item1);

Self.C1TrueDBGrid1.Columns['Country'].ValueItems.Translate := true;

end;


Specifying Text-to-Picture Translations - Visual Basic

Visual Basic

Dim Item As New C1.Win.C1TrueDBGrid.ValueItem()

With Me.C1TrueDBGrid1.Columns("Country").ValueItems.Values

Item.Value = "CAN"

Item.DisplayValue = System.Drawing.Image.FromFile("canada.bmp")

.Add(Item)
Item = New C1.Win.C1TrueDBGrid.ValueItem()

Item.Value = "UK"

Item.DisplayValue = System.Drawing.Image.FromFile("uk.bmp")

.Add(Item)
Item = New C1.Win.C1TrueDBGrid.ValueItem()

Item.Value = "USA"

Item.DisplayValue = System.Drawing.Image.FromFile("usa.bmp")

.Add(Item)
Item = New C1.Win.C1TrueDBGrid.ValueItem()

Item.Value = "JPN"

Item.DisplayValue = System.Drawing.Image.FromFile("japan.bmp")

.Add(Item)
Item = New C1.Win.C1TrueDBGrid.ValueItem()

Item.Value = "AUS"

Item.DisplayValue = System.Drawing.Image.FromFile("australia.bmp")

.Add(Item)

Me.C1TrueDBGrid1.Columns("Country").ValueItems.Translate = True

End With


Specifying Text-to-Text Translations - C#

C#

C1.Win.C1TrueDBGrid.ValueItemCollection v = this.C1TrueDBGrid.Columns["Country"].ValueItems.Values;

v.Add(new C1TrueDBGrid.ValueItem("CAN","Canada"));

v.Add(new C1TrueDBGrid.ValueItem("UK","United Kingdom"));

v.Add(new C1TrueDBGrid.ValueItem("USA","United States"));

v.Add(new C1TrueDBGrid.ValueItem("JPN","Japan"));

v.Add(new C1TrueDBGrid.ValueItem("AUS","Australia"));

this.C1TrueDBGrid1.Columns["Country"].ValueItems.Translate = true;


Specifying Text-to-Text Translations - Delphi

Delphi

var item1: C1TrueDBGrid.ValueItem;

with Self.C1TrueDBGrid1.Columns['Country'] do

begin

item1 := C1.Win.C1TrueDBGrid.ValueItem.Create;

item1.Value :='CAN';

item1.DisplayValue :='Canada';

Add(item1);

item1 := C1.Win.C1TrueDBGrid.ValueItem.Create;

item1.Value :='UK';

item1.DisplayValue :='United Kingdom';

Add(item1);

item1 := C1.Win.C1TrueDBGrid.ValueItem.Create;

item1.Value :='USA';

item1.DisplayValue :='United States';

Add(item1);

item1 := C1.Win.C1TrueDBGrid.ValueItem.Create;

item1.Value :='JPN';

item1.DisplayValue :='Japan';

Add(item1);

item1 := C1.Win.C1TrueDBGrid.ValueItem.Create;

item1.Value :='AUS';

item1.DisplayValue :='Australia';

Add(item1);

Self.C1TrueDBGrid1.Columns['Country'].ValueItems.Translate := true;

end;


Specifying Text-to-Text Translations - Visual Basic

Visual Basic

Dim v as C1.Win.C1TrueDBGrid.ValueItemCollection

v = Me.C1TrueDBGrid1.Columns("Country").ValueItems.Values

v.Add(new C1TrueDBGrid.ValueItem("CAN","Canada"))

v.Add(new C1TrueDBGrid.ValueItem("UK","United Kingdom"))

v.Add(new C1TrueDBGrid.ValueItem("USA","United States"))

v.Add(new C1TrueDBGrid.ValueItem("JPN","Japan"))

v.Add(new C1TrueDBGrid.ValueItem("AUS","Australia"))

Me.C1TrueDBGrid1.Columns("Country").ValueItems.Translate = True


Split.ColumnCaptionHeight - C#

C#

this.C1trueDBGrid1.Splits[0].ColumnCaptionHeitght = this.C1trueDBGrid1.Splits[0].ColumnCaptionHeight * 2;

this.C1trueDBGrid1.Columns[0].Caption = "First line\nSecond line";


Split.ColumnCaptionHeight - Delphi

Delphi

With Self.C1TrueDBGrid1 do
begin

Splits[0].ColumnCaptionHeight := Splits[0].ColumnCaptionHeight * 2;

Columns[0].Caption := 'First line' + #13#10 + 'Second line';

end;


Split.ColumnCaptionHeight - Visual Basic

Visual Basic

With Me.C1TrueDBGrid1

.Splits(0).ColumnCaptionHeight = .Splits(0).ColumnCaptionHeight * 2

.Columns(0).Caption = "First line" + vbCrLf + "Second line"

End With


SplitIndex Property- C#

C#

this.C1TrueDBGrid1.SplitIndex = 2;


SplitIndex Property- Delphi

Delphi

Self.C1TrueDBGrid1.SplitIndex := 2;


SplitIndex Property- Visual Basic

Visual Basic

Me.C1TrueDBGrid1.SplitIndex = 2


Split Matrix Notation2- C#

C#

this.C1TrueDBGrid1.Splits[1].Style.ForeColor = System.Drawing.Color.Blue ;


Split Matrix Notation2- Delphi

Delphi

Self.C1TrueDBGrid1.Splits[1].Style.ForeColor := System.Drawing.Color.Blue;


Split Matrix Notation2- Visual Basic

Visual Basic

Me.C1TrueDBGrid1.Splits(1).Style.ForeColor = System.Drawing.Color.Blue


Split Matrix Notation- C#

C#

this.C1TrueDBGrid1.Splits[2,1].Style.ForeColor = System.Drawing.Color.Blue;


Split Matrix Notation- Delphi

Delphi

Self.C1TrueDBGrid1.Splits.Item[2,1].Style.ForeColor := System.Drawing.Color.Blue;


Split Matrix Notation- Visual Basic

Visual Basic

Me.C1TrueDBGrid1.Splits.Item(2,1).Style.ForeColor = System.Drawing.Color.Blue


Split Object - C#

C#

this.C1TrueDBGrid1.Splits[0].Caption = "Split00";


Split Object - Delphi

Delphi

Self.C1TrueDBGrid1.Splits[0].Caption := ''Split00'';


Split Object - Visual Basic

Visual Basic

Me.C1TrueDBGrid1.Splits(0).Caption = "Split00"


Splits Property2- C#

C#

this.C1TrueDBGrid.Splits["ThirdSplit"].SpringMode = true;


Splits Property2- Delphi

Delphi

Self.C1TrueDBGrid.Splits['ThirdSplit'].SpringMode := True;


Splits Property2- Visual Basic

Visual Basic

Me.C1TrueDBGrid.Splits("ThirdSplit").SpringMode = True


Splits Property3- C#

C#

this.C1TrueDBGrid.Splits[2, 0].SpringMode = true;


Splits Property3- Delphi

Delphi

Self.C1TrueDBGrid.Splits[2, 0].SpringMode := True;


Splits Property3- Visual Basic

Visual Basic

Me.C1TrueDBGrid.Splits(2, 0).SpringMode = True


Splits Property- C#

C#

this.C1TrueDBGrid.Splits[2].SpringMode = true;


Splits Property- Delphi

Delphi

Self.C1TrueDBGrid.Splits[2].SpringMode := True;


Splits Property- Visual Basic

Visual Basic

Me.C1TrueDBGrid.Splits(2).SpringMode = True


Standard Keystroke Events - C#

C#

private void C1trueDBGrid1_KeyPress(object sender, System.Windows.Forms.KeyPressEventArgs e){

// Cancel user key input if it is not a letter or a digit

if (! e.Keychar.IsLetterOrDigit(e.KeyChar]){

e.Handled = true ;

}

}


Standard Keystroke Events - Delphi

Delphi

procedure TWinForm.C1TrueDBGrid1_KeyPress(sender: System.Object; e: System.Windows.Forms.KeyPressEventArgs);
begin

// Cancel user key input if it is not a letter or a digit

If not e.KeyChar.IsLetterOrDigit(e.KeyChar) then

e.Handled := True;

end;


Standard Keystroke Events - Visual Basic

Visual Basic

Private Sub C1TrueDBGrid1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles C1TrueDBGrid1.KeyPress

' Cancel user key input if it is not a letter or a digit

If Not e.KeyChar.IsLetterOrDigit(e.KeyChar) Then

e.Handled = True

End If

End Sub


Style.ForeGroundPicturePosition Property - C#

C#

c1TrueDBGrid1.Splits[0].DisplayColumns[1].HeadingStyle.ForeGroundPicturePosition = C1.Win.C1TrueDBGrid.ForeGroundPicturePositionEnum.LeftOfText;


Style.ForeGroundPicturePosition Property - Delphi

Delphi

c1TrueDBGrid1.Splits[0].DisplayColumns[1].HeadingStyle.ForeGroundPicturePosition := C1.Win.C1TrueDBGrid.ForeGroundPicturePositionEnum.LeftOfText;


Style.ForeGroundPicturePosition Property - Visual Basic

Visual Basic

c1TrueDBGrid1.Splits(0).DisplayColumns(1).HeadingStyle.ForeGroundPicturePosition = C1.Win.C1TrueDBGrid.ForeGroundPicturePositionEnum.LeftOfText


Style Object - C#

C#

this.C1TrueDBGrid1.Styles["Normal"].Backcolor = System.Drawing.Color.Gray;


Style Object - Delphi

Delphi

Self.C1TrueDBGrid1.Styles[''Normal''].Backcolor := System.Drawing.Color.Gray;


Style Object - Visual Basic

Visual Basic

Me.C1TrueDBGrid1.Styles("Normal").Backcolor = System.Drawing.Color.Gray


Tutorial 1 - C#

C#

this.ComposerTableAdapter.Fill(this.DsComposer.Composer);


Tutorial 1 - Delphi

Delphi

Self.ComposerTableAdapter.Fill(Self.DsComposer.Composer);


Tutorial 1 - Visual Basic

Visual Basic

Me.ComposerTableAdapter.Fill(Me.DsComposer.Composer)


Tutorial 2- C#

C#

this.ComposerTableAdapter.Fill(this.DsComposer.Composer);


Tutorial 2- C#2

C#

private void Button1_Click( System.object sender, System.EventArgs e) Button1.Click

{

string sqlStr = TextBox1.Text;

da as Oledb.OleDbDataAdapter = New_ Oledb.OleDbDataAdapter (sqlStr, this.ComposerTableAdapter.Connection);

DataSet DataSet ds = new DataSet();

ds.Clear();

try {

da.Fill(ds, "mySQL");

this.C1TrueDBGrid1.SetDataBinding(ds.Tables["mySQL"], "", false);

}

catch () {

MessageBox.Show ("Error in SQL clause");

}

}


Tutorial 2- Delphi

Delphi

Self.ComposerTableAdapter.Fill(Self.DsComposer.Composer);


Tutorial 2- Delphi 2

Delphi

procedure TWinForm.button1_Click(sender: System.Object; e: System.EventArgs);

var

SqlStr: string;

Adapter: OleDbDataAdapter;

Ds: DataSet;

begin

SqlStr := textBox1.Text;

Adapter := OleDbDataAdapter.Create(SqlStr, Self.ComposerTableAdapter.Connection);

Ds := DataSet.Create;

Ds.Clear;

try

Adapter.Fill(Ds, 'mySQL');

c1TrueDBGrid1.DataSource := nil;

c1TrueDBGrid1.ClearFields;

c1TrueDBGrid1.DataSource := Ds.Tables['mySQL'];

except

MessageBox.Show('Error in SQL clause.');

end;

end;


Tutorial 2- Visual Basic

Visual Basic

Me.ComposerTableAdapter.Fill(Me.DsComposer.Composer)


Tutorial 2- Visual Basic2

Visual Basic

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

Dim sqlStr As String = TextBox1.Text

Dim da as Oledb.OleDbDataAdapter = New_ Oledb.OleDbDataAdapter (sqlStr, Me.ComposerTableAdapter.Connection)

Dim ds As DataSet = New DataSet()

ds.Clear()

Try

da.Fill(ds, "mySQL")

Me.C1TrueDBGrid1.SetDataBinding(ds.Tables("mySQL"), "", False)

Catch

MessageBox.Show("Error in SQL clause")

End Try

End Sub


Tutorial 3- C#

C#

this.ComposerTableAdapter.Fill(this.DsMasterDetail.Composer);


Tutorial 3- Delphi

Delphi

Self.ComposerTableAdapter.Fill(Self.DsMasterDetail.Composer);


Tutorial 3- Visual Basic

Visual Basic

Me.ComposerTableAdapter.Fill(Me.DsMasterDetail.Composer)


Tutorial 4- C#

C#

this.CustomersTableAdapter.Fill(this.DsCustomers.Customers);


Tutorial 4- C#2

C#

private void btnFirst_Click( System.object sender, System.EventArgs e) {

// Move to the first record in the grid

this.C1TrueDBGrid1.MoveFirst();

}

private void btnNext_Click( System.object sender, System.EventArgs e) {

// Move to the next record in the grid

this.C1TrueDBGrid1.MoveNext();

}

private void btnPrevious_Click( System.object sender, System.EventArgs e) {

// Move to the previous record in the grid

this.C1TrueDBGrid1.MovePrevious();

}

private void btnLast_Click( System.object sender, System.EventArgs e) {

// Move to the last record in the grid

this.C1TrueDBGrid1.MoveLast();

}


Tutorial 4- C#3

C#

private void btnDelete_Click( System.object sender, System.EventArgs e) {

// Delete the record and save the changes to the database

this.C1TrueDBGrid1.Delete();

UpdateCustomers();

}

private void BtnUpdate_Click( System.object sender, System.EventArgs e) {

// Update the grid, call the UpdateCustomers sub to save

this.C1TrueDBGrid1.UpdateData();

UpdateCustomers();

}

private void BtnAdd_Click( System.object sender, System.EventArgs e) btnAdd.Click {

// This "Add new" button moves the cursor to the

// "new (blank) row" at the end so that user can start

// adding data to the new record.

// Move to last record, "new row" will be visible

this.C1TrueDBGrid1.MoveLast();

// Move to the "addnew row", and set focus to the grid

this.C1TrueDBGrid1.Row = this.C1TrueDBGrid1.Row + 1;

this.C1TrueDBGrid1.Select();

}


Tutorial 4- C#4

C#

private void UpdateCustomers() {

this.CustomersTableAdapter.Connection.Open();

System.Data.DataSet UpdatedRows;

System.Data.DataSet InsertedRows;

System.Data.DataSet DeletedRows;

//these three are Data Tables that hold any changes that have been made to the dataset since the last update.

UpdatedRows = this.DsCustomers.GetChanges(DataRowState.Modified);

InsertedRows = this.DsCustomers.GetChanges(DataRowState.Added);

DeletedRows = this.DsCustomers.GetChanges(DataRowState.Deleted);

try {

//for each of these, we have to make sure that the Data Tables contain any records, otherwise, we will get an error.

if (! UpdatedRows == null ) this.CustomersTableAdapter.Update(UpdatedRows)

if (! InsertedRows == null ) this.CustomersTableAdapter.Update(InsertedRows)

if (! DeletedRows == null ) this.CustomersTableAdapter.Update(DeletedRows)

}

catch (System.Exception eUpdate) {

MessageBox.Show ("Caught exception: " + eUpdate.Message);

}

this.CustomersTableAdapter.Connection.Close();

}


Tutorial 4- Delphi

Delphi

Self.CustomersTableAdapter.Fill(Self.DsCustomers.Customers);


Tutorial 4- Delphi2

Delphi

procedure TWinForm.button4_Click(sender: System.Object; e: System.EventArgs);

begin

// Move to the first record in the grid

c1TrueDBGrid1.MoveFirst;

end;

procedure TWinForm.button5_Click(sender: System.Object; e: System.EventArgs);

begin

// Move to the next record in the grid

c1TrueDBGrid1.MoveNext;

end;

procedure TWinForm.button6_Click(sender: System.Object; e: System.EventArgs);

begin

// Move to the previous record in the grid

c1TrueDBGrid1.MovePrevious;

end;

procedure TWinForm.button7_Click(sender: System.Object; e: System.EventArgs);

begin

// Move to the last record in the grid

c1TrueDBGrid1.MoveLast;

end;


Tutorial 4- Delphi3

Delphi

procedure TWinForm.BtnDelete_Click(sender: System.Object; ByVal e As System.EventArgs);

begin

// Delete the record and save the changes to the database

Self.C1TrueDBGrid1.Delete;

UpdateCustomers;

end;

procedure TWinForm.BtnUpdate_Click(sender: System.Object; e: System.EventArgs);

begin

// Update the grid, call the UpdateCustomers sub to save

Self.C1TrueDBGrid1.Update();

UpdateCustomers;

end;

procedure TWinForm.BtnAdd_Click(sender:System.Object; e: System.EventArgs);

begin

// This "Add New" button moves the cursor to the

// "new (blank) row" at the end so that user can start

// adding data to the new record.

// Move to last record, "new row" will be visible

Self.C1TrueDBGrid1.MoveLast;

// Move to the "addnew row", and set focus to the grid

Self.C1TrueDBGrid1.Row := Self.C1TrueDBGrid1.Row + 1;

Self.C1TrueDBGrid1.Select;

End Sub;


Tutorial 4- Delphi 4

Delphi

procedure TWinForm.UpdateCustomers;

var

UpdatedRows: System.Data.DataSet;

InsertedRows: System.Data.DataSet;

DeletedRows: System.Data.DataSet;

begin

Self.CustomersTableAdapter.Connection.Open;

// these three are Data Tables that hold any changes that have
// been made to the dataset since the last update.

UpdatedRows := Self.DsCustomers.GetChanges(DataRowState.Modified);

InsertedRows := Self.DsCustomers.GetChanges(DataRowState.Added);

DeletedRows := Self.DsCustomers.GetChanges(DataRowState.Deleted);

try

// For each of these, we have to make sure that the Data Tables contain
// any records, otherwise, we will get an error.

If (UpdatedRows <> nil) then
Self.CustomersTableAdapter.Update(UpdatedRows);

If (InsertedRows <> nil) then
Self.CustomersTableAdapter.Update(InsertedRows);

If (DeletedRows <> nil) then
Self.CustomersTableAdapter.Update(DeletedRows);

except
on Ex: System.Exception do MessageBox.Show('Caught exception: ' + Ex.Message);

end;

Self.CustomersTableAdapter.Connection.Close;

end;


Tutorial 4- Visual Basic

Visual Basic

Me.CustomersTableAdapter.Fill(Me.DsCustomers.Customers)


Tutorial 4- Visual Basic2

Visual Basic

Private Sub btnFirst_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnFirst.Click

' Move to the first record in the grid

Me.C1TrueDBGrid1.MoveFirst()

End Sub

Private Sub btnNext_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnNext.Click

' Move to the next record in the grid

Me.C1TrueDBGrid1.MoveNext()

End Sub

Private Sub btnPrevious_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnPrevious.Click

' Move to the previous record in the grid

Me.C1TrueDBGrid1.MovePrevious()

End Sub

Private Sub btnLast_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnLast.Click

' Move to the last record in the grid

Me.C1TrueDBGrid1.MoveLast()

End Sub


Tutorial 4- Visual Basic 3

Visual Basic

Private Sub btnDelete_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnDelete.Click

' Delete the record and save the changes to the database

Me.C1TrueDBGrid1.Delete()

Call UpdateCustomers()

End Sub

Private Sub BtnUpdate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnUpdate.Click

' Update the grid, call the UpdateCustomers sub to save

Me.C1TrueDBGrid1.UpdateData()

Call UpdateCustomers()

End Sub

Private Sub BtnAdd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAdd.Click

' This "Add New" button moves the cursor to the

' "new (blank) row" at the end so that user can start

' adding data to the new record.

' Move to last record, "new row" will be visible

Me.C1TrueDBGrid1.MoveLast()

' Move to the "addnew row", and set focus to the grid

Me.C1TrueDBGrid1.Row = Me.C1TrueDBGrid1.Row + 1

Me.C1TrueDBGrid1.Select()

End Sub


Tutorial 4- Visual Basic4

Visual Basic

Private Sub UpdateCustomers()

Me.CustomersTableAdapter.Connection.Open()

Dim UpdatedRows As System.Data.DataSet

Dim InsertedRows As System.Data.DataSet

Dim DeletedRows As System.Data.DataSet

'these three are Data Tables that hold any changes that have been made to the dataset since the last update.

UpdatedRows = Me.DsCustomers.GetChanges(DataRowState.Modified)

InsertedRows = Me.DsCustomers.GetChanges(DataRowState.Added)

DeletedRows = Me.DsCustomers.GetChanges(DataRowState.Deleted)

Try

'For each of these, we have to make sure that the Data Tables contain any records, otherwise, we will get an error.

If Not UpdatedRows Is Nothing Then Me.CustomersTableAdapter.Update(UpdatedRows)

If Not InsertedRows Is Nothing Then Me.CustomersTableAdapter.Update(InsertedRows)

If Not DeletedRows Is Nothing Then Me.CustomersTableAdapter.Update(DeletedRows)

Catch eUpdate As System.Exception

MessageBox.Show ("Caught exception: " & eUpdate.Message)

End Try

Me.CustomersTableAdapter.Connection.Close()

End Sub


Tutorial 5- C#

C#

this.ComposerTableAdapter.Fill(this.DsComposer.Composer);


Tutorial 5- C#2

C#

int l;

for ( l = 0 ; l < this.DsComposer.Composer.Rows.Count; l++){

if ( this.DsComposer.Composer. Rows[l]["Country"] == "Germany" )

{

this.C1TrueDBGrid1.SelectedRows.Add(l);

}

}


Tutorial 5- C#3

C#

this.C1TrueDBGrid1.SelectedRows.Clear();


Tutorial 5- Delphi

Delphi

Self.ComposerTableAdapter.Fill(Self.DsComposer.Composer);


Tutorial 5- Delphi2

Delphi

procedure TWinForm.button1_Click(sender: System.Object; e: System.EventArgs);

var

I : Integer;

begin

for I := 0 to Self.DsComposer.Composer.Rows.Count – 1 do
begin
if (Self.DsComposer1.Composer.Rows[i].Item['Country'].ToString = 'Germany') then

c1TrueDBGrid1.SelectedRows.Add(i);

end;

end;


Tutorial 5- Delphi 3

Delphi

Self.C1TrueDBGrid1.SelectedRows.Clear;


Tutorial 5- Visual Basic

Visual Basic

Me.ComposerTableAdapter.Fill(Me.DsComposer.Composer)


Tutorial 5- Visual Basic2

Visual Basic

Dim l As Integer

For l = 0 To Me.DsComposer.Composer.Rows.Count - 1

If Me.DsComposer.Composer.Rows(l).Item("Country") = "Germany"

Then

Me.C1TrueDBGrid1.SelectedRows.Add(l)

End If

Next


Tutorial 5- Visual Basic3

Visual Basic

Me.C1TrueDBGrid1.SelectedRows.Clear()


Tutorial 6 - C#

C#

DataTable dtCopy = new DataTable ;


Tutorial 6 - C#2

C#

this.ContactsTableAdapter.Fill(this.DsContacts.Contacts);

dtCopy = this.DsContacts1.Tables[0].Copy();


Tutorial 6 - C#3

C#

private void C1TrueDBGrid1_UnboundColumnFetch( System.object sender, C1.Win.C1TrueDBGrid.UnboundColumnFetchEventArgs e)

{

if ( e.Col == 0 && e.Row < dtCopy.Rows.Count )

{

e.value = dtCopy.Rows[e.Row] ["FirstName"] + " " + dtCopy.Rows[e.Row] ["LastName"];

}

}


Tutorial 6 - Delphi

Delphi

var dtCopy: DataTable;

dtCopy := DataTable.Create;


Tutorial 6 - Delphi 2

Delphi

Self.ContactsTableAdapter.Fill(Self.DsContacts.Contacts);

dtCopy := Self.DsContacts1.Tables[0].Copy;


Tutorial 6 - Delphi 3

Delphi

procedure TWinForm.c1TrueDBGrid1_UnboundColumnFetch(sender: System.Object; e: C1.Win.C1TrueDBGrid.UnboundColumnFetchEventArgs);

begin

if((e.Col = 0) and (e.Row < dtCopy.Rows.Count)) then

e.Value := dtCopy.Rows[e.Row]['FirstName'].ToString + ' ' +

dtCopy.Rows[e.Row]['LastName'].ToString;

end;


Tutorial 6 - Visual Basic

Visual Basic

Dim dtCopy As New DataTable


Tutorial 6 - Visual Basic2

Visual Basic

Me.ContactsTableAdapter.Fill(Me.DsContacts.Contacts)

dtCopy = Me.DsContacts1.Tables(0).Copy()


Tutorial 6 - Visual Basic 3

Visual Basic

Private Sub C1TrueDBGrid1_UnboundColumnFetch(ByVal sender As System.Object, ByVal e As C1.Win.C1TrueDBGrid.UnboundColumnFetchEventArgs) Handles C1TrueDBGrid1.UnboundColumnFetch

If e.Col = 0 And e.Row < dtCopy.Rows.Count Then

e.Value = dtCopy.Rows(e.Row).Item("FirstName") & " " & dtCopy.Rows(e.Row).Item("LastName")

End If

End Sub


Tutorial 8 - C#

C#

this.CustTypeTableAdapter.Fill(this.DsCustType.CustType);


Tutorial 8 - C#2

C#

this.C1TrueDBGrid1.Columns["CustType"].DropDown = this.C1TrueDBDropdown1;


Tutorial 8 - Delphi

Delphi

Self.CustTypeTableAdapter.Fill(Self.DsCustType.CustType);


Tutorial 8 - Delphi 2

Delphi

Self.C1TrueDBGrid1.Columns['CustType'].DropDown := c1TrueDBDropdown1;


Tutorial 8 - Visual Basic

Visual Basic

Me.CustTypeTableAdapter.Fill(Me.DsCustType.CustType)


Tutorial 8 - Visual Basic2

Visual Basic

Me.C1TrueDBGrid1.Columns("CustType").DropDown = Me.C1TrueDBDropdown1


Tutorial 9 - C#

C#

using System.Data;

using System.Data.Oledb;

using System.IO;

using System.Collections;


Tutorial 9 - C#2

C#

private void Form1_Load( System.object sender, System.EventArgs e)

{

this.ContactsTableAdapter.Fill(this.DsContacts.Contacts);

// add customer types to listbox1

ListBox1.Items.Add("Prospective");

ListBox1.Items.Add("Normal");

ListBox1.Items.Add("Buyer");

ListBox1.Items.Add("Distributor");

ListBox1.Items.Add("Other");

ListBox1.Visible = false;

//place a button in the CustType column

this.C1TrueDBGrid1.Splits[0].DisplayColumns["CustType"].Button = true;

}


Tutorial 9 - C#3

C#

private void C1TrueDBGrid1_ButtonClick( object sender, C1.Win.C1TrueDBGrid.ColEventArgs e)

{

ListBox1.Left = this.C1TrueDBGrid1.Left + this.C1TrueDBGrid1.RecordSelectorWidth + this.C1TrueDBGrid1.Splits[0].DisplayColumns[0].Width + this.C1TrueDBGrid1.Splits[0].DisplayColumns[1].Width;

ListBox1.Top = this.C1TrueDBGrid1.Top + this.C1TrueDBGrid1.RowTop(this.C1TrueDBGrid1.Row);

ListBox1.Visible = true;

ListBox1.Select();

}


Tutorial 9 - C#4

C#

private void ListBox1_DoubleClick( object sender, System.EventArgs e) {

this.C1TrueDBGrid1.Columns["CustType"].Text =

(this.ListBox1.SelectedIndex + 1).ToString();

this.ListBox1.Visible = false;

}


Tutorial 9 - C#5

C#

private void ListBox1_Leave( object sender, System.EventArgs e)

{

this.ListBox1.Visible = false;

}


Tutorial 9 - C#6

C#

private void C1TrueDBGrid1_Scroll( object sender, C1.Win.C1TrueDBGrid.CancelEventArgs e)

{

this.ListBox1.Visible = false;

}


Tutorial 9 - Delphi

Delphi

uses System.Data;

uses System.Data.Oledb;

uses System.IO;

uses System.Collections;


Tutorial 9 - Delphi2

Delphi

procedure TWinForm.TWinForm_Load(sender: System.Object; e: System.EventArgs);

begin

//add customer types to listbox1

listBox1.Items.Add('Prospective');

listBox1.Items.Add('Normal');

listBox1.Items.Add('Buyer');

listBox1.Items.Add('Distributor');

listBox1.Items.Add('Other');

listBox1.Visible = False;

//place a button in the CustType column

c1TrueDBGrid1.Splits[0].DisplayColumns['CustType'].Button := true;

end;


Tutorial 9 - Delphi3

Delphi

procedure TWinForm.c1TrueDBGrid1_ButtonClick(sender: System.Object; e: C1.Win.C1TrueDBGrid.ColEventArgs);

begin

listBox1.Left := c1TrueDBGrid1.Left + c1TrueDBGrid1.RecordSelectorWidth + c1TrueDBGrid1.Splits[0].DisplayColumns[0].Width + c1TrueDBGrid1.Splits[0].DisplayColumns[1].Width + c1TrueDBGrid1.Splits[0].DisplayColumns[2].Width;

listBox1.Top := c1TrueDBGrid1.Top + c1TrueDBGrid1.RowTop(c1TrueDBGrid1.Row);

listBox1.Visible := true;

listBox1.Select;

end;


Tutorial 9 - Delphi 4

Delphi

procedure TWinForm.listBox1_DoubleClick(sender: System.Object; e: System.EventArgs);

begin

c1TrueDBGrid1.Columns[2].Text := listBox1.SelectedIndex.ToString;

listBox1.Visible := false;

end;


Tutorial 9 - Delphi 5

Delphi

procedure TWinForm.listBox1_Leave(sender: System.Object; e: System.EventArgs);

begin

listBox1.Visible := false;

end;


Tutorial 9 - Delphi 6

Delphi

procedure TWinForm.C1TrueDBGrid1_Scroll(sender: System.Object; e: C1.Win.C1TrueDBGrid.CancelEventArgs);

begin
Self.ListBox1.Visible := false;

end;


Tutorial 9 - Visual Basic

Visual Basic

Imports System.Data

Imports System.Data.Oledb

Imports System.IO

Imports System.Collections


Tutorial 9 - Visual Basic2

Visual Basic

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

Me.ContactsTableAdapter.Fill(Me.DsContacts.Contacts)

' add customer types to listbox1

With Me.ListBox1

.Items.Add("Prospective")

.Items.Add("Normal")

.Items.Add("Buyer")

.Items.Add("Distributor")

.Items.Add("Other")

.Visible = False

End With

' place a button in the CustType column

Me.C1TrueDBGrid1.Splits(0).DisplayColumns("CustType").Button = True

End Sub


Tutorial 9 - Visual Basic 3

Visual Basic

Private Sub C1TrueDBGrid1_ButtonClick(ByVal sender As Object, ByVal e As C1.Win.C1TrueDBGrid.ColEventArgs) Handles C1TrueDBGrid1.ButtonClick

With ListBox1

.Left = Me.C1TrueDBGrid1.Left + Me.C1TrueDBGrid1.RecordSelectorWidth + Me.C1TrueDBGrid1.Splits(0).DisplayColumns(0).Width + Me.C1TrueDBGrid1.Splits(0).DisplayColumns(1).Width

.Top = Me.C1TrueDBGrid1.Top + Me.C1TrueDBGrid1.RowTop(Me.C1TrueDBGrid1.Row)

.Visible = True

.Select()

End With

End Sub


Tutorial 9 - Visual Basic 4

Visual Basic

Private Sub ListBox1_DoubleClick(ByVal sender As Object, ByVal e As System.EventArgs) Handles ListBox1.DoubleClick

Me.C1TrueDBGrid1.Columns("CustType").Text =

Me.ListBox1.SelectedIndex + 1

Me.ListBox1.Visible = False

End Sub


Tutorial 9 - Visual Basic 5

Visual Basic

Private Sub ListBox1_Leave(ByVal sender As Object, ByVal e As System.EventArgs) Handles ListBox1.Leave

Me.ListBox1.Visible = False

End Sub


Tutorial 9 - Visual Basic 6

Visual Basic

Private Sub C1TrueDBGrid1_Scroll(ByVal sender As Object, ByVal e As C1.Win.C1TrueDBGrid.CancelEventArgs) Handles C1TrueDBGrid1.Scroll

Me.ListBox1.Visible = False

End Sub


Tutorial 11 - C#

C#

int bflag;


Tutorial 11 - C#2

C#

// prospective

this.C1TrueDBGrid1.FetchRowStyles = true;

bFlag = 1;

this.C1TrueDBGrid1.Refresh();


Tutorial 11 - C#3

C#

// distributors

this.C1TrueDBGrid1.FetchRowStyles = true;

bFlag = 2;

this.C1TrueDBGrid1.Refresh();


Tutorial 11 - C#4

C#

// reset styles

this.C1TrueDBGrid1.FetchRowStyles = false;

this.C1TrueDBGrid1.Refresh();


Tutorial 11 - C#5

C#

private void C1TrueDBGrid1_FetchRowStyle( object sender, C1.Win.C1TrueDBGrid.FetchRowStyleEventArgs e)

{

if ( bFlag == 1 && (int)this.C1TrueDBGrid1 [e.Row, "CustType"] == 1 )

{

Font fntFont = new Font(e.CellStyle.Font.Name, e.CellStyle.Font.Size, FontStyle.Bold);

e.CellStyle.Font = fntFont;

e.CellStyle.ForeColor = System.Drawing.Color.Blue;

}

if ( bFlag == 2 &&

this.C1TrueDBGrid1 [e.Row, "CustType"] == 4 )

{

e.CellStyle.ForeColor = System.Drawing.Color.White;

e.CellStyle.BackColor = System.Drawing.Color.Red;

}

}


Tutorial 11 - Delphi

Delphi

var bflag: Integer;


Tutorial 11 - Delphi2

Delphi

begin

// prospective

c1TrueDBGrid1.FetchRowStyles := true;

FFlag := 1;

Self.C1TrueDBGrid1.Refresh;

end;


Tutorial 11 - Delphi 3

Delphi

begin

// distributors

c1TrueDBGrid1.FetchRowStyles := true;

FFlag := 2;

c1TrueDBGrid1.Refresh;

end;


Tutorial 11 - Delphi 4

Delphi

begin

// reset styles

c1TrueDBGrid1.FetchRowStyles := false;

c1TrueDBGrid1.Refresh;

end;


Tutorial 11 - Delphi 5

Delphi

procedure TWinForm.c1TrueDBGrid1_FetchRowStyle(sender: System.Object; e: C1.Win.C1TrueDBGrid.FetchRowStyleEventArgs);

var

MyFont: System.Drawing.Font;

begin

if ((FFlag = 1) and (c1TrueDBGrid1.Columns['CustType'].CellValue(e.Row).ToString = '1')) then

begin

MyFont := System.Drawing.Font.Create(e.CellStyle.Font.Name, e.CellStyle.Font.Size, FontStyle.Bold);

e.CellStyle.Font := MyFont;

e.CellStyle.ForeColor := System.Drawing.Color.Blue;

end

else if ((FFlag = 2) and (c1TrueDBGrid1.Columns['CustType'].CellValue(e.Row).ToString = '4')) then

begin

e.CellStyle.ForeColor := System.Drawing.Color.White;

e.CellStyle.BackColor := System.Drawing.Color.Red;

end;

end;


Tutorial 11 -Visual Basic

Visual Basic

Dim bflag As Integer


Tutorial 11 - Visual Basic 2

Visual Basic

' prospective

Me.C1TrueDBGrid1.FetchRowStyles = True

bFlag = 1

Me.C1TrueDBGrid1.Refresh()


Tutorial 11 - Visual Basic 3

Visual Basic

' distributors

Me.C1TrueDBGrid1.FetchRowStyles = True

bFlag = 2

Me.C1TrueDBGrid1.Refresh()


Tutorial 11 - Visual Basic 4

Visual Basic

' reset styles

Me.C1TrueDBGrid1.FetchRowStyles = False

Me.C1TrueDBGrid1.Refresh()


Tutorial 11 - Visual Basic 5

Visual Basic

Private Sub C1TrueDBGrid1_FetchRowStyle(ByVal sender As Object, ByVal e As C1.Win.C1TrueDBGrid.FetchRowStyleEventArgs) Handles C1TrueDBGrid1.FetchRowStyle

If bFlag = 1 And Me.C1TrueDBGrid1 (e.Row,"CustType") = 1

Then

Dim fntFont As New Font(e.CellStyle.Font.Name, e.CellStyle.Font.Size, FontStyle.Bold)

e.CellStyle.Font = fntFont

e.CellStyle.ForeColor = System.Drawing.Color.Blue

End If

If bFlag = 2 And

Me.C1TrueDBGrid1 (e.Row, "CustType") = 4

Then

e.CellStyle.ForeColor = System.Drawing.Color.White

e.CellStyle.BackColor = System.Drawing.Color.Red

End If

End Sub


Tutorial 13 - C#

C#

Point _ptStartDrag;

long _dragRow;


Tutorial 13 - C#2

C#

this.CallListTableAdapter.Fill(this.DsCallList.CallList);

this.CustomersTableAdapter.Fill(this.DsCustomers.Customers);


Tutorial 13 - C#3

C#

private void ResetDragDrop() {

// Turn off drag-and-drop by resetting the highlight and label text.

this._ptStartDrag = Point.Empty;

this._dragRow = - 1;

this.C1TrueDBGrid1.MarqueeStyle = C1.Win.C1TrueDBGrid.MarqueeEnum.SolidCellBorder;

this.C1TrueDBGrid2.MarqueeStyle = C1.Win.C1TrueDBGrid.MarqueeEnum.SolidCellBorder;

this.Label3.Text = "Drag a row from the top grid and drop it on the bottom grid.";

}


Tutorial 13 - C#4

C#

private void C1TrueDBGrid1_MouseDown( object sender, System.Windows.Forms.MouseEventArgs e)

{

int row, col;

this._ptStartDrag = Point.Empty;

this._dragRow = - 1;

if ( this.C1TrueDBGrid1.CellContaining(e.X, e.Y, row, col) ) {

// save the starting point of the drag operation

this._ptStartDrag = new Point(e.X, e.Y);

this._dragRow = row;

}

}

private void C1TrueDBGrid1_MouseMove( object sender, System.Windows.Forms.MouseEventArgs e)

{

// if we don't have an empty start drag point, then the drag has been initiated

if (!this._ptStartDrag.IsEmpty ) {

// create a rectangle that bounds the start of the drag operation by 2 pixels

Rectangle r = new Rectangle(this._ptStartDrag, Size.Empty);

r.Inflate(2, 2);

// if we've moved more than 2 pixels, lets start the drag operation

if (!r.Contains(e.X, e.Y) ) {

this.C1TrueDBGrid1.Row = this._dragRow;

this.C1TrueDBGrid1.MarqueeStyle = C1.Win.C1TrueDBGrid.MarqueeEnum.HighlightRow;

this.C1TrueDBGrid1.DoDragDrop(this._dragRow, DragDropEffects.Copy);

}

}

}


Tutorial 13 - C#5

C#

private void C1TrueDBGrid2_DragEnter( object sender, System.Windows.Forms.DragEventArgs e) {

this.Label3.Text = "Create a new record when dropped...";

e.Effect = DragDropEffects.Copy;

}

private void C1TrueDBGrid2_DragDrop( object sender, System.Windows.Forms.DragEventArgs e) {

try {

int row = (int)e.Data.GetData(typeof(int));

// use the grids indexer to get some data

string custname = this.C1TrueDBGrid1[row, "FirstName"].ToString();

// use the CellText() method to get some data

custname += " " + this.C1TrueDBGrid1.Columns["LastName"].CellText(row);

// use the CellValue() method to get some data

custname += " " + this.C1TrueDBGrid1.Columns["Company"].CellValue(row).ToString();

// add a new row to the data set for the bottom grid

DataRowView drv = this.DsCallList.CallList.DefaultView.AddNew();

drv["CallDate"] = DateTime.Now;

drv["Customer"] = custname;

drv["Phone"] = this.C1TrueDBGrid1.Columns["Phone"].Value.ToString();

drv.EndEdit();

this.C1TrueDBGrid2.MoveLast();

this.C1TrueDBGrid2.Select();

// commit changes to the database

DataSet inserted = this.DsCallList.GetChanges(DataRowState.Added);

if (! (inserted == null) ) {

this.CallListTableAdapter.Update(inserted);

}

} catch (System.Exception ex) {

MessageBox.Show(ex.Message);

}

}


Tutorial 13 - Delphi

Delphi

FDragRow: LongInt;

FptStartDrag: Point;


Tutorial 13 - Delphi2

Delphi

Self.CallListTableAdapter.Fill(Self.DsCallList.CallList);

Self.CustomersTableAdapter.Fill(Self.DsCustomers.Customers);


Tutorial 13 - Delphi3

Delphi

procedure TWinForm.ResetDragDrop;

begin

// Turn off drag-and-drop by resetting the highlight and label text.

FptStartDrag := Point.Empty;

FDragRow := -1;

c1TrueDBGrid1.MarqueeStyle := MarqueeEnum.SolidCellBorder;

c1TrueDBGrid2.MarqueeStyle := MarqueeEnum.SolidCellBorder;

label1.Text := 'Drag a row from the top grid and drop it on the bottom grid.';

end;


Tutorial 13 - Delphi4

Delphi

procedure TWinForm.C1TrueDBGrid1_MouseMove(sender: System.Object; e: System.Windows.Forms.MouseEventArgs);

var R: Rectangle;

begin

// if we don't have an empty start drag point, then
//the drag has been initiated
if (not FPtStartDrag.IsEmpty) then

begin

// create a rectangle that bounds the start of the drag operation by 2 pixels

R := Rectangle.Create(FptStartDrag,Size.Empty);

R.Inflate(2,2);

// if we've moved more than 2 pixels, lets start the drag operation

if (not r.Contains(e.X,e.Y)) then

begin

c1TrueDBGrid1.Row := FDragRow;

c1TrueDBGrid1.MarqueeStyle := MarqueeEnum.HighlightRow;

c1TrueDBGrid1.DoDragDrop(System.Object(FDragRow), DragDropEffects.Copy);

end;

end;

end;

procedure TWinForm.C1TrueDBGrid1_MouseDown(sender: System.Object; e: System.Windows.Forms.MouseEventArgs);

var Row, Col: Integer;

begin

FPtStartDrag := Point.Empty;

FDragRow := -1;

if (c1TrueDBGrid1.CellContaining(e.X, e.Y, row, col)) then

begin

// save the starting point of the drag operation

FPtStartDrag := Point.Create(e.X, e.Y);

FDragRow := row;

end;

end;


Tutorial 13 - Delphi5

Delphi

procedure TWinForm.C1TrueDBGrid2_DragEnter(sender: System.Object; e: System.Windows.Forms.DragEventArgs);

begin

Label1.Text := 'Create a new record when dropped...';

e.Effect := DragDropEffects.Copy;

end;

procedure TWinForm.C1TrueDBGrid2_DragDrop(sender: System.Object; e: System.Windows.Forms.DragEventArgs);

var Row: Integer;

CustName: String;

Drv: C1.Data.C1DataRow;

begin

try

Row := Integer(e.Data.GetData(typeof(Integer)));

// use the grids indexer to get some data

CustName := c1TrueDBGrid1[Row,'FirstName'].ToString;

// use the CellText() method to get some data

CustName := CustName + ' ' + c1TrueDBGrid1.Columns['LastName'].CellText(Row);

// use the CellValue() method to get some data

CustName := CustName + ' ' + c1TrueDBGrid1.Columns['Company'].CellValue(Row).ToString;

// add a new row to the data set for the bottom grid

Drv := c1ExpressTable2.DataTable.AddNew;

Drv['CallDate'] := DateTime.Now;

Drv['Customer'] := CustName;

Drv['Phone'] := c1TrueDBGrid1.Columns['Phone'].Value.ToString;

Drv.EndEdit;

c1TrueDBGrid2.MoveLast;

c1TrueDBGrid2.Select;

// commit changes to the database

c1ExpressTable2.ExpressConnection.Update;

except

on Ex: System.Exception do MessageBox.Show(Ex.Message);

end;

end;


Tutorial 13 - Visual Basic

Visual Basic

Dim _ptStartDrag As Point

Dim _dragRow As Long


Tutorial 13 - Visual Basic2

Visual Basic

Me.CallListTableAdapter.Fill(Me.DsCallList.CallList)

Me.CustomersTableAdapter.Fill(Me.DsCustomers.Customers)


Tutorial 13 - Visual Basic3

Visual Basic

Private Sub ResetDragDrop()

' Turn off drag-and-drop by resetting the highlight and label text.

Me._ptStartDrag = Point.Empty

Me._dragRow = - 1

Me.C1TrueDBGrid1.MarqueeStyle = C1.Win.C1TrueDBGrid.MarqueeEnum.SolidCellBorder

Me.C1TrueDBGrid2.MarqueeStyle = C1.Win.C1TrueDBGrid.MarqueeEnum.SolidCellBorder

Me.Label3.Text = "Drag a row from the top grid and drop it on the bottom grid."

End Sub


Tutorial 13 - Visual Basic4

Visual Basic

Private Sub C1TrueDBGrid1_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles C1TrueDBGrid1.MouseDown

Dim row, col As Integer

Me._ptStartDrag = Point.Empty

Me._dragRow = - 1

If Me.C1TrueDBGrid1.CellContaining(e.X, e.Y, row, col) Then

' save the starting point of the drag operation

Me._ptStartDrag = New Point(e.X, e.Y)

Me._dragRow = row

End If

End Sub

Private Sub C1TrueDBGrid1_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles C1TrueDBGrid1.MouseMove

' if we don't have an empty start drag point, then the drag has been initiated

If Not Me._ptStartDrag.IsEmpty Then

' create a rectangle that bounds the start of the drag operation by 2 pixels

Dim r As New Rectangle(Me._ptStartDrag, Size.Empty)

r.Inflate(2, 2)

' if we've moved more than 2 pixels, lets start the drag operation

If Not r.Contains(e.X, e.Y) Then

Me.C1TrueDBGrid1.Row = Me._dragRow

Me.C1TrueDBGrid1.MarqueeStyle = C1.Win.C1TrueDBGrid.MarqueeEnum.HighlightRow

Me.C1TrueDBGrid1.DoDragDrop(Me._dragRow, DragDropEffects.Copy)

End If

End If

End Sub


Tutorial 13 - Visual Basic5

Visual Basic

Private Sub C1TrueDBGrid2_DragEnter(ByVal sender As Object, ByVal e As System.Windows.Forms.DragEventArgs) Handles C1TrueDBGrid2.DragEnter

Me.Label3.Text = "Create a new record when dropped..."

e.Effect = DragDropEffects.Copy

End Sub

Private Sub C1TrueDBGrid2_DragDrop(ByVal sender As Object, ByVal e As System.Windows.Forms.DragEventArgs) Handles C1TrueDBGrid2.DragDrop

Try

Dim row As Integer = CInt(e.Data.GetData(GetType(Integer)))

' use the grids indexer to get some data

Dim custname As String = Me.C1TrueDBGrid1(row, "FirstName").ToString()

' use the CellText() method to get some data

custname += " " + Me.C1TrueDBGrid1.Columns("LastName").CellText(row)

' use the CellValue() method to get some data

custname += " " + Me.C1TrueDBGrid1.Columns("Company").CellValue(row).ToString()

' add a new row to the data set for the bottom grid

Dim drv As DataRowView = Me.DsCallList.CallList.DefaultView.AddNew()

drv("CallDate") = DateTime.Now

drv("Customer") = custname

drv("Phone") = Me.C1TrueDBGrid1.Columns("Phone").Value.ToString()

drv.EndEdit()

Me.C1TrueDBGrid2.MoveLast()

Me.C1TrueDBGrid2.Select()

' commit changes to the database

Dim inserted As DataSet = Me.DsCallList.GetChanges(DataRowState.Added)

If Not (inserted Is Nothing) Then

Me.CallListTableAdapter.Update(inserted)

End If

Catch ex As System.Exception

MessageBox.Show(ex.Message)

End Try

End Sub


Tutorial 14 - C#

C#

private void Form1_Load( System.object sender, System.EventArgs e)

{

// create an additional split

this.C1TrueDBGrid1.InsertHorizontalSplit(0);

// hide all columns in the leftmost split except 0 and 1

int x;

for ( x = 2 ; x < this.C1TrueDBGrid1.Columns.Count; x++)

{

this.C1TrueDBGrid1.Splits[0].DisplayColumns[x].Visible = false;

}

//configure split 0 to display exactly 2 columns

C1TrueDBGrid1.Splits[0].SplitSizeMode = C1.Win.C1TrueDBGrid.SizeModeEnum.NumberOfColumns;

C1TrueDBGrid1.Splits[0].SplitSize = 2;

C1TrueDBGrid1.Splits[0].AllowHorizontalSizing = false;

//make columns 0 and 1 invisible in split 1

this.C1TrueDBGrid1.Splits[1].DisplayColumns[0].Visible = false;

this.C1TrueDBGrid1.Splits[1].DisplayColumns[1].Visible = false;

//turn off recordselectors in split 1

this.C1TrueDBGrid1.Splits[1].RecordSelectors = false;

}


Tutorial 14 - Delphi

Delphi

procedure TWinForm.TWinForm_Load(sender: System.Object; e: System.EventArgs);

var x: Integer;

begin

//create an additional split

C1TrueDBGrid1.InsertHorizontalSplit(0);

//hide all columns in the leftmost split except 0 and 1

x := 2;

while (x < Self.c1TrueDBGrid1.Columns.Count) do

begin

C1TrueDBGrid1.Splits[0].DisplayColumns[x].Visible := False;

x := x + 1;

end;

//configure split 0 to display exactly 2 columns

C1TrueDBGrid1.Splits[0].SplitSizeMode := C1.Win.C1TrueDBGrid.SizeModeEnum.NumberOfColumns;

C1TrueDBGrid1.Splits[0].SplitSize := 2;

C1TrueDBGrid1.Splits[0].AllowHorizontalSizing := False;

C1TrueDBGrid1.Splits[1].DisplayColumns[0].Visible := False;

C1TrueDBGrid1.Splits[1].DisplayColumns[1].Visible := False;

C1TrueDBGrid1.Splits[1].RecordSelectors := False;

end;


Tutorial 14 - Visual Basic

Visual Basic

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

' create an additional split

Me.C1TrueDBGrid1.InsertHorizontalSplit(0)

' hide all columns in the leftmost split except 0 and 1

Dim x As Integer

For x = 2 To Me.C1TrueDBGrid1.Columns.Count - 1

Me.C1TrueDBGrid1.Splits(0).DisplayColumns(x).Visible = False

Next

' configure split 0 to display exactly 2 columns

With Me.C1TrueDBGrid1.Splits(0)

.SplitSizeMode = C1.Win.C1TrueDBGrid.SizeModeEnum.NumberOfColumns

.SplitSize = 2

.AllowHorizontalSizing = False

End With

' make columns 0 and 1 invisible in split 1

Me.C1TrueDBGrid1.Splits(1).DisplayColumns(0).Visible = False

Me.C1TrueDBGrid1.Splits(1).DisplayColumns(1).Visible = False

' turn off recordselectors in split 1

Me.C1TrueDBGrid1.Splits(1).RecordSelectors = False

End Sub


Tutorial 15 - C#

C#

// change the presentation of the grid

C1DisplayColumn col = this.C1TrueDBGrid1.Splits[0].DisplayColumns["Country"];

col.Style.BackColor = System.Drawing.Color.Cyan;

Font fntFont;

fntFont = new Font("Times new Roman", col..Style.Font.Size, FontStyle.Regular);

col.Style.Font = fntFont;

C1TrueDBGrid1.Splits[0].DisplayColumns["Last"].Style.ForeColor = System.Drawing.Color.Red;

this.C1TrueDBGrid1.Columns["last"].NumberFormat = "FormatText event";

Font fntfont;

fntfont = new Font(.Font.Name, C1TrueDBGrid1.HeadingStyle.Font.Size, FontStyle.Bold);

C1TrueDBGrid1.HeadingStyle.Font = fntfont;

C1TrueDBGrid1.HeadingStyle.BackColor = System.Drawing.Color.Blue;

C1TrueDBGrid1.HeadingStyle.ForeColor = System.Drawing.Color.Yellow;


Tutorial 15 - C#2

C#

private void C1TrueDBGrid1_FormatText( object sender, C1.Win.C1TrueDBGrid.FormatTextEventArgs e)

{

e.value = e.Value.ToUpper();

}


Tutorial 15 - C#3

C#

Font fntFont;

fntFont = new Font(C1TrueDBGrid1.PrintInfo.PageHeaderStyle.Font.Name, C1TrueDBGrid1.PrintInfo.PageHeaderStyle.Font.Size, FontStyle.Italic);

C1TrueDBGrid1.PrintInfo.PageHeaderStyle.Font = fntFont;

C1TrueDBGrid1.PrintInfo.PageHeader = "Composers Table";

// column headers will be on every page

C1TrueDBGrid1.PrintInfo.RepeatColumnHeaders = true;

// display page numbers (centered)

C1TrueDBGrid1.PrintInfo.PageFooter = "Page: \p";

// invoke print preview

C1TrueDBGrid1.PrintInfo.UseGridColors = true;

C1TrueDBGrid1.PrintInfo.PrintPreview();


Tutorial 15 - Delphi

Delphi

procedure TWinForm.TWinForm_Load(sender: System.Object; e: System.EventArgs);

var

Style: C1.Win.C1TrueDBGrid.Style;

FntFont: System.Drawing.Font;

Split: C1.Win.C1TrueDBGrid.Split;

begin

Split := Self.c1TrueDBGrid1.Splits[0];

Split.DisplayColumns['Country'].Style.BackColor := Color.Cyan;

FntFont := System.Drawing.Font.Create('Times New Roman', Split.DisplayColumns['Country'].Style.Font.Size, FontStyle.Regular);

Split.DisplayColumns['Country'].Style.Font := fntFont;

Split.DisplayColumns['Last'].Style.ForeColor := System.Drawing.Color.Red;

C1TrueDBGrid1.Columns['Last'].NumberFormat := 'FormatTextEvent';

Style := C1TrueDBGrid1.HeadingStyle;

FntFont := System.Drawing.Font.Create(style.Font.Name, style.Font.Size, FontStyle.Bold);

Style.BackColor := System.Drawing.Color.Blue;

Style.ForeColor := System.Drawing.Color.Yellow;

end;


Tutorial 15 - Delphi2

Delphi

procedure TWinForm.C1TrueDBGrid1_FormatText(sender: System.Object; e: C1.Win.C1TrueDBGrid.FormatTextEventArgs);

begin

e.Value := e.Value.ToUpper;

end;


Tutorial 15 - Delphi3

Delphi

procedure TWinForm.Button1_Click(sender: System.Object; e: System.EventArgs);

var

FntFont: System.Drawing.Font;

PrintInfo: C1.Win.C1TrueDBGrid.PrintInfo;

begin

PrintInfo := C1TrueDBGrid1.PrintInfo;

FntFont := System.Drawing.Font.Create(printInfo.PageHeaderStyle.Font.Name, printInfo.PageHeaderStyle.Font.Size, FontStyle.Italic);

PrintInfo.PageHeaderStyle.Font := fntFont;

PrintInfo.PageHeader := 'Composer Table';

PrintInfo.RepeatColumnHeaders := True;

PrintInfo.PageFooter := 'Page: \p';

PrintInfo.UseGridColors := True;

PrintInfo.PrintPreview;

end;


Tutorial 15 - Visual Basic

Visual Basic

' change the presentation of the grid

With Me.C1TrueDBGrid1.Splits(0).DisplayColumns

.Item("Country").Style.BackColor = System.Drawing.Color.Cyan

Dim fntFont As Font

fntFont = New Font("Times New Roman", .Item("Country").Style.Font.Size, FontStyle.Regular)

.Item("Country").Style.Font = fntFont

.Item("Last").Style.ForeColor = System.Drawing.Color.Red

End With

Me.C1TrueDBGrid1.Columns("last").NumberFormat = "FormatText Event"

With Me.C1TrueDBGrid1.HeadingStyle

Dim fntfont As Font

fntfont = New Font(.Font.Name, .Font.Size, FontStyle.Bold)

.Font = fntfont

.BackColor = System.Drawing.Color.Blue

.ForeColor = System.Drawing.Color.Yellow

End With


Tutorial 15 - Visual Basic2

Visual Basic

Private Sub C1TrueDBGrid1_FormatText(ByVal sender As Object, ByVal e As C1.Win.C1TrueDBGrid.FormatTextEventArgs) Handles C1TrueDBGrid1.FormatText

e.Value = UCase(e.Value)

End Sub


Tutorial 15 - Visual Basic3

Visual Basic

With Me.C1TrueDBGrid1.PrintInfo

Dim fntFont As Font

fntFont = New Font(.PageHeaderStyle.Font.Name, .PageHeaderStyle.Font.Size, FontStyle.Italic)

.PageHeaderStyle.Font = fntFont

.PageHeader = "Composers Table"

' column headers will be on every page

.RepeatColumnHeaders = True

' display page numbers (centered)

.PageFooter = "Page: \p"

' invoke print preview

.UseGridColors = True

.PrintPreview()

End With


Tutorial 16 - C#

C#

this.ComposerTableAdapter.Fill(this.DsMasterDetail.Composer);

this.C1TrueDBGrid1.DataView = C1.Win.C1TrueDBGrid.DataViewEnum.Hierarchical;


Tutorial 16 - Delphi

Delphi

Self.ComposerTableAdapter.Fill(Self.DsMasterDetail.Composer);

Self.C1TrueDBGrid1.DataView := C1.Win.C1TrueDBGrid.DataViewEnum.Hierarchical;


Tutorial 16 - Visual Basic

Visual Basic

Me.ComposerTableAdapter.Fill(Me.DsMasterDetail.Composer)

Me.C1TrueDBGrid1.DataView = C1.Win.C1TrueDBGrid.DataViewEnum.Hierarchical


Tutorial 17 - C#

C#

this.C1TrueDBGrid1.DataView = C1.Win.C1TrueDBGrid.DataViewEnum.GroupBy;


Tutorial 17 - Delphi

Delphi

Self.C1TrueDBGrid1.DataView := C1.Win.C1TrueDBGrid.DataViewEnum.GroupBy;


Tutorial 17 - Visual Basic

Visual Basic

Me.C1TrueDBGrid1.DataView = C1.Win.C1TrueDBGrid.DataViewEnum.GroupBy


Tutorial 18 - C#

C#

this.C1TrueDBDropDown1.ValueTranslate = true;

this.C1TrueDBDropDown1.ListField = "TypeDesc";

this.C1TrueDBDropDown1.DataField = "TypeID";


Tutorial 18 - Delphi

Delphi

Self.C1TrueDBDropDown1.ValueTranslate := True;

Self.C1TrueDBDropDown1.ListField := 'TypeDesc';

Self.C1TrueDBDropDown1.DataField := 'TypeID';


Tutorial 18 - Visual Basic

Visual Basic

Me.C1TrueDBDropDown1.ValueTranslate = True

Me.C1TrueDBDropDown1.ListField = "TypeDesc"

Me.C1TrueDBDropDown1.DataField = "TypeID"


Tutorial 19 - C#

C#

string strTemp; //string to be copied to the clipboard

int row;

C1.Win.C1TrueDBGrid.C1DataColumn col;

int cols, rows;

if ( this.C1TrueDBGrid1.SelectedRows.Count > 0 ) {

foreach ( row in this.C1TrueDBGrid1.SelectedRows

//copy everything here

foreach ( col in this.C1TrueDBGrid1.SelectedCols

strTemp = strTemp + col.CellText(row) + "\t"; }

strTemp = strTemp + "\n"; }

System.Windows.Forms.Clipboard.SetDataObject(strTemp, false);

MessageBox.Show ("Range of " + this.C1TrueDBGrid1.SelectedCols.Count.ToString() + " x " + C1TrueDBGrid1.SelectedRows.Count.ToString() + " cells have been copied to the clipboard in TAB delimited format");

} else {

MessageBox.Show ("Please select a range of cells");

}


Tutorial 19 - Delphi

Delphi

procedure TWinForm.Button1_Click(sender: System.Object; e: System.EventArgs);

var

StrTemp: string;

i, j, Row: Integer;

Col: C1.Win.C1TrueDBGrid.C1DataColumn;

begin

StrTemp := '';

if (C1TrueDBGrid1.SelectedRows.Count > 0) then

begin

for i := 0 to C1TrueDBGrid1.SelectedRows.Count-1 do

begin

Row := c1TrueDBGrid1.SelectedRows[i];

//copy everything here

for j := 0 to C1TrueDBGrid1.SelectedCols.Count-1 do

begin

Col := C1TrueDBGrid1.SelectedCols[j];

StrTemp := StrTemp + col.CellText(Row) + #9;

strTemp := strTemp + #13;

end;

end;

System.Windows.Forms.Clipboard.SetDataObject(StrTemp, False);

MessageBox.Show('Range of ' + C1TrueDBGrid1.SelectedCols.Count.ToString +

' x ' + Self.c1TrueDBGrid1.SelectedRows.Count.ToString + ' cells have been copied to the clipboard in TAB delimited format');

end

else

MessageBox.Show('Please select a range of cells');

end;


Tutorial 19 - Visual Basic

Visual Basic

Dim strTemp As String ' string to be copied to the clipboard

Dim row As Integer

Dim col As C1.Win.C1TrueDBGrid.C1DataColumn

Dim cols As Integer, rows As Integer

If Me.C1TrueDBGrid1.SelectedRows.Count > 0 Then

For Each row In Me.C1TrueDBGrid1.SelectedRows

' copy everything here

For Each col In Me.C1TrueDBGrid1.SelectedCols

strTemp = strTemp & col.CellText(row) & vbTab

Next

strTemp = strTemp & vbCrLf

Next

System.Windows.Forms.Clipboard.SetDataObject(strTemp, False)

MessageBox.Show ("Range of " & Me.C1TrueDBGrid1.SelectedCols.Count & " x " & C1TrueDBGrid1.SelectedRows.Count & " cells have been copied to the clipboard in TAB delimited format")

Else

MessageBox.Show ("Please select a range of cells")

End If


Tutorial 20 - C#

C#

this.C1TrueDBGrid1.DataView = C1.Win.C1TrueDBGrid.DataViewEnum.Normal;

this.ComboBox1.SelectedIndex = 0;


Tutorial 20 - C#2

C#

private void ComboBox1_SelectedIndexChanged( object sender, System.EventArgs e)

{

switch (ComboBox1.SelectedItem) {

case "Normal":

this.C1TrueDBGrid1.DataView = C1.Win.C1TrueDBGrid.DataViewEnum.Normal;

break;

case "Inverted":

this.C1TrueDBGrid1.DataView = C1.Win.C1TrueDBGrid.DataViewEnum.Inverted;

break;

case "Form":

this.C1TrueDBGrid1.DataView = C1.Win.C1TrueDBGrid.DataViewEnum.Form;

break;

case "GroupBy":

this.C1TrueDBGrid1.DataView = C1.Win.C1TrueDBGrid.DataViewEnum.GroupBy;

break;

case "MultipleLines":

this.C1TrueDBGrid1.DataView = C1.Win.C1TrueDBGrid.DataViewEnum.MultipleLines;

break;

case "Hierarchical";

MessageBox.Show ("Hierarchical View can't be set at run-time. See Tutorial 16");

break;

}

}


Tutorial 20 - Delphi

Delphi

C1TrueDBGrid1.DataView := C1.Win.C1TrueDBGrid.DataViewEnum.Normal;

ComboBox1.SelectedIndex := 0;


Tutorial 20 - Delphi 2

Delphi

procedure TWinForm.ComboBox1_SelectedIndexChanged(sender: System.Object; e: System.EventArgs);

begin

case ComboBox1.SelectedIndex of

0: C1TrueDBGrid1.DataView := C1.Win.C1TrueDBGrid.DataViewEnum.Normal;

1: C1TrueDBGrid1.DataView := C1.Win.C1TrueDBGrid.DataViewEnum.Inverted;

2: C1TrueDBGrid1.DataView := C1.Win.C1TrueDBGrid.DataViewEnum.Form;

3: C1TrueDBGrid1.DataView := C1.Win.C1TrueDBGrid.DataViewEnum.GroupBy;

4: C1TrueDBGrid1.DataView := C1.Win.C1TrueDBGrid.DataViewEnum.MultipleLines;

5: MessageBox.Show('Hierarchical View can't be set at run-time. Please see Tutorial 16');

end;

end;


Tutorial 20 - Visual Basic

Visual Basic

Me.C1TrueDBGrid1.DataView = C1.Win.C1TrueDBGrid.DataViewEnum.Normal

Me.ComboBox1.SelectedIndex = 0


Tutorial 20 - Visual Basic2

Visual Basic

Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles ComboBox1.SelectedIndexChanged

Select Case ComboBox1.SelectedItem

Case "Normal"

Me.C1TrueDBGrid1.DataView = C1.Win.C1TrueDBGrid.DataViewEnum.Normal

Case "Inverted"

Me.C1TrueDBGrid1.DataView = C1.Win.C1TrueDBGrid.DataViewEnum.Inverted

Case "Form"

Me.C1TrueDBGrid1.DataView = C1.Win.C1TrueDBGrid.DataViewEnum.Form

Case "GroupBy"

Me.C1TrueDBGrid1.DataView = C1.Win.C1TrueDBGrid.DataViewEnum.GroupBy

Case "MultipleLines"

Me.C1TrueDBGrid1.DataView = C1.Win.C1TrueDBGrid.DataViewEnum.MultipleLines

Case "Hierarchical"

MessageBox.Show ("Hierarchical View can't be set at run-time. See Tutorial 16")

End Select

End Sub


Tutorial 21 - C#

C#

this.C1TrueDBGrid1.FilterBar = true;


Tutorial 21 - Delphi

Delphi

C1TrueDBGrid1.FilterBar := True;


Tutorial 21 - Visual Basic

Visual Basic

Me.C1TrueDBGrid1.FilterBar = True


Tutorial 22 - C#

C#

this.CustomerTableAdapter.Fill(this.DsCustomer.Customer);


Tutorial 22 - C#2

C#

DataTable dbTable; // a copy of the data

Color borderColor;

int borderLeft, int borderTop, int borderRight, int borderBottom;

C1.Win.C1TrueDBGrid.BorderTypeEnum borderType;


Tutorial 22 - C#3

C#

dbTable = this.DsCustomer.Tables[0].Copy();

// fill each combobox

FillComboBox1();

FillCombo(ComboBox2);

FillCombo(ComboBox3);

FillCombo(ComboBox4);

FillCombo(ComboBox5);

this.CheckBox2.Checked = true;

// init border sizes

this.borderBottom = 1;

this.borderLeft = 1;

this.borderRight = 1;

this.borderTop = 1;


Tutorial 22 - C#4

C#

// fill each combo with numbers from 1 to 10

private void FillCombo(ref ComboBox com)

{

int i;

com.Text = 1;

for ( i = 1 ; i <= 10; i++)

{

com.Items.Add[I];

}

}

//fill the first combo with border types

private void FillComboBox1() {

this.ComboBox1.Text = "None";

With this.ComboBox1.Items;

.Add("Fillet");

.Add("Flat");

.Add("Groove");

.Add("Inset");

.Add("InsetBevel");

.Add("None");

.Add("Raised");

.Add("RaisedBevel");

} With

}


Tutorial 22 - C#5

C#

private void Button1_Click( System.object sender, System.EventArgs e) Button1.Click

{

DialogResult result;

result = this.ColorDialog1.ShowDialog();

if ( result == DialogResult.OK ) {

borderColor = this.ColorDialog1.Color;

Button1.BackColor = borderColor;

}

UpdateBorder();

}


Tutorial 22 - C#6

C#

private void UpdateBorder() {

C1.Win.C1TrueDBGrid.GridBorders b;

b = his.C1TrueDBGrid1.Splits[0].DisplayColumns(this.C1TrueDBGrid1.Col).Style.Borders;

b.Color = ColorDialog1.Color;

b.BorderType = borderType;

b.Bottom = borderBottom;

b.Left = borderLeft;

b.Right = borderRight;

b.Top = borderTop;

}


Tutorial 22 - C#7

C#

private void ComboBox1_SelectionChangeCommitted( object sender, System.EventArgs e)

{

switch (this.ComboBox1.SelectedItem) {

case "Fillet";

this.borderType = C1.Win.C1TrueDBGrid.BorderTypeEnum.Fillet;

break;

case "Flat";

this.borderType = C1.Win.C1TrueDBGrid.BorderTypeEnum.Flat;

break;

case "Groove";

this.borderType = C1.Win.C1TrueDBGrid.BorderTypeEnum.Groove;

break;

case "Inset";

this.borderType = C1.Win.C1TrueDBGrid.BorderTypeEnum.Inset;

break;

case "InsetBevel";

this.borderType = C1.Win.C1TrueDBGrid.BorderTypeEnum.InsetBevel;

break;

case "None";

this.borderType = C1.Win.C1TrueDBGrid.BorderTypeEnum.None;

break;

case "Raised";

this.borderType = C1.Win.C1TrueDBGrid.BorderTypeEnum.Raised;

break;

case "RaisedBevel";

this.borderType = C1.Win.C1TrueDBGrid.BorderTypeEnum.RaisedBevel;

break;

}

this.UpdateBorder();

}

private void ComboBox2_SelectionChangeCommitted( object sender, System.EventArgs e)

{

this.borderTop = this.ComboBox2.SelectedItem;

this.UpdateBorder();

}

private void ComboBox3_SelectionChangeCommitted( object sender, System.EventArgs e)

{

this.borderBottom = this.ComboBox3.SelectedItem;

this.UpdateBorder();

}

private void ComboBox4_SelectionChangeCommitted( object sender, System.EventArgs e)

{

this.borderLeft = this.ComboBox4.SelectedItem;

this.UpdateBorder();

}

private void ComboBox5_SelectionChangeCommitted( object sender, System.EventArgs e)

{

this.borderRight = this.ComboBox5.SelectedItem;

this.UpdateBorder();

}


Tutorial 22 - C#8

C#

private void CheckBox1_Click( object sender, System.EventArgs e)

{

this.C1TrueDBGrid1.ScrollTips = this.CheckBox1.Checked;

}

private void CheckBox2_Click( object sender, System.EventArgs e)

{

this.C1TrueDBGrid1.ScrollTrack = this.CheckBox2.Checked;

}

private void C1TrueDBGrid1_FetchScrollTips( System.object sender, C1.Win.C1TrueDBGrid.FetchScrollTipsEventArgs e)

{

// set the ScrollTip depending on which

// scroll bar was moved

switch (e.ScrollBar)

{

case C1.Win.C1TrueDBGrid.ScrollBarEnum.Horizontal:

e.ScrollTip = this.C1TrueDBGrid1.Columns[e.ColIndex].Caption;

break;

case C1.Win.C1TrueDBGrid.ScrollBarEnum.Vertical:

e.ScrollTip = "Record: " + (e.Row + 1).ToString() + " of " + this.dbTable.Rows.Count.ToString() + "\n" + "Company: " + this.dbTable.Rows[e.Row]["Company"].ToString() + "\n" + "User code: " + this.dbTable.Rows[e.Row]["UserCode"].ToString();

break;

}

e.TipStyle.ForeColor = Color.Blue;

}


Tutorial 22 - Delphi

Delphi

Self.CustomerTableAdapter.Fill(Self.DsCustomer.Customer);


Tutorial 22 - Delphi2

Delphi

FBorderColor: System.Drawing.Color;
BorderLeft, BorderTop, BorderRight, BorderBottom: Integer;
FBorderType: C1.Win.C1TrueDBGrid.BorderTypeEnum;


Tutorial 22 - Delphi3

Delphi

begin

FillComboBorderAppearance;

FillComboBorderSize(Self.comboBox1);

FillComboBorderSize(Self.comboBox2);

FillComboBorderSize(Self.comboBox3);

FillComboBorderSize(Self.comboBox4);

CheckBox2.Checked := True;

BorderBottom := 1;

BorderLeft := 1;

BorderRight := 1;

BorderTop := 1;

end;


Tutorial 22 - Delphi4

Delphi

procedure TWinForm.FillComboBorderAppearance;

begin

Self.comboBox5.Items.Add('Fillet');

Self.comboBox5.Items.Add('Flat');

Self.comboBox5.Items.Add('Groove');

Self.comboBox5.Items.Add('Inset');

Self.comboBox5.Items.Add('InsetBevel');

Self.comboBox5.Items.Add('None');

Self.comboBox5.Items.Add('Raised');

Self.comboBox5.Items.Add('RaisedBevel');

end;

procedure TWinForm.FillComboBorderSize(combo: ComboBox);

var

i: Integer;

begin

combo.Text := '1';

i := 1;

while (i <> 11) do

begin

combo.Items.Add(i.ToString);

i := i + 1;

end;

end;


Tutorial 22 - Delphi5

Delphi

procedure TWinForm.Button1_Click(sender: System.Object; e: System.EventArgs);

var

result: System.Windows.Forms.DialogResult;

begin

result := ColorDialog1.ShowDialog;

if (result = System.Windows.Forms.DialogResult.OK) then

begin

FBorderColor := ColorDialog1.Color;

Button1.BackColor := FBorderColor;

end;

UpdateBorder;

end;


Tutorial 22 - Delphi6

Delphi

procedure TWinForm.UpdateBorder;

var

Column: C1.Win.C1TrueDBGrid.C1DisplayColumn;

begin

Column := C1TrueDBGrid1.Splits[0].DisplayColumns[Self.c1TrueDBGrid1.Col];

Column.Style.Borders.Color := ColorDialog1.Color;

Column.Style.Borders.BorderType := FBorderType;

Column.Style.Borders.Bottom := BorderBottom;

Column.Style.Borders.Left := BorderLeft;

Column.Style.Borders.Top := BorderTop;

Column.Style.Borders.Right := BorderRight;

end;


Tutorial 22 - Delphi7

Delphi

procedure TWinForm.ComboBox5_SelectedIndexChanged(sender: System.Object; e: System.EventArgs);

begin

case ComboBox5.SelectedIndex of

0: FBorderType := C1.Win.C1TrueDBGrid.BorderTypeEnum.Fillet;

1: FBorderType := C1.Win.C1TrueDBGrid.BorderTypeEnum.Flat;

2: FBorderType := C1.Win.C1TrueDBGrid.BorderTypeEnum.Groove;

3: FBorderType := C1.Win.C1TrueDBGrid.BorderTypeEnum.Inset;

4: FBorderType := C1.Win.C1TrueDBGrid.BorderTypeEnum.InsetBevel;

5: FBorderType := C1.Win.C1TrueDBGrid.BorderTypeEnum.None;

6: FBorderType := C1.Win.C1TrueDBGrid.BorderTypeEnum.Raised;

7: FBorderType := C1.Win.C1TrueDBGrid.BorderTypeEnum.RaisedBevel;

end;

UpdateBorder;

end;

procedure TWinForm.ComboBox4_SelectedIndexChanged(sender: System.Object; e: System.EventArgs);

begin

BorderRight := System.Int32.Parse(ComboBox4.SelectedItem.ToString);

UpdateBorder;

end;

procedure TWinForm.ComboBox3_SelectedIndexChanged(sender: System.Object; e: System.EventArgs);

begin

BorderLeft := System.Int32.Parse(ComboBox3.SelectedItem.ToString);

UpdateBorder;

end;

procedure TWinForm.ComboBox2_SelectedIndexChanged(sender: System.Object; e: System.EventArgs);

begin

BorderBottom := System.Int32.Parse(ComboBox2.SelectedItem.ToString);

UpdateBorder;

end;

procedure TWinForm.ComboBox1_SelectedIndexChanged(sender: System.Object; e: System.EventArgs);

begin

BorderTop := System.Int32.Parse(ComboBox1.SelectedItem.ToString);

UpdateBorder;
end;


Tutorial 22 - Delphi8

Delphi

procedure TWinForm.C1TrueDBGrid1_FetchScrollTips(sender: System.Object; e: C1.Win.C1TrueDBGrid.FetchScrollTipsEventArgs);

var Row: Integer;

begin

case e.ScrollBar of

C1.Win.C1TrueDBGrid.ScrollBarEnum.Horizontal: e.ScrollTip := c1TrueDBGrid1.Columns[e.ColIndex].Caption;

C1.Win.C1TrueDBGrid.ScrollBarEnum.Vertical:

begin

Row := e.Row + 1;

e.ScrollTip := 'Record: ' + Row.ToString + ' of ' +

dbTable.Rows.Count.ToString + #10#13 +
'Company: ' + dbTable.Rows[e.Row]['Company'].ToString + #10#13 +
'User code: ' + dbTable.Rows[e.Row]['UserCode'].ToString;

end;

end;

e.TipStyle.ForeColor := Color.Blue;

end;

procedure TWinForm.CheckBox2_CheckedChanged(sender: System.Object; e: System.EventArgs);

begin

C1TrueDBGrid1.ScrollTrack := CheckBox2.Checked;

end;

procedure TWinForm.CheckBox1_CheckedChanged(sender: System.Object; e: System.EventArgs);

begin

C1TrueDBGrid1.ScrollTips := CheckBox1.Checked;

end;


Tutorial 22 - Visual Basic

Visual Basic

Me.CustomerTableAdapter.Fill(Me.DsCustomer.Customer)


Tutorial 22 - Visual Basic2

Visual Basic

Dim dbTable As DataTable ' a copy of the data

Dim borderColor As Color

Dim borderLeft As Integer, borderTop As Integer, borderRight As Integer, borderBottom As Integer

Dim borderType As C1.Win.C1TrueDBGrid.BorderTypeEnum


Tutorial 22 - Visual Basic3

Visual Basic

dbTable = Me.DsCustomer.Tables(0).Copy()

' fill each combobox

FillComboBox1()

FillCombo(ComboBox2)

FillCombo(ComboBox3)

FillCombo(ComboBox4)

FillCombo(ComboBox5)

Me.CheckBox2.Checked = True

' init border sizes

Me.borderBottom = 1

Me.borderLeft = 1

Me.borderRight = 1

Me.borderTop = 1


Tutorial 22 - Visual Basic4

Visual Basic

' fill each combo with numbers from 1 to 10

Private Sub FillCombo(ByRef com As ComboBox)

Dim i As Integer

com.Text = 1

For i = 1 To 10

com.Items.Add(i)

Next

End Sub

' fill the first combo with border types

Private Sub FillComboBox1()

Me.ComboBox1.Text = "None"

With Me.ComboBox1.Items

.Add("Fillet")

.Add("Flat")

.Add("Groove")

.Add("Inset")

.Add("InsetBevel")

.Add("None")

.Add("Raised")

.Add("RaisedBevel")

End With

End Sub


Tutorial 22 - Visual Basic5

Visual Basic

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

Dim result As DialogResult

result = Me.ColorDialog1.ShowDialog()

If result = DialogResult.OK Then

borderColor = Me.ColorDialog1.Color

Button1.BackColor = borderColor

End If

UpdateBorder()

End Sub


Tutorial 22 - Visual Basic6

Visual Basic

Private Sub UpdateBorder()

With Me.C1TrueDBGrid1.Splits(0).DisplayColumns(Me.C1TrueDBGrid1.Col).Style.Borders

.Color = ColorDialog1.Color

.BorderType = borderType

.Bottom = borderBottom

.Left = borderLeft

.Right = borderRight

.Top = borderTop

End With

End Sub


Tutorial 22 - Visual Basic7

Visual Basic

Private Sub ComboBox1_SelectionChangeCommitted(ByVal sender As Object, ByVal e As System.EventArgs) Handles ComboBox1.SelectionChangeCommitted

Select Case Me.ComboBox1.SelectedItem

Case "Fillet"

Me.borderType = C1.Win.C1TrueDBGrid.BorderTypeEnum.Fillet

Case "Flat"

Me.borderType = C1.Win.C1TrueDBGrid.BorderTypeEnum.Flat

Case "Groove"

Me.borderType = C1.Win.C1TrueDBGrid.BorderTypeEnum.Groove

Case "Inset"

Me.borderType = C1.Win.C1TrueDBGrid.BorderTypeEnum.Inset

Case "InsetBevel"

Me.borderType = C1.Win.C1TrueDBGrid.BorderTypeEnum.InsetBevel

Case "None"

Me.borderType = C1.Win.C1TrueDBGrid.BorderTypeEnum.None

Case "Raised"

Me.borderType = C1.Win.C1TrueDBGrid.BorderTypeEnum.Raised

Case "RaisedBevel"

Me.borderType = C1.Win.C1TrueDBGrid.BorderTypeEnum.RaisedBevel

End Select

Me.UpdateBorder()

End Sub

Private Sub ComboBox2_SelectionChangeCommitted(ByVal sender As Object, ByVal e As System.EventArgs) Handles ComboBox2.SelectionChangeCommitted

Me.borderTop = Me.ComboBox2.SelectedItem

Me.UpdateBorder()

End Sub

Private Sub ComboBox3_SelectionChangeCommitted(ByVal sender As Object, ByVal e As System.EventArgs) Handles ComboBox3.SelectionChangeCommitted

Me.borderBottom = Me.ComboBox3.SelectedItem

Me.UpdateBorder()

End Sub

Private Sub ComboBox4_SelectionChangeCommitted(ByVal sender As Object, ByVal e As System.EventArgs) Handles ComboBox4.SelectionChangeCommitted

Me.borderLeft = Me.ComboBox4.SelectedItem

Me.UpdateBorder()

End Sub

Private Sub ComboBox5_SelectionChangeCommitted(ByVal sender As Object, ByVal e As System.EventArgs) Handles ComboBox5.SelectionChangeCommitted

Me.borderRight = Me.ComboBox5.SelectedItem

Me.UpdateBorder()

End Sub


Tutorial 22 - Visual Basic8

Visual Basic

Private Sub CheckBox1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles CheckBox1.Click

Me.C1TrueDBGrid1.ScrollTips = Me.CheckBox1.Checked

End Sub

Private Sub CheckBox2_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles CheckBox2.Click

Me.C1TrueDBGrid1.ScrollTrack = Me.CheckBox2.Checked

End Sub

Private Sub C1TrueDBGrid1_FetchScrollTips(ByVal sender As System.Object, ByVal e As C1.Win.C1TrueDBGrid.FetchScrollTipsEventArgs) Handles C1TrueDBGrid1.FetchScrollTips

' Set the ScrollTip depending on which

' scroll bar was moved

Select Case e.ScrollBar

Case C1.Win.C1TrueDBGrid.ScrollBarEnum.Horizontal

e.ScrollTip = Me.C1TrueDBGrid1.Columns(e.ColIndex).Caption

Case C1.Win.C1TrueDBGrid.ScrollBarEnum.Vertical

e.ScrollTip = "Record: " & CStr(e.Row + 1) & " of " & _

CStr(Me.dbTable.Rows.Count) & vbCrLf & "Company: " & _

Me.dbTable.Rows(e.Row).Item("Company") & vbCrLf & _

"User code: " & Me.dbTable.Rows(e.Row).Item("UserCode")

End Select

e.TipStyle.ForeColor = Color.Blue

End Sub


Unbound Grid1 - C#

C#

C1TrueDBGrid.Columns.Add(new C1DataColumn("FirstName",typeof(string)));

C1TrueDBGrid.Columns.Add(new C1DataColumn("LateName",typeof(string)));

C1TrueDBGrid.Columns.Add(new C1DataColumn("DateOfBirth",typeof(DateTime)));


Unbound Grid1 - Delphi

Delphi

C1TrueDBGrid.Columns.Add(C1DataColumn.Create('FirstName', TypeOf(string)));

C1TrueDBGrid.Columns.Add(C1DataColumn.Create('LateName', TypeOf(string)));

C1TrueDBGrid.Columns.Add(C1DataColumn.Create('DateOfBirth', TypeOf(DateTime)));


UnBound Grid1 - Visual Basic

Visual Basic

C1TrueDBGrid.Columns.Add(New C1DataColumn("FirstName", GetType(String)))

C1TrueDBGrid.Columns.Add(New C1DataColumn("LateName", GetType(String)))

C1TrueDBGrid.Columns.Add(New C1DataColumn("DateOfBirth", GetType(DateTime)))


Unbound Grid2 - C#

C#

C1TrueDBGrid.SetDataBinding();


Unbound Grid2 - Delphi

Delphi

C1TrueDBGrid.SetDataBinding;


UnBound Grid2 - Visual Basic

Visual Basic

C1TrueDBGrid.SetDataBinding()


Unbound Grid3 - C#

C#

C1TrueDBGrid.AddRow("John;Doe;11/29/1985");

C1TrueDBGrid.AddRow("Jane;Doe;7/12/1980");

int index = C1TrueDBGrid.AddRows(2);

for(int i=index; i < 2; i++)

{

C1TrueDBGrid[i,"FirstName"] = "Joe";

C1TrueDBGrid[i, "LastName"] = "Doe";

C1TrueDBGrid[i, "DateOfBirth"] = new DateTime(2000,1, 15);

}


Unbound Grid3 - Delphi

Delphi

C1TrueDBGrid.AddRow('John;Doe;11/29/1985');

C1TrueDBGrid.AddRow('Jane;Doe;7/12/1980');

index := C1TrueDBGrid.AddRows(2);

i := index;

while (i < 2) do

begin

C1TrueDBGrid[i] := 'Joe';

C1TrueDBGrid[i] := 'Doe';

C1TrueDBGrid[i] := DateTime.Create(2000, 1, 15);

end;


UnBound Grid3 - Visual Basic

Visual Basic

C1TrueDBGrid.AddRow("John;Doe;11/29/1985")

C1TrueDBGrid.AddRow("Jane;Doe;7/12/1980")

Dim index As Integer = C1TrueDBGrid.AddRows(2)

Dim i As Integer

For i = index To 1

C1TrueDBGrid(i, "FirstName") = "Joe"

C1TrueDBGrid(i, "LastName") = "Doe"

C1TrueDBGrid(i, "DateOfBirth") = New DateTime(2000, 1, 15)

Next i


Using an Arbitrary Dropdown Control- C#

C#

Rectangle r = Me.C1TrueDBGrid1.Splits(0).GetCellBounds(Me.C1TrueDBGrid1.Row, e.ColIndex)

r = Me.C1TrueDBGrid1.RectangleToScreen(r)

r = Me.RectangleToClient(r)

Me.ListBox1.Left = r.Left

Me.ListBox1.Top = r.Bottom


Using an Arbitrary Dropdown Control- Delphi

Delphi

var Col1: C1TrueDBGrid.C1DataColumn;

Col1 := C1TrueDBGrid1.Columns[e.ColIndex];

with Self.C1TrueDBGrid1 do

begin

Self.ListBox1.Left := Left + Col1.Left + Col1.Width;

Self.ListBox1.Top := Top + RowTop(Row);

End With;


Using an Arbitrary Dropdown Control- Visual Basic

Visual Basic

Dim Col As C1.Win.C1TrueDBGrid.C1DataColumn = C1TrueDBGrid1.Columns(e.ColIndex)

Dim r As Rectangle

r = Me.C1TrueDBGrid1.Splits(0).GetCellBounds(Me.C1TrueDBGrid1.Row, e.ColIndex)

r = Me.C1TrueDBGrid1.RectangleToScreen(r)

r = Me.RectangleToClient(r)

Me.ListBox1.Left = r.Left

Me.ListBox1.Top = r.Bottom


Using Custom Editors - C#

C#

private void Form_Load(EventArgs e)
{

// create custom editor

C1NumericEdit editor = new C1NumericEdit();

editor.BorderStyle = BorderStyle.None;

// assign custom editor to the grid

C1TrueDBGrid1.Columns[0].Editor = editor;

}


Using Custom Editors - Delphi

Delphi

procedure TWinForm.TWinForm_Load(e: System.EventArgs);

var editor: C1NumericEdit;
begin

// create custom editor

editor := C1NumericEdit.Create;

editor.BorderStyle := BorderStyle.None;

// assign custom editor to the grid

C1TrueDBGrid1.Columns[0].Editor := editor;

end;


Using Custom Editors - Visual Basic

Visual Basic

Private Sub Form_Load(EventArgs e)

' create custom editor

Dim editor as New C1NuumericEdit()

editor.BorderStyle = BorderStyle.None

' assign custom editor to the grid

C1TrueDBGrid1.Columns(0).Editor = editor

End Sub


Using the C1DisplayColumnCollection Editor- C#

C#

this.C1TrueDBGrid1.Splits[0].DisplayColumns(0).Merge = true;


Using the C1DisplayColumnCollection Editor- Delphi

Delphi

Self.C1TrueDBGrid1.Splits[0].DisplayColumns[0].Merge := True;


Using the C1DisplayColumnCollection Editor- Visual Basic

Visual Basic

Me.C1TrueDBGrid1.Splits(0).DisplayColumns(0).Merge = True


Using the GridStyleCollection Editor- C#

C#

this.C1TrueDBGrid1.Styles["Normal"].WrapText = false;


Using the GridStyleCollection Editor- Delphi

Delphi

Self.C1TrueDBGrid1.Styles['Normal'].WrapText := False;


Using the GridStyleCollection Editor- Visual Basic

Visual Basic

Me.C1TrueDBGrid1.Styles("Normal").WrapText = False


Using the SplitCollection Editor - C#

C#

this.C1TrueDBGrid.Splits[0].AllowColMove = true;


Using the SplitCollection Editor - Delphi

Delphi

Self.C1TrueDBGrid.Splits[0].AllowColMove := True;


Using the SplitCollection Editor - Visual Basic

Visual Basic

Me.C1TrueDBGrid.Splits(0).AllowColMove = True


Using the ValueItemCollection Editor- C#

C#

this.C1TrueDBGrid1.Columns[0].ValueItems.Values;


Using the ValueItemCollection Editor- Delphi

Delphi

Self.C1TrueDBGrid1.Columns[0].ValueItems.Values;


Using the ValueItemCollection Editor- Visual Basic

Visual Basic

Me.C1TrueDBGrid1.Columns(0).ValueItems.Values


ValueItemCollection Class- C#

C#

this.C1TrueDBGrid.Columns[0].ValueItems.Values[0].DisplayValue = "Canada";


ValueItemCollection Class- Delphi

Delphi

Self.C1TrueDBGrid.Columns[0].ValueItems.Values[0].DisplayValue := 'Canada';


ValueItemCollection Class- Visual Basic

Visual Basic

Me.C1TrueDBGrid.Columns(0).ValueItems.Values(0).DisplayValue = "Canada"


ValueItems Class- C#

C#

this.C1TrueDBGrid.Columns[0].ValueItems.MaxComboItems = 5;


ValueItems Class- Delphi

Delphi

Self.C1TrueDBGrid.Columns[0].ValueItems.MaxComboItems := 5;


ValueItems Class- Visual Basic

Visual Basic

Me.C1TrueDBGrid.Columns(0).ValueItems.MaxComboItems = 5


Vertical Scrolling and Split Groups2 - C#

C#

this.C1TrueDBGrid1.Splits[0,1].HorizontalScrollGroup = 2;


Vertical Scrolling and Split Groups2 - Delphi

Delphi

Self.C1TrueDBGrid1.Splits.Item[0,1].HorizontalScrollGroup := 2;


Vertical Scrolling and Split Groups2 - Visual Basic

Visual Basic

Me.C1TrueDBGrid1.Splits.Item(0,1).HorizontalScrollGroup = 2


Vertical Scrolling and Split Groups - C#

C#

this.C1TrueDBGrid1.InsertHorizontalSplit(0); // Create a Split at the left

this.C1TrueDBGrid1.InsertHorizontalSplit(0); // Create another


Vertical Scrolling and Split Groups - Delphi

Delphi

Self.C1TrueDBGrid1.InsertHorizontalSplit(0); // Create a Split at the left

Self.C1TrueDBGrid1.InsertHorizontalSplit(0); // Create another


Vertical Scrolling and Split Groups - Visual Basic

Visual Basic

Me.C1TrueDBGrid1.InsertHorizontalSplit(0) ' Create a Split at the left

Me.C1TrueDBGrid1.InsertHorizontalSplit(0) ' Create another


Working with Collections2- C#

C#

//Declare Split0 as Split object

C1.Win.C1TrueDBGrid.Split Split0;

// set Split0 to reference the first Split in the collection

Split0 = this.C1TrueDBGrid1.Splits[0];


Working with Collections2- Delphi

Delphi

// Declare Split0 as a Split object;

var Split0: C1.Win.C1TrueDBGrid.Split;

// Set Split0 to reference the first Split in the collection;

Split0 := Self.C1TrueDBGrid1.Splits.Item[0];


Working with Collections2- Visual Basic

Visual Basic

' Declare Split0 as a Split object

Dim Split0 As C1.Win.C1TrueDBGrid.Split

' Set Split0 to reference the first Split in the collection

Split0 = Me.C1TrueDBGrid1.Splits(0)


Working with Collections3- C#

C#

//Declare Split0 as Split object

C1.Win.C1TrueDBGrid.Split Split0;

// set Split0 to reference the first Split in the collection

Split0 = this.C1TrueDBGrid1.Splits[0];


Working with Collections3- Delphi

Delphi

// Declare Split0 as a Split object;

var Split0: C1.Win.C1TrueDBGrid.Split;

// Set Split0 to reference the first Split in the collection;

Split0 := Self.C1TrueDBGrid1.Splits[0];


Working with Collections3- Visual Basic

Visual Basic

' Declare Split0 as a Split object

var Split0: C1.Win.C1TrueDBGrid.Split

' Set Split0 to reference the first Split in the collection

Split0 = Me.C1TrueDBGrid1.Splits(0)


Working with Collections4- C#

C#

variable = Split0.Property; // Read a Split object property

Split0.Property = variable; // set a Split object property

Split0.Method (arg1, arg2, ...); // Execute a Split object method


Working with Collections4- Delphi

Delphi

variable := Split0.Property; // Read a Split object property

Split0.Property := variable; // Set a Split object property

Split0.Method(arg1, arg2, ...); // Execute a Split object method


Working with Collections4- Visual Basic

Visual Basic

variable = Split0.Property ' Read a Split object property

Split0.Property = variable ' Set a Split object property

Split0.Method (arg1, arg2, ...) ' Execute a Split object method


Working with Collections5- C#

C#

// Read a Split object's properties

variable1 = this.TrueDBGrid1.Splits[0,0].Property1;

variable2 = this.TrueDBGrid1.Splits[0,0].Property2;

// set a Split object's properties

this.TrueDBGrid1.Splits[0,0].Property1 = variable1;

this.TrueDBGrid1.Splits[0,0].Property2 = variable2;


Working with Collections5- Delphi

Delphi

// Read a Split object's properties;

variable1 := Self.TrueDBGrid1.Splits[0,0].Property1;

variable2 := Self.TrueDBGrid1.Splits[0,0].Property2;

// Set a Split object's properties;

Self.TrueDBGrid1.Splits[0,0].Property1 := variable1;

Self.TrueDBGrid1.Splits[0,0].Property2 := variable2;


Working with Collections5- Visual Basic

Visual Basic

' Read a Split object's properties

variable1 = Me.TrueDBGrid1.Splits(0,0).Property1

variable2 = Me.TrueDBGrid1.Splits(0,0).Property2

' Set a Split object's properties

Me.TrueDBGrid1.Splits(0,0).Property1 = variable1

Me.TrueDBGrid1.Splits(0,0).Property2 = variable2


Working with Collections6- C#

C#

//Declare Split0 as Split object

C1TrueDBGrid.Split Split0;

// set Split0 to reference the first Split in the collection

Split0 = this.C1TrueDBGrid1.Splits[0,0];

// Read a Split object's properties

variable1 = Split0.Property1;

variable2 = Split0.Property2;

// set { a Split object's properties

Split0.Property1 = variable1;

Split0.Property2 = variable2;


Working with Collections6- Delphi

Delphi

// Declare Split0 as a Split;

var Split0: C1TrueDBGrid.Split;

// Set Split0 to reference the first Split in the collection;

Split0 := Self.C1TrueDBGrid1.Splits.Item[0,0];

// Read a Split object's properties;

variable1 := Split0.Property1;

variable2 := Split0.Property2;

// Set a Split object's properties;

Split0.Property1 := variable1;

Split0.Property2 := variable2;


Working with Collections6- Visual Basic

Visual Basic

' Declare Split0 as a Split

Dim Split0 As C1TrueDBGrid.Split

' Set Split0 to reference the first Split in the collection

Split0 = Me.C1TrueDBGrid1.Splits.Item(0,0)

' Read a Split object's properties

variable1 = Split0.Property1

variable2 = Split0.Property2

' Set a Split object's properties

Split0.Property1 = variable1

Split0.Property2 = variable2


Working with Collections7- C#

C#

// Declare Cols as a Columns collection object, then set it to reference C1TrueDBGrid1's C1DataColumnCollection object.

C1.Win.C1TrueDBGrid.C1DataColumnCollection Cols;

Cols = this.C1TrueDBGrid1.Columns;

// Declare Col0 as a C1DataColumn object, then set it to

// reference the first Column object in the collection.

C1.Win.C1TrueDBGrid.C1DataColumn Col0 = new C1TrueDBGrid.DataColumn();

Col0 = Cols[0];

// Read and set the C1DataColumn object's Property1

variable1 = Col0.Property1;

Col0.Property1 = variable1;

// Execute the C1DataColumn object's Method1 (declared as a Sub)

Col0.Method1 (arg1, arg2, ...);

// Execute the C1DataColumn object's Method2 (declared as a Function)

variable2 = Col0.Method2(arg1);


Working with Collections7- Delphi

Delphi

// Declare Cols as a Columns collection object, then set it to reference C1TrueDBGrid1's C1DataColumnCollection object.

// Declare Col0 as a DataColumn object, then set it to reference the first Column object in the collection.

var Cols: C1TrueDBGrid.C1DataColumnCollection;

Col0: C1TrueDBGrid.C1DataColumn;

…

Cols := Self.C1TrueDBGrid1.Columns;

Col0 := Cols[0];

// Read and set the DataColumn object's Property1

variable1 := Col0.Property1;

Col0.Property1 := variable1;

// Execute the DataColumn object's Method1 (declared as a Sub)

Col0.Method1 (arg1, arg2, ...);

// Execute the DataColumn object's Method2 (declared as a Function)

variable2 := Col0.Method2(arg1);


Working with Collections7- Visual Basic

Visual Basic

' Declare Cols as a Columns collection object, then set it to reference C1TrueDBGrid1's C1DataColumnCollection object.

Dim Cols As C1.Win.C1TrueDBGrid.C1DataColumnCollection

Cols = Me.C1TrueDBGrid1.Columns

' Declare Col0 as a C1DataColumn object, then set it to
' reference the first Column object in the collection.

Dim Col0 As New C1.Win.C1TrueDBGrid.C1DataColumn

Col0 = Cols(0)

' Read and set the C1DataColumn object's Property1

variable1 = Col0.Property1

Col0.Property1 = variable1

' Execute the C1DataColumn object's Method1 (declared as a Sub)

Col0.Method1 (arg1, arg2, ...)

' Execute the C1DataColumn object's Method2 (declared as a Function)

variable2 = Col0.Method2(arg1)


Working with Collections8- C#

C#

this.C1TrueDBGrid1.Columns[0].Property1 = variable1;

this.C1TrueDBGrid1.Columns[0].Property2 = variable2;


Working with Collections8- Delphi

Delphi

with Self.C1TrueDBGrid1.Columns[0]
begin

Property1 := variable1;

Property2 := variable2;

end;


Working with Collections8- Visual Basic

Visual Basic

With Me.C1TrueDBGrid1.Columns(0)

.Property1 = variable1

.Property2 = variable2

End With


Working with Collections- C#

C#

// Read a Split object property

variable = this.C1TrueDBGrid1.Splits[0].Property;

// set a Split object property

this.C1TrueDBGrid1.Splits[0].Property = variable;


Working with Collections- Delphi

Delphi

// Read a Split object property;

variable := Self.C1TrueDBGrid1.Splits[0].Property;

// Set a Split object property;

Self.C1TrueDBGrid1.Splits[0].Property := variable;


Working with Collections- Visual Basic

Visual Basic

' Read a Split object property

variable = Me.C1TrueDBGrid1.Splits(0).Property

' Set a Split object property

Me.C1TrueDBGrid1.Splits(0).Property = variable


Working with Columns in Splits- C#

C#

this.C1TrueDBGrid1.Splits[1].DisplayColumns["LastName"].Visible = true;


Working with Columns in Splits- Delphi

Delphi

Self.C1TrueDBGrid1.Splits[1].DisplayColumns['LastName'];


Working with Columns in Splits- Visual Basic

Visual Basic

Me.C1TrueDBGrid1.Splits(1).DisplayColumns("LastName").Visible = True


Working with the Count Property2 - C#

C#

for (n = 0; n < this.c1TrueDBGrid1.Columns.Count; n++)

{

Console.WriteLine(this.c1TrueDBGrid1.Columns[n].Caption);

}


Working with the Count Property2 - Delphi

Delphi

for n := 0 to Self.C1TrueDBGrid1.Columns.Count – 1 do

Debug.WriteLine(Self.C1TrueDBGrid1.Columns[n].Caption);


Working with the Count Property2 - Visual Basic

Visual Basic

For n = 0 To Me.C1TrueDBGrid1.Columns.Count - 1

Debug.WriteLine(Me.C1TrueDBGrid1.Columns(n).Caption)

Next n


Working with the Count Property3 - C#

C#

// Determine how many columns there are

int NumCols;

NumCols = this.C1TrueDBGrid1.Columns.Count;

// Append a column to the end of the Columns collection

C1TrueDBGrid.C1DataColumn C = new C1TrueDBGrid.C1DataColumn();

this.TrueDBGrid1.Columns.Insert(NumCols, C);

// Make the new column visible, since columns created

// at run time are invisible by default

this.TrueDBGrid1.Splits[0].DisplayColumns[C].Visible = true;

// The following loop removes all columns from the grid

while ( this.C1TrueDBGrid1.Columns.Count > 0 )

{

this.C1TrueDBGrid1.Columns.RemoveAt(0);

}


Working with the Count Property3 - Delphi

Delphi

var NumCols: Integer;

C: C1TrueDBGrid.C1DataColumn;

// Determine how many columns there are

NumCols := Self.C1TrueDBGrid1.Columns.Count;

// Append a column to the end of the Columns collection

Self.TrueDBGrid1.Columns.Insert(NumCols, C);

// Make the new column visible, since columns created

// at run time are invisible by default

Self.TrueDBGrid1.Columns[NumCols].Visible := True;

// The following loop removes all columns from the grid

while (Self.C1TrueDBGrid1.Columns.Count > 0) do

Self.C1TrueDBGrid1.Columns.RemoveAt(0);


Working with the Count Property3 - Visual Basic

Visual Basic

' Determine how many columns there are

Dim NumCols As Integer

NumCols = Me.C1TrueDBGrid1.Columns.Count

' Append a column to the end of the Columns collection

Dim C As C1TrueDBGrid.C1DataColumn = New C1TrueDBGrid.C1DataColumn()

Me.TrueDBGrid1.Columns.Insert(NumCols, C)

' Make the new column visible, since columns created

' at run time are invisible by default

Me.TrueDBGrid1.Splits(0).DisplayColumns(C).Visible = True

' The following loop removes all columns from the grid

While Me.C1TrueDBGrid1.Columns.Count

Me.C1TrueDBGrid1.Columns.RemoveAt(0)

Wend


Working with the Count Property4 - C#

C#

C1TrueDBGrid.C1DataColumn c;

foreach (c In this.C1TrueDBGrid1.Columns)

{

Console.WriteLine(c);

}


Working with the Count Property4 - Delphi

Delphi

var C: C1TrueDBGrid.C1DataColumn;
i: Integer;

for i := 0 to Self.C1TrueDBGrid1.Columns.Count-1 do

begin
C := Self.C1TrueDBGrid1.Columns[i]; // Determine how many columns there are

Debug.WriteLine(C.Caption);

end;


Working with the Count Property4 - Visual Basic

Visual Basic

Dim C As C1TrueDBGrid.C1DataColumn

For Each C In Me.C1TrueDBGrid1.Columns

Debug.WriteLine(C.Caption)

Next S


Working with the Count Property - C#

C#

// set a variable equal to the number of Splits in C1TrueDBGrid1

variable = this.C1TrueDBGrid1.Splits.Count;


Working with the Count Property - Delphi

Delphi

// Set a variable equal to the number of Splits in C1TrueDBGrid1

variable := Self.C1TrueDBGrid1.Splits.Count;


Working with the Count Property - Visual Basic

Visual Basic

' Set a variable equal to the number of Splits in C1TrueDBGrid1

variable = Me.C1TrueDBGrid1.Splits.Count


Copyright © 1987-2005 ComponentOne LLC. All rights reserved.