Vous êtes sur la page 1sur 279

Copyright 1987-2006 ComponentOne LLC. All rights reserved.

Corporate Headquarters
ComponentOne LLC
201 South Highland Avenue
3
rd
Floor
Pittsburgh, PA 15206 USA
Internet: info@ComponentOne.com
Web site: http://www.componentone.com
Sales
E-mail: sales@componentone.com
Telephone: 1.800.858.2739 or 1.412.681.4343 (Pittsburgh, PA USA Office)


Technical Support
See Technical Support in this manual for information on obtaining technical support.

Trademarks
ComponentOne WebGrid for ASP.NET and the ComponentOne WebGrid for ASP.NET logo are trademarks, and ComponentOne is a
registered trademark of ComponentOne LLC. All other trademarks used herein are the properties of their respective owners.

Warranty
ComponentOne warrants that the original CD (or diskettes) are free from defects in material and workmanship, assuming normal use,
for a period of 90 days from the date of purchase. If a defect occurs during this time, you may return the defective CD (or disk) to
ComponentOne, along with a dated proof of purchase, and ComponentOne will replace it at no charge. After 90 days, you can obtain a
replacement for a defective CD (or disk) by sending it and a check for $25 (to cover postage and handling) to ComponentOne.
Except for the express warranty of the original CD (or disks) set forth here, ComponentOne makes no other warranties, express or
implied. Every attempt has been made to ensure that the information contained in this manual is correct as of the time it was written.
We are not responsible for any errors or omissions. ComponentOnes liability is limited to the amount you paid for the product.
ComponentOne is not liable for any special, consequential, or other damages for any reason.

Copying and Distribution
While you are welcome to make backup copies of the software for your own use and protection, you are not permitted to make copies
for the use of anyone else. We put a lot of time and effort into creating this product, and we appreciate your support in seeing that it is
used by licensed users only. Please read License Agreement and Licensing sections in this manual before copying and redistributing
any ComponentOne WebGrid for ASP.NET files.


iii
Table of Contents
Welcome to ComponentOne WebGrid for ASP.NET.................................................................... 1
Terminology..........................................................................................................................................1
Overview...............................................................................................................................................1
What's New in C1WebGrid for ASP.NET 2.0 ........................................................................................3
Installing C1WebGrid for ASP.NET......................................................................................................4
END-USER LICENSE AGREEMENT FOR COMPONENTONE SOFTWARE..................................5
Licensing FAQs...................................................................................................................................11
Technical Support................................................................................................................................14
Redistributable Files ............................................................................................................................15
Namespaces ........................................................................................................................................15
Creating an ASP.NET 2.0 Project ........................................................................................................17
Adding the C1WebGrid Component to the Toolbox.............................................................................18
Migrating a C1WebGrid Project to Visual Studio 2005..........................................................................19
Using C1WebGrid ...............................................................................................................25
Using the Property Builder ...................................................................................................................25
Using the Properties window................................................................................................................29
Using the AutoFormat Dialog Box.......................................................................................................30
Formatting Rows.................................................................................................................................31
Grouping.............................................................................................................................................31
C1WebGrid Samples ............................................................................................................37
Visual Basic and C# Samples ...............................................................................................................37
Borland Samples..................................................................................................................................38
Task-Based Help..................................................................................................................39
Binding C1WebGrid to a Data Source control ......................................................................................39
Formatting C1WebGrid.......................................................................................................................44
C1WebGrid Layout Serialization.........................................................................................................61
Displaying Controls in a Column .........................................................................................................63
Aggregates and Grouping.....................................................................................................................69
Creating a Pageable Grid .....................................................................................................................74
Scrolling C1WebGrid ..........................................................................................................................79
C1WebGrid Frequently Asked Questions ..................................................................................83
C1.Web.C1WebGrid.2 Assembly............................................................................................85
C1.Web.C1WebGrid Namespace ............................................................................................87
C1.Web.C1WebGrid Hierarchy ...........................................................................................................90
AggregateEnum Enumeration..............................................................................................................92
C1BoundColumn Class........................................................................................................................92
C1ButtonColumn Class .......................................................................................................................98
C1CancelCommandEventArgs Class.................................................................................................. 103
C1CancelCommandEventHandler Delegate ....................................................................................... 106
C1ColMovedEventArgs Class ............................................................................................................ 107
C1ColMovedEventHandler Delegate ................................................................................................. 109
C1ColMovingEventArgs Class........................................................................................................... 110
C1ColMovingEventHandler Delegate ................................................................................................ 112
C1Column Class................................................................................................................................ 113
C1ColumnCollection Class ................................................................................................................ 122
C1CommandEventArgs Class ............................................................................................................ 127
C1CommandEventHandler Delegate.................................................................................................. 130
iv

C1DeletedCommandEventArgs Class ................................................................................................ 130
C1DeletedCommandEventHandler Delegate...................................................................................... 134
C1DeletingCommandEventArgs Class ............................................................................................... 135
C1DeletingCommandEventHandler Delegate..................................................................................... 138
C1EditCommandColumn Class ......................................................................................................... 139
C1GridItem Class.............................................................................................................................. 144
C1GroupAggregateEventHandler Delegate ........................................................................................ 151
C1GroupColMovedEventArgs Class .................................................................................................. 151
C1GroupColMovedEventHandler Delegate........................................................................................ 154
C1GroupColMovingEventArgs Class................................................................................................. 155
C1GroupColMovingEventHandler Delegate ...................................................................................... 158
C1GroupTextEventArgs Class ........................................................................................................... 159
C1GroupTextEventHandler Delegate................................................................................................. 162
C1HyperLinkColumn Class ............................................................................................................... 162
C1ItemCollection Class ..................................................................................................................... 169
C1ItemEventArgs Class ..................................................................................................................... 173
C1ItemEventHandler Delegate........................................................................................................... 175
C1ListItemType Enumeration............................................................................................................ 176
C1PageChangingEventArgs Class ...................................................................................................... 177
C1PageChangingEventHandler Delegate............................................................................................ 179
C1PagerStyle Class ............................................................................................................................ 180
C1ScrollBarStyle Enumeration........................................................................................................... 187
C1SelectedIndexChangingEventArgs Class ........................................................................................ 188
C1SelectedIndexChangingHandler Delegate....................................................................................... 191
C1SortDirection Enumeration............................................................................................................ 192
C1SortingCommandEventArgs Class ................................................................................................. 193
C1SortingCommandEventHandler Delegate....................................................................................... 195
C1TemplateColumn Class ................................................................................................................. 196
C1UpdatedEventArgs Class ............................................................................................................... 201
C1UpdatedEventHandler Delegate..................................................................................................... 206
C1UpdatingEventArgs Class .............................................................................................................. 206
C1UpdatingEventHandler Delegate ................................................................................................... 210
C1WebGrid Class.............................................................................................................................. 211
GridUpdateBindingCollection Class................................................................................................... 253
GroupColumnCollection Class........................................................................................................... 256
GroupInfo Class ................................................................................................................................ 259
GroupMoveEnum Enumeration......................................................................................................... 266
GroupPositionEnum Enumeration..................................................................................................... 266
OutlineModeEnum Enumeration....................................................................................................... 267
RowMergeEnum Enumeration .......................................................................................................... 267
Index .............................................................................................................................. 269

Terminology 1

Welcome to ComponentOne WebGrid
for ASP.NET
Welcome to ComponentOne WebGrid for ASP.NET, a suite of ASP.NET components used to display
items from a data source in a customizable table. It also includes other UI elements for ASP.NET web pages.
If you like WebGrid for ASP.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 get copies of our
products and try them for as long as they want. Those who like the tools and find them useful can buy licenses
at reasonable prices. The only restriction is that unlicensed copies of the software will display a
ComponentOne banner when they are loaded as a friendly reminder that we do expect people to pay for the
software if they use it on a regular basis.
We hope you'll like WebGrid for ASP.NET. If you have suggestions or ideas for new features or new tools,
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

Terminology
In this text, C1WebGrid is used as a short name to designate the whole ComponentOne WebGrid for
ASP.NET product.
Overview
WebGrid for ASP.NET allows you to display items from a data source in a table that can be easily formatted
and manipulated.
WebGrid for ASP.NET is highly compatible with the Microsoft DataGrid, which means you can upgrade
existing ASP.NET applications easily, and become productive with the WebGrid immediately.
In addition to the standard DataGrid features, WebGrid for ASP.NET includes advanced features that enable
developers to build intuitive, professional-looking Web applications quickly and easily:
Customized grid formatting The C1WebGrid component can be customized to
automatically create columns, display borders and gridlines,
allow editing within the grid, to sort data and much more.
Customized paging You can determine how to display C1WebGrid data on
multiple pages and how the pagers appear. Pagers can be
displayed numerically, as Next and Previous buttons or you
can create your own style.
2 Welcome to ComponentOne WebGrid for ASP.NET

Interactive features You can implement interactive features such as Outlook-
style grouping, which allows you to drag and drop a column
to group on that column.
Grouping with Aggregates You can group data, create trees with expandable and
collapsible nodes, and automatically calculate data
aggregates to be placed in the group header and footer rows.
Row Merging The RowMerge property allows you to merge rows
containing identical text. This feature can be used to create a
neat and well-organized grid.
ValueLists By creating a ValueList dictionary and setting the ValueList
property, you can replace the text appearing in a grid with
your own.
Client-Side Scrolling The VScrollBarStyle and HScrollBarStyle properties of
C1WebGrid allow you to create a client-side grid that
supports both horizontal and vertical scrolling. You can
determine whether your columns and rows are fixed to the
grid when it is scrolled using the new Fixed properties of the
C1Column class and the C1GridItem class, respectively.
C1WebGrid Layout Serialization By saving and loading grid layouts, you can easily create
new instances of C1WebGrid with the same look and feel as
an existing C1WebGrid.
For additional information on these features, and to learn about other WebGrid for ASP.NET features, see
Task-Based Help (page 39).
Client Side Script
C1WebGrids client side functionality is provided by java script included in the product. These scripts should
be installed in such a way as to be accessible by using the virtual directory C1WebGrid_Client. The
C1WebGrid property ClientDir points to the directory containing the client side script code and its default
value is /c1WebGrid_Client/v1_x/.
Note: This directory may change when new functionality is added or existing script files are changed.
Browser Compatibility
C1WebGrid provides downlevel support for Mozilla and Opera.
Class Hierarchy
This section summarizes the class relationships between the more important classes included in C1WebGrid.
C1.Web.C1WebGrid.C1WebGrid : System.Web.UI.WebControls.WebControl
Encapsulates most of the grid functionality. This component is shown in the Visual Studios toolbox.
C1.Web. C1WebGrid.C1Column : System.Object
Base class for columns.
C1.Web. C1WebGrid.C1GridItem : System.Web.UI.WebControls.TableRow
Grid items.
C1.Web. C1WebGrid.C1ItemCollection : System.Collections.CollectionBase
Collection of items.
C1.Web. C1WebGrid.C1PagerStyle : System.Web.UI.WebControls.TableItemStyle
Style of the Pager. Determines if and how the pager is displayed.
What's New in C1WebGrid for ASP.NET 2.0 3

C1.Web. C1WebGrid.GroupInfo : System.Object
Used to determine how and where grouped header and footer rows are displayed.
Samples and Task-Based Help
WebGrid for ASP.NET includes sample projects and task-based help to give you a better understanding of
how C1WebGrid works.
The sample projects demonstrate the techniques for using groups and aggregates, customizing
columns and pagers, and sorting and editing data. They are located in C:\Program
Files\ComponentOne Studio ASP.NET\C1WebGrid\Samples.
The task-based help topics walk you step-by-step through specific tasks, such as binding C1WebGrid
to a data source, merging rows, and adding a column. For additional information, see Task-Based
Help (page 39).
We encourage you to run the projects, examine the code, and experiment with your own modifications.
Running the samples and using the task-based help is the best and quickest way to realize the full potential of
C1WebGrid. You will find that C1WebGrid is very easy to use, and it enables you to create powerful
applications.
What's New in C1WebGrid for ASP.NET 2.0
This documentation was last revised for 2006 v1 on December 28, 2005.
Overview of What's New in ComponentOne WebGrid for ASP.NET
There are new properties and an enumeration that have been added to WebGrid for ASP.NET to allow the
user more flexibility.
Feature Overview
DataSource components are supported: If a DataSource component is used as a dataset for the grid, grid
features such as record deletion, editing, paging, and sorting work automatically without the need to write
special event handlers.
ControlState support: C1WebGrid's most critical properties are stored separately from ViewState and will
work even if ViewState is turned off. These properties are: DataKeyField, EditItemIndex, CurrentPageIndex
and SelectedIndex.
C1WebGrid now renders xhtml 1.1 compatible html content.
Cancellable events: Actions such as column moving, row deletion, row selection, paging, sorting, and date
updating can be handled and cancelled, if needed, using the following events:
ColumnMoving\ColumnMoved
DeletingCommand\DeletedCommand
GroupColumnMoving\GroupColumnMoved
PageIndexChanging\PageIndexChanged
SelectedIndexChanging\SelectedIndexChanged
SortingCommand\SortedCommand
UpdatingCommand\UpdatedCommand
CancelingCommand
Each action has two corresponding events; one takes place before the action, another after.
4 Welcome to ComponentOne WebGrid for ASP.NET

The client part (scripts and images) is now stored within the C1WebGrid assembly and automatically
deployed on the end-user client machine.
Installing C1WebGrid for ASP.NET
To install C1WebGridfor ASP.NET, run the C1WebGrid.msi installation file provided in the distribution CD
(or downloaded from the Web), and follow the instructions.
C1WebGrid for ASP.NET Setup Files
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.
C1WebGrid Contains samples for C1WebGrid.
System Requirements
Operating Systems:
Windows 2000
Windows 2003 Server
Windows NT 4
Windows XP, sp1, sp2
Web Server:
Microsoft Internet Information Services (IIS) 5.x
Microsoft Internet Information Services (IIS) 6.x
Environments:
.NET Framework 1.0
.NET Framework 1.1
ASP.NET
C# .NET
Delphi
Internet Explorer 4.x
Internet Explorer 5.x
Internet Explorer 6.x
Netscape 4
Netscape 6
Netscape 7
Visual Basic .NET
END-USER LICENSE AGREEMENT FOR COMPONENTONE SOFTWARE 5

Environments (Visual Studio 2005):
.NET Framework 2.0
C# .NET
Visual Basic .NET
ASP.NET
Delphi
Internet Explorer 4.x
Internet Explorer 5.x
Internet Explorer 6.x
Netscape 4
Netscape 6
Netscape 7
Hard Disk Space: 41 MB of hard disk space for storage of the software
Disc Drive: CD or DVD-ROM drive if installing from CD
Installing Demonstration Versions
If you wish to try WebGrid for ASP.NET or any of our other products and do not have a registration key,
follow the steps through the installation wizard and use the default serial number.
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 WebGrid for ASP.NET
To uninstall WebGrid for ASP.NET, open Control Panel and select the Add or Remove Programs option.
Select ComponentOneWebGrid for ASP.NET and click the Remove button.
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.
6 Welcome to ComponentOne WebGrid for ASP.NET

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.
END-USER LICENSE AGREEMENT FOR COMPONENTONE SOFTWARE 7

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.
8 Welcome to ComponentOne WebGrid for ASP.NET

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
END-USER LICENSE AGREEMENT FOR COMPONENTONE SOFTWARE 9

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 , 3
rd
Floor, Pittsburgh,
Pennsylvania 15206 USA. For solicitations issued by the Government on or after December 1, 1995 and
10 Welcome to ComponentOne WebGrid for ASP.NET

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,
Licensing FAQs 11

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
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?
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?
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
12 Welcome to ComponentOne WebGrid for ASP.NET

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
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
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
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
When building console applications, there are no forms to add components to, and therefore Visual Studio
won't create a licenses.licx file.
Licensing FAQs 13

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
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
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.
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").
14 Welcome to ComponentOne WebGrid for ASP.NET

I have a licensed version of a ComponentOne product on my web server but the components still
behave as unlicensed.
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.
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
ComponentOne WebGrid for ASP.NET is developed and supported by ComponentOne LLC, a company
formed by the merger of APEX Software Corporation and VideoSoft. You can obtain technical support using
any of the following methods:
ComponentOne Web site
The ComponentOne Web site at www.componentone.com provides a wealth of information and software
downloads for WebGrid for ASP.NET users, including:
Descriptions of the various support options available through the ComponentOne Service Team.
Answers to frequently asked questions (FAQ's) about our products, organized by functionality. Please
consult the FAQ's before contacting us directly, as this can save you time and also introduce you to
other useful information pertaining to our products.
Free product updates, which provide you with bug fixes and new features.
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
For technical support through the Internet, e-mail us at:
support.c1webgrid@componentone.com


Redistributable Files 15

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:
http://www.componentone.com/support
Peer-to-Peer newsgroup
ComponentOne also sponsors peer-to-peer newsgroups for WebGrid. 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 WebGrid. However, ComponentOne may monitor the newsgroups 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
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. 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
ComponentOne WebGrid for ASP .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.Web.C1WebGrid.dll
C1.Web.C1WebGrid.2.dll (if using Visual Studio 2005)
Site licenses are available for groups of multiple developers. Please contact Sales@ComponentOne.com for
details.
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 Web products is C1.Web. The namespace for the C1WebGrid
component is C1.Web.C1WebGrid. The following code fragment shows how to declare a C1WebGrid
component using the fully qualified name for this class:
Visual Basic
Dim webgrid As C1.Web.C1WebGrid.C1WebGrid
C#
C1.Web.C1WebGrid.C1WebGrid webgrid;

16 Welcome to ComponentOne WebGrid for ASP.NET

Delphi
var webgrid: C1.Web.C1WebGrid.C1WebGrid;
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 C1BoundColumn, you can use it inside your project without
qualification. However, the C1.Web.C1WebGrid.dll assembly also implements a class called
C1BoundColumn. So, if you want to use the C1WebGrid class in the same project, you must use a fully
qualified reference to make the reference unique. If the reference is not unique, Visual Studio .NET produces
an error stating that the name is ambiguous. The following code snippet demonstrates how to declare these
objects:
Visual Basic
' Define a new object based on your C1BoundColumn class.
Dim MyCol as C1BoundColumn

' Define a new C1WebGrid.C1BoundColumn object.
Dim NewCol as C1.Web.C1WebGrid.C1BoundColumn
C#
// Define a new object based on your C1BoundColumn class.
C1BoundColumn MyCol ;

// Define a new C1WebGrid.C1BoundColumn object.
C1.Web.C1WebGrid.C1BoundColumn newCol;
Delphi
var newCol: C1.Web.C1WebGrid.C1BoundColumn;
MyCol: C1BoundColumn;
Fully qualified names are object references that are prefixed with the name of the namespace where the object
is defined. You can use objects defined in other projects if you create a reference to the class (by choosing Add
Reference from the Project menu) and then use the fully qualified name for the object in your 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, you can use
the Imports statement (using in C#) to define an alias an abbreviated name you can use 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
Imports C1BoundColumn = C1.Web.C1WebGrid.C1BoundColumn
Imports MyCol = MyProject.Objects.C1BoundColumn

Dim c1 As C1BoundColumn
Dim c2 As MyCol
C#
using C1BoundColumn = C1.Web.C1WebGrid.C1BoundColumn ;
using MyCol = MyProject.Objects.C1BoundColumn ;

C1BoundColumn c1 ;
MyCol c2 ;
Delphi
uses C1.Web.C1WebGrid, MyProject.Objects;

type MyCol = MyProject.Objects.C1BoundColumn;
C1BoundColumn = C1.Web.C1WebGrid.C1BoundColumn;
Creating an ASP.NET 2.0 Project 17

var
c2: MyCol;
c1: C1BoundColumn;
If you use the Imports statement without an alias, you can use all the names in that namespace without
qualification provided they are unique to the project.
Creating an ASP.NET 2.0 Project
This topic demonstrates how to create a new ASP.NET project.
1. From the File menu in Microsoft Visual Studio .NET, select New Web Site. The New Web Site dialog
box opens.
2. Select ASP.NET Web Site from the list of Templates.

3. Enter a URL for your application in the Location field and click OK.
Note: The Web server must have IIS version 5 or later and the .NET Framework installed on it. If you
have IIS on your computer, you can specify http://localhost for the server.
A new Web Forms project is created at the root of the Web server you specified. In addition, a new Web
Forms page called WebForm1.aspx is displayed in the Web Forms Designer in Design view.
4. Double-click the C1WebGrid component in the Toolbox to add it to WebForm1.aspx. For information
on adding a component to the toolbox, see Adding the C1WebGrid Component to the Toolbox (page 18).
18 Welcome to ComponentOne WebGrid for ASP.NET


Adding the C1WebGrid Component to the Toolbox
When you install C1WebGrid, the following new component will appear in the Visual Studio Toolbox
customization dialog box:
C1WebGrid
C1WebGrid is the component used to generate a table of items that can be selected, edited, deleted and sorted.
In order to use the C1WebGrid 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 toolbox context menu.
2. If you want the C1WebGrid component to appear on its own tab in the Toolbox, select Add Tab from the
context menu and type in the tab name, C1WebGrid, 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.
Migrating a C1WebGrid Project to Visual Studio 2005 19

The Choose Toolbox Items dialog box opens.
4. In the Choose Toolbox Items dialog box, select the .NET Framework Components tab. Sort the list by
Namespace (click the Namespace column header) and check the check box for the component belonging to
namespace C1.Web.C1WebGrid.

Migrating a C1WebGrid Project to Visual Studio 2005
To migrate a project using ComponentOne components to Visual Studio 2005, there are three 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. Finally, the assembly reference in each
webform must be updated to reference the new assembly.
To convert the project:
1. Open Visual Studio 2005 and in the File menu, select Open and choose Web Site from the submenu.
2. Locate the folder for the ASP.NET project that you wish to convert to Visual Studio 2005. Select it and
click Open. The Visual Studio Conversion Wizard appears.
20 Welcome to ComponentOne WebGrid for ASP.NET


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.
Migrating a C1WebGrid Project to Visual Studio 2005 21

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 select the project node. Click the Properties
button.

9. The Property Pages dialog box opens. Select the C1.Web.C1WebGrid reference and click Remove.
10. Click Add Reference. Locate and select the C1.Web.C1WebGrid.2.dll. Click OK to add it to the project.
22 Welcome to ComponentOne WebGrid for ASP.NET


11. Click OK to close the Property Pages dialog box.
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.
Migrating a C1WebGrid Project to Visual Studio 2005 23

3. If the webform is not open, double-click the .aspx file to open it. Switch to Design view to create a new
licenses.licx file.
To update each webform:
1. Open an .aspx file. Switch to Source view and locate the line at the top of the document that reads:
<%@ Register TagPrefix="cc1" Namespace="C1.Web.C1WebGrid"
Assembly="C1.Web.C1WebGrid" %>
2. Change it to read:
<%@ Register TagPrefix="cc1" Namespace="C1.Web.C1WebGrid"
Assembly="C1.Web.C1WebGrid.2" %>
3. Repeat for each .aspx file.
4. Right-click the main .aspx page and select Set As Start Page.

5. Click the Start Debugging button to compile and run the project.

24 Welcome to ComponentOne WebGrid for ASP.NET

Migrate event handlers:
If you have implemented any of the below event handlers, you must change each to correspond to the
C1.Web.C1WebGrid.2 assembly:
C1.Web.C1WebGrid Event Handlers C1.Web.C1WebGrid.2 Event Handlers
DeleteCommand DeletingCommand
EditCommand EditingCommand
PageIndexChanged PageIndexChanging
SelectedIndexChanged SelectedIndexChanging
SortCommand SortingCommand
UpdateCommand UpdatingCommand

The migration process is complete.
Using the Property Builder 25

Using C1WebGrid
WebGrid for ASP.NET allows you to select, edit, delete and sort the items displayed in the table generated by
the C1WebGrid component. C1WebGrid also supports paging, so data can be displayed across multiple
pages, which are accessed by default or customized navigation buttons.
The columns of a table created using the C1WebGrid component correspond to the fields in a data source.
You can control which columns are displayed, the types of columns to display, and the appearance of the
whole table.
Using the AutoGenerateColumns property, you can generate columns automatically, manually or both.
Setting this property to True (default) creates a C1BoundColumn for each field in the data source. Setting this
property to False allows you to specify the columns to display, which are added to the Columns collection.
Note: Explicitly declared columns are rendered first, followed by automatically generated columns.
Automatically generated columns are not added to the Columns collection.
Using the Property Builder
The Property builder allows you to easily set the properties to be applied to the C1WebGrid component.
Using the Property builder, you can determine whether headers and footers are shown, customize paging and
page navigation, and format the appearance of C1WebGrid.

26 Using C1WebGrid

Setting properties using the Property Builder
1. Right-click C1WebGrid and select Show Smart Tag from the context menu. Select Property builder from
the C1WebGrid Tasks menu.

The C1WebGrid Properties dialog box appears.

2. From the C1WebGrid Properties dialog box, select one of the following tabs in the left column:
General Displays the data source and allows you to set headers, footers and sorting.
Columns Allows you to specify the types of columns that appear and set the properties
for each.
Paging You can determine whether paging is used, and you can customize how and
where it appears.
Using the Property Builder 27

Format Allows you to set the font, color and alignment of the grid and everything
within it, including the headers, footers, the pager, specific items and
columns.
Borders Allows you to set the cell padding and spacing, and you can customize how
the gridlines appear.
Grouping You can determine whether a column is grouped on and how the group
header and footer rows should be formatted and displayed.
3. Choose one of the columns in the list of Selected columns.
4. Set the desired properties under Column properties and click Apply.

5. Once you are finished setting the properties, click OK.
Adding columns using the Property Builder
You can also determine the types of columns to display. Column types include:
C1BoundColumn: displays a column bound to a field in a data source
C1ButtonColumn: displays a command button for each item
C1EditCommandColumn: displays a column containing editing commands for each item
C1HyperLinkColumn: displays each item as a hyperlink
C1TemplateColumn: displays each item in the column following a specified template


28 Using C1WebGrid

To add columns:
1. Right-click C1WebGrid and select Show Smart Tag from the context menu. Select Property builder from
the C1WebGrid Tasks menu. The C1WebGrid Properties dialog box appears.

2. Click the Columns tab in the left pane.
3. Under Column List, select the desired column from the list of Available columns.
Using the Properties window 29


4. Click the arrow button between the column lists to create a column under the list of Selected columns.
Note: When the checkbox next to Create columns automatically at run time is checked (default), bound
columns are automatically created. If you uncheck the box, you must manually create columns.
Using the Properties window
The C1WebGrid properties can easily be set at design time using the Properties window.
1. Select the C1WebGrid component.
2. Select Properties Window from the View menu on the .NET toolbar.
3. In the Properties window, set any of the desired properties.
30 Using C1WebGrid


Using the AutoFormat Dialog Box
The AutoFormat dialog box allows you to choose a preformatted style to apply to C1WebGrid.
1. Right-click C1WebGrid and select Auto Format from the context menu. The Auto Format dialog box
opens.

2. Select one of the predefined formats under Select a Scheme in the left pane. You can preview each format
in the right pane.
3. Click OK.
Formatting Rows 31

Formatting Rows
Each row in the C1WebGrid component represents a record in the data source. You can select, edit, delete,
and apply different styles to your rows. By adding a C1ButtonColumn and code for the EditingCommand,
C1WebGrid.UpdateCommand and CancelingCommand events, you can select each row to be edited or
deleted. The EditItemStyle property allows you to determine the appearance of the rows.
Note: For additional information on editing rows, see Task-Based Help (page 39).
The RowMerge property allows you to merge rows containing identical text. You can use the Property
builder to specify which rows to merge and how they are merged.
Note: For additional information, see Merging Rows (page 69).
Grouping
The C1WebGrid data grouping features allow you to automatically calculate data aggregates and create trees
with nodes that can be collapsed and expanded.
The C1WebGrid data grouping features are controlled by two properties of the C1Column class:
1. The GroupInfo property determines whether a group should be created for the column, as well as the
appearance, position, and content of the group header and group footer rows.
2. The Aggregate property determines the type of aggregate that should be calculated for this column and
included in the group header and footer rows.
Typically, you will set the GroupInfo property for columns that contain categories that you would like to
group on (for example, OrderYear, Country, etc.). You will set the Aggregate property for columns that
contain the values that you want to aggregate on (for example, Amount, Sales, Expenses, etc.).
It is important that the data should be sorted on the columns that are being grouped on. The C1WebGrid will
not sort the group columns automatically.
Setting Grouping Properties at Design Time
You can set up the Grouping properties at design time using the Property builder. You will use three pages in
the dialog box to set up each aspect of data grouping:
1. Grouping Page:
This page contains a list of columns. For each column that you want to group on, set the Position
property to determine where the group header and footer rows should be displayed (set Position to None
to remove grouping for a column). Also set the HeaderText (and/or FooterText) property to determine
what will be displayed in the group header/footer rows. Optionally, set up the group header and footer
styles.
2. Columns Page:
Set the Aggregate property on each column that you want to aggregate on. Usually, these will be columns
that contain numeric values, and will not be grouped on.
3. Formats Page:
Select each column that you are grouping on and set the styles for the group header and group footer rows.
Typically, you will set the background color so the group headers and footers stand out from the regular
rows.
For additional information on the Property builder, see Using the Property Builder (page 25).
32 Using C1WebGrid

Setting Grouping Properties at Run Time
You can also set the Grouping properties at run time. This gives you extra flexibility because you can set up
the grouping based on user selections.
For example, the code below configures the grid to display the same data in one of four modes selectable by
the user (the full sample is available in the distribution package).
Visual Basic
Private Sub _rblView_SelectedIndexChanged(ByVal sender As Object, ByVal
e As System.EventArgs)
' set up grouping/merging
Dim col As C1Column = C1WebGrid1.Columns(0)
Select Case _rblView.SelectedItem.Text
' Traditional Mode: no grouping or merging
Case "Traditional"
col.Visible = True
col.RowMerge = RowMergeEnum.None
col.GroupInfo.Position = GroupPositionEnum.None

' Merged: no grouping, similar values merged down the columns
Case "Merged"
col.Visible = True
col.RowMerge = RowMergeEnum.Free
col.GroupInfo.Position = GroupPositionEnum.None

' Grouped: grouped with collapsible headers, grouped values merged.
Case "Grouped"
col.Visible = True
col.RowMerge = RowMergeEnum.Free
col.GroupInfo.Position = GroupPositionEnum.Header

' Summary: grouped with collapsible headers, grouped values hidden.
Case "Summary"
col.Visible = False
col.RowMerge = RowMergeEnum.None
col.GroupInfo.Position = GroupPositionEnum.Header
End Select

' bind the grid
BindGrid()
End Sub
C#
private void _rblView_SelectedIndexChanged(object sender,
System.EventArgs e)
{
// set up grouping/merging
C1Column col = C1WebGrid1.Columns[0];
switch (_rblView.SelectedItem.Text)
{
// Traditional Mode: no grouping or merging
case "Traditional":
col.Visible = true;
col.RowMerge = RowMergeEnum.None;
col.GroupInfo.Position = GroupPositionEnum.None;
break;

Grouping 33

// Merged: no grouping, similar values merged down the columns
case "Merged":
col.Visible = true;
col.RowMerge = RowMergeEnum.Free;
col.GroupInfo.Position = GroupPositionEnum.None;
break;

// Grouped: grouped with collapsible headers, grouped values merged.
case "Grouped":
col.Visible = true;
col.RowMerge = RowMergeEnum.Free;
col.GroupInfo.Position = GroupPositionEnum.Header;
break;

// Summary: grouped with collapsible headers, grouped values hidden.
case "Summary":
col.Visible = false;
col.RowMerge = RowMergeEnum.None;
col.GroupInfo.Position = GroupPositionEnum.Header;
break;
}

// bind the grid
BindGrid();
}
Delphi
procedure TWebForm1._rblView_SelectedIndexChanged(sender: System.Object;
e: System.EventArgs);
var col: C1Column;
begin
// apply new settings
col := C1WebGrid1.Columns[0];
if (_rblView.SelectedItem.Text = 'Traditional') then
begin
col.Visible := true;
col.RowMerge := RowMergeEnum.None;
col.GroupInfo.Position := GroupPositionEnum.None;
end
else if (_rblView.SelectedItem.Text = 'Summary') then
begin
col.Visible := false;
col.RowMerge := RowMergeEnum.None;
col.GroupInfo.Position := GroupPositionEnum.Header;
col.GroupInfo.HeaderText := 'Total for <i>{0}</i>';
col.GroupInfo.FooterText := System.String.Empty;
C1WebGrid1.GroupIndent := &Unit.Create('15px');
// we'll let the grid automatically compute the sum for us
col := C1WebGrid1.Columns.ColumnByName('ProductSales');
col.Aggregate := AggregateEnum.Sum;
end
else if (_rblView.SelectedItem.Text = 'Custom') then
begin
col.Visible := false;
col.RowMerge := RowMergeEnum.None;
col.GroupInfo.Position := GroupPositionEnum.HeaderAndFooter;
34 Using C1WebGrid

// setting the text to Custom will allow us to configure the grouped
row
// in the GroupText() event
col.GroupInfo.HeaderText := 'Custom';
col.GroupInfo.FooterText := 'Custom';
// this allows us to configure the aggregate column in the
header/footer
col := C1WebGrid1.Columns.ColumnByName('ProductSales');
col.Aggregate := AggregateEnum.Custom;
C1WebGrid1.GroupIndent := &Unit.Create('15px');
end;
BindGrid;
end;
Collapsing and Expanding Groups
C1WebGrid generates client-side script that allows users to collapse and expand the groups without round
trips to the server.
If you set the GroupInfo OutlineMode property to StartCollapsed or StartExpanded, the grid will display
expanded/collapsed icons next to each group header row. The users can click these icons to collapse and
expand the groups to see the overall structure or the details of the data.
For example, an initial display might look like:

After clicking the '+' sign on the Orders taken by Andrew Fuller group header, the group expands to show the
details:

The behavior for the outline nodes is as follows:
1. Click:
If the node is currently expanded, it becomes collapsed. All subordinate group headers and data are
hidden.
Grouping 35

If the node is currently collapsed, it becomes expanded. If there are any subordinate group headers,
they are displayed in the collapsed state. If there are no subordinate group headers, the data is
displayed.
2. Control-Click:
Only the node that was clicked is displayed.
3. Shift-Click:
All nodes and data below the node that was clicked are displayed.
You can select different icons for the group headers using the GroupInfo ImageCollapsed and
ImageExpanded properties.
For additional information on grouping, see the Task-Based Help (page 39).

Visual Basic and C# Samples 37

C1WebGrid 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 products 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
AutoEditing
Editable C1WebGrid using templates and the Update() method. This sample uses the
C1WebGrid control.
Booleans
Customize columns to display checkboxes and listboxes for a column. This sample uses the
C1WebGrid control.
CustomGrouping
Customize the information displayed in the Group header and footer. This sample uses the
C1WebGrid control.
CustomPaging
Customize the pager when you have more than one page of data. This sample uses the
C1WebGrid control.
DataFormatString
Customize bound columns using the DataFormatString property. This sample uses the
C1WebGrid control.
Editing Use templates to edit and display data. This sample uses the C1WebGrid control.
GridCustomizing
Customize the grid when using AutoGenerated columns. This sample uses the C1WebGrid
control.
Grouping Advanced grouping sample. This sample uses the C1WebGrid control.
Merging Automatic row spanning, grouping and aggregates. This sample uses the C1WebGrid control.
MoreInfo How to configure columns as buttons. This sample uses the C1WebGrid control.
OutlineGrouping Outlook-style grouping with rich client side UI. This sample uses the C1WebGrid control.
Scrollable Client side scrollable C1WebGrid. This sample uses the C1WebGrid control.
SimpleEdit
Shows how to use templates to create an editable grid. This sample uses the C1WebGrid
control.
Sorting How to sort columns programmatically. This sample uses the C1WebGrid control.
Sorting2 Sort columns automatically. This sample uses the C1WebGrid control.
ValueList Customize bound columns using ValueLists. This sample uses the C1WebGrid control.

38 C1WebGrid Samples

Borland Samples
Booleans
Customize columns to display checkboxes and listboxes for a column. This sample uses
the C1WebGrid control.
CustomGrouping
Customize the information displayed in the Group header and footer. This sample uses
the C1WebGrid control.
CustomPaging
Customize the pager when you have more than one page of data. This sample uses the
C1WebGrid control.
DataFormatString
Customize bound columns using the DataFormatString property. This sample uses the
C1WebGrid control.
Editing Use templates to edit and display data. This sample uses the C1WebGrid control.
GridCustomizing
Customize the grid when using AutoGenerated columns. This sample uses the
C1WebGrid control.
Grouping Advanced grouping sample. This sample uses the C1WebGrid control.
Merging
Automatic row spanning, grouping and aggregates. This sample uses the C1WebGrid
control.
MoreInfo How to configure columns as buttons. This sample uses the C1WebGrid control.
OutlineGrouping
Outlook-style grouping with rich client side UI. This sample uses the C1WebGrid
control.
SimpleEdit This sample uses the C1WebGrid control.
Sorting How to sort columns programmatically. This sample uses the C1WebGrid control.
Sorting2 Sort columns automatically. This sample uses the C1WebGrid control.
ValueList Customize bound columns using ValueLists. This sample uses the C1WebGrid control.
Binding C1WebGrid to a Data Source control 39

Task-Based Help
The task-based help assumes that you are familiar with programming in Visual Studio .NET, know what a
DataSet is, 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 C1WebGrid features and get a good sense of what
C1WebGrid can do.
The help uses an Access database, WebGridDemo.MDB, for bound data. It is assumed WebGridDemo.MDB
is in the C:\Program Files\ComponentOne Studio.NET\common directory, and it is referred to 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 WebGridDemo.mdb reference in the projects.
Each task-based help topic also assumes that you have created a new ASP.NET project and have placed a
bound C1WebGrid component on the form. For additional information, see Creating an ASP.NET 2.0
Project (page 17) and Binding C1WebGrid to a Data Source control (page 39).
Binding C1WebGrid to a Data Source control
This topic demonstrates how to bind C1WebGrid to a data source control.
1. In Visual Web Developer, in Solution Explorer, right-click the App_Data folder, and then click Add
Existing Item.

2. Locate the WebGridDemo.mdb file (usually it can be found in C:\Program Files\ComponentOne
Studio.NET\Commom\WebGridDemo.mdb).
3. In the App_Data folder, click the WebGridDemo.mdb file, and then click Add.
4. Open the Default.aspx page and switch to Design view.
5. From the Data tab in the Toolbox, drag an AccessDataSource control onto the page.
If the Access Data Source Tasks shortcut menu does not appear, right-click the AccessDataSource
control, and then click Show Smart Tag.
40 Task-Based Help

6. On the Access Data Source Tasks shortcut menu, click Configure Data Source. The Configure Data
Source - <DataSourceName> wizard appears.
7. On the Choose a Database page, in the Microsoft Access data file box, type
"~/App_Data/WebGridDemo.mdb".
Alternatively, click Browse, and then in the Select Microsoft Access Database dialog box, move to
the WebGridDemo.mdb file in the App_Data folder.
8. Click Next.
9. The Configure the Select Statement page appears.
10. Click the Specify columns from a table or view option.
11. In the Name dropdown list, select Products.
12. In the Columns box, select the ProductID, ProductName, QuantityPerUnit, UnitsInStock check boxes.

13. Click Next.
14. The Test Query page appears.
Optionally, click Test Query to test your query.
15. Click Finish.
16. Drag a C1WebGrid control onto the page.
If the C1WebGrid Tasks shortcut menu does not appear, right-click the C1WebGrid control, and
then click Show Smart Tag.
Alternatively, right-click the C1WebGrid control, then click Properties. In the Properties tab, in the
DataSourceId check box, click AccessDataSource1.
17. On the C1WebGrid Tasks menu, in the Choose Data Source box, click AccessDataSource1.
Binding C1WebGrid to a Data Source control 41

Automatically updating the data source
This topic illustrates how to create editable grid using templates and DataSource control (SimpleEdit sample).
1. Create a grid and bind it to a DataSource control, see Binding C1WebGrid to a Data Source control (page
39) topic for details. Use Suppliers table, retrieve SupplierID, CompanyName, ContactName, Address fields.
2. Configure UpdateQuery:
Right-click the AccessDataSource1 component, then click Properties. In the Properties tab click the
ellipsis button next to UpdateQuery.
The Command and Parameter Editor dialog box appears.
Click QueryBuilder.
Insert the following text in UPDATE command:
UPDATE Suppliers SET CompanyName = ?, ContactName = ?, Address = ?
WHERE (SupplierID = ?)
In Parameters, add a parameter named SupplierID. Click on Show advanced properties, set Type to
Int32
The same way add CompanyName, ContactName, Address parameters, but set their Types to String.

Click OK.
3. Right-click the C1WebGrid control, and then click Show Smart Tag.
4. On the C1WebGrid Tasks menu, in the Choose Data Source box, click AccessDataSource1.
5. Right-click the C1WebGrid control, then click Properties. In the Properites tab set DataKeyField value
to SupplierID.
42 Task-Based Help

Adding template columns
1. Right-click the C1WebGrid control, and then click Show Smart Tag.
2. On the C1WebGrid Tasks menu, click Property builder.
3. C1WebGrid Properties window appears.
4. Click the Columns tab.
5. Select the button to remove all columns from Selected columns list.
6. Select Template Column from the Available columns list.
7. Click the arrow button between the column lists to copy the Template Column to the Selected columns list.
Repeat this task three times to create three more Template Columns.
8. Under Column properties, set each column's HeaderText property to "Supplier #", "Contact name",
"Company name", and "Address" respectively.
Note: To view changes to each Template Column, you must click the Apply button.
9. From the Available columns list, expand the Button Column node and select Edit, Update, Cancel.
10. Click the arrow button between the column lists to copy the Edit, Update, Cancel into the Selected
columns list.
11. The Selected columns list should look like this:

12. Click OK.
Binding C1WebGrid to a Data Source control 43

Binding template columns
Binding non-editable template column Supplier # to data:
1. Right-click the C1WebGrid control, then select Edit Template from its context menu.
2. Choose Column[0] SupplierID.
3. The template editor appears:

4. From the Standard tab in the Toolbox, drag a Label control into the ItemTemplate section.
5. If the Label Tasks shortcut menu does not appear, right-click the Label1 control, and then click Show
Smart Tag.
6. On the Label Tasks menu click Edit DataBindings.
7. The Label1 DataBindings window appears.
8. Select Text in the Bindable properties list, and then select the SupplierID field from the Bound to checkbox.
9. Click OK.
10. Right-click the template editor, and click End Template Editing from its context menu.
Binding editable template columns Contact name, Company name, Address to data:
1. Right-click the C1WebGrid1 control, then select Edit Template from its context menu.
2. Choose Column[1] Contact name.
3. The template editor appears.
4. From the Standard tab in the Toolbox, drag a Label control into the ItemTemplate section.
5. If the Label Tasks shortcut menu does not appear, right-click the Label1 control, and then click Show
Smart Tag.
6. On the Label Tasks menu click Edit DataBindings.
44 Task-Based Help

7. The Label1 DataBindings window appears.
8. Select Text in the Bindable properties list, and then select the ContactName field from the Bound to combo
box.
9. Click OK.
10. From the Standard tab in the Toolbox, drag a TextBox control into the EditItemTemplate section.
11. If the TextBox Tasks shortcut menu does not appear, right-click the TextBox1 control, and then click
Show Smart Tag.
12. On the TextBox Tasks menu click Edit DataBindings.
13. Select Text in the Bindable properties list, and then select the ContactName field from the Bound to
checkbox.
14. Make sure that Two-way databinding checkbox is checked.
15. Click OK.
16. Right-click the template editor, and click End Template Editing from its context menu.
17. Repeat steps 1 16 above for Company name and Address columns. Bind them to CompanyName and Address
fields accordingly.
Run the project:
The project should look similar to the example below:

When you click the Edit button in the first row, an editable TextBox appears for each column. You can edit
the information, and click Update to update the database or click Cancel to ignore any edits you made:

Formatting C1WebGrid
Automatically Generating Columns
This topic demonstrates how to customize columns using the ItemCreated and ItemDataBound events when
the AutoGenerateColumns property is set to True.
1. Use the AutoGenerateColumns property of the C1WebGrid class to create a C1BoundColumn for each
field in the data source:
Visual Basic
C1WebGrid1.AutoGenerateColumns = True
C#
C1WebGrid1.AutoGenerateColumns = true;
Delphi
C1WebGrid1.AutoGenerateColumns := True;
Formatting C1WebGrid 45

2. Add the following code for the ItemCreated and ItemDataBound events.
Visual Basic
Private Sub C1WebGrid1_ItemCreated(sender As Object, e As
C1.Web.C1WebGrid.C1ItemEventArgs) Handles C1WebGrid1.ItemCreated
Select Case e.Item.ItemType
'Set the colors of column headers
Case C1ListItemType.Header
e.Item.BackColor = Color.Brown
Dim i As Integer
For i = 0 To e.Item.Cells.Count - 1
If i < 2 Then
e.Item.Cells(i).ForeColor = Color.White
Else
e.Item.Cells(i).ForeColor = Color.Yellow
End If
Next i
'Set the background color of the first column cells
Case C1ListItemType.Item, C1ListItemType.AlternatingItem
e.Item.Cells(0).BackColor = Color.AliceBlue
End Select
End Sub


Private Sub C1WebGrid1_ItemDataBound(sender As Object, e As
C1.Web.C1WebGrid.C1ItemEventArgs) Handles C1WebGrid1.ItemDataBound
' format unitprice as currency
If e.Item.ItemType = C1ListItemType.Item OrElse e.Item.ItemType
= C1ListItemType.AlternatingItem Then
e.Item.Cells(2).Text = String.Format("{0:c}",
Convert.ToDouble(e.Item.Cells(2).Text))
End If
End Sub
C#
private void C1WebGrid1_ItemCreated(object sender,
C1.Web.C1WebGrid.C1ItemEventArgs e)
{
switch (e.Item.ItemType)
{
//Set the colors of column headers
case C1ListItemType.Header:
e.Item.BackColor = Color.Brown;
for (int i = 0; i < e.Item.Cells.Count; i++)
if (i < 2)
e.Item.Cells[i].ForeColor = Color.White;
else
e.Item.Cells[i].ForeColor = Color.Yellow;
break;

//Set the background color of the first column cells
case C1ListItemType.Item:
case C1ListItemType.AlternatingItem:
e.Item.Cells[0].BackColor = Color.AliceBlue;
break;
}
}
46 Task-Based Help

private void C1WebGrid1_ItemDataBound(object sender,
C1.Web.C1WebGrid.C1ItemEventArgs e)
{
// format unitprice as currency
if( e.Item.ItemType == C1ListItemType.Item || e.Item.ItemType
== C1ListItemType.AlternatingItem )
e.Item.Cells[2].Text =
string.Format("{0:c}",Convert.ToDouble(e.Item.Cells[2].Text));
}
Delphi
procedure TWebForm1.C1WebGrid1_ItemDataBound(sender: System.Object; e:
C1.Web.C1WebGrid.C1ItemEventArgs);
begin
if ((e.Item.ItemType = C1ListItemType.Item) or (e.Item.ItemType =
C1ListItemType.AlternatingItem)) then
e.Item.Cells[2].Text := System.String.Format('{0:c}',
System.Object(Convert.ToDouble(e.Item.Cells[2].Text)));
end;

procedure TWebForm1.C1WebGrid1_ItemCreated(sender: System.Object; e:
C1.Web.C1WebGrid.C1ItemEventArgs);
var i: Integer;
begin
if e.Item.ItemType = C1ListItemType.Header then
begin
e.Item.BackColor := Color.Brown;
for i := 0 to e.Item.Cells.Count-1 do
begin
if (i < 2) then
e.Item.Cells[i].ForeColor := Color.White
else
e.Item.Cells[i].ForeColor := Color.Yellow;
end;
end
else if ((e.Item.ItemType = C1ListItemType.Item) or
(e.Item.ItemType = C1ListItemType.AlternatingItem)) then
e.Item.Cells[0].BackColor := Color.AliceBlue;
end;
The ItemCreated event formats the grids headers, alternating row colors and the color of the first column.
The ItemDataBound event formats a column, the UnitPrice column in this example, so that the numbers
appear as currency.

See the GridCustomizing sample provided with C1WebGrid for additional information.

Formatting C1WebGrid 47

Adding Borders and Gridlines to C1WebGrid
This topic demonstrates how to add borders and spacing to C1WebGrid.
Use the following properties:
Property Data Type
BorderColor System.Drawing.Color
BorderStyle BorderStyle (enum)
BorderWidth System.Web.UI.WebControls.Unit
CellPadding Integer
CellSpacing Integer
GridLines System.Web.UI.WebControls.GridLines
Sample Code:
Visual Basic
C1WebGrid1.BorderColor = System.Drawing.Color.Blue
C#
C1WebGrid1.BorderColor = System.Drawing.Color.Blue;
Delphi
C1WebGrid1.BorderColor := System.Drawing.Color.Blue;


Sample Code:
Visual Basic
C1WebGrid1.BorderStyle = BorderStyle.Dotted
C#
C1WebGrid1.BorderStyle = BorderStyle.Dotted;
Delphi
C1WebGrid1.BorderStyle := BorderStyle.Dotted;


48 Task-Based Help


Sample Code:
Visual Basic
C1WebGrid1.BorderWidth = System.Web.UI.WebControls.Unit.Pixel(5)
C#
C1WebGrid1.BorderWidth =_
System.Web.UI.WebControls.Unit.Pixel(5);
Delphi
C1WebGrid1.BorderWidth := System.Web.UI.WebControls.Unit.Pixel(5);


Sample Code:
Visual Basic
C1WebGrid1.CellPadding = 5
C#
C1WebGrid1.CellPadding = 5;
Delphi
C1WebGrid1.CellPadding := 5;


Sample Code:
Visual Basic
C1WebGrid1.CellSpacing = 10
C#
C1WebGrid1.CellSpacing = 10;
Delphi
C1WebGrid1.CellSpacing := 10;
Formatting C1WebGrid 49



Sample Code:
Visual Basic
C1WebGrid1.GridLines = GridLines.Horizontal
C#
C1WebGrid1.GridLines = GridLines.Horizontal;
Delphi
C1WebGrid1.GridLines := GridLines.Horizontal;

Customizing Columns Using DataFormatString
This topic demonstrates how to customize a column using the DataFormatString property.
Add the following code to the DataFormatString property, where C1BoundColumn1 is the name of one of your
C1BoundColumn:
Visual Basic
C1BoundColumn1.DataFormatString = "{0:N0} unit(s)"
C#
C1BoundColumn1.DataFormatString = "{0:N0} unit(s)";
Delphi
C1BoundColumn1.DataFormatString :='{0:N0} unit(s)';
This formats the data in the column as numbers followed by unit (s):
50 Task-Based Help


Note: When column data type is Date, DataFormatString is set to {0:d} for displaying the date in short date.
See the DataFormatString property and the DataFormatString sample provided with C1WebGrid for more
information on formatting strings.
Customizing Columns Using ValueLists
This topic demonstrates how to change the display of cell data using the ValueList property.
The ValueList property sets the object that implements the IDicitionary interface used for textual substitution.
In order to substitute text, a dictionary containing replacement text must be created.
1. To create a ValueList dictionary, add the following code:
Visual Basic
'Prepare ValueList dictionary
Dim ht As New Hashtable()
ht.Add("1", "Beverages")
ht.Add("2", "Condiments")
ht.Add("3", "Confections")
ht.Add("4", "Dairy Products")
ht.Add("5", "Grains/Cereals")
ht.Add("6", "Meat/Poultry")
ht.Add("7", "Produce")
ht.Add("8", "Seafood")
C#
//Prepare ValueList dictionary
Hashtable ht = new Hashtable();
ht.Add("1", "Beverages");
ht.Add("2", "Condiments");
ht.Add("3", "Confections");
ht.Add("4", "Dairy Products");
ht.Add("5", "Grains/Cereals");
ht.Add("6", "Meat/Poultry");
ht.Add("7", "Produce");
ht.Add("8", "Seafood");
Delphi
//Prepare ValueList dictionary
ht := Hashtable.Create;
ht.Add('1', 'Beverages');
ht.Add('2', 'Condiments');
ht.Add('3', 'Confections');
ht.Add('4', 'Dairy Products');
ht.Add('5', 'Grains/Cereals');
ht.Add('6', 'Meat/Poultry');
ht.Add('7', 'Produce');
ht.Add('8', 'Seafood');
Formatting C1WebGrid 51

2. Assign the column, CategoryID in this example, that contains the items to be replaced by the items in the
ValueList dictionary:
Visual Basic
CType(C1WebGrid1.Columns.ColumnByName("CategoryID"),
C1.Web.C1WebGrid.C1BoundColumn).ValueList = ht
C#
((C1.Web.C1WebGrid.C1BoundColumn)C1WebGrid1.Columns.ColumnByName("Catego
ryID")).ValueList = ht;
Delphi
C1.Web.C1WebGrid.C1BoundColumn(C1WebGrid1.Columns.ColumnByName('Category
ID')).ValueList := ht;
The items in the CategoryID column of the Data grid are replaced with the items in the ValueList
dictionary and appear in the Category column of the C1WebGrid.


See the ValueLists sample provided with C1WebGrid for additional information.
Automatically Sorting Columns
This topic demonstrates how to configure the grid to automatically sort a column.
1. Select the C1WebGrid component and set the AllowSorting properties to True.
Visual Basic
C1WebGrid1.AllowSorting = True
C#
C1WebGrid1.AllowSorting = true;
Delphi
C1WebGrid1.AllowSorting := true;
2. Set the C1WebGrid.DataSourceID property.
3. If you want to use custom sort indicators, you can change the images that the grid uses by setting the
ImageSortAscending and ImageSortDescending properties.
52 Task-Based Help

4. Click the HeaderText of the column you want to sort.

See the Sorting2 sample provided with C1WebGrid for additional information.
Displaying Specified Columns
This topic demonstrates how to specify the columns to be displayed in C1WebGrid.
1. Set the AutoGenerateColumns property to False.
2. Right-click C1WebGrid and select Show Smart Tag from the context menu. Select Property builder from
the C1WebGrid Tasks menu.

The C1WebGrid Properties dialog box appears.
Formatting C1WebGrid 53


3. Click the Columns tab in the left pane.
4. Under Column List, select Bound Column from the list of Available columns.
54 Task-Based Help


5. Click the arrow button between the column lists to create a bound column under the list of Selected
columns. Repeat this step for each column in the data source to which C1WebGrid is bound.
6. Set the DataField property for each column to exactly match the respective field in the database table to
which the grid column is bound. This information can be found in the SQL statement used to bind
C1WebGrid.
For example, if you used the SQL statement "SELECT OrderID, ProductName, UnitPrice, Quantity,
Discount, ExtendedPrice FROM [Order Details Extended]" to bind C1WebGrid, you must create six
Bound Columns, each with its DataField property set to OrderID, ProductName, UnitPrice, Quantity,
Discount, or ExtendedPrice, respectively.
Formatting C1WebGrid 55


7. Under Column properties, set the Visible property to False for any column in the data source that you do
not want to appear in the grid.
Using the example in step 6, if the Visible properties of the UnitPrice and Discount columns are set to False,
the C1WebGrid appears as:


56 Task-Based Help

Setting Column Width
This topic demonstrates how to set the width of a column in C1WebGrid.
A column's width can be specified in code if the column is not automatically generated. To set the column
width:
1. Set the AutoGenerateColumns property of C1WebGrid to False.
2. Specify the columns to appear in C1WebGrid.
3. Set the width of the ProductName column via the Code Editor or at design time:
Add the following code after the DataBind method is called:
Visual Basic
C1WebGrid1.Columns(2).ItemStyle.Width = New Unit(500)
C#
C1WebGrid1.Columns[2].ItemStyle.Width = new Unit(500);
Delphi
C1WebGrid1.Columns[2].ItemStyle.Width = &Unit.Create(500);
OR
From the Property builder, select Format tab in the left pane. Expand the Columns node and select
the ProductName column from the list. Change the Column Width to 500 Pixel, and click OK.




Formatting C1WebGrid 57

In this example, the second column is 500 pixels:

Setting the Footer Text
This topic demonstrates how to show a footer and set its text in C1WebGrid.
To set the footer text:
1. Set the ShowFooter property to True.
2. Set the footer text for individual columns using the FooterText property. This property must be set before
the DataBind method is called.
For example, use the following code:
Visual Basic
C1WebGrid1.ShowFooter = True
C1WebGrid1.Columns(0).FooterText = "Footer"
C#
C1WebGrid1.ShowFooter = true;
C1WebGrid1.Columns[0].FooterText = "Footer";
Delphi
C1WebGrid1.ShowFooter := True
C1WebGrid1.Columns[0].FooterText := Footer;
This example sets the footer text for the first column to Footer.
Note: The footer text can only be set for columns that are not automatically generated.
Adding a Row to WebGrid
This topic demonstrates how to add a row to C1WebGrid.
To insert a row in the grid, you must add a new row in the DataTable or DataSet object to which the grid is
bound and then rebind the grid to this object.
1. Set the AutoGenerateColumns property to False.
2. Set the ShowFooter property to True.
3. Add an Edit, Update, Cancel button column to C1WebGrid using the Property builder. See, Using the
Property Builder (page 25) for more information.
Note: Expand the Button Column node to access the Edit, Update, Cancel button column.
58 Task-Based Help


4. Use the ItemCreated event to create an AddNew button that allows you to add a new row to C1WebGrid
if a footer exists:
Visual Basic
Private Sub C1WebGrid1_ItemCreated(ByVal sender As Object, ByVal e As
C1.Web.C1WebGrid.C1ItemEventArgs) Handles C1WebGrid1.ItemCreated
' if we have a footer then add an addnew button to it
If e.Item.ItemType = C1.Web.C1WebGrid.C1ListItemType.Footer Then
Dim btnAdd As New LinkButton()
btnAdd.Text = "AddNew"
' add a handler for the click event
AddHandler btnAdd.Click, AddressOf AddNew_Click
e.Item.Cells(0).Controls.Add(btnAdd)
End If
End Sub
C#
private void C1WebGrid1_ItemCreated(object sender,
C1.Web.C1WebGrid.C1ItemEventArgs e)
{
// if we have a footer then add an addnew button to it
if( e.Item.ItemType ==
C1.Web.C1WebGrid.C1ListItemType.Footer )
{
LinkButton btnAdd = new LinkButton();
btnAdd.Text = "AddNew";
// add a handler for the click event
btnAdd.Click += new
System.EventHandler(AddNew_Click);
Formatting C1WebGrid 59

e.Item.Cells[0].Controls.Add(btnAdd);
}
}
Delphi
procedure Form1.C1WebGrid1_ItemCreated(sender: Object; e:
C1.Web.C1WebGrid.C1ItemEventArgs);
var btnAdd: LinkButton;
begin
// if we have a footer then add an addnew button to it
if e.Item.ItemType = C1.Web.C1WebGrid.C1ListItemType.Footer then
begin
btnAdd := LinkButton.Create;
btnAdd.Text := 'AddNew';
// add a handler for the click event;
Include(btnAdd.Click, AddNew_Click);
e.Item.Cells[0].Controls.Add(btnAdd);
end;
end;
5. Add the following code to the AddNew_Click event.
Visual Basic
' adds a new row to the datasource and puts the grid in edit mode
Public Sub AddNew_Click(ByVal sender As Object, ByVal e As
EventArgs)
Me.OleDbDataAdapter1.Fill(Me.DataSet21)
Dim table As DataTable = Me.DataSet21.Tables(0)
Dim row As DataRow = table.NewRow()
row.EndEdit()
table.Rows.Add(row)
Me.C1WebGrid1.EditItemIndex = table.Rows.Count - 1
Me.C1WebGrid1.DataBind()
End Sub
C#
// adds a new row to the datasource and puts the grid in edit mode
public void AddNew_Click(object sender, EventArgs e)
{
this.oleDbDataAdapter1.Fill(this.dataSet11);
DataTable table = this.dataSet11.Tables[0];
DataRow row = table.NewRow();
row.EndEdit();
table.Rows.Add(row);
this.C1WebGrid1.EditItemIndex = table.Rows.Count-1;
this.C1WebGrid1.DataBind();
}
Delphi
// adds a new row to the datasource and puts the grid in edit mode;
procedure AddNew_Click(sender: Object; e: EventArgs);
var table: DataTable;
row: DataRow;
begin
Me.OleDbDataAdapter1.Fill(Me.DataSet21);
table := Self.DataSet21.Tables[0];
row := table.NewRow();
row.EndEdit();
table.Rows.Add(row);
60 Task-Based Help

Self.C1WebGrid1.EditItemIndex := table.Rows.Count - 1;
Self.C1WebGrid1.DataBind();
end;
When the AddNew button you created in step 4 is clicked, an editable row appears in C1WebGrid. The
information entered in the new row is added to the Data Table and the grid is rebound.

Modifying Row and Font Color
This topic demonstrates how to change the color of a specific row or a cell's font using the ItemDataBound
event.
Within the ItemDataBound event:
1. Specify the number of the row you want to change using the Item.ItemIndex property.
2. Set the desired color of the Item.BackColor property.
For example, add the following code to the ItemDataBound event:
Visual Basic
Private Sub C1WebGrid1_ItemDataBound(ByVal sender As Object, ByVal e As
C1.Web.C1WebGrid.C1ItemEventArgs) Handles C1WebGrid1.ItemDataBound
If (e.Item.ItemIndex = 2) Then
e.Item.BackColor = System.Drawing.Color.Red
End If
End Sub
C#
private void C1WebGrid1_ItemDataBound(object sender,
C1.Web.C1WebGrid.C1ItemEventArgs e)
{
if ((e.Item.ItemIndex == 2)) {
e.Item.BackColor = System.Drawing.Color.Red;
}
}
Delphi
procedure C1WebGrid1_ItemDataBound(sender: Object; e:
C1.Web.C1WebGrid.C1ItemEventArgs);
begin
if e.Item.ItemIndex = 2 then
e.Item.BackColor := System.Drawing.Color.Red;
end;
This code changes the background color of the third row to red.

C1WebGrid Layout Serialization 61

You can change the color of the font used in a specific cell by specifying the text in the cell and the desired
color.
For example, add the following code to the ItemDataBound event:
Visual Basic
Private Sub C1WebGrid1_ItemDataBound(ByVal sender As Object, ByVal e As
C1.Web.C1WebGrid.C1ItemEventArgs) Handles C1WebGrid1.ItemDataBound
If (e.Item.Cells(1).Text = "Manjimup Dried Apples") Then
e.Item.Cells(1).ForeColor = System.Drawing.Color.Green
End If
End Sub
C#
private void C1WebGrid1_ItemDataBound(object sender,
C1.Web.C1WebGrid.C1ItemEventArgs e)
{
if ((e.Item.Cells[1].Text == "Manjimup Dried Apples")) {
e.Item.Cells[1].ForeColor = System.Drawing.Color.Green;
}
}
Delphi
procedure C1WebGrid1_ItemDataBound(sender: Object; e:
C1.Web.C1WebGrid.C1ItemEventArgs);
begin
if (e.Item.Cells[1].Text :='Manjimup Dried Apples') then
e.Item.Cells[1].ForeColor := System.Drawing.Color.Green;
end;
This code changes the font color of the cell containing "Manjimup Dried Apples" to green.

C1WebGrid Layout Serialization
This topic demonstrates how to save and load C1WebGrid layouts to and from an XML file. This allows you
to quickly and easily distribute visual settings between multiple instances of C1WebGrid.
Note: Template columns are not supported by these layout methods.
To save a C1WebGrid layout:
1. Right-click the C1WebGrid component and select Show Smart Tag from the context menu.
2. The C1WebGrid Tasks menu appears. Select Save layout from the menu.
62 Task-Based Help


3. Choose a location for the XML file from the Save As dialog box.

To load a C1WebGrid layout:
1. Right-click the C1WebGrid component and select Show Smart Tag from the context menu.
2. The C1WebGrid Tasks menu appears. Select Load layout from the menu.

3. Select an XML file from the Open dialog box. The Load layout window appears.

4. Select All to load all settings of the saved C1WebGrid layout or select Custom and specify the settings to
load.
Notes:
The Load layout and Save layout options are also available in the Properties window.
The LoadLayout and SaveLayout methods can be used at run-time to load and save C1WebGrid layouts.
Displaying Controls in a Column 63

Displaying Controls in a Column
Displaying CheckBoxes or ListBoxes in a Column
This topic demonstrates how to use the ASP CheckBox and ListBox controls to display data for a column.
1. Right-click C1WebGrid and select Show Smart Tag from the context menu. From the C1WebGrid
Tasks menu, select Property builder. The C1WebGrid Properties dialog box appears.
2. Click the Columns tab in the left pane.
3. Under Column List, select Template Column from the list of Available columns.
4. Click the arrow button between the column lists to copy the Template Column to the list of Selected
columns.

5. Select the new Template Column and set the desired properties under Column properties.
6. Click OK to return to the form.
7. Right-click C1WebGrid, and select Show Smart Tag from the context menu. From the C1WebGrid
Tasks menu, select Edit Templates.
8. Click the Display drop-down arrow and choose the new Template Column you created.
64 Task-Based Help


The template editor Document appears.

9. Select the ItemTemplate section.
10. Double-click the CheckBox or ListBox control in the .NET Toolbox to add it to the ItemTemplate
section. Note that you can format the CheckBox or ListBox using the Properties window.
11. Right-click the template editor Document and select End Template Editing from the context menu.
The example below uses C1TemplateColumns to display both a CheckBox and a ListBox as columns.
Displaying Controls in a Column 65


See the Booleans sample provided with C1WebGrid for additional information.
Displaying Images in a Column
This topic demonstrates how to replace the standard text for the Edit/Update/Cancel button with images.
1. Right-click C1WebGrid and select Show Smart Tag from the context menu. From the C1WebGrid
Tasks menu, select Property builder. The C1WebGrid Properties dialog box appears.
2. Click the Columns tab in the left pane.
3. Under Column List, expand Button Column from the list of Available columns.

4. Select Edit, Update, Cancel and click the arrow button between the column lists to copy the fields to the
list of Selected columns.
5. In the Column properties window, enter the HTML code for an image in the CancelText box.
66 Task-Based Help

For example:
<img src=cancel.gif border=0 align=absmiddle alt='Cancel Editing'>

6. Add the following code to the EditText box:
<img src=edit.gif border=0 align=absmiddle alt='Edit this item'>
7. Add the following code to the UpdateText box:
<img src=ok.gif border=0 align=absmiddle alt='Save changes'>
8. Click OK.
The example below shows the images in the Edit, Update, Cancel column on the right.

Displaying Controls in a Column 67

Displaying Buttons in a Column
This topic demonstrates how to use the items in a column as buttons.
1. Set the AutoGenerateColumns property to False:
Visual Basic
C1WebGrid1.AutoGenerateColumns = False
C#
C1WebGrid1.AutoGenerateColumns = false;
Delphi
C1WebGrid1.AutoGenerateColumns := false;
2. Create a C1ButtonColumn using the Property builder. See Using the Property Builder (page 25) for more
information.
3. Set the C1ButtonColumns ButtonType property to LinkButton.


4. Set the C1ButtonColumns CommandName and Text properties.
5. Use the ItemCommand event to get an action to occur when the buttons in the C1ButtonColumn are
clicked. For example:
Visual Basic
Protected Sub C1WebGrid1_ItemCommand([source] As Object, e As
C1.Web.C1WebGrid.C1CommandEventArgs)
If e.CommandName = "moreinfo" Then
Session("empId") = CInt(C1WebGrid1.DataKeys(e.Item.ItemIndex))

68 Task-Based Help

End If
End Sub
C#
protected void C1WebGrid1_ItemCommand(object source,
C1.Web.C1WebGrid.C1CommandEventArgs e)
{
if (e.CommandName == "moreinfo")
Session["empId"] =
(int)C1WebGrid1.DataKeys[e.Item.ItemIndex];
}
Delphi
procedure C1WebGrid1_ItemCommand(source: System.Object; e:
C1.Web.C1WebGrid.C1CommandEventArgs);
begin
if (e.CommandName = 'moreinfo') then
Session['empId'] :=
(Integer(C1WebGrid1.DataKeys[e.Item.ItemIndex]));
end;
This code causes detailed information about the selected employee to appear when the More LinkButton
is clicked.

See the MoreInfo sample provided with C1WebGrid for additional information.
Aggregates and Grouping 69

Aggregates and Grouping
Merging Rows
This topic demonstrates how to merge rows containing identical text in C1WebGrid.
The RowMerge property allows the selected column to merge rows with the same text. For example, all of the
products below belong to the category Beverages.

Setting the RowMerge property to Free allows the Category column to merge the rows with the text Beverages.

Use the RowMerge property of the C1WebGrid class to determine if and how rows are merged:
Visual Basic
C1WebGrid1.Columns(0).RowMerge =_
C1.Web.C1WebGrid.RowMergeEnum.Free
C#
C1WebGrid1.Columns[i].RowMerge =_
C1.Web.C1WebGrid.RowMergeEnum.Free;
Delphi
C1WebGrid1.Columns[0].RowMerge := C1.Web.C1WebGrid.RowMergeEnum.Free;
See the Merging sample provided with C1WebGrid for additional information.
Grouping Properties
The example below shows a typical grid and how you would set the GroupInfo and Aggregate properties for
the columns.
70 Task-Based Help

Note: This example uses the Grouping sample and an Access database, WebGridDemo.MDB, provided with
C1WebGrid.
To group orders by year and show the sales totals, set the following properties:
1. The DataSource should be sorted by OrderYear (for example, 'SELECT OrderDate, YEAR(OrderDate)
AS OrderYear, Country, Salesperson, OrderID, ExtendedPrice FROM Invoices ORDER BY
YEAR(OrderDate) DESC, Country, Salesperson, OrderID, ExtendedPrice DESC').
2. The GroupInfo property of the Year column should be set as follows (these properties can be set at design
time by choosing Grouping from the Property builder):
Set the Position property to Header (group rows will appear before the data).
Set the HeaderText property to "Orders in <i>{0}</i>". (This is the text on group header rows; {0}
is replaced with the value being grouped on).
Expand the HeaderStyle property and set it. (This is the style for the group header rows; you will
usually set at least the HeaderStyle.BackColor).

3. The Aggregate property of the ExtendedPrice column should be set to Sum. This will cause the grid to add
the sales for each group and display the aggregate value in the group header (and footer) rows. To set this
property:
Select Columns from the Property builder.
Choose ExtendedPrice from the list of Selected columns.
Aggregates and Grouping 71


Set the Aggregate property to Sum.
4. To make the grid appear neatly and organized, you can use the GroupIndent property to indent each
group a specific number of points or pixels. To set this property:
Click the C1WebGrid on your form.
In the Properties window, set GroupIndent to 15px or the desired amount of space.
72 Task-Based Help


After setting these properties, the rendered grid looks like this:

You can have as many group and aggregate columns as you want. For example, you could show
totals for sales, and group data by country, salesperson, and order number.
See the Grouping sample provided with C1WebGrid for additional information.
Outlook-Style Grouping
This topic demonstrates Outlook-style grouping using a drag-and-drop operation on the client.
1. Set the C1WebGrid.AllowAutoSort, AllowColMoving, AllowGrouping and AllowSorting properties to
True:
Visual Basic
C1WebGrid1.AllowColMoving = True
C1WebGrid1.AllowGrouping = True
C1WebGrid1.AllowSorting = True
Aggregates and Grouping 73

C#
C1WebGrid1.AllowColMoving = true;
C1WebGrid1.AllowGrouping = true;
C1WebGrid1.AllowSorting = true;
Delphi
C1WebGrid1.AllowColMoving := True;
C1WebGrid1.AllowGrouping := True;
C1WebGrid1.AllowSorting := True;
2. Set the C1WebGrid.DataSourceID property.
3. Add the following code for the GroupColumnMoved event:
Visual Basic
Private Sub C1WebGrid1_GroupColumnMoved(ByVal sender As Object, ByVal e
As C1.Web.C1WebGrid.C1GroupColMoveEventArgs) Handles
C1WebGrid1.GroupColumnMoved
If e.GroupMove <> GroupMoveEnum.FromGroup Then
e.Column.GroupInfo.HeaderStyle.BackColor =
Me.C1WebGrid1.GroupingStyle.BackColor
e.Column.GroupInfo.HeaderStyle.ForeColor = Color.Black
End If
End Sub



C#
private void C1WebGrid1_GroupColumnMoved(object sender,
C1.Web.C1WebGrid.C1GroupColMoveEventArgs e)
{
if( e.GroupMove != GroupMoveEnum.FromGroup )
{
e.Column.GroupInfo.HeaderStyle.BackColor =
this.C1WebGrid1.GroupingStyle.BackColor;
e.Column.GroupInfo.HeaderStyle.ForeColor = Color.Black;
}

}

Delphi
procedure TWebForm1.C1WebGrid1_GroupColumnMoved(source: System.Object;
e: C1.Web.C1WebGrid.C1GroupColMoveEventArgs);
begin
if (e.GroupMove <> GroupMoveEnum.FromGroup) then
begin
e.Column.GroupInfo.HeaderStyle.BackColor :=
Self.C1WebGrid1.GroupingStyle.BackColor;
e.Column.GroupInfo.HeaderStyle.ForeColor := Color.Black;
end;
end;

Dragging and dropping a column allows you to group by that column, as shown in the following graphic.
74 Task-Based Help


See the OutlookGrouping sample provided with C1WebGrid for additional information.
Creating a Pageable Grid
Paging
This topic demonstrates how to display the contents of C1WebGrid on multiple pages, navigate through those
pages and set the number of items to be displayed on each page.
1. Set AllowPaging to True and PageSize to 4 to move through the pages of data from the data source four
items at a time.
Visual Basic
C1WebGrid1.AllowPaging = True
C1WebGrid1.PageSize = 4
C#
C1WebGrid1.AllowPaging = true;
C1WebGrid1.PageSize = 4;
Delphi
C1WebGrid1.AllowPaging := True;
C1WebGrid1.PageSize := 4;
2. Set the C1WebGrid.DataSourceID property.




Creating a Pageable Grid 75

Changing Paging Types
This topic demonstrates how to set the pager style.
Use the Mode property of the C1PagerStyle class to set numeric paging:
Visual Basic
C1WebGrid1.PagerStyle.Mode = PagerMode.NumericPages
C#
C1WebGrid1.PagerStyle.Mode = PagerMode.NumericPages;
Delphi
C1WebGrid1.PagerStyle.Mode := PagerMode.NumericPages;
Use the Mode property of the C1PagerStyle class to use Next and Previous buttons rather than numeric
paging:
Visual Basic
C1WebGrid1.PagerStyle.Mode = PagerMode.NextPrev
C#
C1WebGrid1.PagerStyle.Mode = PagerMode.NextPrev;
Delphi
C1WebGrid1.PagerStyle.Mode := PagerMode.NextPrev;
See the CustomPaging sample provided with C1WebGrid for additional information.
Creating Customized Paging
This topic demonstrates how to customize paging.
1. Select the C1WebGrid component and set the AllowPaging property to True.
Visual Basic
C1WebGrid1.AllowPaging = True
C#
C1WebGrid1.AllowPaging = true;
Delphi
C1WebGrid1.AllowPaging := True;
2. Add the following code to your form:
Visual Basic
Private Function CreateDataSource(nPageIndex As Integer) As
OleDbDataReader
' page index is assumed to be 0-based
Dim nPageSize As Integer = C1WebGrid1.PageSize
Dim nBaseProductID As Integer = nPageSize * nPageIndex

' Set up the connection
Dim conn As OleDbConnection = getConnectionString()

' Set up the command
Dim strCmd As String = "SELECT TOP " + nPageSize.ToString()
+ " " + "productid, productname, quantityperunit, unitsinstock " + "FROM
products " + "WHERE productid >" + nBaseProductID.ToString()
Dim cmd As New OleDbCommand(strCmd, conn)

' Execute the command
76 Task-Based Help

Dim dr As OleDbDataReader
conn.Open()
dr = cmd.ExecuteReader(CommandBehavior.CloseConnection)
Return dr
End Function

Private Sub C1WebGrid1_PageIndexChanging(ByVal sender As Object, ByVal e
As C1.Web.C1WebGrid.C1PageChangingEventArgs) Handles
C1WebGrid1.PageIndexChanging
Dim dr As OleDbDataReader = CreateDataSource(e.NewPageIndex)
C1WebGrid1.CurrentPageIndex = e.NewPageIndex
C1WebGrid1.DataSource = dr
C1WebGrid1.DataBind()
dr.Close()
End Sub
C#
private OleDbDataReader CreateDataSource(int nPageIndex)
{
// page index is assumed to be 0-based
int nPageSize = C1WebGrid1.PageSize;
int nBaseProductID = nPageSize * nPageIndex;

// Set up the connection
OleDbConnection conn = getConnectionString();

// Set up the command
string strCmd = "SELECT TOP " + nPageSize + " " +
"productid, productname, quantityperunit,
unitsinstock " +
"FROM products " +
"WHERE productid >" + nBaseProductID;
OleDbCommand cmd = new OleDbCommand(strCmd, conn);

// Execute the command
OleDbDataReader dr;
conn.Open();
dr = cmd.ExecuteReader(CommandBehavior.CloseConnection);
return dr;
}

private void C1WebGrid1_PageIndexChanging(object sender,
C1.Web.C1WebGrid.C1PageChangingEventArgs e)
{
OleDbDataReader dr = CreateDataSource(e.NewPageIndex);
C1WebGrid1.CurrentPageIndex = e.NewPageIndex;
C1WebGrid1.DataSource = dr;
C1WebGrid1.DataBind();
dr.Close();
}
Delphi
function TWebForm1.CreateDataSource(nPageIndex: Integer):
OleDbDataReader;
var nPageSize, nBaseProductID: Integer;
conn: OleDbConnection;
strCmd: string;
Creating a Pageable Grid 77

cmd: OleDbCommand;
begin
// page index is assumed to be 0-based
nPageSize := C1WebGrid1.PageSize;
nBaseProductID := nPageSize * nPageIndex;

// Set up the connection
conn := GetConnection;

// Set up the command
strCmd := 'SELECT TOP ' + nPageSize.ToString + ' ' +
'productid, productname, quantityperunit,
unitsinstock ' +
'FROM products ' +
'WHERE productid >' + nBaseProductID.ToString;
cmd := OleDbCommand.Create(strCmd, conn);

// Execute the command
conn.Open;
Result := cmd.ExecuteReader(CommandBehavior.CloseConnection);
end;

procedure TWebForm1.C1WebGrid1_PageIndexChanging(sender: System.Object;
e: C1.Web.C1WebGrid.C1PageChangingEventArgs);
var dr: OleDbDataReader;
begin
dr := CreateDataSource(e.NewPageIndex);
C1WebGrid1.CurrentPageIndex := e.NewPageIndex;
C1WebGrid1.DataSource := dr;
C1WebGrid1.DataBind;
dr.Close;
end;
3. Add the following code for the ItemCreated event to your form:
Visual Basic
Private Sub C1WebGrid1_ItemCreated(ByVal sender As Object, ByVal e As
C1.Web.C1WebGrid.C1ItemEventArgs) Handles C1WebGrid1.ItemCreated
Dim elemType As C1ListItemType = e.Item.ItemType
If elemType = C1ListItemType.Pager Then
' The pager as a whole has the following layout:
'
' <TR><TD colspan=X> ... links ... </TD></TR>
'
' Item points to <TR>. The code below moves to <TD>.
Dim pager As TableCell = CType(e.Item.Controls(0),
TableCell)

' Loop through the pager buttons skipping over blanks
' (Blanks are treated as LiteralControl(s)
Dim i As Integer
For i = 0 To pager.Controls.Count Step 2
Dim o As [Object] = pager.Controls(i)
If TypeOf o Is LinkButton Then
Dim h As LinkButton = CType(o, LinkButton)
h.Text = "[ " + h.Text + " ]"
Else
Dim l As Label = CType(o, Label)
78 Task-Based Help

l.Text = "Page " + l.Text
End If
Next i
End If
End Sub
C#
private void C1WebGrid1_ItemCreated(object sender,
C1.Web.C1WebGrid.C1ItemEventArgs e)
{
C1ListItemType elemType = e.Item.ItemType;
if (elemType == C1ListItemType.Pager)
{
// The pager as a whole has the following layout:
//
// <TR><TD colspan=X> ... links ... </TD></TR>
//
// Item points to <TR>. The code below moves to <TD>.
TableCell pager = (TableCell) e.Item.Controls[0];

// Loop through the pager buttons skipping over blanks
// (Blanks are treated as LiteralControl(s)
for (int i=0; i<pager.Controls.Count; i+=2)
{
Object o = pager.Controls[i];
if (o is LinkButton)
{
LinkButton h = (LinkButton) o;
h.Text = "[ " + h.Text + " ]";
}
else
{
Label l = (Label) o;
l.Text = "Page " + l.Text;
}
}
}
}
Delphi
procedure TWebForm1.C1WebGrid1_ItemCreated(sender: System.Object; e:
C1.Web.C1WebGrid.C1ItemEventArgs);
var elemType: C1ListItemType;
pager: TableCell;
i: Integer;
h: LinkButton;
o: System.Object;
l: &Label;
begin
elemType := e.Item.ItemType;
if (elemType = C1ListItemType.Pager) then
begin
// The pager as a whole has the following layout:
//
// <TR><TD colspan=X> ... links ... </TD></TR>
//
// Item points to <TR>. The code below moves to <TD>.
Scrolling C1WebGrid 79

pager := TableCell(e.Item.Controls[0]);

// Loop through the pager buttons skipping over blanks
// (Blanks are treated as LiteralControl(s)
i := 0;
while (i < pager.Controls.Count) do
begin
o := pager.Controls[i];
if (o is LinkButton) then
begin
h := LinkButton(o);
h.Text := '[ ' + h.Text + ' ]';
end
else
begin
l := &Label(o);
l.Text := 'Page ' + l.Text;
end;
i := i + 2;
end;
end;
end;
Brackets are placed around each page number. The current page is displayed in text as Page # without
the brackets.

See the CustomPaging sample provided with C1WebGrid for additional information.
Scrolling C1WebGrid
Creating a Scrollable Grid
This topic demonstrates how to enable vertical and horizontal scrolling in a C1WebGrid.
80 Task-Based Help

1. Select the C1WebGrid component and set the HScrollBarStyle and VScrollBarStyle properties to
Always.
Visual Basic
C1WebGrid1.HScrollBarStyle = C1.Web.C1WebGrid.C1ScrollBarStyle.Always
C1WebGrid1.VScrollBarStyle = C1.Web.C1WebGrid.C1ScrollBarStyle.Always
C#
C1WebGrid1.HScrollBarStyle = C1.Web.C1WebGrid.C1ScrollBarStyle.Always;
C1WebGrid1.VScrollBarStyle = C1.Web.C1WebGrid.C1ScrollBarStyle.Always;
Delphi
C1WebGrid1.HScrollBarStyle := C1.Web.C1WebGrid.C1ScrollBarStyle.Always;
C1WebGrid1.VScrollBarStyle := C1.Web.C1WebGrid.C1ScrollBarStyle.Always;
The grid will have both horizontal and vertical scrollbars. It should look similar to the example below.

See the Scrollable sample provided with C1WebGrid for additional information.
Creating a Non-Scrollable Column
This topic demonstrates how to fix a column in the grid so that it will not scroll.
1. Create a scrollable grid.
2. Set the first column's Fixed property to True. This keeps the column fixed to the left side of the grid when
it is scrolled horizontally.
Visual Basic
C1WebGrid1.Columns(0).Fixed = True
C#
C1WebGrid1.Columns[0].Fixed = true;
Delphi
C1WebGrid1.Columns[0].Fixed := True;
Scroll the grid. Note that the first column does not scroll to the right with the other columns.
Scrolling C1WebGrid 81


See the Scrollable sample provided with C1WebGrid for additional information.
Creating a Non-Scrollable Row
This topic demonstrates how to fix a row in the grid so that it will not scroll.
1. Add the following code to the form Declarations:
Visual Basic
Private _fixRows As Boolean = False
C#
private bool _fixRows = false;
Delphi
var fixRows: Boolean;
fixRows := false;
2. Add the following code to the Page_Load event to allow scrolling and fixed rows:
Visual Basic
If Not Page.IsPostBack Then

this.RadioButtonList1.SelectedIndex = 0
End If
C#
if( !Page.IsPostBack )
{
this.RadioButtonList1.SelectedIndex = 0;
}
Delphi
if (!Page.IsPostBack) then
begin

RadioButtonList1.SelectedIndex := 0;end;
3. Add the following code to the C1WebGrid's ItemDataBound event which contains the information for
the rows to be fixed:
Visual Basic
Private Sub C1WebGrid1_ItemDataBound(ByVal sender As Object, ByVal e As
C1.Web.C1WebGrid.C1ItemEventArgs) Handles C1WebGrid1.ItemDataBound
' fix the top three rows of the grid when scrolling horizontally
If Me._fixRows AndAlso e.Item.ItemIndex <= 2 Then
82 Task-Based Help

e.Item.Fixed = True
End If
End Sub
C#
private void C1WebGrid1_ItemDataBound(object sender,
C1.Web.C1WebGrid.C1ItemEventArgs e)
{
// fix the top three rows of the grid when scrolling
horizontally
if( this._fixRows && e.Item.ItemIndex <= 2 )
e.Item.Fixed=true;
}

Delphi
procedure TWebForm1.C1WebGrid1_ItemDataBound (sender: System.Object; e:
C1.Web.C1WebGrid.C1ItemEventArgs);
begin
// fix the top three rows of the grid when scrolling horizontally
if((fixRows) and (e.Item.ItemIndex = 0)) then
e.Item.Fixed := true;
end;
Scroll the grid. Note that the first three rows do not scroll down with the other rows.

See the Scrollable sample provided with C1WebGrid for additional information.
C1WebGrid Frequently Asked Questions 83

C1WebGrid Frequently Asked
Questions
Here are some frequently asked questions (FAQs) about C1WebGrid:
Why do I get the following error?
The Microsoft Jet database engine cannot open the file 'C:\Program Files\ComponentOne
Studio.NET\common\WebGridDemo.mdb'. It is already opened exclusively by another user, or
you need permission to view its data.
This error occurs in the following scenarios:
1. The IUSR and ASPNET accounts do not have the correct Windows NT permissions on the
folder that contains the file. Right-click the folder where the Access database is stored, select
Properties and click the Security tab. Add and allow permissions for ASPNET and IUSR
accounts.
2. Another process or user has that Access database open. Make sure that the database is not
open.
3. If you access the Access database through a network. Make sure the database is local to the
machine.
Once these steps are completed, reopen and run the project file, and check the status.

How can I resolve the following error?
Parser Error: File or assembly name "C1.Web.C1WebGrid.2, or one of its dependencies, was not
found.
This error can occur due to the following reasons:
1. The application is not able to find c1.web.c1webgrid.2.dll" file. Set the Copy Local property
for the .dll in the References section of the Solution Explorer to True.
2. If the aspnet_wp account does not have permissions to write to WinNT\Temp (system
temporary) directory. Give full control to the ASPNET account on the Winnt/Temp
directory. Restart IIS and check the status.

How can I distribute an application created with WebGrid?
There are two ways to distribute the C1.Web.C1WebGrid.2.dll to the server, depending on the Copy
Local property of the C1WebGrid reference in the References section of the Solution Explorer:
1. If Copy Local is False, the C1.Web.C1WebGrid.2.dll file must be registered in the GAC of
the server.
2. If Copy Local is True (preferred method), the file must be located in the same directory as the
.dll generated by your application.
See the Redistributable Files (page 15) section for additional information.
Visit HelpCentral to find more frequently asked questions regarding C1WebGrid.
C1.Web.C1WebGrid.2 Assembly 85

C1.Web.C1WebGrid.2 Assembly
Namespaces
C1.Web.C1WebGrid
C1.Web.C1WebGrid.Data
C1.Web.C1WebGrid.Design
C1.Web.C1WebGrid.Util.Serialization
C1.Web.C1WebGrid Namespace 87

C1.Web.C1WebGrid Namespace
C1.Web.C1WebGrid Hierarchy
Classes
Class Description
C1BoundColumn A C1BoundColumn is bound to a field in a data
source. Inherits from C1Column.
C1ButtonColumn A C1ButtonColumn displays a command button for
each item. Inherits from C1Column.
C1CancelCommandEventArgs Provides data for a cancelable events such as
CancelingCommand and EditingCommand of the
C1WebGrid control.
C1ColMovedEventArgs Provides data for the ColumnMoved event of the
C1WebGrid control.
C1ColMovingEventArgs Provides data for the ColumnMoving event of the
C1WebGrid control.
C1Column This is the base class for all columns.
C1ColumnCollection Provides access to the columns that are contained by a
parent column.
C1CommandEventArgs Provides data for the command events such as
ItemCommand of the C1WebGrid.
C1DeletedCommandEventArgs Provides data for the DeletedCommand event of the
C1WebGrid control.
C1DeletingCommandEventArgs Provides data for the DeletingCommand event of the
C1WebGrid control.
C1EditCommandColumn A C1EditCommandColumn displays a column
containing editing commands for each item. Inherits
from C1Column.
C1GridItem Represents an item (row) in the C1WebGrid control.
C1GroupColMovedEventArgs Provides data for the GroupColumnMoved event of
the C1WebGrid.
C1GroupColMovingEventArgs Provides data for the GroupColumnMoving event of
the C1WebGrid.
C1GroupTextEventArgs Provides data for the GroupText and
GroupAggregate events of the C1WebGrid.
C1HyperLinkColumn A C1HyperLinkColumn displays each item as a
hyperlink. Inherits from C1Column.
C1ItemCollection Provides access to the items that are contained by a
parent item.
C1ItemEventArgs Provides data for the ItemCreated and
ItemDataBound events of the C1WebGrid control.
88 C1.Web.C1WebGrid Namespace

Class Description
C1PageChangingEventArgs Provides data for the PageIndexChanging event of
the C1WebGrid control.
C1PagerStyle C1PagerStyle is used to customize the appearance and
position of a pager.
C1SelectedIndexChangingEventArgs Provides data for the SelectedIndexChanging event
of the C1WebGrid control.
C1SortingCommandEventArgs Provides data for the SortingCommand event of the
C1WebGrid control.
C1TemplateColumn A C1TemplateColumn displays each item in the
column following a specified template.
C1UpdatedEventArgs Provides data for the UpdatedCommand event of the
C1WebGrid control.
C1UpdatingEventArgs Provides data for the UpdatingCommand event of the
C1WebGrid control.
C1WebGrid Represents the C1WebGrid control.
GridUpdateBindingCollection GridUpdateBindingCollection contains
GridUpdateBinding objects specifying bindings used
in Update method.
GroupColumnCollection Provides access to the columns that are contained in
the grouping area.
GroupInfo GroupInfo is used to customize the appearance and
position of groups.
Delegates
Delegate Description
C1CancelCommandEventHandler Represents the method that will handle the
CancelingCommand and the EditingCommand
events of the C1WebGrid control.
C1ColMovedEventHandler Represents the method that will handle the
ColumnMoved event of the C1WebGrid.
C1ColMovingEventHandler Represents the method that will handle the
ColumnMoving event of the C1WebGrid.
C1CommandEventHandler Represents the the method that will handle the
ItemCommand event of the C1WebGrid.
C1DeletedCommandEventHandler Represents the the method that will handle the
DeletedCommand event of the C1WebGrid.
C1DeletingCommandEventHandler Represents the the method that will handle the
DeletingCommand event of the C1WebGrid.
C1GroupAggregateEventHandler Represents the method that will handle the
GroupAggregate event of the C1WebGrid
C1GroupColMovedEventHandler Represents the method that will handle the
GroupColumnMoved event of the C1WebGrid.
C1.Web.C1WebGrid Namespace 89

Delegate Description
C1GroupColMovingEventHandler Represents the method that will handle the
GroupColumnMoving event of the C1WebGrid.
C1GroupTextEventHandler Represents the method that will handle the
GroupText event of the C1WebGrid.
C1ItemEventHandler Represents the method that will handle the
ItemCreated and ItemDataBound events of the
C1WebGrid
C1PageChangingEventHandler Provides data for the PageIndexChanging event of
the C1WebGrid control.
C1SelectedIndexChangingHandler Represents the method that will handle the
SelectedIndexChanging event of the C1WebGrid.
C1SortingCommandEventHandler Represents the the method that will handle the
SortingCommand event of the C1WebGrid.
C1UpdatedEventHandler Represents the the method that will handle the
UpdatedCommand event of the C1WebGrid.
C1UpdatingEventHandler Represents the the method that will handle the
UpdatingCommand event of the C1WebGrid.
Enumerations
Enumeration Description
AggregateEnum Use the members of this enumeration to set the value
of the Aggregate property in the C1Column class.
C1ListItemType Use the members of this enumeration to set the value
of the ItemType property in the C1GridItem class.
C1ScrollBarStyle Use the members of this enumeration to set the value
of the HScrollBarStyle and VScrollBarStyle
properties in the C1WebGrid class.
C1SortDirection Use the members of this enumeration to set the value
of the SortDirection property in the C1Column class.
GroupMoveEnum Use the members of this enumeration to determine the
action that raised the GroupColumnMoving and the
GroupColumnMoved events.
GroupPositionEnum Use the members of this enumeration to set the value
of the Position property in the GroupInfo class.
OutlineModeEnum Use the members of this enumeration to set the value
of the OutlineMode property in the GroupInfo class.
RowMergeEnum Use the members of this enumeration to set the value
of the RowMerge property in the C1Column derived
column object.
See Also
C1.Web.C1WebGrid.2 Assembly

90 C1.Web.C1WebGrid Namespace

C1.Web.C1WebGrid Hierarchy
System.Object
C1.Web.C1WebGrid.C1Column ---- System.Web.UI.IStateManager
C1.Web.C1WebGrid.C1BoundColumn
C1.Web.C1WebGrid.C1ButtonColumn
C1.Web.C1WebGrid.C1EditCommandColumn
C1.Web.C1WebGrid.C1HyperLinkColumn
C1.Web.C1WebGrid.C1TemplateColumn
System.EventArgs
C1.Web.C1WebGrid.C1ColMovedEventArgs
C1.Web.C1WebGrid.C1DeletedCommandEventArgs
C1.Web.C1WebGrid.C1GroupColMovedEventArgs
C1.Web.C1WebGrid.C1GroupTextEventArgs
C1.Web.C1WebGrid.C1ItemEventArgs
C1.Web.C1WebGrid.C1UpdatedEventArgs
System.ComponentModel.CancelEventArgs
C1.Web.C1WebGrid.C1ColMovingEventArgs
C1.Web.C1WebGrid.C1GroupColMovingEventArgs
C1.Web.C1WebGrid.C1PageChangingEventArgs
C1.Web.C1WebGrid.C1SortingCommandEventArgs
System.Web.UI.WebControls.CommandEventArgs
C1.Web.C1WebGrid.C1CommandEventArgs
C1.Web.C1WebGrid.C1CancelCommandEventArgs
C1.Web.C1WebGrid.C1DeletingCommandEventArgs
C1.Web.C1WebGrid.C1SelectedIndexChangingEventArgs
C1.Web.C1WebGrid.C1UpdatingEventArgs
System.Collections.CollectionBase
C1.Web.C1WebGrid.C1ColumnCollection ---- d, System.Web.UI.IStateManager
C1.Web.C1WebGrid.GroupColumnCollection
C1.Web.Data.WebControls.UpdateBindingCollection ---- System.Web.UI.IStateManager
C1.Web.C1WebGrid.GridUpdateBindingCollection
System.Web.UI.Control
System.Web.UI.WebControls.WebControl
System.Web.UI.WebControls.BaseDataBoundControl
System.Web.UI.WebControls.DataBoundControl
System.Web.UI.WebControls.CompositeDataBoundControl
C1.Web.C1WebGrid Hierarchy 91

C1.Web.C1WebGrid.C1WebGrid ---- an, System.Web.UI.IPostBackDataHandler,
System.Web.UI.IPostBackEventHandler
System.Web.UI.WebControls.TableRow
C1.Web.C1WebGrid.C1GridItem ---- System.Web.UI.IDataItemContainer
C1.Web.C1WebGrid.C1ItemCollection ---- System.Collections.ICollection,
System.Collections.IEnumerable
System.MarshalByRefObject
System.ComponentModel.Component
System.Web.UI.WebControls.Style
System.Web.UI.WebControls.TableItemStyle
C1.Web.C1WebGrid.C1PagerStyle
C1.Web.C1WebGrid.GroupInfo ---- System.Web.UI.IStateManager
System.ValueType
System.[Enum]
C1.Web.C1WebGrid.AggregateEnum
C1.Web.C1WebGrid.C1ListItemType
C1.Web.C1WebGrid.C1ScrollBarStyle
C1.Web.C1WebGrid.C1SortDirection
C1.Web.C1WebGrid.GroupMoveEnum
C1.Web.C1WebGrid.GroupPositionEnum
C1.Web.C1WebGrid.OutlineModeEnum
C1.Web.C1WebGrid.RowMergeEnum
System.[Delegate]
System.MulticastDelegate
C1.Web.C1WebGrid.C1CancelCommandEventHandler
C1.Web.C1WebGrid.C1ColMovedEventHandler
C1.Web.C1WebGrid.C1ColMovingEventHandler
C1.Web.C1WebGrid.C1CommandEventHandler
C1.Web.C1WebGrid.C1DeletedCommandEventHandler
C1.Web.C1WebGrid.C1DeletingCommandEventHandler
C1.Web.C1WebGrid.C1GroupAggregateEventHandler
C1.Web.C1WebGrid.C1GroupColMovedEventHandler
C1.Web.C1WebGrid.C1GroupColMovingEventHandler
C1.Web.C1WebGrid.C1GroupTextEventHandler
C1.Web.C1WebGrid.C1ItemEventHandler
C1.Web.C1WebGrid.C1PageChangingEventHandler
C1.Web.C1WebGrid.C1SelectedIndexChangingHandler
C1.Web.C1WebGrid.C1SortingCommandEventHandler
92 C1.Web.C1WebGrid Namespace

C1.Web.C1WebGrid.C1UpdatedEventHandler
C1.Web.C1WebGrid.C1UpdatingEventHandler
See Also
C1.Web.C1WebGrid Namespace
AggregateEnum Enumeration
Use the members of this enumeration to set the value of the Aggregate property in the C1Column class.

[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.Web.C1WebGrid
Assembly: C1.Web.C1WebGrid.2 (in C1.Web.C1WebGrid.2.dll)
Members
Member name Description
Average Average of the numerical values.
Count Count of non-empty values.
Custom Custom value.
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.Web.C1WebGrid Namespace
C1BoundColumn Class
A C1BoundColumn is bound to a field in a data source. Inherits from C1Column.
For a list of all members of this type, see C1BoundColumn Members.
System.Object
C1BoundColumn Members 93

C1.Web.C1WebGrid.C1Column
C1.Web.C1WebGrid.C1BoundColumn

[Visual Basic]
Public Class C1BoundColumn
Inherits C1Column

[C#]
public class C1BoundColumn : C1Column

[Delphi]
type C1BoundColumn = class (C1Column);
Namespace: C1.Web.C1WebGrid
Assembly: C1.Web.C1WebGrid.2 (in C1.Web.C1WebGrid.2.dll)
See Also
C1BoundColumn Members | C1.Web.C1WebGrid Namespace
C1BoundColumn Members
C1BoundColumn overview
Public Constructors
C1BoundColumn Constructor Constructor. Initializes a new instance of the
C1BoundColumn class.
Public Properties
Aggregate (inherited from C1Column) Causes the grid to calculate aggregate values to the
column and place them in the group header and footer
rows. If the grid does not contain any groups, setting
the Aggregate property has no effect.
AllowGroup (inherited from C1Column) Used to disallow the client-side grouping of a column
in a grouped grid.
AllowMove (inherited from C1Column) Determines whether column can be moved on the
client.
AllowSizing (inherited from C1Column) Determines whether columns can be sized on the
client.
DataField Sets or returns the name of the field in the database
table to which a grid column is bound.
DataFormatString Sets or returns the string that specifies the display
format for items in the column.
Fixed (inherited from C1Column) Determines whether a column is fixed to the left of the
grid when it is scrolled horizontally.
FooterStyle (inherited from C1Column) Gets the style properties of the column footer.
FooterText (inherited from C1Column) Gets or sets the text of the footer.
94 C1.Web.C1WebGrid Namespace

GroupInfo (inherited from C1Column) Gets a GroupInfo object that determines whether a
column should be grouped on and how the group
header and footer rows should be formatted and
displayed.
HeaderImageUrl (inherited from C1Column) Gets or sets the location of the image to be used in the
header.
HeaderStyle (inherited from C1Column) Gets the style properties of the column header.
HeaderText (inherited from C1Column) Gets or sets the text of the header.
ItemStyle (inherited from C1Column) Gets the style properties of the item.
ReadOnly Determines whether the items in the bound column
can be edited.
RowMerge (inherited from C1Column) Determines whether rows are merged.
SortDirection (inherited from C1Column) Gets the direction of the sort.
SortExpression (inherited from C1Column) Gets or sets the name of the field or expression to pass
to the OnSortCommand method when a column is
selected for sorting.
ValueList Gets or sets the object that implements the
IDicitionary interface used for textual substitution.
Visible (inherited from C1Column) Determines whether the column is visible within the
displayed area of the C1WebGrid component.
Public Methods
ToString Overriden. Returns a string that represents the current
object.
See Also
C1BoundColumn Class | C1.Web.C1WebGrid Namespace
C1BoundColumn Constructor
Constructor. Initializes a new instance of the C1BoundColumn class.

[Visual Basic]
Public Function New()

[C#]
public C1BoundColumn()

[Delphi]
public constructor Create(); overload;
See Also
C1BoundColumn Class | C1BoundColumn Members | C1.Web.C1WebGrid Namespace
C1BoundColumn Properties
The properties of the C1BoundColumn class are listed here. For a complete list of C1BoundColumn class
members, see the C1BoundColumn Members topic.
C1BoundColumn Properties 95

Public Properties
Aggregate (inherited from C1Column) Causes the grid to calculate aggregate values to the
column and place them in the group header and footer
rows. If the grid does not contain any groups, setting
the Aggregate property has no effect.
AllowGroup (inherited from C1Column) Used to disallow the client-side grouping of a column
in a grouped grid.
AllowMove (inherited from C1Column) Determines whether column can be moved on the
client.
AllowSizing (inherited from C1Column) Determines whether columns can be sized on the
client.
DataField Sets or returns the name of the field in the database
table to which a grid column is bound.
DataFormatString Sets or returns the string that specifies the display
format for items in the column.
Fixed (inherited from C1Column) Determines whether a column is fixed to the left of the
grid when it is scrolled horizontally.
FooterStyle (inherited from C1Column) Gets the style properties of the column footer.
FooterText (inherited from C1Column) Gets or sets the text of the footer.
GroupInfo (inherited from C1Column) Gets a GroupInfo object that determines whether a
column should be grouped on and how the group
header and footer rows should be formatted and
displayed.
HeaderImageUrl (inherited from C1Column) Gets or sets the location of the image to be used in the
header.
HeaderStyle (inherited from C1Column) Gets the style properties of the column header.
HeaderText (inherited from C1Column) Gets or sets the text of the header.
ItemStyle (inherited from C1Column) Gets the style properties of the item.
ReadOnly Determines whether the items in the bound column
can be edited.
RowMerge (inherited from C1Column) Determines whether rows are merged.
SortDirection (inherited from C1Column) Gets the direction of the sort.
SortExpression (inherited from C1Column) Gets or sets the name of the field or expression to pass
to the OnSortCommand method when a column is
selected for sorting.
ValueList Gets or sets the object that implements the
IDicitionary interface used for textual substitution.
Visible (inherited from C1Column) Determines whether the column is visible within the
displayed area of the C1WebGrid component.
See Also
C1BoundColumn Class | C1.Web.C1WebGrid Namespace

96 C1.Web.C1WebGrid Namespace

C1BoundColumn.DataField Property
Sets or returns the name of the field in the database table to which a grid column is bound.

[Visual Basic]
Public Property DataField As String

[C#]
public string DataField {get;set;}

[Delphi]
public property DataField: String read get_DataField write set_DataField;
See Also
C1BoundColumn Class | C1BoundColumn Members | C1.Web.C1WebGrid Namespace
C1BoundColumn.DataFormatString Property
Sets or returns the string that specifies the display format for items in the column.

[Visual Basic]
Public Property DataFormatString As String

[C#]
public string DataFormatString {get;set;}

[Delphi]
public property DataFormatString: String read get_DataFormatString write
set_DataFormatString;
Property Value
This property is used to provide a custom format for the items in the column.
Remarks
The data format string consists of two parts, separated by a colon, in the form {A:Bxx}. For example, the
formatting string, {0:D2}, would format the cell to display a number with two decimal places.
Note: The entire string must be enclosed in curly braces to denote that it is a format string and not a literal
string. Any text outside the curly braces is displayed as literal text.
The value before the colon (A in the general example) specifies the parameter index in a zero-based list of
parameters.
Note: This value can only be set to 0 because there is only one value in each cell.
The character after the colon (B in the general example) specifies the format to display the value in. The
following table lists the common formats.
C - Displays numeric values in currency format. D - Displays numeric values in decimal format. E - Displays
numeric values in scientific (exponential) format. F - Displays numeric values in fixed format. G - Displays
numeric values in general format. N - Displays numeric values in number format. X - Displays numeric values
in hexadecimal format.
Note: The format character is not case-sensitive, except for X, which displays the hexadecimal characters in
the case specified.
The value after the format character (xx in the general example) specifies the number of significant digits or
decimal places to display the value in.
C1BoundColumn.ReadOnly Property 97

See Also
C1BoundColumn Class | C1BoundColumn Members | C1.Web.C1WebGrid Namespace
C1BoundColumn.ReadOnly Property
Determines whether the items in the bound column can be edited.

[Visual Basic]
Overridable Public Property ReadOnly As Boolean

[C#]
virtual public bool ReadOnly {get;set;}

[Delphi]
public property ReadOnly: Boolean read get_ReadOnly write set_ReadOnly;
See Also
C1BoundColumn Class | C1BoundColumn Members | C1.Web.C1WebGrid Namespace
C1BoundColumn.ValueList Property
Gets or sets the object that implements the IDicitionary interface used for textual substitution.

[Visual Basic]
Public Property ValueList As IDictionary

[C#]
public IDictionary ValueList {get;set;}

[Delphi]
public property ValueList: IDictionary read get_ValueList write
set_ValueList;
See Also
C1BoundColumn Class | C1BoundColumn Members | C1.Web.C1WebGrid Namespace
C1BoundColumn Methods
The methods of the C1BoundColumn class are listed here. For a complete list of C1BoundColumn class
members, see the C1BoundColumn Members topic.
Public Methods
ToString Overriden. Returns a string that represents the current
object.
See Also
C1BoundColumn Class | C1.Web.C1WebGrid Namespace
C1BoundColumn.ToString Method
Returns a string that represents the current object.

[Visual Basic]
Overrides Public Function ToString() As String
98 C1.Web.C1WebGrid Namespace


[C#]
override public string ToString()

[Delphi]
public function ToString(): String; override;
See Also
C1BoundColumn Class | C1BoundColumn Members | C1.Web.C1WebGrid Namespace
C1ButtonColumn Class
A C1ButtonColumn displays a command button for each item. Inherits from C1Column.
For a list of all members of this type, see C1ButtonColumn Members.
System.Object
C1.Web.C1WebGrid.C1Column
C1.Web.C1WebGrid.C1ButtonColumn

[Visual Basic]
Public Class C1ButtonColumn
Inherits C1Column

[C#]
public class C1ButtonColumn : C1Column

[Delphi]
type C1ButtonColumn = class (C1Column);
Namespace: C1.Web.C1WebGrid
Assembly: C1.Web.C1WebGrid.2 (in C1.Web.C1WebGrid.2.dll)
See Also
C1ButtonColumn Members | C1.Web.C1WebGrid Namespace
C1ButtonColumn Members
C1ButtonColumn overview
Public Constructors
C1ButtonColumn Constructor Constructor. Initializes a new instance of the
C1ButtonColumn class.
Public Properties
Aggregate (inherited from C1Column) Causes the grid to calculate aggregate values to the
column and place them in the group header and footer
rows. If the grid does not contain any groups, setting
the Aggregate property has no effect.
AllowGroup (inherited from C1Column) Used to disallow the client-side grouping of a column
in a grouped grid.
C1ButtonColumn Constructor 99

AllowMove (inherited from C1Column) Determines whether column can be moved on the
client.
AllowSizing (inherited from C1Column) Determines whether columns can be sized on the
client.
ButtonType Sets or returns the type of the button in the column.
CommandName Sets or returns the command associated with the
button.
DataTextField Gets or sets the field name from a data source to bind
to the C1ButtonColumn.
DataTextFormatString Gets or sets the field name from a data source to bind
to the C1ButtonColumn.
Fixed (inherited from C1Column) Determines whether a column is fixed to the left of the
grid when it is scrolled horizontally.
FooterStyle (inherited from C1Column) Gets the style properties of the column footer.
FooterText (inherited from C1Column) Gets or sets the text of the footer.
GroupInfo (inherited from C1Column) Gets a GroupInfo object that determines whether a
column should be grouped on and how the group
header and footer rows should be formatted and
displayed.
HeaderImageUrl (inherited from C1Column) Gets or sets the location of the image to be used in the
header.
HeaderStyle (inherited from C1Column) Gets the style properties of the column header.
HeaderText (inherited from C1Column) Gets or sets the text of the header.
ItemStyle (inherited from C1Column) Gets the style properties of the item.
RowMerge (inherited from C1Column) Determines whether rows are merged.
SortDirection (inherited from C1Column) Gets the direction of the sort.
SortExpression (inherited from C1Column) Gets or sets the name of the field or expression to pass
to the OnSortCommand method when a column is
selected for sorting.
Text Gets or sets the field name from a data source to bind
to the C1ButtonColumn.
Visible (inherited from C1Column) Determines whether the column is visible within the
displayed area of the C1WebGrid component.
Public Methods
ToString Overriden. Returns a string that represents the current
object.
See Also
C1ButtonColumn Class | C1.Web.C1WebGrid Namespace
C1ButtonColumn Constructor
Constructor. Initializes a new instance of the C1ButtonColumn class.

100 C1.Web.C1WebGrid Namespace

[Visual Basic]
Public Function New()

[C#]
public C1ButtonColumn()

[Delphi]
public constructor Create(); overload;
See Also
C1ButtonColumn Class | C1ButtonColumn Members | C1.Web.C1WebGrid Namespace
C1ButtonColumn Properties
The properties of the C1ButtonColumn class are listed here. For a complete list of C1ButtonColumn class
members, see the C1ButtonColumn Members topic.
Public Properties
Aggregate (inherited from C1Column) Causes the grid to calculate aggregate values to the
column and place them in the group header and footer
rows. If the grid does not contain any groups, setting
the Aggregate property has no effect.
AllowGroup (inherited from C1Column) Used to disallow the client-side grouping of a column
in a grouped grid.
AllowMove (inherited from C1Column) Determines whether column can be moved on the
client.
AllowSizing (inherited from C1Column) Determines whether columns can be sized on the
client.
ButtonType Sets or returns the type of the button in the column.
CommandName Sets or returns the command associated with the
button.
DataTextField Gets or sets the field name from a data source to bind
to the C1ButtonColumn.
DataTextFormatString Gets or sets the field name from a data source to bind
to the C1ButtonColumn.
Fixed (inherited from C1Column) Determines whether a column is fixed to the left of the
grid when it is scrolled horizontally.
FooterStyle (inherited from C1Column) Gets the style properties of the column footer.
FooterText (inherited from C1Column) Gets or sets the text of the footer.
GroupInfo (inherited from C1Column) Gets a GroupInfo object that determines whether a
column should be grouped on and how the group
header and footer rows should be formatted and
displayed.
HeaderImageUrl (inherited from C1Column) Gets or sets the location of the image to be used in the
header.
HeaderStyle (inherited from C1Column) Gets the style properties of the column header.
HeaderText (inherited from C1Column) Gets or sets the text of the header.
C1ButtonColumn.ButtonType Property 101

ItemStyle (inherited from C1Column) Gets the style properties of the item.
RowMerge (inherited from C1Column) Determines whether rows are merged.
SortDirection (inherited from C1Column) Gets the direction of the sort.
SortExpression (inherited from C1Column) Gets or sets the name of the field or expression to pass
to the OnSortCommand method when a column is
selected for sorting.
Text Gets or sets the field name from a data source to bind
to the C1ButtonColumn.
Visible (inherited from C1Column) Determines whether the column is visible within the
displayed area of the C1WebGrid component.
See Also
C1ButtonColumn Class | C1.Web.C1WebGrid Namespace
C1ButtonColumn.ButtonType Property
Sets or returns the type of the button in the column.

[Visual Basic]
Overridable Public Property ButtonType As ButtonColumnType

[C#]
virtual public ButtonColumnType ButtonType {get;set;}

[Delphi]
public property ButtonType: ButtonColumnType read get_ButtonType write
set_ButtonType;
Property Value
One of the System.Web.UI.WebControls.ButtonColumnType values. Default is
ButtonColumnType.LinkButton.
Remarks
This property is used to specify whether the buttons in the column are displayed as link or push buttons.
See Also
C1ButtonColumn Class | C1ButtonColumn Members | C1.Web.C1WebGrid Namespace
C1ButtonColumn.CommandName Property
Sets or returns the command associated with the button.

[Visual Basic]
Overridable Public Property CommandName As String

[C#]
virtual public string CommandName {get;set;}

[Delphi]
public property CommandName: String read get_CommandName write
set_CommandName;
102 C1.Web.C1WebGrid Namespace

See Also
C1ButtonColumn Class | C1ButtonColumn Members | C1.Web.C1WebGrid Namespace
C1ButtonColumn.DataTextField Property
Gets or sets the field name from a data source to bind to the C1ButtonColumn.

[Visual Basic]
Overridable Public Property DataTextField As String

[C#]
virtual public string DataTextField {get;set;}

[Delphi]
public property DataTextField: String read get_DataTextField write
set_DataTextField;
See Also
C1ButtonColumn Class | C1ButtonColumn Members | C1.Web.C1WebGrid Namespace
C1ButtonColumn.DataTextFormatString Property
Gets or sets the field name from a data source to bind to the C1ButtonColumn.

[Visual Basic]
Overridable Public Property DataTextFormatString As String

[C#]
virtual public string DataTextFormatString {get;set;}

[Delphi]
public property DataTextFormatString: String read get_DataTextFormatString
write set_DataTextFormatString;
See Also
C1ButtonColumn Class | C1ButtonColumn Members | C1.Web.C1WebGrid Namespace
C1ButtonColumn.Text Property
Gets or sets the field name from a data source to bind to the C1ButtonColumn.

[Visual Basic]
Overridable Public Property Text As String

[C#]
virtual public string Text {get;set;}

[Delphi]
public property Text: String read get_Text write set_Text;
See Also
C1ButtonColumn Class | C1ButtonColumn Members | C1.Web.C1WebGrid Namespace

C1ButtonColumn Methods 103

C1ButtonColumn Methods
The methods of the C1ButtonColumn class are listed here. For a complete list of C1ButtonColumn class
members, see the C1ButtonColumn Members topic.
Public Methods
ToString Overriden. Returns a string that represents the current
object.
See Also
C1ButtonColumn Class | C1.Web.C1WebGrid Namespace
C1ButtonColumn.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;
See Also
C1ButtonColumn Class | C1ButtonColumn Members | C1.Web.C1WebGrid Namespace
C1CancelCommandEventArgs Class
Provides data for a cancelable events such as CancelingCommand and EditingCommand of the C1WebGrid
control.
For a list of all members of this type, see C1CancelCommandEventArgs Members.
System.Object
System.EventArgs
System.Web.UI.WebControls.CommandEventArgs
C1.Web.C1WebGrid.C1CommandEventArgs
C1.Web.C1WebGrid.C1CancelCommandEventArgs
C1.Web.C1WebGrid.C1DeletingCommandEventArgs
C1.Web.C1WebGrid.C1SelectedIndexChangingEventArgs
C1.Web.C1WebGrid.C1UpdatingEventArgs

[Visual Basic]
Public Class C1CancelCommandEventArgs
Inherits C1CommandEventArgs

[C#]
public class C1CancelCommandEventArgs : C1CommandEventArgs

104 C1.Web.C1WebGrid Namespace

[Delphi]
type C1CancelCommandEventArgs = class (C1CommandEventArgs);
Namespace: C1.Web.C1WebGrid
Assembly: C1.Web.C1WebGrid.2 (in C1.Web.C1WebGrid.2.dll)
See Also
C1CancelCommandEventArgs Members | C1.Web.C1WebGrid Namespace
C1CancelCommandEventArgs Members
C1CancelCommandEventArgs overview
Public Constructors
C1CancelCommandEventArgs Constructor Constructor. Initializes a new instance of the
C1CancelCommandEventArgs class.
Public Properties
Cancel Gets or sets a value indicating whether the event
should be canceled.
CommandSource (inherited from
C1CommandEventArgs)
Gets the source of the command.
Item (inherited from C1CommandEventArgs) Gets the C1GridItem item that contains the
command source.
See Also
C1CancelCommandEventArgs Class | C1.Web.C1WebGrid Namespace
C1CancelCommandEventArgs Constructor
Overload List
Constructor. Initializes a new instance of the C1CancelCommandEventArgs class.
[Visual Basic] Public Function New(C1CommandEventArgs)
[C#] public C1CancelCommandEventArgs(C1CommandEventArgs);
[Delphi] public constructor Create(C1CommandEventArgs); overload;
Constructor. Initializes a new instance of the C1CancelCommandEventArgs class.
[Visual Basic] Public Function New(C1GridItem, Object, CommandEventArgs)
[C#] public C1CancelCommandEventArgs(C1GridItem, object, CommandEventArgs);
[Delphi] public constructor Create(C1GridItem; Object; CommandEventArgs); overload;
See Also
C1CancelCommandEventArgs Class | C1CancelCommandEventArgs Members | C1.Web.C1WebGrid
Namespace
C1CancelCommandEventArgs Constructor (C1CommandEventArgs)
Constructor. Initializes a new instance of the C1CancelCommandEventArgs class.


C1CancelCommandEventArgs Constructor (C1GridItem, Object, CommandEventArgs) 105

[Visual Basic]
Public Function New( _
ByVal e As C1CommandEventArgs _
)

[C#]
public C1CancelCommandEventArgs(
C1CommandEventArgs e
);

[Delphi]
public constructor Create(
e: C1CommandEventArgs
); overload;
Parameters
e
A C1CommandEventArgs that contains the event data.
See Also
C1CancelCommandEventArgs Class | C1CancelCommandEventArgs Members | C1.Web.C1WebGrid
Namespace | C1CancelCommandEventArgs Constructor Overload List
C1CancelCommandEventArgs Constructor (C1GridItem, Object,
CommandEventArgs)
Constructor. Initializes a new instance of the C1CancelCommandEventArgs class.

[Visual Basic]
Public Function New( _
ByVal item As C1GridItem, _
ByVal commandSource As Object, _
ByVal originalArgs As CommandEventArgs _
)

[C#]
public C1CancelCommandEventArgs(
C1GridItem item,
object commandSource,
CommandEventArgs originalArgs
);

[Delphi]
public constructor Create(
item: C1GridItem;
commandSource: Object;
originalArgs: CommandEventArgs
); overload;
Parameters
item
A C1GridItem that contains the command source.

106 C1.Web.C1WebGrid Namespace

commandSource
The source of the command.
originalArgs
A System.Web.UI.WebControls.CommandEventArgs that contains the event data.
See Also
C1CancelCommandEventArgs Class | C1CancelCommandEventArgs Members | C1.Web.C1WebGrid
Namespace | C1CancelCommandEventArgs Constructor Overload List
C1CancelCommandEventArgs Properties
The properties of the C1CancelCommandEventArgs class are listed here. For a complete list of
C1CancelCommandEventArgs class members, see the C1CancelCommandEventArgs Members topic.
Public Properties
Cancel Gets or sets a value indicating whether the event
should be canceled.
CommandSource (inherited from
C1CommandEventArgs)
Gets the source of the command.
Item (inherited from C1CommandEventArgs) Gets the C1GridItem item that contains the
command source.
See Also
C1CancelCommandEventArgs Class | C1.Web.C1WebGrid Namespace
C1CancelCommandEventArgs.Cancel Property
Gets or sets a value indicating whether the event should be canceled.

[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
C1CancelCommandEventArgs Class | C1CancelCommandEventArgs Members | C1.Web.C1WebGrid
Namespace
C1CancelCommandEventHandler Delegate
Represents the method that will handle the CancelingCommand and the EditingCommand events of the
C1WebGrid control.





C1ColMovedEventArgs Class 107

[Visual Basic]
Public Delegate Sub C1CancelCommandEventHandler( _
ByVal sender As Object, _
ByVal e As C1CancelCommandEventArgs _
)

[C#]
public delegate void C1CancelCommandEventHandler(
object sender,
C1CancelCommandEventArgs e
);

[Delphi]
type C1CancelCommandEventHandler = procedure (
sender: Object;
e: C1CancelCommandEventArgs
) of object;
Parameters
sender
e
Namespace: C1.Web.C1WebGrid
Assembly: C1.Web.C1WebGrid.2 (in C1.Web.C1WebGrid.2.dll)
See Also
C1.Web.C1WebGrid Namespace
C1ColMovedEventArgs Class
Provides data for the ColumnMoved event of the C1WebGrid control.
For a list of all members of this type, see C1ColMovedEventArgs Members.
System.Object
System.EventArgs
C1.Web.C1WebGrid.C1ColMovedEventArgs

[Visual Basic]
Public Class C1ColMovedEventArgs
Inherits EventArgs

[C#]
public class C1ColMovedEventArgs : EventArgs

[Delphi]
type C1ColMovedEventArgs = class (EventArgs);
Namespace: C1.Web.C1WebGrid
Assembly: C1.Web.C1WebGrid.2 (in C1.Web.C1WebGrid.2.dll)
See Also
C1ColMovedEventArgs Members | C1.Web.C1WebGrid Namespace
108 C1.Web.C1WebGrid Namespace

C1ColMovedEventArgs Members
C1ColMovedEventArgs overview
Public Constructors
C1ColMovedEventArgs Constructor Constructor. Initializes a new instance of the
C1ColMovedEventArgs class.
Public Fields
Column The C1Column object being repositioned.
DestIndex Index of the new position within the Columns
collection.
See Also
C1ColMovedEventArgs Class | C1.Web.C1WebGrid Namespace
C1ColMovedEventArgs Constructor
Constructor. Initializes a new instance of the C1ColMovedEventArgs class.

[Visual Basic]
Public Function New( _
ByVal col As C1Column, _
ByVal dst As Integer _
)

[C#]
public C1ColMovedEventArgs(
C1Column col,
int dst
);

[Delphi]
public constructor Create(
col: C1Column;
dst: Int32
);
Parameters
col
The C1Column object being repositioned.
dst
Index of the new position within the Columns collection.
See Also
C1ColMovedEventArgs Class | C1ColMovedEventArgs Members | C1.Web.C1WebGrid Namespace
C1ColMovedEventArgs Fields
The fields of the C1ColMovedEventArgs class are listed here. For a complete list of C1ColMovedEventArgs
class members, see the C1ColMovedEventArgs Members topic.

C1ColMovedEventArgs.Column Field 109

Public Fields
Column The C1Column object being repositioned.
DestIndex Index of the new position within the Columns
collection.
See Also
C1ColMovedEventArgs Class | C1.Web.C1WebGrid Namespace
C1ColMovedEventArgs.Column Field
The C1Column object being repositioned.

[Visual Basic]
Public ReadOnly Column As C1Column

[C#]
public readonly C1Column Column

[Delphi]
public Column: C1Column;
See Also
C1ColMovedEventArgs Class | C1ColMovedEventArgs Members | C1.Web.C1WebGrid Namespace
C1ColMovedEventArgs.DestIndex Field
Index of the new position within the Columns collection.

[Visual Basic]
Public ReadOnly DestIndex As Integer

[C#]
public readonly int DestIndex

[Delphi]
public DestIndex: Int32;
See Also
C1ColMovedEventArgs Class | C1ColMovedEventArgs Members | C1.Web.C1WebGrid Namespace
C1ColMovedEventHandler Delegate
Represents the method that will handle the ColumnMoved event of the C1WebGrid.

[Visual Basic]
Public Delegate Sub C1ColMovedEventHandler( _
ByVal sender As Object, _
ByVal e As C1ColMovedEventArgs _
)




110 C1.Web.C1WebGrid Namespace

[C#]
public delegate void C1ColMovedEventHandler(
object sender,
C1ColMovedEventArgs e
);

[Delphi]
type C1ColMovedEventHandler = procedure (
sender: Object;
e: C1ColMovedEventArgs
) of object;
Parameters
sender
The source of the event.
e
Namespace: C1.Web.C1WebGrid
Assembly: C1.Web.C1WebGrid.2 (in C1.Web.C1WebGrid.2.dll)
See Also
C1.Web.C1WebGrid Namespace
C1ColMovingEventArgs Class
Provides data for the ColumnMoving event of the C1WebGrid control.
For a list of all members of this type, see C1ColMovingEventArgs Members.
System.Object
System.EventArgs
System.ComponentModel.CancelEventArgs
C1.Web.C1WebGrid.C1ColMovingEventArgs

[Visual Basic]
Public Class C1ColMovingEventArgs
Inherits CancelEventArgs

[C#]
public class C1ColMovingEventArgs : CancelEventArgs

[Delphi]
type C1ColMovingEventArgs = class (CancelEventArgs);
Namespace: C1.Web.C1WebGrid
Assembly: C1.Web.C1WebGrid.2 (in C1.Web.C1WebGrid.2.dll)
See Also
C1ColMovingEventArgs Members | C1.Web.C1WebGrid Namespace
C1ColMovingEventArgs Members 111

C1ColMovingEventArgs Members
C1ColMovingEventArgs overview
Public Constructors
C1ColMovingEventArgs Constructor Constructor. Initializes a new instance of the
C1ColMovingEventArgs class.
Public Fields
Column The C1Column object being repositioned.
DestIndex Index of the new position within the Columns
collection.
See Also
C1ColMovingEventArgs Class | C1.Web.C1WebGrid Namespace
C1ColMovingEventArgs Constructor
Constructor. Initializes a new instance of the C1ColMovingEventArgs class.

[Visual Basic]
Public Function New( _
ByVal col As C1Column, _
ByVal dst As Integer _
)

[C#]
public C1ColMovingEventArgs(
C1Column col,
int dst
);

[Delphi]
public constructor Create(
col: C1Column;
dst: Int32
);
Parameters
col
The C1Column object being repositioned.
dst
Index of the new position within the Columns collection.
See Also
C1ColMovingEventArgs Class | C1ColMovingEventArgs Members | C1.Web.C1WebGrid Namespace
C1ColMovingEventArgs Fields
The fields of the C1ColMovingEventArgs class are listed here. For a complete list of
C1ColMovingEventArgs class members, see the C1ColMovingEventArgs Members topic.
112 C1.Web.C1WebGrid Namespace

Public Fields
Column The C1Column object being repositioned.
DestIndex Index of the new position within the Columns
collection.
See Also
C1ColMovingEventArgs Class | C1.Web.C1WebGrid Namespace
C1ColMovingEventArgs.Column Field
The C1Column object being repositioned.

[Visual Basic]
Public ReadOnly Column As C1Column

[C#]
public readonly C1Column Column

[Delphi]
public Column: C1Column;
See Also
C1ColMovingEventArgs Class | C1ColMovingEventArgs Members | C1.Web.C1WebGrid Namespace
C1ColMovingEventArgs.DestIndex Field
Index of the new position within the Columns collection.

[Visual Basic]
Public ReadOnly DestIndex As Integer

[C#]
public readonly int DestIndex

[Delphi]
public DestIndex: Int32;
See Also
C1ColMovingEventArgs Class | C1ColMovingEventArgs Members | C1.Web.C1WebGrid Namespace
C1ColMovingEventHandler Delegate
Represents the method that will handle the ColumnMoving event of the C1WebGrid.

[Visual Basic]
Public Delegate Sub C1ColMovingEventHandler( _
ByVal sender As Object, _
ByVal e As C1ColMovingEventArgs _
)




C1Column Class 113

[C#]
public delegate void C1ColMovingEventHandler(
object sender,
C1ColMovingEventArgs e
);

[Delphi]
type C1ColMovingEventHandler = procedure (
sender: Object;
e: C1ColMovingEventArgs
) of object;
Parameters
sender
The source of the event.
e
Namespace: C1.Web.C1WebGrid
Assembly: C1.Web.C1WebGrid.2 (in C1.Web.C1WebGrid.2.dll)
See Also
C1.Web.C1WebGrid Namespace
C1Column Class
This is the base class for all columns.
For a list of all members of this type, see C1Column Members.
System.Object
C1.Web.C1WebGrid.C1Column
C1.Web.C1WebGrid.C1BoundColumn
C1.Web.C1WebGrid.C1ButtonColumn
C1.Web.C1WebGrid.C1EditCommandColumn
C1.Web.C1WebGrid.C1HyperLinkColumn
C1.Web.C1WebGrid.C1TemplateColumn

[Visual Basic]
Public Class C1Column
Implements IStateManager

[C#]
public class C1Column : IStateManager

[Delphi]
type C1Column = class (TObject, IStateManager);
Namespace: C1.Web.C1WebGrid
Assembly: C1.Web.C1WebGrid.2 (in C1.Web.C1WebGrid.2.dll)

114 C1.Web.C1WebGrid Namespace

See Also
C1Column Members | C1.Web.C1WebGrid Namespace
C1Column Members
C1Column overview
Public Constructors
C1Column Constructor Constructor.Creates a new instance of the C1Column
class.
Public Properties
Aggregate Causes the grid to calculate aggregate values to the
column and place them in the group header and footer
rows. If the grid does not contain any groups, setting
the Aggregate property has no effect.
AllowGroup Used to disallow the client-side grouping of a column
in a grouped grid.
AllowMove Determines whether column can be moved on the
client.
AllowSizing Determines whether columns can be sized on the
client.
Fixed Determines whether a column is fixed to the left of the
grid when it is scrolled horizontally.
FooterStyle Gets the style properties of the column footer.
FooterText Gets or sets the text of the footer.
GroupInfo Gets a GroupInfo object that determines whether a
column should be grouped on and how the group
header and footer rows should be formatted and
displayed.
HeaderImageUrl Gets or sets the location of the image to be used in the
header.
HeaderStyle Gets the style properties of the column header.
HeaderText Gets or sets the text of the header.
ItemStyle Gets the style properties of the item.
RowMerge Determines whether rows are merged.
SortDirection Gets the direction of the sort.
SortExpression Gets or sets the name of the field or expression to pass
to the OnSortCommand method when a column is
selected for sorting.
Visible Determines whether the column is visible within the
displayed area of the C1WebGrid component.
Public Methods
ToString Overriden. Returns a string that represents the current
object.
C1Column Constructor 115

See Also
C1Column Class | C1.Web.C1WebGrid Namespace
C1Column Constructor
Constructor.Creates a new instance of the C1Column class.

[Visual Basic]
Public Function New()

[C#]
public C1Column()

[Delphi]
public constructor Create(); overload;
See Also
C1Column Class | C1Column Members | C1.Web.C1WebGrid Namespace
C1Column Properties
The properties of the C1Column class are listed here. For a complete list of C1Column class members, see the
C1Column Members topic.
Public Properties
Aggregate Causes the grid to calculate aggregate values to the
column and place them in the group header and footer
rows. If the grid does not contain any groups, setting
the Aggregate property has no effect.
AllowGroup Used to disallow the client-side grouping of a column
in a grouped grid.
AllowMove Determines whether column can be moved on the
client.
AllowSizing Determines whether columns can be sized on the
client.
Fixed Determines whether a column is fixed to the left of the
grid when it is scrolled horizontally.
FooterStyle Gets the style properties of the column footer.
FooterText Gets or sets the text of the footer.
GroupInfo Gets a GroupInfo object that determines whether a
column should be grouped on and how the group
header and footer rows should be formatted and
displayed.
HeaderImageUrl Gets or sets the location of the image to be used in the
header.
HeaderStyle Gets the style properties of the column header.
HeaderText Gets or sets the text of the header.
ItemStyle Gets the style properties of the item.
116 C1.Web.C1WebGrid Namespace

RowMerge Determines whether rows are merged.
SortDirection Gets the direction of the sort.
SortExpression Gets or sets the name of the field or expression to pass
to the OnSortCommand method when a column is
selected for sorting.
Visible Determines whether the column is visible within the
displayed area of the C1WebGrid component.
See Also
C1Column Class | C1.Web.C1WebGrid Namespace
C1Column.Aggregate Property
Causes the grid to calculate aggregate values to the column and place them in the group header and footer
rows. If the grid does not contain any groups, setting the Aggregate property has no effect.

[Visual Basic]
Public Property Aggregate As AggregateEnum

[C#]
public AggregateEnum Aggregate {get;set;}

[Delphi]
public property Aggregate: AggregateEnum read get_Aggregate write
set_Aggregate;
Property Value
One of the AggregateEnum values. The default is AggregateEnum.None.
Remarks
The aggregate value displayed in the group header/footer rows is formatted using the column's
DataFormatString property, except for Counts which are displayed as integers with no decimals.
See Also
C1Column Class | C1Column Members | C1.Web.C1WebGrid Namespace
C1Column.AllowGroup Property
Used to disallow the client-side grouping of a column in a grouped grid.

[Visual Basic]
Overridable Public Property AllowGroup As Boolean

[C#]
virtual public bool AllowGroup {get;set;}

[Delphi]
public property AllowGroup: Boolean read get_AllowGroup write
set_AllowGroup;
Property Value
When this property is set to True (default), you can drag and drop columns to the grouping area.
C1Column.AllowMove Property 117

See Also
C1Column Class | C1Column Members | C1.Web.C1WebGrid Namespace
C1Column.AllowMove Property
Determines whether column can be moved on the client.

[Visual Basic]
Overridable Public Property AllowMove As Boolean

[C#]
virtual public bool AllowMove {get;set;}

[Delphi]
public property AllowMove: Boolean read get_AllowMove write set_AllowMove;
Property Value
The default value is True.
See Also
C1Column Class | C1Column Members | C1.Web.C1WebGrid Namespace
C1Column.AllowSizing Property
Determines whether columns can be sized on the client.

[Visual Basic]
Overridable Public Property AllowSizing As Boolean

[C#]
virtual public bool AllowSizing {get;set;}

[Delphi]
public property AllowSizing: Boolean read get_AllowSizing write
set_AllowSizing;
Property Value
The default value is True.
See Also
C1Column Class | C1Column Members | C1.Web.C1WebGrid Namespace
C1Column.Fixed Property
Determines whether a column is fixed to the left of the grid when it is scrolled horizontally.

[Visual Basic]
Public Property Fixed As Boolean

[C#]
public bool Fixed {get;set;}

[Delphi]
public property Fixed: Boolean read get_Fixed write set_Fixed;
118 C1.Web.C1WebGrid Namespace

Remarks
The default value of this property is False. When this property is set to True for a column, all columns to the
left are also fixed. This property is usually used with the HScrollBarStyle property.
This property is ignored under group mode.
See Also
C1Column Class | C1Column Members | C1.Web.C1WebGrid Namespace
C1Column.FooterStyle Property
Gets the style properties of the column footer.

[Visual Basic]
Overridable Public ReadOnly Property FooterStyle As TableItemStyle

[C#]
virtual public TableItemStyle FooterStyle {get;}

[Delphi]
public property FooterStyle: TableItemStyle read get_FooterStyle;
Remarks
This property is used to provide a custom style for the footer section of the column.
See Also
C1Column Class | C1Column Members | C1.Web.C1WebGrid Namespace
C1Column.FooterText Property
Gets or sets the text of the footer.

[Visual Basic]
Overridable Public Property FooterText As String

[C#]
virtual public string FooterText {get;set;}

[Delphi]
public property FooterText: String read get_FooterText write
set_FooterText;
See Also
C1Column Class | C1Column Members | C1.Web.C1WebGrid Namespace
C1Column.GroupInfo Property
Gets a GroupInfo object that determines whether a column should be grouped on and how the group header
and footer rows should be formatted and displayed.

[Visual Basic]
Overridable Public ReadOnly Property GroupInfo As GroupInfo

[C#]
virtual public GroupInfo GroupInfo {get;}
C1Column.HeaderImageUrl Property 119


[Delphi]
public property GroupInfo: GroupInfo read get_GroupInfo;
See Also
C1Column Class | C1Column Members | C1.Web.C1WebGrid Namespace
C1Column.HeaderImageUrl Property
Gets or sets the location of the image to be used in the header.

[Visual Basic]
Overridable Public Property HeaderImageUrl As String

[C#]
virtual public string HeaderImageUrl {get;set;}

[Delphi]
public property HeaderImageUrl: String read get_HeaderImageUrl write
set_HeaderImageUrl;
See Also
C1Column Class | C1Column Members | C1.Web.C1WebGrid Namespace
C1Column.HeaderStyle Property
Gets the style properties of the column header.

[Visual Basic]
Overridable Public ReadOnly Property HeaderStyle As TableItemStyle

[C#]
virtual public TableItemStyle HeaderStyle {get;}

[Delphi]
public property HeaderStyle: TableItemStyle read get_HeaderStyle;
Remarks
This property is used to provide a custom style for the header section of the column.
See Also
C1Column Class | C1Column Members | C1.Web.C1WebGrid Namespace
C1Column.HeaderText Property
Gets or sets the text of the header.

[Visual Basic]
Overridable Public Property HeaderText As String

[C#]
virtual public string HeaderText {get;set;}



120 C1.Web.C1WebGrid Namespace

[Delphi]
public property HeaderText: String read get_HeaderText write
set_HeaderText;
See Also
C1Column Class | C1Column Members | C1.Web.C1WebGrid Namespace
C1Column.ItemStyle Property
Gets the style properties of the item.

[Visual Basic]
Overridable Public ReadOnly Property ItemStyle As TableItemStyle

[C#]
virtual public TableItemStyle ItemStyle {get;}

[Delphi]
public property ItemStyle: TableItemStyle read get_ItemStyle;
Remarks
This property is used to provide a custom style for the items of the C1WebGrid component.
See Also
C1Column Class | C1Column Members | C1.Web.C1WebGrid Namespace
C1Column.RowMerge Property
Determines whether rows are merged.

[Visual Basic]
Public Property RowMerge As RowMergeEnum

[C#]
public RowMergeEnum RowMerge {get;set;}

[Delphi]
public property RowMerge: RowMergeEnum read get_RowMerge write
set_RowMerge;
Property Value
One of the RowMergeEnum values. The default is RowMergeEnum.None.
See Also
C1Column Class | C1Column Members | C1.Web.C1WebGrid Namespace
C1Column.SortDirection Property
Gets the direction of the sort.

[Visual Basic]
Public Property SortDirection As C1SortDirection

[C#]
public C1SortDirection SortDirection {get;set;}
C1Column.SortExpression Property 121


[Delphi]
public property SortDirection: C1SortDirection read get_SortDirection
write set_SortDirection;
Property Value
One of the C1SortDirection values. The default value is C1SortDirection.NotSet.
Remarks
This property provides a convenient method of tracking the sort state for columns when the grid is sorted. If
this property has a value other than C1SortDirection.NotSet, the grid will automatically display the
appropriate sort direction using the ImageSortAscending and ImageSortAscending properties in the column
headers.
See Also
C1Column Class | C1Column Members | C1.Web.C1WebGrid Namespace
C1Column.SortExpression Property
Gets or sets the name of the field or expression to pass to the OnSortCommand method when a column is
selected for sorting.

[Visual Basic]
Overridable Public Property SortExpression As String

[C#]
virtual public string SortExpression {get;set;}

[Delphi]
public property SortExpression: String read get_SortExpression write
set_SortExpression;
Remarks
This property does not bind the column to a field in data source. To bind a column to a field, see the
documentation for the specific column type.
See Also
C1Column Class | C1Column Members | C1.Web.C1WebGrid Namespace
C1Column.Visible Property
Determines whether the column is visible within the displayed area of the C1WebGrid component.

[Visual Basic]
Public Property Visible As Boolean

[C#]
public bool Visible {get;set;}

[Delphi]
public property Visible: Boolean read get_Visible write set_Visible;
Property Value
True if the column is visible in the C1WebGrid component; otherwise, False. The default value is True.
122 C1.Web.C1WebGrid Namespace

See Also
C1Column Class | C1Column Members | C1.Web.C1WebGrid Namespace
C1Column Methods
The methods of the C1Column class are listed here. For a complete list of C1Column class members, see the
C1Column Members topic.
Public Methods
ToString Overriden. Returns a string that represents the current
object.
See Also
C1Column Class | C1.Web.C1WebGrid Namespace
C1Column.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
C1Column Class | C1Column Members | C1.Web.C1WebGrid Namespace
C1ColumnCollection Class
Provides access to the columns that are contained by a parent column.
For a list of all members of this type, see C1ColumnCollection Members.
System.Object
System.Collections.CollectionBase
C1.Web.C1WebGrid.C1ColumnCollection
C1.Web.C1WebGrid.GroupColumnCollection

[Visual Basic]
Public Class C1ColumnCollection
Inherits CollectionBase
Implements d, IStateManager

[C#]
public class C1ColumnCollection : CollectionBase , d, IStateManager

C1ColumnCollection Members 123

[Delphi]
type C1ColumnCollection = class (CollectionBase, d, IStateManager);
Namespace: C1.Web.C1WebGrid
Assembly: C1.Web.C1WebGrid.2 (in C1.Web.C1WebGrid.2.dll)
See Also
C1ColumnCollection Members | C1.Web.C1WebGrid Namespace
C1ColumnCollection Members
C1ColumnCollection overview
Public Properties
Item Gets a C1Column derived column object from the
C1ColumnCollection collection at the specified
index. In C#, this property is the indexer for the
C1ColumnCollection class.
Public Methods
Add Adds the specified C1Column derived column object
to the end of the C1ColumnCollection.
ColumnByName Gets C1Column derived column object from the
name specified.
IndexOf Returns the index of the specified C1Column derived
column object from the C1ColumnCollection.
Insert Inserts the specified C1Column derived column
object into the collection at specified index.
Remove Removes the specified C1Column derived column
object from the C1ColumnCollection.
See Also
C1ColumnCollection Class | C1.Web.C1WebGrid Namespace
C1ColumnCollection Properties
The properties of the C1ColumnCollection class are listed here. For a complete list of C1ColumnCollection
class members, see the C1ColumnCollection Members topic.
Public Properties
Item Gets a C1Column derived column object from the
C1ColumnCollection collection at the specified
index. In C#, this property is the indexer for the
C1ColumnCollection class.
See Also
C1ColumnCollection Class | C1.Web.C1WebGrid Namespace
C1ColumnCollection.Item Property
Gets a C1Column derived column object from the C1ColumnCollection collection at the specified index. In
C#, this property is the indexer for the C1ColumnCollection class.
124 C1.Web.C1WebGrid Namespace


[Visual Basic]
Public Default Property Item( _
ByVal index As Integer _
) As C1Column

[C#]
public C1Column this[
int index
] {get;set;}

[Delphi]
public property Item[
index: Int32
]: C1Column read get_Item write set_Item;
Parameters
index
The index of the C1Column derived object in the C1ColumnCollection collection to retrieve.
See Also
C1ColumnCollection Class | C1ColumnCollection Members | C1.Web.C1WebGrid Namespace
C1ColumnCollection Methods
The methods of the C1ColumnCollection class are listed here. For a complete list of C1ColumnCollection
class members, see the C1ColumnCollection Members topic.
Public Methods
Add Adds the specified C1Column derived column object
to the end of the C1ColumnCollection.
ColumnByName Gets see C1Column derived column object from the
name specified.
IndexOf Returns the index of the specified C1Column derived
column object from the C1ColumnCollection.
Insert Inserts the specified C1Column derived column
object into the collection at specified index.
Remove Removes the specified C1Column derived column
object from the C1ColumnCollection.
See Also
C1ColumnCollection Class | C1.Web.C1WebGrid Namespace
C1ColumnCollection.Add Method
Adds the specified C1Column derived column object to the end of the C1ColumnCollection.

[Visual Basic]
Overridable Public Sub Add( _
ByVal gridColumn As C1Column _
)

C1ColumnCollection.ColumnByName Method 125

[C#]
virtual public void Add(
C1Column gridColumn
);

[Delphi]
public procedure Add(
gridColumn: C1Column
); virtual;
Parameters
gridColumn
The C1Column derived column object to append to the C1ColumnCollection
See Also
C1ColumnCollection Class | C1ColumnCollection Members | C1.Web.C1WebGrid Namespace
C1ColumnCollection.ColumnByName Method
Gets see C1Column derived column object from the name specified.

[Visual Basic]
Public Function ColumnByName( _
ByVal name As String _
) As C1Column

[C#]
public C1Column ColumnByName(
string name
);

[Delphi]
public function ColumnByName(
name: String
): C1Column;
Parameters
name
Name of the column to search.
Return Value
The C1Column derived column object with specified name.
Exceptions
Exception Type Condition
System.ArgumentException Thrown when column with specified name can not be
found.
See Also
C1ColumnCollection Class | C1ColumnCollection Members | C1.Web.C1WebGrid Namespace
C1ColumnCollection.IndexOf Method
Returns the index of the specified C1Column derived column object from the C1ColumnCollection.
126 C1.Web.C1WebGrid Namespace


[Visual Basic]
Public Function IndexOf( _
ByVal col As C1Column _
) As Integer

[C#]
public int IndexOf(
C1Column col
);

[Delphi]
public function IndexOf(
col: C1Column
): Int32;
Parameters
col
The C1Column derived column object to search for in the C1ColumnCollection.
Return Value
The index position of the specified C1Column derived column object in the C1ColumnCollection. The
default value is -1, which indicates that the specified C1Column derived object is not found.
See Also
C1ColumnCollection Class | C1ColumnCollection Members | C1.Web.C1WebGrid Namespace
C1ColumnCollection.Insert Method
Inserts the specified C1Column derived column object into the collection at specified index.

[Visual Basic]
Overridable Public Sub Insert( _
ByVal index As Integer, _
ByVal col As C1Column _
)

[C#]
virtual public void Insert(
int index,
C1Column col
);

[Delphi]
public procedure Insert(
index: Int32;
col: C1Column
); virtual;
Parameters
index
The zero-based index at which col should be inserted

C1ColumnCollection.Remove Method 127

col
The C1Column derived column object to insert.
See Also
C1ColumnCollection Class | C1ColumnCollection Members | C1.Web.C1WebGrid Namespace
C1ColumnCollection.Remove Method
Removes the specified C1Column derived column object from the C1ColumnCollection.

[Visual Basic]
Overridable Public Sub Remove( _
ByVal col As C1Column _
)

[C#]
virtual public void Remove(
C1Column col
);

[Delphi]
public procedure Remove(
col: C1Column
); virtual;
Parameters
col
The C1Column derived column object to remove.
See Also
C1ColumnCollection Class | C1ColumnCollection Members | C1.Web.C1WebGrid Namespace
C1CommandEventArgs Class
Provides data for the command events such as ItemCommand of the C1WebGrid.
For a list of all members of this type, see C1CommandEventArgs Members.
System.Object
System.EventArgs
System.Web.UI.WebControls.CommandEventArgs
C1.Web.C1WebGrid.C1CommandEventArgs
C1.Web.C1WebGrid.C1CancelCommandEventArgs

[Visual Basic]
Public Class C1CommandEventArgs
Inherits CommandEventArgs

[C#]
public class C1CommandEventArgs : CommandEventArgs


128 C1.Web.C1WebGrid Namespace

[Delphi]
type C1CommandEventArgs = class (CommandEventArgs);
Namespace: C1.Web.C1WebGrid
Assembly: C1.Web.C1WebGrid.2 (in C1.Web.C1WebGrid.2.dll)
See Also
C1CommandEventArgs Members | C1.Web.C1WebGrid Namespace
C1CommandEventArgs Members
C1CommandEventArgs overview
Public Constructors
C1CommandEventArgs Constructor Constructor. Initializes a new instance of the
C1CommandEventArgs class.
Public Properties
CommandSource Gets the source of the command.
Item Gets the C1GridItem item that contains the
command source.
See Also
C1CommandEventArgs Class | C1.Web.C1WebGrid Namespace
C1CommandEventArgs Constructor
Constructor. Initializes a new instance of the C1CommandEventArgs class.

[Visual Basic]
Public Function New( _
ByVal item As C1GridItem, _
ByVal commandSource As Object, _
ByVal originalArgs As CommandEventArgs _
)

[C#]
public C1CommandEventArgs(
C1GridItem item,
object commandSource,
CommandEventArgs originalArgs
);

[Delphi]
public constructor Create(
item: C1GridItem;
commandSource: Object;
originalArgs: CommandEventArgs
);
Parameters
item
A C1GridItem that contains the command source.
C1CommandEventArgs Properties 129

commandSource
The source of the command.
originalArgs
A System.Web.UI.WebControls.CommandEventArgs that contains the event data.
See Also
C1CommandEventArgs Class | C1CommandEventArgs Members | C1.Web.C1WebGrid Namespace
C1CommandEventArgs Properties
The properties of the C1CommandEventArgs class are listed here. For a complete list of
C1CommandEventArgs class members, see the C1CommandEventArgs Members topic.
Public Properties
CommandSource Gets the source of the command.
Item Gets the C1GridItem item that contains the
command source.
See Also
C1CommandEventArgs Class | C1.Web.C1WebGrid Namespace
C1CommandEventArgs.CommandSource Property
Gets the source of the command.

[Visual Basic]
Public ReadOnly Property CommandSource As Object

[C#]
public object CommandSource {get;}

[Delphi]
public property CommandSource: Object read get_CommandSource;
See Also
C1CommandEventArgs Class | C1CommandEventArgs Members | C1.Web.C1WebGrid Namespace
C1CommandEventArgs.Item Property
Gets the C1GridItem item that contains the command source.

[Visual Basic]
Public ReadOnly Property Item As C1GridItem

[C#]
public C1GridItem Item {get;}

[Delphi]
public property Item: C1GridItem read get_Item;
See Also
C1CommandEventArgs Class | C1CommandEventArgs Members | C1.Web.C1WebGrid Namespace
130 C1.Web.C1WebGrid Namespace

C1CommandEventHandler Delegate
Represents the the method that will handle the ItemCommand event of the C1WebGrid.

[Visual Basic]
Public Delegate Sub C1CommandEventHandler( _
ByVal sender As Object, _
ByVal e As C1CommandEventArgs _
)

[C#]
public delegate void C1CommandEventHandler(
object sender,
C1CommandEventArgs e
);

[Delphi]
type C1CommandEventHandler = procedure (
sender: Object;
e: C1CommandEventArgs
) of object;
Parameters
sender
The source of the event.
e
Namespace: C1.Web.C1WebGrid
Assembly: C1.Web.C1WebGrid.2 (in C1.Web.C1WebGrid.2.dll)
See Also
C1.Web.C1WebGrid Namespace
C1DeletedCommandEventArgs Class
Provides data for the DeletedCommand event of the C1WebGrid control.
For a list of all members of this type, see C1DeletedCommandEventArgs Members.
System.Object
System.EventArgs
C1.Web.C1WebGrid.C1DeletedCommandEventArgs

[Visual Basic]
Public Class C1DeletedCommandEventArgs
Inherits EventArgs

[C#]
public class C1DeletedCommandEventArgs : EventArgs

[Delphi]
type C1DeletedCommandEventArgs = class (EventArgs);
C1DeletedCommandEventArgs Members 131

Namespace: C1.Web.C1WebGrid
Assembly: C1.Web.C1WebGrid.2 (in C1.Web.C1WebGrid.2.dll)
See Also
C1DeletedCommandEventArgs Members | C1.Web.C1WebGrid Namespace
C1DeletedCommandEventArgs Members
C1DeletedCommandEventArgs overview
Public Constructors
C1DeletedCommandEventArgs Constructor Constructor. Initializes a new instance of the
C1DeletedCommandEventArgs class.
Public Properties
AffectedRows Gets the number of rows affected by the delete
operation.
Exception Gets the exception that was raised during the delete
operation.
ExceptionHandled Gets or sets a value indicating whether an exception
that was raised during the delete operation was
handled in the event handler.
Keys Gets an ordered dictionary of key field name/value
pairs for the deleted record.
Values Gets a dictionary of the non-key field name/value
pairs for the deleted record.
See Also
C1DeletedCommandEventArgs Class | C1.Web.C1WebGrid Namespace
C1DeletedCommandEventArgs Constructor
Constructor. Initializes a new instance of the C1DeletedCommandEventArgs class.

[Visual Basic]
Public Function New( _
ByVal affected As Integer, _
ByVal excpt As Exception, _
ByVal keys As IOrderedDictionary, _
ByVal values As IOrderedDictionary _
)

[C#]
public C1DeletedCommandEventArgs(
int affected,
Exception excpt,
IOrderedDictionary keys,
IOrderedDictionary values
);



132 C1.Web.C1WebGrid Namespace

[Delphi]
public constructor Create(
affected: Int32;
excpt: Exception;
keys: IOrderedDictionary;
values: IOrderedDictionary
);
Parameters
affected
Number of rows affected by the delete operation.
excpt
Exception that was raised during the delete operation.
keys
An ordered dictionary of key field name/value pairs for the deleted record.
values
A dictionary of the non-key field name/value pairs for the deleted record.
See Also
C1DeletedCommandEventArgs Class | C1DeletedCommandEventArgs Members | C1.Web.C1WebGrid
Namespace
C1DeletedCommandEventArgs Properties
The properties of the C1DeletedCommandEventArgs class are listed here. For a complete list of
C1DeletedCommandEventArgs class members, see the C1DeletedCommandEventArgs Members topic.
Public Properties
AffectedRows Gets the number of rows affected by the delete
operation.
Exception Gets the exception that was raised during the delete
operation.
ExceptionHandled Gets or sets a value indicating whether an exception
that was raised during the delete operation was
handled in the event handler.
Keys Gets an ordered dictionary of key field name/value
pairs for the deleted record.
Values Gets a dictionary of the non-key field name/value
pairs for the deleted record.
See Also
C1DeletedCommandEventArgs Class | C1.Web.C1WebGrid Namespace
C1DeletedCommandEventArgs.AffectedRows Property
Gets the number of rows affected by the delete operation.

[Visual Basic]
Public ReadOnly Property AffectedRows As Integer

C1DeletedCommandEventArgs.Exception Property 133

[C#]
public int AffectedRows {get;}

[Delphi]
public property AffectedRows: Int32 read get_AffectedRows;
See Also
C1DeletedCommandEventArgs Class | C1DeletedCommandEventArgs Members | C1.Web.C1WebGrid
Namespace
C1DeletedCommandEventArgs.Exception Property
Gets the exception that was raised during the delete operation.

[Visual Basic]
Public ReadOnly Property Exception As Exception

[C#]
public Exception Exception {get;}

[Delphi]
public property Exception: Exception read get_Exception;
See Also
C1DeletedCommandEventArgs Class | C1DeletedCommandEventArgs Members | C1.Web.C1WebGrid
Namespace
C1DeletedCommandEventArgs.ExceptionHandled Property
Gets or sets a value indicating whether an exception that was raised during the delete operation was handled
in the event handler.

[Visual Basic]
Public Property ExceptionHandled As Boolean

[C#]
public bool ExceptionHandled {get;set;}

[Delphi]
public property ExceptionHandled: Boolean read get_ExceptionHandled write
set_ExceptionHandled;
See Also
C1DeletedCommandEventArgs Class | C1DeletedCommandEventArgs Members | C1.Web.C1WebGrid
Namespace
C1DeletedCommandEventArgs.Keys Property
Gets an ordered dictionary of key field name/value pairs for the deleted record.

[Visual Basic]
Public ReadOnly Property Keys As IOrderedDictionary

[C#]
public IOrderedDictionary Keys {get;}
134 C1.Web.C1WebGrid Namespace


[Delphi]
public property Keys: IOrderedDictionary read get_Keys;
See Also
C1DeletedCommandEventArgs Class | C1DeletedCommandEventArgs Members | C1.Web.C1WebGrid
Namespace
C1DeletedCommandEventArgs.Values Property
Gets a dictionary of the non-key field name/value pairs for the deleted record.

[Visual Basic]
Public ReadOnly Property Values As IOrderedDictionary

[C#]
public IOrderedDictionary Values {get;}

[Delphi]
public property Values: IOrderedDictionary read get_Values;
See Also
C1DeletedCommandEventArgs Class | C1DeletedCommandEventArgs Members | C1.Web.C1WebGrid
Namespace
C1DeletedCommandEventHandler Delegate
Represents the the method that will handle the DeletedCommand event of the C1WebGrid.

[Visual Basic]
Public Delegate Sub C1DeletedCommandEventHandler( _
ByVal sender As Object, _
ByVal e As C1DeletedCommandEventArgs _
)

[C#]
public delegate void C1DeletedCommandEventHandler(
object sender,
C1DeletedCommandEventArgs e
);

[Delphi]
type C1DeletedCommandEventHandler = procedure (
sender: Object;
e: C1DeletedCommandEventArgs
) of object;
Parameters
sender
The source of the event.
e
Namespace: C1.Web.C1WebGrid
C1DeletingCommandEventArgs Class 135

Assembly: C1.Web.C1WebGrid.2 (in C1.Web.C1WebGrid.2.dll)
See Also
C1.Web.C1WebGrid Namespace
C1DeletingCommandEventArgs Class
Provides data for the DeletingCommand event of the C1WebGrid control.
For a list of all members of this type, see C1DeletingCommandEventArgs Members.
System.Object
System.EventArgs
System.Web.UI.WebControls.CommandEventArgs
C1.Web.C1WebGrid.C1CommandEventArgs
C1.Web.C1WebGrid.C1CancelCommandEventArgs
C1.Web.C1WebGrid.C1DeletingCommandEventArgs

[Visual Basic]
Public Class C1DeletingCommandEventArgs
Inherits C1CancelCommandEventArgs

[C#]
public class C1DeletingCommandEventArgs : C1CancelCommandEventArgs

[Delphi]
type C1DeletingCommandEventArgs = class (C1CancelCommandEventArgs);
Namespace: C1.Web.C1WebGrid
Assembly: C1.Web.C1WebGrid.2 (in C1.Web.C1WebGrid.2.dll)
See Also
C1DeletingCommandEventArgs Members | C1.Web.C1WebGrid Namespace
C1DeletingCommandEventArgs Members
C1DeletingCommandEventArgs overview
Public Constructors
C1DeletingCommandEventArgs Constructor Constructor. Initializes a new instance of the
C1DeletingCommandEventArgs class.
Public Properties
Cancel (inherited from
C1CancelCommandEventArgs)
Gets or sets a value indicating whether the event
should be canceled.
CommandSource (inherited from
C1CommandEventArgs)
Gets the source of the command.
Item (inherited from C1CommandEventArgs) Gets the C1GridItem item that contains the
command source.
136 C1.Web.C1WebGrid Namespace

Keys Gets a dictionary of field name/value pairs that
represent the primary key of the item to delete.
Values Gets a dictionary of the non-key field name/value
pairs in the item to delete.
See Also
C1DeletingCommandEventArgs Class | C1.Web.C1WebGrid Namespace
C1DeletingCommandEventArgs Constructor
Overload List
Constructor. Initializes a new instance of the C1DeletingCommandEventArgs class.
[Visual Basic] Public Function New(C1CommandEventArgs)
[C#] public C1DeletingCommandEventArgs(C1CommandEventArgs);
[Delphi] public constructor Create(C1CommandEventArgs); overload;
Constructor. Initializes a new instance of the C1DeletingCommandEventArgs class.
[Visual Basic] Public Function New(C1GridItem, Object, CommandEventArgs)
[C#] public C1DeletingCommandEventArgs(C1GridItem, object, CommandEventArgs);
[Delphi] public constructor Create(C1GridItem; Object; CommandEventArgs); overload;
See Also
C1DeletingCommandEventArgs Class | C1DeletingCommandEventArgs Members | C1.Web.C1WebGrid
Namespace
C1DeletingCommandEventArgs Constructor (C1CommandEventArgs)
Constructor. Initializes a new instance of the C1DeletingCommandEventArgs class.

[Visual Basic]
Public Function New( _
ByVal e As C1CommandEventArgs _
)

[C#]
public C1DeletingCommandEventArgs(
C1CommandEventArgs e
);

[Delphi]
public constructor Create(
e: C1CommandEventArgs
); overload;
Parameters
e
A C1CommandEventArgs that contains the event data.


C1DeletingCommandEventArgs Constructor (C1GridItem, Object, CommandEventArgs) 137

See Also
C1DeletingCommandEventArgs Class | C1DeletingCommandEventArgs Members | C1.Web.C1WebGrid
Namespace | C1DeletingCommandEventArgs Constructor Overload List
C1DeletingCommandEventArgs Constructor (C1GridItem, Object,
CommandEventArgs)
Constructor. Initializes a new instance of the C1DeletingCommandEventArgs class.

[Visual Basic]
Public Function New( _
ByVal item As C1GridItem, _
ByVal commandSource As Object, _
ByVal originalArgs As CommandEventArgs _
)

[C#]
public C1DeletingCommandEventArgs(
C1GridItem item,
object commandSource,
CommandEventArgs originalArgs
);

[Delphi]
public constructor Create(
item: C1GridItem;
commandSource: Object;
originalArgs: CommandEventArgs
); overload;
Parameters
item
A C1GridItem that contains the command source.
commandSource
The source of the command.
originalArgs
A System.Web.UI.WebControls.CommandEventArgs that contains the event data.
See Also
C1DeletingCommandEventArgs Class | C1DeletingCommandEventArgs Members | C1.Web.C1WebGrid
Namespace | C1DeletingCommandEventArgs Constructor Overload List
C1DeletingCommandEventArgs Properties
The properties of the C1DeletingCommandEventArgs class are listed here. For a complete list of
C1DeletingCommandEventArgs class members, see the C1DeletingCommandEventArgs Members topic.
Public Properties
Cancel (inherited from
C1CancelCommandEventArgs)
Gets or sets a value indicating whether the event
should be canceled.
138 C1.Web.C1WebGrid Namespace

CommandSource (inherited from
C1CommandEventArgs)
Gets the source of the command.
Item (inherited from C1CommandEventArgs) Gets the C1GridItem item that contains the
command source.
Keys Gets a dictionary of field name/value pairs that
represent the primary key of the item to delete.
Values Gets a dictionary of the non-key field name/value
pairs in the item to delete.
See Also
C1DeletingCommandEventArgs Class | C1.Web.C1WebGrid Namespace
C1DeletingCommandEventArgs.Keys Property
Gets a dictionary of field name/value pairs that represent the primary key of the item to delete.

[Visual Basic]
Public ReadOnly Property Keys As IOrderedDictionary

[C#]
public IOrderedDictionary Keys {get;}

[Delphi]
public property Keys: IOrderedDictionary read get_Keys;
See Also
C1DeletingCommandEventArgs Class | C1DeletingCommandEventArgs Members | C1.Web.C1WebGrid
Namespace
C1DeletingCommandEventArgs.Values Property
Gets a dictionary of the non-key field name/value pairs in the item to delete.

[Visual Basic]
Public ReadOnly Property Values As IOrderedDictionary

[C#]
public IOrderedDictionary Values {get;}

[Delphi]
public property Values: IOrderedDictionary read get_Values;
See Also
C1DeletingCommandEventArgs Class | C1DeletingCommandEventArgs Members | C1.Web.C1WebGrid
Namespace
C1DeletingCommandEventHandler Delegate
Represents the the method that will handle the DeletingCommand event of the C1WebGrid.



C1EditCommandColumn Class 139

[Visual Basic]
Public Delegate Sub C1DeletingCommandEventHandler( _
ByVal sender As Object, _
ByVal e As C1DeletingCommandEventArgs _
)

[C#]
public delegate void C1DeletingCommandEventHandler(
object sender,
C1DeletingCommandEventArgs e
);

[Delphi]
type C1DeletingCommandEventHandler = procedure (
sender: Object;
e: C1DeletingCommandEventArgs
) of object;
Parameters
sender
The source of the event.
e
Namespace: C1.Web.C1WebGrid
Assembly: C1.Web.C1WebGrid.2 (in C1.Web.C1WebGrid.2.dll)
See Also
C1.Web.C1WebGrid Namespace
C1EditCommandColumn Class
A C1EditCommandColumn displays a column containing editing commands for each item. Inherits from
C1Column.
For a list of all members of this type, see C1EditCommandColumn Members.
System.Object
C1.Web.C1WebGrid.C1Column
C1.Web.C1WebGrid.C1EditCommandColumn

[Visual Basic]
Public Class C1EditCommandColumn
Inherits C1Column

[C#]
public class C1EditCommandColumn : C1Column

[Delphi]
type C1EditCommandColumn = class (C1Column);
Namespace: C1.Web.C1WebGrid
Assembly: C1.Web.C1WebGrid.2 (in C1.Web.C1WebGrid.2.dll)
140 C1.Web.C1WebGrid Namespace

See Also
C1EditCommandColumn Members | C1.Web.C1WebGrid Namespace
C1EditCommandColumn Members
C1EditCommandColumn overview
Public Constructors
C1EditCommandColumn Constructor Constructor. Initializes a new instance of the
C1EditCommandColumn class.
Public Properties
Aggregate (inherited from C1Column) Causes the grid to calculate aggregate values to the
column and place them in the group header and footer
rows. If the grid does not contain any groups, setting
the Aggregate property has no effect.
AllowGroup (inherited from C1Column) Used to disallow the client-side grouping of a column
in a grouped grid.
AllowMove (inherited from C1Column) Determines whether column can be moved on the
client.
AllowSizing (inherited from C1Column) Determines whether columns can be sized on the
client.
ButtonType Sets or returns the type of the button in the column.
CancelText Sets or returns the text to display for the Cancel
button.
EditText Sets or returns the text to display for the Edit button.
Fixed (inherited from C1Column) Determines whether a column is fixed to the left of the
grid when it is scrolled horizontally.
FooterStyle (inherited from C1Column) Gets the style properties of the column footer.
FooterText (inherited from C1Column) Gets or sets the text of the footer.
GroupInfo (inherited from C1Column) Gets a GroupInfo object that determines whether a
column should be grouped on and how the group
header and footer rows should be formatted and
displayed.
HeaderImageUrl (inherited from C1Column) Gets or sets the location of the image to be used in the
header.
HeaderStyle (inherited from C1Column) Gets the style properties of the column header.
HeaderText (inherited from C1Column) Gets or sets the text of the header.
ItemStyle (inherited from C1Column) Gets the style properties of the item.
RowMerge (inherited from C1Column) Determines whether rows are merged.
SortDirection (inherited from C1Column) Gets the direction of the sort.
SortExpression (inherited from C1Column) Gets or sets the name of the field or expression to pass
to the OnSortCommand method when a column is
selected for sorting.
C1EditCommandColumn Constructor 141

UpdateText Sets or returns the text to display for the Update
button.
Visible (inherited from C1Column) Determines whether the column is visible within the
displayed area of the C1WebGrid component.
Public Methods
ToString Overriden. Returns a string that represents the current
object
See Also
C1EditCommandColumn Class | C1.Web.C1WebGrid Namespace
C1EditCommandColumn Constructor
Constructor. Initializes a new instance of the C1EditCommandColumn class.

[Visual Basic]
Public Function New()

[C#]
public C1EditCommandColumn()

[Delphi]
public constructor Create(); overload;
See Also
C1EditCommandColumn Class | C1EditCommandColumn Members | C1.Web.C1WebGrid Namespace
C1EditCommandColumn Properties
The properties of the C1EditCommandColumn class are listed here. For a complete list of
C1EditCommandColumn class members, see the C1EditCommandColumn Members topic.
Public Properties
Aggregate (inherited from C1Column) Causes the grid to calculate aggregate values to the
column and place them in the group header and footer
rows. If the grid does not contain any groups, setting
the Aggregate property has no effect.
AllowGroup (inherited from C1Column) Used to disallow the client-side grouping of a column
in a grouped grid.
AllowMove (inherited from C1Column) Determines whether column can be moved on the
client.
AllowSizing (inherited from C1Column) Determines whether columns can be sized on the
client.
ButtonType Sets or returns the type of the button in the column.
CancelText Sets or returns the text to display for the Cancel
button.
EditText Sets or returns the text to display for the Edit button.
142 C1.Web.C1WebGrid Namespace

Fixed (inherited from C1Column) Determines whether a column is fixed to the left of the
grid when it is scrolled horizontally.
FooterStyle (inherited from C1Column) Gets the style properties of the column footer.
FooterText (inherited from C1Column) Gets or sets the text of the footer.
GroupInfo (inherited from C1Column) Gets a GroupInfo object that determines whether a
column should be grouped on and how the group
header and footer rows should be formatted and
displayed.
HeaderImageUrl (inherited from C1Column) Gets or sets the location of the image to be used in the
header.
HeaderStyle (inherited from C1Column) Gets the style properties of the column header.
HeaderText (inherited from C1Column) Gets or sets the text of the header.
ItemStyle (inherited from C1Column) Gets the style properties of the item.
RowMerge (inherited from C1Column) Determines whether rows are merged.
SortDirection (inherited from C1Column) Gets the direction of the sort.
SortExpression (inherited from C1Column) Gets or sets the name of the field or expression to pass
to the OnSortCommand method when a column is
selected for sorting.
UpdateText Sets or returns the text to display for the Update
button.
Visible (inherited from C1Column) Determines whether the column is visible within the
displayed area of the C1WebGrid component.
See Also
C1EditCommandColumn Class | C1.Web.C1WebGrid Namespace
C1EditCommandColumn.ButtonType Property
Sets or returns the type of the button in the column.

[Visual Basic]
Overridable Public Property ButtonType As ButtonColumnType

[C#]
virtual public ButtonColumnType ButtonType {get;set;}

[Delphi]
public property ButtonType: ButtonColumnType read get_ButtonType write
set_ButtonType;
Property Value
One of the System.Web.UI.WebControls.ButtonColumnType values. Default is
ButtonColumnType.LinkButton.
Remarks
This property is used to specify whether the buttons in the column display as push buttons or hyperlinks.

C1EditCommandColumn.CancelText Property 143

See Also
C1EditCommandColumn Class | C1EditCommandColumn Members | C1.Web.C1WebGrid Namespace
C1EditCommandColumn.CancelText Property
Sets or returns the text to display for the Cancel button.

[Visual Basic]
Overridable Public Property CancelText As String

[C#]
virtual public string CancelText {get;set;}

[Delphi]
public property CancelText: String read get_CancelText write
set_CancelText;
Remarks
You must provide a value for the CancelText property. Otherwise, the Cancel command button will not
appear in the C1EditCommandColumn.
See Also
C1EditCommandColumn Class | C1EditCommandColumn Members | C1.Web.C1WebGrid Namespace
C1EditCommandColumn.EditText Property
Sets or returns the text to display for the Edit button.

[Visual Basic]
Overridable Public Property EditText As String

[C#]
virtual public string EditText {get;set;}

[Delphi]
public property EditText: String read get_EditText write set_EditText;
Remarks
You must provide a value for the EditText property. Otherwise, the Edit command button will not appear in
the C1EditCommandColumn.
See Also
C1EditCommandColumn Class | C1EditCommandColumn Members | C1.Web.C1WebGrid Namespace
C1EditCommandColumn.UpdateText Property
Sets or returns the text to display for the Update button.

[Visual Basic]
Overridable Public Property UpdateText As String

[C#]
virtual public string UpdateText {get;set;}

144 C1.Web.C1WebGrid Namespace

[Delphi]
public property UpdateText: String read get_UpdateText write
set_UpdateText;
Remarks
You must provide a value for the UpdateText property. Otherwise, the Update command button will not
appear in the C1EditCommandColumn.
See Also
C1EditCommandColumn Class | C1EditCommandColumn Members | C1.Web.C1WebGrid Namespace
C1EditCommandColumn Methods
The methods of the C1EditCommandColumn class are listed here. For a complete list of
C1EditCommandColumn class members, see the C1EditCommandColumn Members topic.
Public Methods
ToString Overriden. Returns a string that represents the current
object
See Also
C1EditCommandColumn Class | C1.Web.C1WebGrid Namespace
C1EditCommandColumn.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;
See Also
C1EditCommandColumn Class | C1EditCommandColumn Members | C1.Web.C1WebGrid Namespace
C1GridItem Class
Represents an item (row) in the C1WebGrid control.
For a list of all members of this type, see C1GridItem Members.
System.Object
System.Web.UI.Control
System.Web.UI.WebControls.WebControl
System.Web.UI.WebControls.TableRow
C1.Web.C1WebGrid.C1GridItem



C1GridItem Members 145

[Visual Basic]
Public Class C1GridItem
Inherits TableRow
Implements IDataItemContainer

[C#]
public class C1GridItem : TableRow , IDataItemContainer

[Delphi]
type C1GridItem = class (TableRow, IDataItemContainer);
Namespace: C1.Web.C1WebGrid
Assembly: C1.Web.C1WebGrid.2 (in C1.Web.C1WebGrid.2.dll)
See Also
C1GridItem Members | C1.Web.C1WebGrid Namespace
C1GridItem Members
C1GridItem overview
Public Constructors
C1GridItem Constructor Constructor. Initializes a new instance of the
C1GridItem class.
Public Properties
AccessKey (inherited from WebControl) Keyboard shortcut used by the control.
AppRelativeTemplateSourceDirectory (inherited
from Control)
The virtual directory of the Page or UserControl that
contains this control.
Attributes (inherited from WebControl) Tag attributes of the control.
BackColor (inherited from WebControl) Color of the background of the control.
BorderColor (inherited from WebControl) Color of the border around the control.
BorderStyle (inherited from WebControl) Style of the border around the control.
BorderWidth (inherited from WebControl) Width of the border around the control.
Cells (inherited from TableRow) The collection of cells within the table row.
ClientID (inherited from Control) The ID of the control that is rendered for the client.
Controls (inherited from Control) The collection of child controls owned by the control.
ControlStyle (inherited from WebControl) The style associated with the control.
ControlStyleCreated (inherited from WebControl) Whether the style associated with the control has been
created.
CssClass (inherited from WebControl) CSS Class name applied to the control.
DataItem Sets or returns a data item represented by the
C1GridItem object.
Enabled (inherited from WebControl) Enabled state of the control.
EnableViewState (inherited from Control) Whether the control automatically saves its state for
use in round-trips.
146 C1.Web.C1WebGrid Namespace

Fixed Determines whether a row is fixed to the top of the
grid when it is scrolled vertically.
Font (inherited from WebControl) The font used for text within the control.
ForeColor (inherited from WebControl) Color of the text within the control.
HorizontalAlign (inherited from TableRow) The horizontal alignment of the cell content.
ID (inherited from Control) Programmatic name of the control.
ItemIndex Returns the index of a C1GridItem object from the
C1ItemCollection.
ItemType Returns the type of an item represented by the
C1GridItem object.
NamingContainer (inherited from Control) The containing control or page within which ID is
unique.
Page (inherited from Control) The page containing the control.
Parent (inherited from Control) The control containing this control.
Site (inherited from Control) Site of the control.
Style (inherited from WebControl) Low-level access to control styles.
TabIndex (inherited from WebControl) The tab order of the control.
TableSection (inherited from TableRow) The tablesection for the table row.
TemplateControl (inherited from Control) The TemplateControl that hosts this control.
TemplateSourceDirectory (inherited from Control) The virtual directory of the Page or UserControl that
contains this control.
ToolTip (inherited from WebControl) The tooltip displayed when the mouse is over the
control.
UniqueID (inherited from Control) The unique ID of the control within the page.
VerticalAlign (inherited from TableRow) The vertical alignment of the cell content.
Visible (inherited from Control) Indicates whether the control is visible and rendered.
Width (inherited from WebControl) The width of the control.
Public Events
DataBinding (inherited from Control) Fires when the control's data binding expressions are
to be evaluated.
Disposed (inherited from Control) Fires when the control has been disposed.
Init (inherited from Control) Fires when the page has been initialized.
Load (inherited from Control) Fires when the page has been loaded.
PreRender (inherited from Control) Fires before the page is rendered.
Unload (inherited from Control) Fires when the page is unloaded.
Protected Properties
ViewState (inherited from Control) Current viewstate of the control.

C1GridItem Constructor 147

See Also
C1GridItem Class | C1.Web.C1WebGrid Namespace
C1GridItem Constructor
Constructor. Initializes a new instance of the C1GridItem class.

[Visual Basic]
Public Function New( _
ByVal itemIndex As Integer, _
ByVal itemType As C1ListItemType _
)

[C#]
public C1GridItem(
int itemIndex,
C1ListItemType itemType
);

[Delphi]
public constructor Create(
itemIndex: Int32;
itemType: C1ListItemType
); overload;
Parameters
itemIndex
The index of the item in the C1WebGrid control from the Items collection.
itemType
One of the C1ListItemType values.
See Also
C1GridItem Class | C1GridItem Members | C1.Web.C1WebGrid Namespace
C1GridItem Properties
The properties of the C1GridItem class are listed here. For a complete list of C1GridItem class members, see
the C1GridItem Members topic.
Public Properties
AccessKey (inherited from WebControl) Keyboard shortcut used by the control.
AppRelativeTemplateSourceDirectory (inherited
from Control)
The virtual directory of the Page or UserControl that
contains this control.
Attributes (inherited from WebControl) Tag attributes of the control.
BackColor (inherited from WebControl) Color of the background of the control.
BorderColor (inherited from WebControl) Color of the border around the control.
BorderStyle (inherited from WebControl) Style of the border around the control.
BorderWidth (inherited from WebControl) Width of the border around the control.
148 C1.Web.C1WebGrid Namespace

Cells (inherited from TableRow) The collection of cells within the table row.
ClientID (inherited from Control) The ID of the control that is rendered for the client.
Controls (inherited from Control) The collection of child controls owned by the control.
ControlStyle (inherited from WebControl) The style associated with the control.
ControlStyleCreated (inherited from WebControl) Whether the style associated with the control has been
created.
CssClass (inherited from WebControl) CSS Class name applied to the control.
DataItem Sets or returns a data item represented by the
C1GridItem object.
Enabled (inherited from WebControl) Enabled state of the control.
EnableViewState (inherited from Control) Whether the control automatically saves its state for
use in round-trips.
Fixed Determines whether a row is fixed to the top of the
grid when it is scrolled vertically.
Font (inherited from WebControl) The font used for text within the control.
ForeColor (inherited from WebControl) Color of the text within the control.
HorizontalAlign (inherited from TableRow) The horizontal alignment of the cell content.
ID (inherited from Control) Programmatic name of the control.
ItemIndex Returns the index of a C1GridItem object from the
C1ItemCollection.
ItemType Returns the type of an item represented by the
C1GridItem object.
NamingContainer (inherited from Control) The containing control or page within which ID is
unique.
Page (inherited from Control) The page containing the control.
Parent (inherited from Control) The control containing this control.
Site (inherited from Control) Site of the control.
Style (inherited from WebControl) Low-level access to control styles.
TabIndex (inherited from WebControl) The tab order of the control.
TableSection (inherited from TableRow) The tablesection for the table row.
TemplateControl (inherited from Control) The TemplateControl that hosts this control.
TemplateSourceDirectory (inherited from Control) The virtual directory of the Page or UserControl that
contains this control.
ToolTip (inherited from WebControl) The tooltip displayed when the mouse is over the
control.
UniqueID (inherited from Control) The unique ID of the control within the page.
VerticalAlign (inherited from TableRow) The vertical alignment of the cell content.
Visible (inherited from Control) Indicates whether the control is visible and rendered.
Width (inherited from WebControl) The width of the control.
C1GridItem.DataItem Property 149

Protected Properties
ViewState (inherited from Control) Current viewstate of the control.
See Also
C1GridItem Class | C1.Web.C1WebGrid Namespace
C1GridItem.DataItem Property
Sets or returns a data item represented by the C1GridItem object.

[Visual Basic]
Overridable Public Property DataItem As Object Implements
IDataItemContainer.DataItem

[C#]
virtual public object DataItem {get;set;}

[Delphi]
public property DataItem: Object read get_DataItem write set_DataItem;
Implements
IDataItemContainer.DataItem
Remarks
This property only applies to data items in the C1WebGrid component. The ItemType property must be set to
C1ListItemType.Item, C1ListItemType.AlternatingItem, C1ListItemType.SelectedItem, or
C1ListItemType.EditItem.
See Also
C1GridItem Class | C1GridItem Members | C1.Web.C1WebGrid Namespace
C1GridItem.Fixed Property
Determines whether a row is fixed to the top of the grid when it is scrolled vertically.

[Visual Basic]
Public Property Fixed As Boolean

[C#]
public bool Fixed {get;set;}

[Delphi]
public property Fixed: Boolean read get_Fixed write set_Fixed;
Property Value
The default value of this property is False.
Remarks
For a scrollable grid, the C1ListItemType enumeration's Header constant will have a default value of True.
This property can be set in either theItemCreated or ItemDataBound event.
When the grid is in grouping mode, the entire group that contains a fixed row will be moved to the top of the
grid.

150 C1.Web.C1WebGrid Namespace

See Also
C1GridItem Class | C1GridItem Members | C1.Web.C1WebGrid Namespace
C1GridItem.ItemIndex Property
Returns the index of a C1GridItem object from the C1ItemCollection.

[Visual Basic]
Overridable Public ReadOnly Property ItemIndex As Integer

[C#]
virtual public int ItemIndex {get;}

[Delphi]
public property ItemIndex: Int32 read get_ItemIndex;
See Also
C1GridItem Class | C1GridItem Members | C1.Web.C1WebGrid Namespace
C1GridItem.ItemType Property
Returns the type of an item represented by the C1GridItem object.

[Visual Basic]
Overridable Public ReadOnly Property ItemType As C1ListItemType

[C#]
virtual public C1ListItemType ItemType {get;}

[Delphi]
public property ItemType: C1ListItemType read get_ItemType;
See Also
C1GridItem Class | C1GridItem Members | C1.Web.C1WebGrid Namespace
C1GridItem Events
The events of the C1GridItem class are listed here. For a complete list of C1GridItem class members, see the
C1GridItem Members topic.
Public Events
DataBinding (inherited from Control) Fires when the control's data binding expressions are
to be evaluated.
Disposed (inherited from Control) Fires when the control has been disposed.
Init (inherited from Control) Fires when the page has been initialized.
Load (inherited from Control) Fires when the page has been loaded.
PreRender (inherited from Control) Fires before the page is rendered.
Unload (inherited from Control) Fires when the page is unloaded.
See Also
C1GridItem Class | C1.Web.C1WebGrid Namespace
C1GroupAggregateEventHandler Delegate 151

C1GroupAggregateEventHandler Delegate
Represents the method that will handle the GroupAggregate event of the C1WebGrid

[Visual Basic]
Public Delegate Sub C1GroupAggregateEventHandler( _
ByVal sender As Object, _
ByVal e As C1GroupTextEventArgs _
)

[C#]
public delegate void C1GroupAggregateEventHandler(
object sender,
C1GroupTextEventArgs e
);

[Delphi]
type C1GroupAggregateEventHandler = procedure (
sender: Object;
e: C1GroupTextEventArgs
) of object;
Parameters
sender
The source of the event.
e
Namespace: C1.Web.C1WebGrid
Assembly: C1.Web.C1WebGrid.2 (in C1.Web.C1WebGrid.2.dll)
Remarks
Raised when Aggregate has been set to AggregateEnum.Custom. This allows the customization of aggregate
cell contents for text displayed in the group header or footer.
See Also
C1.Web.C1WebGrid Namespace
C1GroupColMovedEventArgs Class
Provides data for the GroupColumnMoved event of the C1WebGrid.
For a list of all members of this type, see C1GroupColMovedEventArgs Members.
System.Object
System.EventArgs
C1.Web.C1WebGrid.C1GroupColMovedEventArgs

[Visual Basic]
Public Class C1GroupColMovedEventArgs
Inherits EventArgs

152 C1.Web.C1WebGrid Namespace

[C#]
public class C1GroupColMovedEventArgs : EventArgs

[Delphi]
type C1GroupColMovedEventArgs = class (EventArgs);
Namespace: C1.Web.C1WebGrid
Assembly: C1.Web.C1WebGrid.2 (in C1.Web.C1WebGrid.2.dll)
See Also
C1GroupColMovedEventArgs Members | C1.Web.C1WebGrid Namespace
C1GroupColMovedEventArgs Members
C1GroupColMovedEventArgs overview
Public Constructors
C1GroupColMovedEventArgs Constructor Constructor. Initializes a new instance of the
C1GroupColMovedEventArgs class.
Public Fields
Column The C1Column object being repositioned.
DestIndex Index of the new position within the Columns or
GroupedColumns collection. Which collection is
specified by the GroupMove member.
GroupMove One of the GroupMoveEnum values that specified
the action that generated the event.
See Also
C1GroupColMovedEventArgs Class | C1.Web.C1WebGrid Namespace
C1GroupColMovedEventArgs Constructor
Constructor. Initializes a new instance of the C1GroupColMovedEventArgs class.

[Visual Basic]
Public Function New( _
ByVal col As C1Column, _
ByVal dst As Integer, _
ByVal pos As GroupMoveEnum _
)

[C#]
public C1GroupColMovedEventArgs(
C1Column col,
int dst,
GroupMoveEnum pos
);





C1GroupColMovedEventArgs Fields 153

[Delphi]
public constructor Create(
col: C1Column;
dst: Int32;
pos: GroupMoveEnum
);
Parameters
col
The C1Column object being repositioned.
dst
Index of the new position within the Columns or GroupedColumns collection. Which collection is
specified by the GroupMove member.
pos
One of the GroupMoveEnum values that specified the action that generated the event.
See Also
C1GroupColMovedEventArgs Class | C1GroupColMovedEventArgs Members | C1.Web.C1WebGrid
Namespace
C1GroupColMovedEventArgs Fields
The fields of the C1GroupColMovedEventArgs class are listed here. For a complete list of
C1GroupColMovedEventArgs class members, see the C1GroupColMovedEventArgs Members topic.
Public Fields
Column The C1Column object being repositioned.
DestIndex Index of the new position within the Columns or
GroupedColumns collection. Which collection is
specified by the GroupMove member.
GroupMove One of the GroupMoveEnum values that specified
the action that generated the event.
See Also
C1GroupColMovedEventArgs Class | C1.Web.C1WebGrid Namespace
C1GroupColMovedEventArgs.Column Field
The C1Column object being repositioned.

[Visual Basic]
Public ReadOnly Column As C1Column

[C#]
public readonly C1Column Column

[Delphi]
public Column: C1Column;


154 C1.Web.C1WebGrid Namespace

See Also
C1GroupColMovedEventArgs Class | C1GroupColMovedEventArgs Members | C1.Web.C1WebGrid
Namespace
C1GroupColMovedEventArgs.DestIndex Field
Index of the new position within the Columns or GroupedColumns collection. Which collection is specified
by the GroupMove member.

[Visual Basic]
Public ReadOnly DestIndex As Integer

[C#]
public readonly int DestIndex

[Delphi]
public DestIndex: Int32;
See Also
C1GroupColMovedEventArgs Class | C1GroupColMovedEventArgs Members | C1.Web.C1WebGrid
Namespace
C1GroupColMovedEventArgs.GroupMove Field
One of the GroupMoveEnum values that specified the action that generated the event.

[Visual Basic]
Public ReadOnly GroupMove As GroupMoveEnum

[C#]
public readonly GroupMoveEnum GroupMove

[Delphi]
public GroupMove: GroupMoveEnum;
See Also
C1GroupColMovedEventArgs Class | C1GroupColMovedEventArgs Members | C1.Web.C1WebGrid
Namespace
C1GroupColMovedEventHandler Delegate
Represents the method that will handle the GroupColumnMoved event of the C1WebGrid.

[Visual Basic]
Public Delegate Sub C1GroupColMovedEventHandler( _
ByVal sender As Object, _
ByVal e As C1GroupColMovedEventArgs _
)





C1GroupColMovingEventArgs Class 155

[C#]
public delegate void C1GroupColMovedEventHandler(
object sender,
C1GroupColMovedEventArgs e
);

[Delphi]
type C1GroupColMovedEventHandler = procedure (
sender: Object;
e: C1GroupColMovedEventArgs
) of object;
Parameters
sender
The source of the event.
e
Namespace: C1.Web.C1WebGrid
Assembly: C1.Web.C1WebGrid.2 (in C1.Web.C1WebGrid.2.dll)
See Also
C1.Web.C1WebGrid Namespace
C1GroupColMovingEventArgs Class
Provides data for the GroupColumnMoving event of the C1WebGrid.
For a list of all members of this type, see C1GroupColMovingEventArgs Members.
System.Object
System.EventArgs
System.ComponentModel.CancelEventArgs
C1.Web.C1WebGrid.C1GroupColMovingEventArgs

[Visual Basic]
Public Class C1GroupColMovingEventArgs
Inherits CancelEventArgs

[C#]
public class C1GroupColMovingEventArgs : CancelEventArgs

[Delphi]
type C1GroupColMovingEventArgs = class (CancelEventArgs);
Namespace: C1.Web.C1WebGrid
Assembly: C1.Web.C1WebGrid.2 (in C1.Web.C1WebGrid.2.dll)
See Also
C1GroupColMovingEventArgs Members | C1.Web.C1WebGrid Namespace

156 C1.Web.C1WebGrid Namespace

C1GroupColMovingEventArgs Members
C1GroupColMovingEventArgs overview
Public Constructors
C1GroupColMovingEventArgs Constructor Constructor. Initializes a new instance of the
C1GroupColMovingEventArgs class.
Public Fields
Column The C1Column object being repositioned.
DestIndex Index of the new position within the Columns or
GroupedColumns collection. Which collection is
specified by the GroupMove member.
GroupMove One of the GroupMoveEnum values that specified
the action that generated the event.
See Also
C1GroupColMovingEventArgs Class | C1.Web.C1WebGrid Namespace
C1GroupColMovingEventArgs Constructor
Constructor. Initializes a new instance of the C1GroupColMovingEventArgs class.

[Visual Basic]
Public Function New( _
ByVal col As C1Column, _
ByVal dst As Integer, _
ByVal pos As GroupMoveEnum _
)

[C#]
public C1GroupColMovingEventArgs(
C1Column col,
int dst,
GroupMoveEnum pos
);

[Delphi]
public constructor Create(
col: C1Column;
dst: Int32;
pos: GroupMoveEnum
);
Parameters
col
The C1Column object being repositioned.
dst
Index of the new position within the Columns or GroupedColumns collection. Which collection is
specified by the GroupMove member.

C1GroupColMovingEventArgs Fields 157

pos
One of the GroupMoveEnum values that specified the action that generated the event.
See Also
C1GroupColMovingEventArgs Class | C1GroupColMovingEventArgs Members | C1.Web.C1WebGrid
Namespace
C1GroupColMovingEventArgs Fields
The fields of the C1GroupColMovingEventArgs class are listed here. For a complete list of
C1GroupColMovingEventArgs class members, see the C1GroupColMovingEventArgs Members topic.
Public Fields
Column The C1Column object being repositioned.
DestIndex Index of the new position within the Columns or
GroupedColumns collection. Which collection is
specified by the GroupMove member.
GroupMove One of the GroupMoveEnum values that specified
the action that generated the event.
See Also
C1GroupColMovingEventArgs Class | C1.Web.C1WebGrid Namespace
C1GroupColMovingEventArgs.Column Field
The C1Column object being repositioned.

[Visual Basic]
Public ReadOnly Column As C1Column

[C#]
public readonly C1Column Column

[Delphi]
public Column: C1Column;
See Also
C1GroupColMovingEventArgs Class | C1GroupColMovingEventArgs Members | C1.Web.C1WebGrid
Namespace
C1GroupColMovingEventArgs.DestIndex Field
Index of the new position within the Columns or GroupedColumns collection. Which collection is specified
by the GroupMove member.

[Visual Basic]
Public ReadOnly DestIndex As Integer

[C#]
public readonly int DestIndex

[Delphi]
public DestIndex: Int32;
158 C1.Web.C1WebGrid Namespace

See Also
C1GroupColMovingEventArgs Class | C1GroupColMovingEventArgs Members | C1.Web.C1WebGrid
Namespace
C1GroupColMovingEventArgs.GroupMove Field
One of the GroupMoveEnum values that specified the action that generated the event.

[Visual Basic]
Public ReadOnly GroupMove As GroupMoveEnum

[C#]
public readonly GroupMoveEnum GroupMove

[Delphi]
public GroupMove: GroupMoveEnum;
See Also
C1GroupColMovingEventArgs Class | C1GroupColMovingEventArgs Members | C1.Web.C1WebGrid
Namespace
C1GroupColMovingEventHandler Delegate
Represents the method that will handle the GroupColumnMoving event of the C1WebGrid.

[Visual Basic]
Public Delegate Sub C1GroupColMovingEventHandler( _
ByVal sender As Object, _
ByVal e As C1GroupColMovingEventArgs _
)

[C#]
public delegate void C1GroupColMovingEventHandler(
object sender,
C1GroupColMovingEventArgs e
);

[Delphi]
type C1GroupColMovingEventHandler = procedure (
sender: Object;
e: C1GroupColMovingEventArgs
) of object;
Parameters
sender
The source of the event.
e
Namespace: C1.Web.C1WebGrid
Assembly: C1.Web.C1WebGrid.2 (in C1.Web.C1WebGrid.2.dll)

C1GroupTextEventArgs Class 159

See Also
C1.Web.C1WebGrid Namespace
C1GroupTextEventArgs Class
Provides data for the GroupText and GroupAggregate events of the C1WebGrid.
For a list of all members of this type, see C1GroupTextEventArgs Members.
System.Object
System.EventArgs
C1.Web.C1WebGrid.C1GroupTextEventArgs

[Visual Basic]
Public Class C1GroupTextEventArgs
Inherits EventArgs

[C#]
public class C1GroupTextEventArgs : EventArgs

[Delphi]
type C1GroupTextEventArgs = class (EventArgs);
Namespace: C1.Web.C1WebGrid
Assembly: C1.Web.C1WebGrid.2 (in C1.Web.C1WebGrid.2.dll)
See Also
C1GroupTextEventArgs Members | C1.Web.C1WebGrid Namespace
C1GroupTextEventArgs Members
C1GroupTextEventArgs overview
Public Properties
Col Column that is being grouped.
EndItemIndex Last index in the Items collection for the data being
grouped.
GroupText This is the text that is being grouped.
ItemType Item that is being grouped, either
C1ListItemType.GroupHeader or
C1ListItemType.GroupFooter.
StartItemIndex First index in the Items collection for the data being
grouped.
Text This is the text that will be displayed in the grouped
Header or Footer.
See Also
C1GroupTextEventArgs Class | C1.Web.C1WebGrid Namespace
160 C1.Web.C1WebGrid Namespace

C1GroupTextEventArgs Properties
The properties of the C1GroupTextEventArgs class are listed here. For a complete list of
C1GroupTextEventArgs class members, see the C1GroupTextEventArgs Members topic.
Public Properties
Col Column that is being grouped.
EndItemIndex Last index in the Items collection for the data being
grouped.
GroupText This is the text that is being grouped.
ItemType Item that is being grouped, either
C1ListItemType.GroupHeader or
C1ListItemType.GroupFooter.
StartItemIndex First index in the Items collection for the data being
grouped.
Text This is the text that will be displayed in the grouped
Header or Footer.
See Also
C1GroupTextEventArgs Class | C1.Web.C1WebGrid Namespace
C1GroupTextEventArgs.Col Property
Column that is being grouped.

[Visual Basic]
Public ReadOnly Property Col As C1Column

[C#]
public C1Column Col {get;}

[Delphi]
public property Col: C1Column read get_Col;
See Also
C1GroupTextEventArgs Class | C1GroupTextEventArgs Members | C1.Web.C1WebGrid Namespace
C1GroupTextEventArgs.EndItemIndex Property
Last index in the Items collection for the data being grouped.

[Visual Basic]
Public ReadOnly Property EndItemIndex As Integer

[C#]
public int EndItemIndex {get;}

[Delphi]
public property EndItemIndex: Int32 read get_EndItemIndex;
See Also
C1GroupTextEventArgs Class | C1GroupTextEventArgs Members | C1.Web.C1WebGrid Namespace
C1GroupTextEventArgs.GroupText Property 161

C1GroupTextEventArgs.GroupText Property
This is the text that is being grouped.

[Visual Basic]
Public ReadOnly Property GroupText As String

[C#]
public string GroupText {get;}

[Delphi]
public property GroupText: String read get_GroupText;
See Also
C1GroupTextEventArgs Class | C1GroupTextEventArgs Members | C1.Web.C1WebGrid Namespace
C1GroupTextEventArgs.ItemType Property
Item that is being grouped, either C1ListItemType.GroupHeader or C1ListItemType.GroupFooter.

[Visual Basic]
Public ReadOnly Property ItemType As C1ListItemType

[C#]
public C1ListItemType ItemType {get;}

[Delphi]
public property ItemType: C1ListItemType read get_ItemType;
See Also
C1GroupTextEventArgs Class | C1GroupTextEventArgs Members | C1.Web.C1WebGrid Namespace
C1GroupTextEventArgs.StartItemIndex Property
First index in the Items collection for the data being grouped.

[Visual Basic]
Public ReadOnly Property StartItemIndex As Integer

[C#]
public int StartItemIndex {get;}

[Delphi]
public property StartItemIndex: Int32 read get_StartItemIndex;
See Also
C1GroupTextEventArgs Class | C1GroupTextEventArgs Members | C1.Web.C1WebGrid Namespace
C1GroupTextEventArgs.Text Property
This is the text that will be displayed in the grouped Header or Footer.

[Visual Basic]
Public Property Text As String
162 C1.Web.C1WebGrid Namespace


[C#]
public string Text {get;set;}

[Delphi]
public property Text: String read get_Text write set_Text;
See Also
C1GroupTextEventArgs Class | C1GroupTextEventArgs Members | C1.Web.C1WebGrid Namespace
C1GroupTextEventHandler Delegate
Represents the method that will handle the GroupText event of the C1WebGrid.

[Visual Basic]
Public Delegate Sub C1GroupTextEventHandler( _
ByVal sender As Object, _
ByVal e As C1GroupTextEventArgs _
)

[C#]
public delegate void C1GroupTextEventHandler(
object sender,
C1GroupTextEventArgs e
);

[Delphi]
type C1GroupTextEventHandler = procedure (
sender: Object;
e: C1GroupTextEventArgs
) of object;
Parameters
sender
The source of the event.
e
Namespace: C1.Web.C1WebGrid
Assembly: C1.Web.C1WebGrid.2 (in C1.Web.C1WebGrid.2.dll)
See Also
C1.Web.C1WebGrid Namespace
C1HyperLinkColumn Class
A C1HyperLinkColumn displays each item as a hyperlink. Inherits from C1Column.
For a list of all members of this type, see C1HyperLinkColumn Members.
System.Object
C1.Web.C1WebGrid.C1Column
C1.Web.C1WebGrid.C1HyperLinkColumn
C1HyperLinkColumn Members 163


[Visual Basic]
Public Class C1HyperLinkColumn
Inherits C1Column

[C#]
public class C1HyperLinkColumn : C1Column

[Delphi]
type C1HyperLinkColumn = class (C1Column);
Namespace: C1.Web.C1WebGrid
Assembly: C1.Web.C1WebGrid.2 (in C1.Web.C1WebGrid.2.dll)
See Also
C1HyperLinkColumn Members | C1.Web.C1WebGrid Namespace
C1HyperLinkColumn Members
C1HyperLinkColumn overview
Public Constructors
C1HyperLinkColumn Constructor Constructor. Initializes a new instance of the
C1HyperLinkColumn class.
Public Properties
Aggregate (inherited from C1Column) Causes the grid to calculate aggregate values to the
column and place them in the group header and footer
rows. If the grid does not contain any groups, setting
the Aggregate property has no effect.
AllowGroup (inherited from C1Column) Used to disallow the client-side grouping of a column
in a grouped grid.
AllowMove (inherited from C1Column) Determines whether column can be moved on the
client.
AllowSizing (inherited from C1Column) Determines whether columns can be sized on the
client.
DataNavigateUrlField Sets or returns the field from a data source to bind to
the URL of the hyperlinks in the
C1HyperLinkColumn.
DataNavigateUrlFormatString Sets or returns the display format for the URL of the
hyperlinks in the C1HyperLinkColumn when the
URL is data-bound to a field in a data source.
DataTextField Sets or returns the field to bind to the text of the
hyperlink.
DataTextFormatString Sets or returns the display format for the text caption
of the hyperlinks in the C1HyperLinkColumn
column.
Fixed (inherited from C1Column) Determines whether a column is fixed to the left of the
grid when it is scrolled horizontally.
164 C1.Web.C1WebGrid Namespace

FooterStyle (inherited from C1Column) Gets the style properties of the column footer.
FooterText (inherited from C1Column) Gets or sets the text of the footer.
GroupInfo (inherited from C1Column) Gets a GroupInfo object that determines whether a
column should be grouped on and how the group
header and footer rows should be formatted and
displayed.
HeaderImageUrl (inherited from C1Column) Gets or sets the location of the image to be used in the
header.
HeaderStyle (inherited from C1Column) Gets the style properties of the column header.
HeaderText (inherited from C1Column) Gets or sets the text of the header.
ItemStyle (inherited from C1Column) Gets the style properties of the item.
NavigateUrl Sets or returns the URL when a hyperlink is clicked.
RowMerge (inherited from C1Column) Determines whether rows are merged.
SortDirection (inherited from C1Column) Gets the direction of the sort.
SortExpression (inherited from C1Column) Gets or sets the name of the field or expression to pass
to the OnSortCommand method when a column is
selected for sorting.
Target Sets or returns the window or frame where content
appears when a hyperlink is clicked.
Text Sets or returns the text for the hyperlink.
Visible (inherited from C1Column) Determines whether the column is visible within the
displayed area of the C1WebGrid component.
Public Methods
ToString Overriden. Returns a string that represents the current
object.
See Also
C1HyperLinkColumn Class | C1.Web.C1WebGrid Namespace
C1HyperLinkColumn Constructor
Constructor. Initializes a new instance of the C1HyperLinkColumn class.

[Visual Basic]
Public Function New()

[C#]
public C1HyperLinkColumn()

[Delphi]
public constructor Create(); overload;
See Also
C1HyperLinkColumn Class | C1HyperLinkColumn Members | C1.Web.C1WebGrid Namespace
C1HyperLinkColumn Properties 165

C1HyperLinkColumn Properties
The properties of the C1HyperLinkColumn class are listed here. For a complete list of C1HyperLinkColumn
class members, see the C1HyperLinkColumn Members topic.
Public Properties
Aggregate (inherited from C1Column) Causes the grid to calculate aggregate values to the
column and place them in the group header and footer
rows. If the grid does not contain any groups, setting
the Aggregate property has no effect.
AllowGroup (inherited from C1Column) Used to disallow the client-side grouping of a column
in a grouped grid.
AllowMove (inherited from C1Column) Determines whether column can be moved on the
client.
AllowSizing (inherited from C1Column) Determines whether columns can be sized on the
client.
DataNavigateUrlField Sets or returns the field from a data source to bind to
the URL of the hyperlinks in the
C1HyperLinkColumn.
DataNavigateUrlFormatString Sets or returns the display format for the URL of the
hyperlinks in the C1HyperLinkColumn when the
URL is data-bound to a field in a data source.
DataTextField Sets or returns the field to bind to the text of the
hyperlink.
DataTextFormatString Sets or returns the display format for the text caption
of the hyperlinks in the C1HyperLinkColumn
column.
Fixed (inherited from C1Column) Determines whether a column is fixed to the left of the
grid when it is scrolled horizontally.
FooterStyle (inherited from C1Column) Gets the style properties of the column footer.
FooterText (inherited from C1Column) Gets or sets the text of the footer.
GroupInfo (inherited from C1Column) Gets a GroupInfo object that determines whether a
column should be grouped on and how the group
header and footer rows should be formatted and
displayed.
HeaderImageUrl (inherited from C1Column) Gets or sets the location of the image to be used in the
header.
HeaderStyle (inherited from C1Column) Gets the style properties of the column header.
HeaderText (inherited from C1Column) Gets or sets the text of the header.
ItemStyle (inherited from C1Column) Gets the style properties of the item.
NavigateUrl Sets or returns the URL when a hyperlink is clicked.
RowMerge (inherited from C1Column) Determines whether rows are merged.
SortDirection (inherited from C1Column) Gets the direction of the sort.
SortExpression (inherited from C1Column) Gets or sets the name of the field or expression to pass
to the OnSortCommand method when a column is
selected for sorting.
166 C1.Web.C1WebGrid Namespace

Target Sets or returns the window or frame where content
appears when a hyperlink is clicked.
Text Sets or returns the text for the hyperlink.
Visible (inherited from C1Column) Determines whether the column is visible within the
displayed area of the C1WebGrid component.
See Also
C1HyperLinkColumn Class | C1.Web.C1WebGrid Namespace
C1HyperLinkColumn.DataNavigateUrlField Property
Sets or returns the field from a data source to bind to the URL of the hyperlinks in the C1HyperLinkColumn.

[Visual Basic]
Overridable Public Property DataNavigateUrlField As String

[C#]
virtual public string DataNavigateUrlField {get;set;}

[Delphi]
public property DataNavigateUrlField: String read get_DataNavigateUrlField
write set_DataNavigateUrlField;
Remarks
The DataNavigateUrlField and NavigateUrl properties cannot both be set at the same time. If both properties
are set, the DataNavigateUrlField property takes precedence
See Also
C1HyperLinkColumn Class | C1HyperLinkColumn Members | C1.Web.C1WebGrid Namespace
C1HyperLinkColumn.DataNavigateUrlFormatString Property
Sets or returns the display format for the URL of the hyperlinks in the C1HyperLinkColumn when the URL is
data-bound to a field in a data source.

[Visual Basic]
Overridable Public Property DataNavigateUrlFormatString As String

[C#]
virtual public string DataNavigateUrlFormatString {get;set;}

[Delphi]
public property DataNavigateUrlFormatString: String read
get_DataNavigateUrlFormatString write set_DataNavigateUrlFormatString;
Remarks
The specified format is only applied to the URL when the URL is data-bound to a field in a data source.
Specify the field to bind to the URL of the hyperlinks in the column by setting the DataNavigateUrlField
property.
See Also
C1HyperLinkColumn Class | C1HyperLinkColumn Members | C1.Web.C1WebGrid Namespace

C1HyperLinkColumn.DataTextField Property 167

C1HyperLinkColumn.DataTextField Property
Sets or returns the field to bind to the text of the hyperlink.

[Visual Basic]
Overridable Public Property DataTextField As String

[C#]
virtual public string DataTextField {get;set;}

[Delphi]
public property DataTextField: String read get_DataTextField write
set_DataTextField;
Remarks
The DataTextField and Text properties cannot both be set at the same time. If both properties are set, the
DataTextField property takes precedence.
See Also
C1HyperLinkColumn Class | C1HyperLinkColumn Members | C1.Web.C1WebGrid Namespace
C1HyperLinkColumn.DataTextFormatString Property
Sets or returns the display format for the text caption of the hyperlinks in the C1HyperLinkColumn column.

[Visual Basic]
Overridable Public Property DataTextFormatString As String

[C#]
virtual public string DataTextFormatString {get;set;}

[Delphi]
public property DataTextFormatString: String read get_DataTextFormatString
write set_DataTextFormatString;
Remarks
The specified format is applied to the text caption only when the text caption is data bound to a field in a data
source. Specify the field to bind to the text caption of the hyperlinks in the column by setting the
DataTextField property.
See Also
C1HyperLinkColumn Class | C1HyperLinkColumn Members | C1.Web.C1WebGrid Namespace
C1HyperLinkColumn.NavigateUrl Property
Sets or returns the URL when a hyperlink is clicked.

[Visual Basic]
Overridable Public Property NavigateUrl As String

[C#]
virtual public string NavigateUrl {get;set;}



168 C1.Web.C1WebGrid Namespace

[Delphi]
public property NavigateUrl: String read get_NavigateUrl write
set_NavigateUrl;
Remarks
The DataNavigateUrlField and NavigateUrl properties cannot both be set at the same time. If both properties
are set, the DataNavigateUrlField property takes precedence.
See Also
C1HyperLinkColumn Class | C1HyperLinkColumn Members | C1.Web.C1WebGrid Namespace
C1HyperLinkColumn.Target Property
Sets or returns the window or frame where content appears when a hyperlink is clicked.

[Visual Basic]
Overridable Public Property Target As String

[C#]
virtual public string Target {get;set;}

[Delphi]
public property Target: String read get_Target write set_Target;
Remarks
If this property is not set, the browser or window with focus refreshes when a hyperlink in the column is
clicked.
See Also
C1HyperLinkColumn Class | C1HyperLinkColumn Members | C1.Web.C1WebGrid Namespace
C1HyperLinkColumn.Text Property
Sets or returns the text for the hyperlink.

[Visual Basic]
Overridable Public Property Text As String

[C#]
virtual public string Text {get;set;}

[Delphi]
public property Text: String read get_Text write set_Text;
Remarks
The DataTextField and Text properties cannot both be set at the same time. If both properties are set, the
DataTextField property takes precedence.
See Also
C1HyperLinkColumn Class | C1HyperLinkColumn Members | C1.Web.C1WebGrid Namespace

C1HyperLinkColumn Methods 169

C1HyperLinkColumn Methods
The methods of the C1HyperLinkColumn class are listed here. For a complete list of C1HyperLinkColumn
class members, see the C1HyperLinkColumn Members topic.
Public Methods
ToString Overriden. Returns a string that represents the current
object.
See Also
C1HyperLinkColumn Class | C1.Web.C1WebGrid Namespace
C1HyperLinkColumn.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;
See Also
C1HyperLinkColumn Class | C1HyperLinkColumn Members | C1.Web.C1WebGrid Namespace
C1ItemCollection Class
Provides access to the items that are contained by a parent item.
For a list of all members of this type, see C1ItemCollection Members.
System.Object
C1.Web.C1WebGrid.C1ItemCollection

[Visual Basic]
Public Class C1ItemCollection
Implements ICollection, IEnumerable

[C#]
public class C1ItemCollection : ICollection, IEnumerable

[Delphi]
type C1ItemCollection = class (TObject, ICollection, IEnumerable);
Namespace: C1.Web.C1WebGrid
Assembly: C1.Web.C1WebGrid.2 (in C1.Web.C1WebGrid.2.dll)
See Also
C1ItemCollection Members | C1.Web.C1WebGrid Namespace
170 C1.Web.C1WebGrid Namespace

C1ItemCollection Members
C1ItemCollection overview
Public Properties
Count Gets the number of objects in the collection.
IsSynchronized Gets a value indicating whether access to the
C1ItemCollection is synchronized (thread-safe).
Item Gets or sets the C1GridItem at the specified index
within the C1ItemCollection. In C#, this property is
the indexer for the C1ItemCollection class.
SyncRoot Gets the object that can be used to synchronize access
to the C1ItemCollection.
Public Methods
CopyTo Copies all the items from this C1ItemCollection to
the specified System.Array object, starting at the
specified index in the System.Array object
GetEnumerator Returns a System.Collections.IEnumerator
implemented object that contains all objects in the
C1ItemCollection.
See Also
C1ItemCollection Class | C1.Web.C1WebGrid Namespace
C1ItemCollection Properties
The properties of the C1ItemCollection class are listed here. For a complete list of C1ItemCollection class
members, see the C1ItemCollection Members topic.
Public Properties
Count Gets the number of objects in the collection.
IsSynchronized Gets a value indicating whether access to the
C1ItemCollection is synchronized (thread-safe).
Item Gets or sets the C1GridItem at the specified index
within the C1ItemCollection. In C#, this property is
the indexer for the C1ItemCollection class.
SyncRoot Gets the object that can be used to synchronize access
to the C1ItemCollection.
See Also
C1ItemCollection Class | C1.Web.C1WebGrid Namespace
C1ItemCollection.Count Property
Gets the number of objects in the collection.

[Visual Basic]
Overridable Public ReadOnly Property Count As Integer Implements
ICollection.Count

C1ItemCollection.IsSynchronized Property 171

[C#]
virtual public int Count {get;}

[Delphi]
public property Count: Int32 read get_Count;
Implements
ICollection.Count
See Also
C1ItemCollection Class | C1ItemCollection Members | C1.Web.C1WebGrid Namespace
C1ItemCollection.IsSynchronized Property
Gets a value indicating whether access to the C1ItemCollection is synchronized (thread-safe).

[Visual Basic]
Overridable Public ReadOnly Property IsSynchronized As Boolean Implements
ICollection.IsSynchronized

[C#]
virtual public bool IsSynchronized {get;}

[Delphi]
public property IsSynchronized: Boolean read get_IsSynchronized;
Implements
ICollection.IsSynchronized
See Also
C1ItemCollection Class | C1ItemCollection Members | C1.Web.C1WebGrid Namespace
C1ItemCollection.Item Property
Gets or sets the C1GridItem at the specified index within the C1ItemCollection. In C#, this property is the
indexer for the C1ItemCollection class.

[Visual Basic]
Public Default Property Item( _
ByVal index As Integer _
) As C1GridItem

[C#]
public C1GridItem this[
int index
] {get;set;}

[Delphi]
public property Item[
index: Int32
]: C1GridItem read get_Item write set_Item;
See Also
C1ItemCollection Class | C1ItemCollection Members | C1.Web.C1WebGrid Namespace
172 C1.Web.C1WebGrid Namespace

C1ItemCollection.SyncRoot Property
Gets the object that can be used to synchronize access to the C1ItemCollection.

[Visual Basic]
Overridable Public ReadOnly Property SyncRoot As Object Implements
ICollection.SyncRoot

[C#]
virtual public object SyncRoot {get;}

[Delphi]
public property SyncRoot: Object read get_SyncRoot;
Implements
ICollection.SyncRoot
See Also
C1ItemCollection Class | C1ItemCollection Members | C1.Web.C1WebGrid Namespace
C1ItemCollection Methods
The methods of the C1ItemCollection class are listed here. For a complete list of C1ItemCollection class
members, see the C1ItemCollection Members topic.
Public Methods
CopyTo Copies all the items from this C1ItemCollection to
the specified System.Array object, starting at the
specified index in the System.Array object
GetEnumerator Returns a System.Collections.IEnumerator
implemented object that contains all objects in the
C1ItemCollection.
See Also
C1ItemCollection Class | C1.Web.C1WebGrid Namespace
C1ItemCollection.CopyTo Method
Copies all the items from this C1ItemCollection to the specified System.Array object, starting at the specified
index in the System.Array object

[Visual Basic]
Overridable Public Sub CopyTo( _
ByVal array As Array, _
ByVal index As Integer _
) Implements ICollection.CopyTo

[C#]
virtual public void CopyTo(
Array array,
int index
);


C1ItemCollection.GetEnumerator Method 173

[Delphi]
public procedure CopyTo(
array: Array;
index: Int32
); virtual;
Implements
ICollection.CopyTo
Parameters
array
The one-dimensional Array.
index
The zero-based index in array at which copying begins.
See Also
C1ItemCollection Class | C1ItemCollection Members | C1.Web.C1WebGrid Namespace
C1ItemCollection.GetEnumerator Method
Returns a System.Collections.IEnumerator implemented object that contains all objects in the
C1ItemCollection.

[Visual Basic]
Overridable Public Function GetEnumerator() As IEnumerator Implements
IEnumerable.GetEnumerator

[C#]
virtual public IEnumerator GetEnumerator()

[Delphi]
public function GetEnumerator(): IEnumerator; virtual;
Implements
IEnumerable.GetEnumerator
Return Value
An IEnumerator for the collection.
See Also
C1ItemCollection Class | C1ItemCollection Members | C1.Web.C1WebGrid Namespace
C1ItemEventArgs Class
Provides data for the ItemCreated and ItemDataBound events of the C1WebGrid control.
For a list of all members of this type, see C1ItemEventArgs Members.
System.Object
System.EventArgs
C1.Web.C1WebGrid.C1ItemEventArgs


174 C1.Web.C1WebGrid Namespace

[Visual Basic]
NonInheritable Public Class C1ItemEventArgs
Inherits EventArgs

[C#]
public sealed class C1ItemEventArgs : EventArgs

[Delphi]
type C1ItemEventArgs = class sealed (EventArgs);
Namespace: C1.Web.C1WebGrid
Assembly: C1.Web.C1WebGrid.2 (in C1.Web.C1WebGrid.2.dll)
See Also
C1ItemEventArgs Members | C1.Web.C1WebGrid Namespace
C1ItemEventArgs Members
C1ItemEventArgs overview
Public Constructors
C1ItemEventArgs Constructor Constructor. Initializes a new instance of the
C1ItemEventArgs class.
Public Properties
Item Gets the referenced item in the C1WebGrid control
when the event is raised.
See Also
C1ItemEventArgs Class | C1.Web.C1WebGrid Namespace
C1ItemEventArgs Constructor
Constructor. Initializes a new instance of the C1ItemEventArgs class.

[Visual Basic]
Public Function New( _
ByVal item As C1GridItem _
)

[C#]
public C1ItemEventArgs(
C1GridItem item
);

[Delphi]
public constructor Create(
item: C1GridItem
);
Parameters
item
A C1GridItem that represents an item in the C1WebGrid.
C1ItemEventArgs Properties 175

See Also
C1ItemEventArgs Class | C1ItemEventArgs Members | C1.Web.C1WebGrid Namespace
C1ItemEventArgs Properties
The properties of the C1ItemEventArgs class are listed here. For a complete list of C1ItemEventArgs class
members, see the C1ItemEventArgs Members topic.
Public Properties
Item Gets the referenced item in the C1WebGrid control
when the event is raised.
See Also
C1ItemEventArgs Class | C1.Web.C1WebGrid Namespace
C1ItemEventArgs.Item Property
Gets the referenced item in the C1WebGrid control when the event is raised.

[Visual Basic]
Public ReadOnly Property Item As C1GridItem

[C#]
public C1GridItem Item {get;}

[Delphi]
public property Item: C1GridItem read get_Item;
See Also
C1ItemEventArgs Class | C1ItemEventArgs Members | C1.Web.C1WebGrid Namespace
C1ItemEventHandler Delegate
Represents the method that will handle the ItemCreated and ItemDataBound events of the C1WebGrid

[Visual Basic]
Public Delegate Sub C1ItemEventHandler( _
ByVal sender As Object, _
ByVal e As C1ItemEventArgs _
)

[C#]
public delegate void C1ItemEventHandler(
object sender,
C1ItemEventArgs e
);

[Delphi]
type C1ItemEventHandler = procedure (
sender: Object;
e: C1ItemEventArgs
) of object;
176 C1.Web.C1WebGrid Namespace

Parameters
sender
The source of the event.
e
Namespace: C1.Web.C1WebGrid
Assembly: C1.Web.C1WebGrid.2 (in C1.Web.C1WebGrid.2.dll)
See Also
C1.Web.C1WebGrid Namespace
C1ListItemType Enumeration
Use the members of this enumeration to set the value of the ItemType property in the C1GridItem class.

[Visual Basic]
Public Enum C1ListItemType

[C#]
public enum C1ListItemType

[Delphi]
type C1ListItemType = (AlternatingItem, EditItem, Footer, GroupArea,
GroupColumn, GroupFooter, GroupHeader, Header, Item, Pager, SelectedItem,
Separator);
Namespace: C1.Web.C1WebGrid
Assembly: C1.Web.C1WebGrid.2 (in C1.Web.C1WebGrid.2.dll)
Members
Member name Description
AlternatingItem An item in alternating (zero-based even-indexed) cells.
It is data-bound.
EditItem An item in a list control currently in edit mode. It is
data-bound.
Footer A footer for the list control. It is not data-bound.
GroupArea A group area.
GroupColumn A group column.
GroupFooter A group footer.
GroupHeader A group header.
Header A header for the list control. It is not data-bound.
Item An item in the list control. It is data-bound.
Pager A pager that displays the controls to navigate to
different pages associated with C1WebGrid. It is not
data-bound.
SelectedItem A selected item in the list control. It is data-bound.
C1PageChangingEventArgs Class 177

Member name Description
Separator A separator between items in a list control. It is not
data-bound.
See Also
C1.Web.C1WebGrid Namespace
C1PageChangingEventArgs Class
Provides data for the PageIndexChanging event of the C1WebGrid control.
For a list of all members of this type, see C1PageChangingEventArgs Members.
System.Object
System.EventArgs
System.ComponentModel.CancelEventArgs
C1.Web.C1WebGrid.C1PageChangingEventArgs

[Visual Basic]
Public Class C1PageChangingEventArgs
Inherits CancelEventArgs

[C#]
public class C1PageChangingEventArgs : CancelEventArgs

[Delphi]
type C1PageChangingEventArgs = class (CancelEventArgs);
Namespace: C1.Web.C1WebGrid
Assembly: C1.Web.C1WebGrid.2 (in C1.Web.C1WebGrid.2.dll)
See Also
C1PageChangingEventArgs Members | C1.Web.C1WebGrid Namespace
C1PageChangingEventArgs Members
C1PageChangingEventArgs overview
Public Constructors
C1PageChangingEventArgs Constructor Constructor. Initializes a new instance of the
C1PageChangingEventArgs class.
Public Properties
CommandSource Gets the source of the command.
NewPageIndex Gets or sets the index of the new page.
See Also
C1PageChangingEventArgs Class | C1.Web.C1WebGrid Namespace
178 C1.Web.C1WebGrid Namespace

C1PageChangingEventArgs Constructor
Constructor. Initializes a new instance of the C1PageChangingEventArgs class.

[Visual Basic]
Public Function New( _
ByVal commandSource As Object, _
ByVal newPageIndex As Integer _
)

[C#]
public C1PageChangingEventArgs(
object commandSource,
int newPageIndex
);

[Delphi]
public constructor Create(
commandSource: Object;
newPageIndex: Int32
);
Parameters
commandSource
The source of the command.
newPageIndex
The index of the new page.
See Also
C1PageChangingEventArgs Class | C1PageChangingEventArgs Members | C1.Web.C1WebGrid
Namespace
C1PageChangingEventArgs Properties
The properties of the C1PageChangingEventArgs class are listed here. For a complete list of
C1PageChangingEventArgs class members, see the C1PageChangingEventArgs Members topic.
Public Properties
CommandSource Gets the source of the command.
NewPageIndex Gets or sets the index of the new page.
See Also
C1PageChangingEventArgs Class | C1.Web.C1WebGrid Namespace
C1PageChangingEventArgs.CommandSource Property
Gets the source of the command.

[Visual Basic]
Public ReadOnly Property CommandSource As Object



C1PageChangingEventArgs.NewPageIndex Property 179

[C#]
public object CommandSource {get;}

[Delphi]
public property CommandSource: Object read get_CommandSource;
See Also
C1PageChangingEventArgs Class | C1PageChangingEventArgs Members | C1.Web.C1WebGrid
Namespace
C1PageChangingEventArgs.NewPageIndex Property
Gets or sets the index of the new page.

[Visual Basic]
Public Property NewPageIndex As Integer

[C#]
public int NewPageIndex {get;set;}

[Delphi]
public property NewPageIndex: Int32 read get_NewPageIndex write
set_NewPageIndex;
See Also
C1PageChangingEventArgs Class | C1PageChangingEventArgs Members | C1.Web.C1WebGrid
Namespace
C1PageChangingEventHandler Delegate
Provides data for the PageIndexChanging event of the C1WebGrid control.

[Visual Basic]
Public Delegate Sub C1PageChangingEventHandler( _
ByVal sender As Object, _
ByVal e As C1PageChangingEventArgs _
)

[C#]
public delegate void C1PageChangingEventHandler(
object sender,
C1PageChangingEventArgs e
);

[Delphi]
type C1PageChangingEventHandler = procedure (
sender: Object;
e: C1PageChangingEventArgs
) of object;
Parameters
sender
The source of the event.
180 C1.Web.C1WebGrid Namespace

e
Namespace: C1.Web.C1WebGrid
Assembly: C1.Web.C1WebGrid.2 (in C1.Web.C1WebGrid.2.dll)
See Also
C1.Web.C1WebGrid Namespace
C1PagerStyle Class
C1PagerStyle is used to customize the appearance and position of a pager.
For a list of all members of this type, see C1PagerStyle Members.
System.Object
System.MarshalByRefObject
System.ComponentModel.Component
System.Web.UI.WebControls.Style
System.Web.UI.WebControls.TableItemStyle
C1.Web.C1WebGrid.C1PagerStyle

[Visual Basic]
Public Class C1PagerStyle
Inherits TableItemStyle

[C#]
public class C1PagerStyle : TableItemStyle

[Delphi]
type C1PagerStyle = class (TableItemStyle);
Namespace: C1.Web.C1WebGrid
Assembly: C1.Web.C1WebGrid.2 (in C1.Web.C1WebGrid.2.dll)
See Also
C1PagerStyle Members | C1.Web.C1WebGrid Namespace
C1PagerStyle Members
C1PagerStyle overview
Public Constructors
C1PagerStyle Constructor Constructor. Initializes a new instance of the
C1PagerStyle class.
Public Properties
BackColor (inherited from Style) Background color of the controls applied with this
style.
BorderColor (inherited from Style) Border color of the controls applied with this style.
BorderStyle (inherited from Style) Style of the border of controls applied with this style.
C1PagerStyle Constructor 181

BorderWidth (inherited from Style) Thickness of the border around the controls applied
with this style.
CssClass (inherited from Style) CSS class name applied to the user of this style.
Font (inherited from Style) The font used for text in controls applied with this
style.
ForeColor (inherited from Style) Foreground color of the controls applied with this
style.
Height (inherited from Style) The height of the controls applied with this style.
HorizontalAlign (inherited from TableItemStyle) The horizontal alignment of the cell content.
Mode Sets or returns a value that specifies whether buttons
that link to the next and previous pages or numeric
buttons that link directly to a page are displayed.
NextPageText Sets or returns the text used for the next page button.
PageButtonCount Sets or returns the number of numeric buttons to
display concurrently in the pager element of the
C1WebGrid component.
Position Sets or returns the pager element position.
PrevPageText Sets or returns the text used for the previous page
button.
VerticalAlign (inherited from TableItemStyle) The vertical alignment of the cell content.
Visible Determines whether the pager is displayed.
Width (inherited from Style) The width of the controls applied with this style.
Wrap (inherited from TableItemStyle) Whether the cell content should wrap or not.
Public Methods
CopyFrom Overriden. Duplicates the style properties of the
specified System.Web.UI.WebControls.Style into the
instance of the C1PagerStyle class that this method is
called from.
MergeWith Overriden. Combines the style properties of the
specified System.Web.UI.WebControls.Style into the
instance of the C1PagerStyle class that this method is
called from.
Reset Overriden. Removes any defined style elements from
the state bag.
See Also
C1PagerStyle Class | C1.Web.C1WebGrid Namespace
C1PagerStyle Constructor
Constructor. Initializes a new instance of the C1PagerStyle class.




182 C1.Web.C1WebGrid Namespace

[Visual Basic]
Public Function New( _
ByVal owner As C1WebGrid _
)

[C#]
public C1PagerStyle(
C1WebGrid owner
);

[Delphi]
public constructor Create(
owner: C1WebGrid
);
Parameters
owner
Owner.
See Also
C1PagerStyle Class | C1PagerStyle Members | C1.Web.C1WebGrid Namespace
C1PagerStyle Properties
The properties of the C1PagerStyle class are listed here. For a complete list of C1PagerStyle class members,
see the C1PagerStyle Members topic.
Public Properties
BackColor (inherited from Style) Background color of the controls applied with this
style.
BorderColor (inherited from Style) Border color of the controls applied with this style.
BorderStyle (inherited from Style) Style of the border of controls applied with this style.
BorderWidth (inherited from Style) Thickness of the border around the controls applied
with this style.
CssClass (inherited from Style) CSS class name applied to the user of this style.
Font (inherited from Style) The font used for text in controls applied with this
style.
ForeColor (inherited from Style) Foreground color of the controls applied with this
style.
Height (inherited from Style) The height of the controls applied with this style.
HorizontalAlign (inherited from TableItemStyle) The horizontal alignment of the cell content.
Mode Sets or returns a value that specifies whether buttons
that link to the next and previous pages or numeric
buttons that link directly to a page are displayed.
NextPageText Sets or returns the text used for the next page button.
PageButtonCount Sets or returns the number of numeric buttons to
display concurrently in the pager element of the
C1WebGrid component.
C1PagerStyle.Mode Property 183

Position Sets or returns the pager element position.
PrevPageText Sets or returns the text used for the previous page
button.
VerticalAlign (inherited from TableItemStyle) The vertical alignment of the cell content.
Visible Determines whether the pager is displayed.
Width (inherited from Style) The width of the controls applied with this style.
Wrap (inherited from TableItemStyle) Whether the cell content should wrap or not.
See Also
C1PagerStyle Class | C1.Web.C1WebGrid Namespace
C1PagerStyle.Mode Property
Sets or returns a value that specifies whether buttons that link to the next and previous pages or numeric
buttons that link directly to a page are displayed.

[Visual Basic]
Public Property Mode As PagerMode

[C#]
public PagerMode Mode {get;set;}

[Delphi]
public property Mode: PagerMode read get_Mode write set_Mode;
Property Value
One of the System.Web.UI.WebControls.PagerMode values. The default value is
System.Web.UI.WebControls.PagerMode.NextPrev
Remarks
Property is used to specify which set of pager buttons to use on the C1WebGrid component. You can specify
buttons that link to the next and previous page, or numeric buttons that link directly to a page.
See Also
C1PagerStyle Class | C1PagerStyle Members | C1.Web.C1WebGrid Namespace
C1PagerStyle.NextPageText Property
Sets or returns the text used for the next page button.

[Visual Basic]
Public Property NextPageText As String

[C#]
public string NextPageText {get;set;}

[Delphi]
public property NextPageText: String read get_NextPageText write
set_NextPageText;
Property Value
The default value is ">", which renders as the greater than sign (>).
184 C1.Web.C1WebGrid Namespace

Remarks
The default value is ">", which renders as the greater than sign (>).
The Mode property must be set to PagerMode.NextPrev for this property to have any effect.
This property is used along with the PrevPageText property to create a custom set of controls for the next and
previous buttons of the pager on the C1WebGrid component.
This property does not automatically encode special characters to HTML. You need to convert these
characters to the appropriate HTML value. For example the greater than symbol (>) will not automatically
convert to ">".
See Also
C1PagerStyle Class | C1PagerStyle Members | C1.Web.C1WebGrid Namespace
C1PagerStyle.PageButtonCount Property
Sets or returns the number of numeric buttons to display concurrently in the pager element of the C1WebGrid
component.

[Visual Basic]
Public Property PageButtonCount As Integer

[C#]
public int PageButtonCount {get;set;}

[Delphi]
public property PageButtonCount: Int32 read get_PageButtonCount write
set_PageButtonCount;
Property Value
The default value is 10.
Remarks
The Mode property must be set to PagerMode.NumericPages for this property to have any effect.
If there are more pages in the C1WebGrid component than specified in this property, ellipses buttons (...) are
displayed in the pager element. When clicked, these buttons display the next or previous set of numeric
buttons.
See Also
C1PagerStyle Class | C1PagerStyle Members | C1.Web.C1WebGrid Namespace
C1PagerStyle.Position Property
Sets or returns the pager element position.

[Visual Basic]
Public Property Position As PagerPosition

[C#]
public PagerPosition Position {get;set;}

[Delphi]
public property Position: PagerPosition read get_Position write
set_Position;
C1PagerStyle.PrevPageText Property 185

Property Value
One of the System.Web.UI.WebControls.PagerPosition values. The default value is PagerPosition.Bottom.
Remarks
The pager element can be displayed at the upper edge, the lower edge, or at both the upper and lower edges of
the C1WebGrid component.
See Also
C1PagerStyle Class | C1PagerStyle Members | C1.Web.C1WebGrid Namespace
C1PagerStyle.PrevPageText Property
Sets or returns the text used for the previous page button.

[Visual Basic]
Public Property PrevPageText As String

[C#]
public string PrevPageText {get;set;}

[Delphi]
public property PrevPageText: String read get_PrevPageText write
set_PrevPageText;
Property Value
The default value is "<", which renders as the less than sign.
Remarks
The Mode property must be set to PagerMode.NextPrev for this property to have any effect.
This property is used along with the NextPageText property to create a custom appearance for the next and
previous buttons of the pager on the C1WebGrid component.
This property does not automatically encode special characters to HTML. You need to convert special
characters to the appropriate HTML value. For example, the greater than symbol (>) will not automatically
convert to ">".
See Also
C1PagerStyle Class | C1PagerStyle Members | C1.Web.C1WebGrid Namespace
C1PagerStyle.Visible Property
Determines whether the pager 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;
Property Value
Set this property to True to display the pager. The default value is True.
186 C1.Web.C1WebGrid Namespace

See Also
C1PagerStyle Class | C1PagerStyle Members | C1.Web.C1WebGrid Namespace
C1PagerStyle Methods
The methods of the C1PagerStyle class are listed here. For a complete list of C1PagerStyle class members, see
the C1PagerStyle Members topic.
Public Methods
CopyFrom Overriden. Duplicates the style properties of the
specified System.Web.UI.WebControls.Style into the
instance of the C1PagerStyle class that this method is
called from.
MergeWith Overriden. Combines the style properties of the
specified System.Web.UI.WebControls.Style into the
instance of the C1PagerStyle class that this method is
called from.
Reset Overriden. Removes any defined style elements from
the state bag.
See Also
C1PagerStyle Class | C1.Web.C1WebGrid Namespace
C1PagerStyle.CopyFrom Method
Duplicates the style properties of the specified System.Web.UI.WebControls.Style into the instance of the
C1PagerStyle class that this method is called from.

[Visual Basic]
Overrides Public Sub CopyFrom( _
ByVal s As Style _
)

[C#]
override public void CopyFrom(
Style s
);

[Delphi]
public procedure CopyFrom(
s: Style
); override;
Parameters
s
A System.Web.UI.WebControls.Style that represents the style to copy.
See Also
C1PagerStyle Class | C1PagerStyle Members | C1.Web.C1WebGrid Namespace
C1PagerStyle.MergeWith Method 187

C1PagerStyle.MergeWith Method
Combines the style properties of the specified System.Web.UI.WebControls.Style into the instance of the
C1PagerStyle class that this method is called from.

[Visual Basic]
Overrides Public Sub MergeWith( _
ByVal s As Style _
)

[C#]
override public void MergeWith(
Style s
);

[Delphi]
public procedure MergeWith(
s: Style
); override;
Parameters
s
A System.Web.UI.WebControls.Style that represents the style to combine.
Remarks
If a property from this instance is already set to a value, the property is unchanged. If a property is not set, this
method sets that property with the value from the corresponding property of the
System.Web.UI.WebControls.Style object.
See Also
C1PagerStyle Class | C1PagerStyle Members | C1.Web.C1WebGrid Namespace
C1PagerStyle.Reset Method
Removes any defined style elements from the state bag.

[Visual Basic]
Overrides Public Sub Reset()

[C#]
override public void Reset()

[Delphi]
public procedure Reset(); override;
See Also
C1PagerStyle Class | C1PagerStyle Members | C1.Web.C1WebGrid Namespace
C1ScrollBarStyle Enumeration
Use the members of this enumeration to set the value of the HScrollBarStyle and VScrollBarStyle properties
in the C1WebGrid class.

188 C1.Web.C1WebGrid Namespace

[Visual Basic]
Public Enum C1ScrollBarStyle

[C#]
public enum C1ScrollBarStyle

[Delphi]
type C1ScrollBarStyle = (Always, Automatic, None);
Namespace: C1.Web.C1WebGrid
Assembly: C1.Web.C1WebGrid.2 (in C1.Web.C1WebGrid.2.dll)
Members
Member name Description
Always Always show the scrollbar.
Automatic Show the scrollbar if the content of the webgrid is
larger than the control.
None No scrollbar.
See Also
C1.Web.C1WebGrid Namespace
C1SelectedIndexChangingEventArgs Class
Provides data for the SelectedIndexChanging event of the C1WebGrid control.
For a list of all members of this type, see C1SelectedIndexChangingEventArgs Members.
System.Object
System.EventArgs
System.Web.UI.WebControls.CommandEventArgs
C1.Web.C1WebGrid.C1CommandEventArgs
C1.Web.C1WebGrid.C1CancelCommandEventArgs
C1.Web.C1WebGrid.C1SelectedIndexChangingEventArgs

[Visual Basic]
Public Class C1SelectedIndexChangingEventArgs
Inherits C1CancelCommandEventArgs

[C#]
public class C1SelectedIndexChangingEventArgs : C1CancelCommandEventArgs

[Delphi]
type C1SelectedIndexChangingEventArgs = class (C1CancelCommandEventArgs);
Namespace: C1.Web.C1WebGrid
Assembly: C1.Web.C1WebGrid.2 (in C1.Web.C1WebGrid.2.dll)
See Also
C1SelectedIndexChangingEventArgs Members | C1.Web.C1WebGrid Namespace
C1SelectedIndexChangingEventArgs Members 189

C1SelectedIndexChangingEventArgs Members
C1SelectedIndexChangingEventArgs overview
Public Constructors
C1SelectedIndexChangingEventArgs Constructor Constructor. Initializes a new instance of the
C1SelectedIndexChangingEventArgs class.
Public Properties
Cancel (inherited from
C1CancelCommandEventArgs)
Gets or sets a value indicating whether the event
should be canceled.
CommandSource (inherited from
C1CommandEventArgs)
Gets the source of the command.
Item (inherited from C1CommandEventArgs) Gets the C1GridItem item that contains the
command source.
NewSelectedIndex Gets or sets the index of the new item to select.
See Also
C1SelectedIndexChangingEventArgs Class | C1.Web.C1WebGrid Namespace
C1SelectedIndexChangingEventArgs Constructor
Overload List
Constructor. Initializes a new instance of the C1SelectedIndexChangingEventArgs class.
[Visual Basic] Public Function New(C1CommandEventArgs)
[C#] public C1SelectedIndexChangingEventArgs(C1CommandEventArgs);
[Delphi] public constructor Create(C1CommandEventArgs); overload;
Constructor. Initializes a new instance of the C1SelectedIndexChangingEventArgs class.
[Visual Basic] Public Function New(C1GridItem, Object, CommandEventArgs)
[C#] public C1SelectedIndexChangingEventArgs(C1GridItem, object, CommandEventArgs);
[Delphi] public constructor Create(C1GridItem; Object; CommandEventArgs); overload;
See Also
C1SelectedIndexChangingEventArgs Class | C1SelectedIndexChangingEventArgs Members |
C1.Web.C1WebGrid Namespace
C1SelectedIndexChangingEventArgs Constructor (C1CommandEventArgs)
Constructor. Initializes a new instance of the C1SelectedIndexChangingEventArgs class.

[Visual Basic]
Public Function New( _
ByVal e As C1CommandEventArgs _
)




190 C1.Web.C1WebGrid Namespace

[C#]
public C1SelectedIndexChangingEventArgs(
C1CommandEventArgs e
);

[Delphi]
public constructor Create(
e: C1CommandEventArgs
); overload;
Parameters
e
A C1CommandEventArgs that contains the event data.
See Also
C1SelectedIndexChangingEventArgs Class | C1SelectedIndexChangingEventArgs Members |
C1.Web.C1WebGrid Namespace | C1SelectedIndexChangingEventArgs Constructor Overload List
C1SelectedIndexChangingEventArgs Constructor (C1GridItem, Object,
CommandEventArgs)
Constructor. Initializes a new instance of the C1SelectedIndexChangingEventArgs class.

[Visual Basic]
Public Function New( _
ByVal item As C1GridItem, _
ByVal commandSource As Object, _
ByVal originalArgs As CommandEventArgs _
)

[C#]
public C1SelectedIndexChangingEventArgs(
C1GridItem item,
object commandSource,
CommandEventArgs originalArgs
);

[Delphi]
public constructor Create(
item: C1GridItem;
commandSource: Object;
originalArgs: CommandEventArgs
); overload;
Parameters
item
A C1GridItem that contains the command source.
commandSource
The source of the command.
originalArgs
A System.Web.UI.WebControls.CommandEventArgs that contains the event data.
C1SelectedIndexChangingEventArgs Properties 191

See Also
C1SelectedIndexChangingEventArgs Class | C1SelectedIndexChangingEventArgs Members |
C1.Web.C1WebGrid Namespace | C1SelectedIndexChangingEventArgs Constructor Overload List
C1SelectedIndexChangingEventArgs Properties
The properties of the C1SelectedIndexChangingEventArgs class are listed here. For a complete list of
C1SelectedIndexChangingEventArgs class members, see the C1SelectedIndexChangingEventArgs Members
topic.
Public Properties
Cancel (inherited from
C1CancelCommandEventArgs)
Gets or sets a value indicating whether the event
should be canceled.
CommandSource (inherited from
C1CommandEventArgs)
Gets the source of the command.
Item (inherited from C1CommandEventArgs) Gets the C1GridItem item that contains the
command source.
NewSelectedIndex Gets or sets the index of the new item to select.
See Also
C1SelectedIndexChangingEventArgs Class | C1.Web.C1WebGrid Namespace
C1SelectedIndexChangingEventArgs.NewSelectedIndex Property
Gets or sets the index of the new item to select.

[Visual Basic]
Public Property NewSelectedIndex As Integer

[C#]
public int NewSelectedIndex {get;set;}

[Delphi]
public property NewSelectedIndex: Int32 read get_NewSelectedIndex write
set_NewSelectedIndex;
See Also
C1SelectedIndexChangingEventArgs Class | C1SelectedIndexChangingEventArgs Members |
C1.Web.C1WebGrid Namespace
C1SelectedIndexChangingHandler Delegate
Represents the method that will handle the SelectedIndexChanging event of the C1WebGrid.

[Visual Basic]
Public Delegate Sub C1SelectedIndexChangingHandler( _
ByVal sender As Object, _
ByVal e As C1SelectedIndexChangingEventArgs _
)


192 C1.Web.C1WebGrid Namespace

[C#]
public delegate void C1SelectedIndexChangingHandler(
object sender,
C1SelectedIndexChangingEventArgs e
);

[Delphi]
type C1SelectedIndexChangingHandler = procedure (
sender: Object;
e: C1SelectedIndexChangingEventArgs
) of object;
Parameters
sender
The source of the event.
e
Namespace: C1.Web.C1WebGrid
Assembly: C1.Web.C1WebGrid.2 (in C1.Web.C1WebGrid.2.dll)
See Also
C1.Web.C1WebGrid Namespace
C1SortDirection Enumeration
Use the members of this enumeration to set the value of the SortDirection property in the C1Column class.

[Visual Basic]
Public Enum C1SortDirection

[C#]
public enum C1SortDirection

[Delphi]
type C1SortDirection = (Ascending, Descending, NotSet);
Namespace: C1.Web.C1WebGrid
Assembly: C1.Web.C1WebGrid.2 (in C1.Web.C1WebGrid.2.dll)
Members
Member name Description
Ascending Sort from smallest to largest. For example, A to Z.
Descending Sort from largest to smallest. For example, Z to A.
NotSet No sorting.
See Also
C1.Web.C1WebGrid Namespace
C1SortingCommandEventArgs Class 193

C1SortingCommandEventArgs Class
Provides data for the SortingCommand event of the C1WebGrid control.
For a list of all members of this type, see C1SortingCommandEventArgs Members.
System.Object
System.EventArgs
System.ComponentModel.CancelEventArgs
C1.Web.C1WebGrid.C1SortingCommandEventArgs

[Visual Basic]
Public Class C1SortingCommandEventArgs
Inherits CancelEventArgs

[C#]
public class C1SortingCommandEventArgs : CancelEventArgs

[Delphi]
type C1SortingCommandEventArgs = class (CancelEventArgs);
Namespace: C1.Web.C1WebGrid
Assembly: C1.Web.C1WebGrid.2 (in C1.Web.C1WebGrid.2.dll)
See Also
C1SortingCommandEventArgs Members | C1.Web.C1WebGrid Namespace
C1SortingCommandEventArgs Members
C1SortingCommandEventArgs overview
Public Constructors
C1SortingCommandEventArgs Constructor Constructor. Initializes a new instance of the
C1SortingCommandEventArgs class.
Public Properties
Column Gets the column to be sorted.
CommandSource Gets the source of the command.
SortExpression Gets the expression used to sort C1WebGrid.
See Also
C1SortingCommandEventArgs Class | C1.Web.C1WebGrid Namespace
C1SortingCommandEventArgs Constructor
Constructor. Initializes a new instance of the C1SortingCommandEventArgs class.




194 C1.Web.C1WebGrid Namespace

[Visual Basic]
Public Function New( _
ByVal commandSource As Object, _
ByVal wce As C1CommandEventArgs, _
ByVal col As C1Column _
)

[C#]
public C1SortingCommandEventArgs(
object commandSource,
C1CommandEventArgs wce,
C1Column col
);

[Delphi]
public constructor Create(
commandSource: Object;
wce: C1CommandEventArgs;
col: C1Column
);
Parameters
commandSource
The source of the command.
wce
A C1CommandEventArgs that contains the event data.
col
Column to be sorted.
See Also
C1SortingCommandEventArgs Class | C1SortingCommandEventArgs Members | C1.Web.C1WebGrid
Namespace
C1SortingCommandEventArgs Properties
The properties of the C1SortingCommandEventArgs class are listed here. For a complete list of
C1SortingCommandEventArgs class members, see the C1SortingCommandEventArgs Members topic.
Public Properties
Column Gets the column to be sorted.
CommandSource Gets the source of the command.
SortExpression Gets the expression used to sort C1WebGrid.
See Also
C1SortingCommandEventArgs Class | C1.Web.C1WebGrid Namespace
C1SortingCommandEventArgs.Column Property
Gets the column to be sorted.


C1SortingCommandEventArgs.CommandSource Property 195

[Visual Basic]
Public ReadOnly Property Column As C1Column

[C#]
public C1Column Column {get;}

[Delphi]
public property Column: C1Column read get_Column;
See Also
C1SortingCommandEventArgs Class | C1SortingCommandEventArgs Members | C1.Web.C1WebGrid
Namespace
C1SortingCommandEventArgs.CommandSource Property
Gets the source of the command.

[Visual Basic]
Public ReadOnly Property CommandSource As Object

[C#]
public object CommandSource {get;}

[Delphi]
public property CommandSource: Object read get_CommandSource;
See Also
C1SortingCommandEventArgs Class | C1SortingCommandEventArgs Members | C1.Web.C1WebGrid
Namespace
C1SortingCommandEventArgs.SortExpression Property
Gets the expression used to sort C1WebGrid.

[Visual Basic]
Public ReadOnly Property SortExpression As String

[C#]
public string SortExpression {get;}

[Delphi]
public property SortExpression: String read get_SortExpression;
See Also
C1SortingCommandEventArgs Class | C1SortingCommandEventArgs Members | C1.Web.C1WebGrid
Namespace
C1SortingCommandEventHandler Delegate
Represents the the method that will handle the SortingCommand event of the C1WebGrid.



196 C1.Web.C1WebGrid Namespace

[Visual Basic]
Public Delegate Sub C1SortingCommandEventHandler( _
ByVal sender As Object, _
ByVal e As C1SortingCommandEventArgs _
)

[C#]
public delegate void C1SortingCommandEventHandler(
object sender,
C1SortingCommandEventArgs e
);

[Delphi]
type C1SortingCommandEventHandler = procedure (
sender: Object;
e: C1SortingCommandEventArgs
) of object;
Parameters
sender
The source of the event.
e
Namespace: C1.Web.C1WebGrid
Assembly: C1.Web.C1WebGrid.2 (in C1.Web.C1WebGrid.2.dll)
See Also
C1.Web.C1WebGrid Namespace
C1TemplateColumn Class
A C1TemplateColumn displays each item in the column following a specified template.
For a list of all members of this type, see C1TemplateColumn Members.
System.Object
C1.Web.C1WebGrid.C1Column
C1.Web.C1WebGrid.C1TemplateColumn

[Visual Basic]
Public Class C1TemplateColumn
Inherits C1Column

[C#]
public class C1TemplateColumn : C1Column

[Delphi]
type C1TemplateColumn = class (C1Column);
Namespace: C1.Web.C1WebGrid
Assembly: C1.Web.C1WebGrid.2 (in C1.Web.C1WebGrid.2.dll)

C1TemplateColumn Members 197

See Also
C1TemplateColumn Members | C1.Web.C1WebGrid Namespace
C1TemplateColumn Members
C1TemplateColumn overview
Public Constructors
C1TemplateColumn Constructor Constructor. Creates a new instance of the
C1TemplateColumn class.
Public Properties
Aggregate (inherited from C1Column) Causes the grid to calculate aggregate values to the
column and place them in the group header and footer
rows. If the grid does not contain any groups, setting
the Aggregate property has no effect.
AllowGroup (inherited from C1Column) Used to disallow the client-side grouping of a column
in a grouped grid.
AllowMove (inherited from C1Column) Determines whether column can be moved on the
client.
AllowSizing (inherited from C1Column) Determines whether columns can be sized on the
client.
EditItemTemplate Sets or returns the template to be used when editing
an item.
Fixed (inherited from C1Column) Determines whether a column is fixed to the left of the
grid when it is scrolled horizontally.
FooterStyle (inherited from C1Column) Gets the style properties of the column footer.
FooterTemplate Sets or returns the template used to show the footer of
a C1TemplateColumn.
FooterText (inherited from C1Column) Gets or sets the text of the footer.
GroupInfo (inherited from C1Column) Gets a GroupInfo object that determines whether a
column should be grouped on and how the group
header and footer rows should be formatted and
displayed.
HeaderImageUrl (inherited from C1Column) Gets or sets the location of the image to be used in the
header.
HeaderStyle (inherited from C1Column) Gets the style properties of the column header.
HeaderTemplate Sets or returns the template used to show the header
of a C1TemplateColumn.
HeaderText (inherited from C1Column) Gets or sets the text of the header.
ItemStyle (inherited from C1Column) Gets the style properties of the item.
ItemTemplate Sets or returns the template used to show an item in a
C1TemplateColumn.
RowMerge (inherited from C1Column) Determines whether rows are merged.
SortDirection (inherited from C1Column) Gets the direction of the sort.
198 C1.Web.C1WebGrid Namespace

SortExpression (inherited from C1Column) Gets or sets the name of the field or expression to pass
to the OnSortCommand method when a column is
selected for sorting.
UpdateBindings Returns the collection of GridUpdateBinding objects
specifying bindings used in Update method.
Visible (inherited from C1Column) Determines whether the column is visible within the
displayed area of the C1WebGrid component.
Public Methods
ToString Overriden. Returns a string that represents the current
object.
See Also
C1TemplateColumn Class | C1.Web.C1WebGrid Namespace
C1TemplateColumn Constructor
Constructor. Creates a new instance of the C1TemplateColumn class.

[Visual Basic]
Public Function New()

[C#]
public C1TemplateColumn()

[Delphi]
public constructor Create(); overload;
See Also
C1TemplateColumn Class | C1TemplateColumn Members | C1.Web.C1WebGrid Namespace
C1TemplateColumn Properties
The properties of the C1TemplateColumn class are listed here. For a complete list of C1TemplateColumn
class members, see the C1TemplateColumn Members topic.
Public Properties
Aggregate (inherited from C1Column) Causes the grid to calculate aggregate values to the
column and place them in the group header and footer
rows. If the grid does not contain any groups, setting
the Aggregate property has no effect.
AllowGroup (inherited from C1Column) Used to disallow the client-side grouping of a column
in a grouped grid.
AllowMove (inherited from C1Column) Determines whether column can be moved on the
client.
AllowSizing (inherited from C1Column) Determines whether columns can be sized on the
client.
EditItemTemplate Sets or returns the template to be used when editing
an item.
C1TemplateColumn.EditItemTemplate Property 199

Fixed (inherited from C1Column) Determines whether a column is fixed to the left of the
grid when it is scrolled horizontally.
FooterStyle (inherited from C1Column) Gets the style properties of the column footer.
FooterTemplate Sets or returns the template used to show the footer of
a C1TemplateColumn.
FooterText (inherited from C1Column) Gets or sets the text of the footer.
GroupInfo (inherited from C1Column) Gets a GroupInfo object that determines whether a
column should be grouped on and how the group
header and footer rows should be formatted and
displayed.
HeaderImageUrl (inherited from C1Column) Gets or sets the location of the image to be used in the
header.
HeaderStyle (inherited from C1Column) Gets the style properties of the column header.
HeaderTemplate Sets or returns the template used to show the header
of a C1TemplateColumn.
HeaderText (inherited from C1Column) Gets or sets the text of the header.
ItemStyle (inherited from C1Column) Gets the style properties of the item.
ItemTemplate Sets or returns the template used to show an item in a
C1TemplateColumn.
RowMerge (inherited from C1Column) Determines whether rows are merged.
SortDirection (inherited from C1Column) Gets the direction of the sort.
SortExpression (inherited from C1Column) Gets or sets the name of the field or expression to pass
to the OnSortCommand method when a column is
selected for sorting.
UpdateBindings Returns the collection of GridUpdateBinding objects
specifying bindings used in Update method.
Visible (inherited from C1Column) Determines whether the column is visible within the
displayed area of the C1WebGrid component.
See Also
C1TemplateColumn Class | C1.Web.C1WebGrid Namespace
C1TemplateColumn.EditItemTemplate Property
Sets or returns the template to be used when editing an item.

[Visual Basic]
Overridable Public Property EditItemTemplate As ITemplate

[C#]
virtual public ITemplate EditItemTemplate {get;set;}

[Delphi]
public property EditItemTemplate: ITemplate read get_EditItemTemplate
write set_EditItemTemplate;

200 C1.Web.C1WebGrid Namespace

See Also
C1TemplateColumn Class | C1TemplateColumn Members | C1.Web.C1WebGrid Namespace
C1TemplateColumn.FooterTemplate Property
Sets or returns the template used to show the footer of a C1TemplateColumn.

[Visual Basic]
Overridable Public Property FooterTemplate As ITemplate

[C#]
virtual public ITemplate FooterTemplate {get;set;}

[Delphi]
public property FooterTemplate: ITemplate read get_FooterTemplate write
set_FooterTemplate;
See Also
C1TemplateColumn Class | C1TemplateColumn Members | C1.Web.C1WebGrid Namespace
C1TemplateColumn.HeaderTemplate Property
Sets or returns the template used to show the header of a C1TemplateColumn.

[Visual Basic]
Overridable Public Property HeaderTemplate As ITemplate

[C#]
virtual public ITemplate HeaderTemplate {get;set;}

[Delphi]
public property HeaderTemplate: ITemplate read get_HeaderTemplate write
set_HeaderTemplate;
See Also
C1TemplateColumn Class | C1TemplateColumn Members | C1.Web.C1WebGrid Namespace
C1TemplateColumn.ItemTemplate Property
Sets or returns the template used to show an item in a C1TemplateColumn.

[Visual Basic]
Overridable Public Property ItemTemplate As ITemplate

[C#]
virtual public ITemplate ItemTemplate {get;set;}

[Delphi]
public property ItemTemplate: ITemplate read get_ItemTemplate write
set_ItemTemplate;
See Also
C1TemplateColumn Class | C1TemplateColumn Members | C1.Web.C1WebGrid Namespace
C1TemplateColumn.UpdateBindings Property 201

C1TemplateColumn.UpdateBindings Property
Returns the collection of GridUpdateBinding objects specifying bindings used in Update method.

[Visual Basic]
Public ReadOnly Property UpdateBindings As GridUpdateBindingCollection

[C#]
public GridUpdateBindingCollection UpdateBindings {get;}

[Delphi]
public property UpdateBindings: GridUpdateBindingCollection read
get_UpdateBindings;
See Also
C1TemplateColumn Class | C1TemplateColumn Members | C1.Web.C1WebGrid Namespace
C1TemplateColumn Methods
The methods of the C1TemplateColumn class are listed here. For a complete list of C1TemplateColumn class
members, see the C1TemplateColumn Members topic.
Public Methods
ToString Overriden. Returns a string that represents the current
object.
See Also
C1TemplateColumn Class | C1.Web.C1WebGrid Namespace
C1TemplateColumn.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;
See Also
C1TemplateColumn Class | C1TemplateColumn Members | C1.Web.C1WebGrid Namespace
C1UpdatedEventArgs Class
Provides data for the UpdatedCommand event of the C1WebGrid control.
For a list of all members of this type, see C1UpdatedEventArgs Members.
System.Object
System.EventArgs
202 C1.Web.C1WebGrid Namespace

C1.Web.C1WebGrid.C1UpdatedEventArgs

[Visual Basic]
Public Class C1UpdatedEventArgs
Inherits EventArgs

[C#]
public class C1UpdatedEventArgs : EventArgs

[Delphi]
type C1UpdatedEventArgs = class (EventArgs);
Namespace: C1.Web.C1WebGrid
Assembly: C1.Web.C1WebGrid.2 (in C1.Web.C1WebGrid.2.dll)
See Also
C1UpdatedEventArgs Members | C1.Web.C1WebGrid Namespace
C1UpdatedEventArgs Members
C1UpdatedEventArgs overview
Public Constructors
C1UpdatedEventArgs Constructor Constructor. Initializes a new instance of the
C1UpdatedEventArgs class.
Public Properties
AffectedRows Gets the number of rows affected by the update
operation.
Exception Gets the exception that was raised during the update
operation.
ExceptionHandled Gets or sets a value indicating whether an exception
that was raised during the update operation was
handled in the event handler.
Keys Gets a dictionary that contains the key field
name/value pairs for the updated record.
NewValues Gets a dictionary that contains the new field
name/value pairs for the updated record.
OldValues Gets a dictionary that contains the original field
name/value pairs for the updated record.
See Also
C1UpdatedEventArgs Class | C1.Web.C1WebGrid Namespace
C1UpdatedEventArgs Constructor
Constructor. Initializes a new instance of the C1UpdatedEventArgs class.




C1UpdatedEventArgs Properties 203

[Visual Basic]
Public Function New( _
ByVal affected As Integer, _
ByVal excpt As Exception, _
ByVal keys As IOrderedDictionary, _
ByVal newValues As IOrderedDictionary, _
ByVal oldValues As IOrderedDictionary _
)

[C#]
public C1UpdatedEventArgs(
int affected,
Exception excpt,
IOrderedDictionary keys,
IOrderedDictionary newValues,
IOrderedDictionary oldValues
);

[Delphi]
public constructor Create(
affected: Int32;
excpt: Exception;
keys: IOrderedDictionary;
newValues: IOrderedDictionary;
oldValues: IOrderedDictionary
);
Parameters
affected
Number of rows affected by the update operation.
excpt
The exception that was raised during the update operation.
keys
A dictionary that contains the key field name/value pairs for the updated record.
newValues
A dictionary that contains the new field name/value pairs for the updated record.
oldValues
A dictionary that contains the original field name/value pairs for the updated record.
See Also
C1UpdatedEventArgs Class | C1UpdatedEventArgs Members | C1.Web.C1WebGrid Namespace
C1UpdatedEventArgs Properties
The properties of the C1UpdatedEventArgs class are listed here. For a complete list of C1UpdatedEventArgs
class members, see the C1UpdatedEventArgs Members topic.
Public Properties
AffectedRows Gets the number of rows affected by the update
operation.
204 C1.Web.C1WebGrid Namespace

Exception Gets the exception that was raised during the update
operation.
ExceptionHandled Gets or sets a value indicating whether an exception
that was raised during the update operation was
handled in the event handler.
Keys Gets a dictionary that contains the key field
name/value pairs for the updated record.
NewValues Gets a dictionary that contains the new field
name/value pairs for the updated record.
OldValues Gets a dictionary that contains the original field
name/value pairs for the updated record.
See Also
C1UpdatedEventArgs Class | C1.Web.C1WebGrid Namespace
C1UpdatedEventArgs.AffectedRows Property
Gets the number of rows affected by the update operation.

[Visual Basic]
Public ReadOnly Property AffectedRows As Integer

[C#]
public int AffectedRows {get;}

[Delphi]
public property AffectedRows: Int32 read get_AffectedRows;
See Also
C1UpdatedEventArgs Class | C1UpdatedEventArgs Members | C1.Web.C1WebGrid Namespace
C1UpdatedEventArgs.Exception Property
Gets the exception that was raised during the update operation.

[Visual Basic]
Public ReadOnly Property Exception As Exception

[C#]
public Exception Exception {get;}

[Delphi]
public property Exception: Exception read get_Exception;
See Also
C1UpdatedEventArgs Class | C1UpdatedEventArgs Members | C1.Web.C1WebGrid Namespace
C1UpdatedEventArgs.ExceptionHandled Property
Gets or sets a value indicating whether an exception that was raised during the update operation was handled
in the event handler.


C1UpdatedEventArgs.Keys Property 205

[Visual Basic]
Public ReadOnly Property ExceptionHandled As Boolean

[C#]
public bool ExceptionHandled {get;}

[Delphi]
public property ExceptionHandled: Boolean read get_ExceptionHandled;
See Also
C1UpdatedEventArgs Class | C1UpdatedEventArgs Members | C1.Web.C1WebGrid Namespace
C1UpdatedEventArgs.Keys Property
Gets a dictionary that contains the key field name/value pairs for the updated record.

[Visual Basic]
Public ReadOnly Property Keys As IOrderedDictionary

[C#]
public IOrderedDictionary Keys {get;}

[Delphi]
public property Keys: IOrderedDictionary read get_Keys;
See Also
C1UpdatedEventArgs Class | C1UpdatedEventArgs Members | C1.Web.C1WebGrid Namespace
C1UpdatedEventArgs.NewValues Property
Gets a dictionary that contains the new field name/value pairs for the updated record.

[Visual Basic]
Public ReadOnly Property NewValues As IOrderedDictionary

[C#]
public IOrderedDictionary NewValues {get;}

[Delphi]
public property NewValues: IOrderedDictionary read get_NewValues;
See Also
C1UpdatedEventArgs Class | C1UpdatedEventArgs Members | C1.Web.C1WebGrid Namespace
C1UpdatedEventArgs.OldValues Property
Gets a dictionary that contains the original field name/value pairs for the updated record.

[Visual Basic]
Public ReadOnly Property OldValues As IOrderedDictionary

[C#]
public IOrderedDictionary OldValues {get;}

206 C1.Web.C1WebGrid Namespace

[Delphi]
public property OldValues: IOrderedDictionary read get_OldValues;
See Also
C1UpdatedEventArgs Class | C1UpdatedEventArgs Members | C1.Web.C1WebGrid Namespace
C1UpdatedEventHandler Delegate
Represents the the method that will handle the UpdatedCommand event of the C1WebGrid.

[Visual Basic]
Public Delegate Sub C1UpdatedEventHandler( _
ByVal sender As Object, _
ByVal e As C1UpdatedEventArgs _
)

[C#]
public delegate void C1UpdatedEventHandler(
object sender,
C1UpdatedEventArgs e
);

[Delphi]
type C1UpdatedEventHandler = procedure (
sender: Object;
e: C1UpdatedEventArgs
) of object;
Parameters
sender
The source of the event.
e
Namespace: C1.Web.C1WebGrid
Assembly: C1.Web.C1WebGrid.2 (in C1.Web.C1WebGrid.2.dll)
See Also
C1.Web.C1WebGrid Namespace
C1UpdatingEventArgs Class
Provides data for the UpdatingCommand event of the C1WebGrid control.
For a list of all members of this type, see C1UpdatingEventArgs Members.
System.Object
System.EventArgs
System.Web.UI.WebControls.CommandEventArgs
C1.Web.C1WebGrid.C1CommandEventArgs
C1.Web.C1WebGrid.C1CancelCommandEventArgs
C1.Web.C1WebGrid.C1UpdatingEventArgs
C1UpdatingEventArgs Members 207


[Visual Basic]
Public Class C1UpdatingEventArgs
Inherits C1CancelCommandEventArgs

[C#]
public class C1UpdatingEventArgs : C1CancelCommandEventArgs

[Delphi]
type C1UpdatingEventArgs = class (C1CancelCommandEventArgs);
Namespace: C1.Web.C1WebGrid
Assembly: C1.Web.C1WebGrid.2 (in C1.Web.C1WebGrid.2.dll)
See Also
C1UpdatingEventArgs Members | C1.Web.C1WebGrid Namespace
C1UpdatingEventArgs Members
C1UpdatingEventArgs overview
Public Constructors
C1UpdatingEventArgs Constructor Constructor. Initializes a new instance of the
C1UpdatingEventArgs class.
Public Properties
Cancel (inherited from
C1CancelCommandEventArgs)
Gets or sets a value indicating whether the event
should be canceled.
CommandSource (inherited from
C1CommandEventArgs)
Gets the source of the command.
Item (inherited from C1CommandEventArgs) Gets the C1GridItem item that contains the
command source.
Keys Gets a dictionary of field name/value pairs that
represent the primary key of the row to update.
NewValues Gets a dictionary containing the revised values of the
non-key field name/value pairs in the row to update.
OldValues Gets a dictionary containing the original field
name/value pairs in the row to update.
See Also
C1UpdatingEventArgs Class | C1.Web.C1WebGrid Namespace
C1UpdatingEventArgs Constructor
Overload List
Constructor. Initializes a new instance of the C1UpdatingEventArgs class.
[Visual Basic] Public Function New(C1CommandEventArgs)
[C#] public C1UpdatingEventArgs(C1CommandEventArgs);
[Delphi] public constructor Create(C1CommandEventArgs); overload;
208 C1.Web.C1WebGrid Namespace

Constructor. Initializes a new instance of the C1UpdatingEventArgs class.
[Visual Basic] Public Function New(C1GridItem, Object, CommandEventArgs)
[C#] public C1UpdatingEventArgs(C1GridItem, object, CommandEventArgs);
[Delphi] public constructor Create(C1GridItem; Object; CommandEventArgs); overload;
See Also
C1UpdatingEventArgs Class | C1UpdatingEventArgs Members | C1.Web.C1WebGrid Namespace
C1UpdatingEventArgs Constructor (C1CommandEventArgs)
Constructor. Initializes a new instance of the C1UpdatingEventArgs class.

[Visual Basic]
Public Function New( _
ByVal e As C1CommandEventArgs _
)

[C#]
public C1UpdatingEventArgs(
C1CommandEventArgs e
);

[Delphi]
public constructor Create(
e: C1CommandEventArgs
); overload;
Parameters
e
A C1CommandEventArgs that contains the event data.
See Also
C1UpdatingEventArgs Class | C1UpdatingEventArgs Members | C1.Web.C1WebGrid Namespace |
C1UpdatingEventArgs Constructor Overload List
C1UpdatingEventArgs Constructor (C1GridItem, Object, CommandEventArgs)
Constructor. Initializes a new instance of the C1UpdatingEventArgs class.

[Visual Basic]
Public Function New( _
ByVal item As C1GridItem, _
ByVal commandSource As Object, _
ByVal originalArgs As CommandEventArgs _
)

[C#]
public C1UpdatingEventArgs(
C1GridItem item,
object commandSource,
CommandEventArgs originalArgs
);

C1UpdatingEventArgs Properties 209

[Delphi]
public constructor Create(
item: C1GridItem;
commandSource: Object;
originalArgs: CommandEventArgs
); overload;
Parameters
item
A C1GridItem that contains the command source.
commandSource
The source of the command.
originalArgs
A System.Web.UI.WebControls.CommandEventArgs that contains the event data.
See Also
C1UpdatingEventArgs Class | C1UpdatingEventArgs Members | C1.Web.C1WebGrid Namespace |
C1UpdatingEventArgs Constructor Overload List
C1UpdatingEventArgs Properties
The properties of the C1UpdatingEventArgs class are listed here. For a complete list of
C1UpdatingEventArgs class members, see the C1UpdatingEventArgs Members topic.
Public Properties
Cancel (inherited from
C1CancelCommandEventArgs)
Gets or sets a value indicating whether the event
should be canceled.
CommandSource (inherited from
C1CommandEventArgs)
Gets the source of the command.
Item (inherited from C1CommandEventArgs) Gets the C1GridItem item that contains the
command source.
Keys Gets a dictionary of field name/value pairs that
represent the primary key of the row to update.
NewValues Gets a dictionary containing the revised values of the
non-key field name/value pairs in the row to update.
OldValues Gets a dictionary containing the original field
name/value pairs in the row to update.
See Also
C1UpdatingEventArgs Class | C1.Web.C1WebGrid Namespace
C1UpdatingEventArgs.Keys Property
Gets a dictionary of field name/value pairs that represent the primary key of the row to update.

[Visual Basic]
Public ReadOnly Property Keys As IOrderedDictionary

[C#]
public IOrderedDictionary Keys {get;}
210 C1.Web.C1WebGrid Namespace


[Delphi]
public property Keys: IOrderedDictionary read get_Keys;
See Also
C1UpdatingEventArgs Class | C1UpdatingEventArgs Members | C1.Web.C1WebGrid Namespace
C1UpdatingEventArgs.NewValues Property
Gets a dictionary containing the revised values of the non-key field name/value pairs in the row to update.

[Visual Basic]
Public ReadOnly Property NewValues As IOrderedDictionary

[C#]
public IOrderedDictionary NewValues {get;}

[Delphi]
public property NewValues: IOrderedDictionary read get_NewValues;
See Also
C1UpdatingEventArgs Class | C1UpdatingEventArgs Members | C1.Web.C1WebGrid Namespace
C1UpdatingEventArgs.OldValues Property
Gets a dictionary containing the original field name/value pairs in the row to update.

[Visual Basic]
Public ReadOnly Property OldValues As IOrderedDictionary

[C#]
public IOrderedDictionary OldValues {get;}

[Delphi]
public property OldValues: IOrderedDictionary read get_OldValues;
See Also
C1UpdatingEventArgs Class | C1UpdatingEventArgs Members | C1.Web.C1WebGrid Namespace
C1UpdatingEventHandler Delegate
Represents the the method that will handle the UpdatingCommand event of the C1WebGrid.

[Visual Basic]
Public Delegate Sub C1UpdatingEventHandler( _
ByVal sender As Object, _
ByVal e As C1UpdatingEventArgs _
)

[C#]
public delegate void C1UpdatingEventHandler(
object sender,
C1UpdatingEventArgs e
);
C1WebGrid Class 211


[Delphi]
type C1UpdatingEventHandler = procedure (
sender: Object;
e: C1UpdatingEventArgs
) of object;
Parameters
sender
The source of the event.
e
Namespace: C1.Web.C1WebGrid
Assembly: C1.Web.C1WebGrid.2 (in C1.Web.C1WebGrid.2.dll)
See Also
C1.Web.C1WebGrid Namespace
C1WebGrid Class
Represents the C1WebGrid control.
For a list of all members of this type, see C1WebGrid Members.
System.Object
System.Web.UI.Control
System.Web.UI.WebControls.WebControl
System.Web.UI.WebControls.BaseDataBoundControl
System.Web.UI.WebControls.DataBoundControl
System.Web.UI.WebControls.CompositeDataBoundControl
C1.Web.C1WebGrid.C1WebGrid

[Visual Basic]
Public Class C1WebGrid
Inherits CompositeDataBoundControl
Implements an, IPostBackDataHandler, IPostBackEventHandler

[C#]
public class C1WebGrid : CompositeDataBoundControl , an,
IPostBackDataHandler, IPostBackEventHandler

[Delphi]
type C1WebGrid = class (CompositeDataBoundControl, an,
IPostBackDataHandler, IPostBackEventHandler);
Namespace: C1.Web.C1WebGrid
Assembly: C1.Web.C1WebGrid.2 (in C1.Web.C1WebGrid.2.dll)
See Also
C1WebGrid Members | C1.Web.C1WebGrid Namespace
212 C1.Web.C1WebGrid Namespace

C1WebGrid Members
C1WebGrid overview
Public Constructors
C1WebGrid Constructor Constructor. Creates a new instance of the
C1WebGrid class.
Public Properties
AccessKey (inherited from WebControl) Keyboard shortcut used by the control.
AllowColMoving Determines whether columns can be moved on the
client.
AllowColSizing Determines whether columns can be sized on the
client.
AllowCustomPaging Determines whether custom paging is enabled.
AllowGrouping Determines whether grouping is enabled.
AllowPaging Determines whether paging is enabled.
AllowSorting Determines whether sorting is enabled.
AlternatingItemStyle Gets the style properties for alternating items.
AppRelativeTemplateSourceDirectory (inherited
from Control)
The virtual directory of the Page or UserControl that
contains this control.
Attributes (inherited from WebControl) Tag attributes of the control.
AutoGenerateColumns Determines whether C1BoundColumn objects are
generated and displayed automatically.
BackColor (inherited from WebControl) Color of the background of the control.
BackImageUrl Sets or returns the URL for the background image of
the C1WebGrid component.
BorderColor (inherited from WebControl) Color of the border around the control.
BorderStyle (inherited from WebControl) Style of the border around the control.
BorderWidth (inherited from WebControl) Width of the border around the control.
CellPadding Sets or returns the cell padding of the rendered table.
CellSpacing Sets or returns the cell padding of the rendered table.
ClientID (inherited from Control) The ID of the control that is rendered for the client.
Columns Gets a collection of objects representing the columns
of the C1WebGrid component.
Controls Overriden. Gets a System.Web.UI.ControlCollection
that contains a collection of child controls in a data
listing control.
ControlStyle (inherited from WebControl) The style associated with the control.
ControlStyleCreated (inherited from WebControl) Whether the style associated with the control has been
created.
C1WebGrid Members 213

CssClass (inherited from WebControl) CSS Class name applied to the control.
CurrentPageIndex Sets or returns the index of the current page.
DataKeyField Sets or returns the key field of the data source.
DataKeys Sets or returns the key field of the data source.
DataMember (inherited from DataBoundControl) The table or view used for binding against.
DataSource (inherited from BaseDataBoundControl) The data source that is used to populate the items in
the list.
DefaultColumnWidth Sets or returns the width for columns in scrollable grid
where no width has been specified.
DefaultRowHeight Sets or returns the height for rows in scrollable grid.
EditItemIndex Sets or returns the index of the item to be edited.
EditItemStyle Gets the style properties of the item to be edited.
Enabled (inherited from WebControl) Enabled state of the control.
EnableViewState (inherited from Control) Whether the control automatically saves its state for
use in round-trips.
Font (inherited from WebControl) The font used for text within the control.
FooterStyle Gets the style properties of the column footer.
ForeColor (inherited from WebControl) Color of the text within the control.
GridLines Sets or returns the grid lines to be shown in the
rendered table.
GroupByCaption Caption of the grouping area.
GroupedColumns Returns the columns contained in a group.
GroupIndent Gets or sets the indentation of your group.
GroupingStyle The style to be applied to grouping area.
HeaderStyle Gets the style properties of the column header.
Height (inherited from WebControl) The height of the control.
HorizontalAlign Determines the horizontal alignment of C1WebGrid.
HScrollBarStyle Specifies the horizontal scrollbar style.
ID (inherited from Control) Programmatic name of the control.
ImageGroup Determines the images used to show expanded nodes
on the grid.
ImageSortAscending Allows you to change and customize the images the
grid uses as sort indicators.
ImageSortDescending Allows you to change and customize the images the
grid uses as sort indicators.
ImageUngroup Determines the images used to show collapsed nodes
on the grid.
Items Gets a collection of objects representing the items in
C1WebGrid.
214 C1.Web.C1WebGrid Namespace

ItemStyle Gets the style properties of the item.
NamingContainer (inherited from Control) The containing control or page within which ID is
unique.
Page (inherited from Control) The page containing the control.
PageCount Gets the total number of pages needed to display the
items in the C1WebGrid component.
PagerStyle Gets the style properties of the pager section.
PageSize Sets or returns the number of items to place on a
single page.
Parent (inherited from Control) The control containing this control.
SelectedIndex Sets or returns the index of the selected item.
SelectedItem Gets a C1GridItem object that represents the selected
item.
SelectedItemStyle Gets the style to be applied to the selected item.
ShowFooter Determines whether the footer is displayed.
ShowHeader Determines whether the header is displayed.
Site (inherited from Control) Site of the control.
Style (inherited from WebControl) Low-level access to control styles.
TabIndex (inherited from WebControl) The tab order of the control.
TemplateControl (inherited from Control) The TemplateControl that hosts this control.
TemplateSourceDirectory (inherited from Control) The virtual directory of the Page or UserControl that
contains this control.
ToolTip (inherited from WebControl) The tooltip displayed when the mouse is over the
control.
UniqueID (inherited from Control) The unique ID of the control within the page.
VirtualItemCount Gets or sets the virtual number of items when custom
paging is used.
Visible (inherited from Control) Indicates whether the control is visible and rendered.
VScrollBarStyle Specifies the vertical scrollbar style.
Width (inherited from WebControl) The width of the control.
Public Methods
DataBind Overloaded. Overriden. Binds the C1WebGrid
component to the specified data source.
LoadLayout Overloaded. Loads control layout properties from the
stream.
LoadPostData Processes post-back data from a server control.
RaisePostBackEvent Enables a server control to process an event raised
when a form is posted to the server.
C1WebGrid Members 215

RaisePostDataChangedEvent Signals the server control object to notify the
Microsoft ASP .NET application that the state of the
control has changed.
SaveLayout Overloaded. Saves control layout properties to the
specified stream.
Update Saves end user changes in the data source.
Public Events
CancelingCommand Fires when the Cancel button of a item in edit mode is
clicked, but before the item exits edit mode.
ColumnMoved Raised when a column has been moved.
ColumnMoving Raised when a column is moved, but before the
C1WebGrid handles the operation.
DataBinding (inherited from Control) Fires when the control's data binding expressions are
to be evaluated.
DataBound (inherited from BaseDataBoundControl) Fires after the control has been databound.
DataChanged Fires when the data is changed.
DeletedCommand Fires when the Delete button is clicked.
DeletingCommand Fires when the Delete button is clicked, but before the
C1WebGrid instance handles the delete operation.
Disposed (inherited from Control) Fires when the control has been disposed.
EditingCommand Fires when the Edit button is clicked, but before the
C1WebGrid instance handles the operation.
GroupAggregate Raised when Aggregate property of the C1Column
class has been set to "Custom". This allows the
customization of aggregate cell contents for text
displayed in the group header or footer.
GroupColumnMoved Raised when a column in the grouping area has been
moved.
GroupColumnMoving Raised when a column in the grouping area is moved,
but before the C1WebGrid handles the operation.
GroupText Raised when the HeaderText or FooterText property
of the GroupInfo class has been set to "Custom". This
allows one to customize the text displayed for the
group header or footer.
Init (inherited from Control) Fires when the page has been initialized.
ItemCommand Raised when a CommandEvent occurs within an
item.
ItemCreated Fires when an item is created and is ready for
customization.
ItemDataBound Fires when an item is data-bound.
Load (inherited from Control) Fires when the page has been loaded.
PageIndexChanged Occurs when one of the pager buttons has been
clicked.
216 C1.Web.C1WebGrid Namespace

PageIndexChanging Occurs when one of the pager buttons is clicked, but
before the C1WebGrid control handles the paging
operation.
PreRender (inherited from Control) Fires before the page is rendered.
SelectedIndexChanged Fires when a item's Select button is clicked.
SelectedIndexChanging Fires when a item's Select button is clicked, but before
the C1WebGrid control handles the select operation.
SortedCommand Occurs when header is clicked to sort a column.
SortingCommand Occurs when header is clicked to sort a column, but
before the C1WebGrid control handles the sort
operation.
Unload (inherited from Control) Fires when the page is unloaded.
UpdatedCommand Fires when the Update button is clicked.
UpdatingCommand Fires when the Update button is clicked, but before
the C1WebGrid handles the update operation.
Protected Properties
ViewState (inherited from Control) Current viewstate of the control.
See Also
C1WebGrid Class | C1.Web.C1WebGrid Namespace
C1WebGrid Constructor
Constructor. Creates a new instance of the C1WebGrid class.

[Visual Basic]
Public Function New()

[C#]
public C1WebGrid()

[Delphi]
public constructor Create();
See Also
C1WebGrid Class | C1WebGrid Members | C1.Web.C1WebGrid Namespace
C1WebGrid Properties
The properties of the C1WebGrid class are listed here. For a complete list of C1WebGrid class members, see
the C1WebGrid Members topic.
Public Properties
AccessKey (inherited from WebControl) Keyboard shortcut used by the control.
AllowColMoving Determines whether columns can be moved on the
client.
C1WebGrid Properties 217

AllowColSizing Determines whether columns can be sized on the
client.
AllowCustomPaging Determines whether custom paging is enabled.
AllowGrouping Determines whether grouping is enabled.
AllowPaging Determines whether paging is enabled.
AllowSorting Determines whether sorting is enabled.
AlternatingItemStyle Gets the style properties for alternating items.
AppRelativeTemplateSourceDirectory (inherited
from Control)
The virtual directory of the Page or UserControl that
contains this control.
Attributes (inherited from WebControl) Tag attributes of the control.
AutoGenerateColumns Determines whether C1BoundColumn objects are
generated and displayed automatically.
BackColor (inherited from WebControl) Color of the background of the control.
BackImageUrl Sets or returns the URL for the background image of
the C1WebGrid component.
BorderColor (inherited from WebControl) Color of the border around the control.
BorderStyle (inherited from WebControl) Style of the border around the control.
BorderWidth (inherited from WebControl) Width of the border around the control.
CellPadding Sets or returns the cell padding of the rendered table.
CellSpacing Sets or returns the cell padding of the rendered table.
ClientID (inherited from Control) The ID of the control that is rendered for the client.
Columns Gets a collection of objects representing the columns
of the C1WebGrid component.
Controls Overriden. Gets a System.Web.UI.ControlCollection
that contains a collection of child controls in a data
listing control.
ControlStyle (inherited from WebControl) The style associated with the control.
ControlStyleCreated (inherited from WebControl) Whether the style associated with the control has been
created.
CssClass (inherited from WebControl) CSS Class name applied to the control.
CurrentPageIndex Sets or returns the index of the current page.
DataKeyField Sets or returns the key field of the data source.
DataKeys Sets or returns the key field of the data source.
DataMember (inherited from DataBoundControl) The table or view used for binding against.
DataSource (inherited from BaseDataBoundControl) The data source that is used to populate the items in
the list.
DefaultColumnWidth Sets or returns the width for columns in scrollable grid
where no width has been specified.
DefaultRowHeight Sets or returns the height for rows in scrollable grid.
218 C1.Web.C1WebGrid Namespace

EditItemIndex Sets or returns the index of the item to be edited.
EditItemStyle Gets the style properties of the item to be edited.
Enabled (inherited from WebControl) Enabled state of the control.
EnableViewState (inherited from Control) Whether the control automatically saves its state for
use in round-trips.
Font (inherited from WebControl) The font used for text within the control.
FooterStyle Gets the style properties of the column footer.
ForeColor (inherited from WebControl) Color of the text within the control.
GridLines Sets or returns the grid lines to be shown in the
rendered table.
GroupByCaption Caption of the grouping area.
GroupedColumns Returns the columns contained in a group.
GroupIndent Gets or sets the indentation of your group.
GroupingStyle The style to be applied to grouping area.
HeaderStyle Gets the style properties of the column header.
Height (inherited from WebControl) The height of the control.
HorizontalAlign Determines the horizontal alignment of C1WebGrid.
HScrollBarStyle Specifies the horizontal scrollbar style.
ID (inherited from Control) Programmatic name of the control.
ImageGroup Determines the images used to show expanded nodes
on the grid.
ImageSortAscending Allows you to change and customize the images the
grid uses as sort indicators.
ImageSortDescending Allows you to change and customize the images the
grid uses as sort indicators.
ImageUngroup Determines the images used to show collapsed nodes
on the grid.
Items Gets a collection of objects representing the items in
C1WebGrid.
ItemStyle Gets the style properties of the item.
NamingContainer (inherited from Control) The containing control or page within which ID is
unique.
Page (inherited from Control) The page containing the control.
PageCount Gets the total number of pages needed to display the
items in the C1WebGrid component.
PagerStyle Gets the style properties of the pager section.
PageSize Sets or returns the number of items to place on a
single page.
Parent (inherited from Control) The control containing this control.
C1WebGrid.AllowColMoving Property 219

SelectedIndex Sets or returns the index of the selected item.
SelectedItem Gets a C1GridItem object that represents the selected
item.
SelectedItemStyle Gets the style to be applied to the selected item.
ShowFooter Determines whether the footer is displayed.
ShowHeader Determines whether the header is displayed.
Site (inherited from Control) Site of the control.
Style (inherited from WebControl) Low-level access to control styles.
TabIndex (inherited from WebControl) The tab order of the control.
TemplateControl (inherited from Control) The TemplateControl that hosts this control.
TemplateSourceDirectory (inherited from Control) The virtual directory of the Page or UserControl that
contains this control.
ToolTip (inherited from WebControl) The tooltip displayed when the mouse is over the
control.
UniqueID (inherited from Control) The unique ID of the control within the page.
VirtualItemCount Gets or sets the virtual number of items when custom
paging is used.
Visible (inherited from Control) Indicates whether the control is visible and rendered.
VScrollBarStyle Specifies the vertical scrollbar style.
Width (inherited from WebControl) The width of the control.
Protected Properties
ViewState (inherited from Control) Current viewstate of the control.
See Also
C1WebGrid Class | C1.Web.C1WebGrid Namespace
C1WebGrid.AllowColMoving Property
Determines whether columns can be moved on the client.

[Visual Basic]
Public Property AllowColMoving As Boolean

[C#]
public bool AllowColMoving {get;set;}

[Delphi]
public property AllowColMoving: Boolean read get_AllowColMoving write
set_AllowColMoving;
Property Value
The default value is False.
Remarks
This property allows your end users to rearrange the order of the columns on the client. This property only
works if you set AutoGenerateColumns to False. You should provide code in the ColumnMoved event.
220 C1.Web.C1WebGrid Namespace

See Also
C1WebGrid Class | C1WebGrid Members | C1.Web.C1WebGrid Namespace
C1WebGrid.AllowColSizing Property
Determines whether columns can be sized on the client.

[Visual Basic]
Public Property AllowColSizing As Boolean

[C#]
public bool AllowColSizing {get;set;}

[Delphi]
public property AllowColSizing: Boolean read get_AllowColSizing write
set_AllowColSizing;
Property Value
The default value is False.
Remarks
This property allows column sizing on the client. For this property to work correctly you need to set the width
of the component to 0px and optionally set the with of each column using the Property builder.
See Also
C1WebGrid Class | C1WebGrid Members | C1.Web.C1WebGrid Namespace
C1WebGrid.AllowCustomPaging Property
Determines whether custom paging is enabled.

[Visual Basic]
Public Property AllowCustomPaging As Boolean

[C#]
public bool AllowCustomPaging {get;set;}

[Delphi]
public property AllowCustomPaging: Boolean read get_AllowCustomPaging
write set_AllowCustomPaging;
Property Value
The default value is False.
Remarks
Set this property to True to enable custom paging.
Paging allows you to display the contents of the C1WebGrid component in page segments. To enable custom
paging, set both the AllowPaging and AllowCustomPaging properties to True. Next, provide code to handle
the PageIndexChanged event. Create a data source that contains the data to display on a single page and then
use the DataBind method to bind the data to the C1WebGrid component.
Because only a segment of the data is loaded, you must set the property to the total number of items in the
C1WebGrid component. This allows the control to determine the total number of pages needed to display
C1WebGrid.AllowGrouping Property 221

every item in the C1WebGrid component. This property is normally programmatically set once the total
number of items in the C1WebGrid component is determined.
When paging is enabled with the AllowCustomPaging property set to False, the C1WebGrid component
assumes that the data source contains all the items to be displayed. The C1WebGrid component calculates the
indexes of the items on the displayed page based on the page index, specified by the CurrentPageIndex
property, and the number of items on a page, specified by the PageSize property.
When the AllowCustomPaging property is set to True, the C1WebGrid component assumes that the data
source only contains the items as determined by the VirtualItemCount property. All items up to the number of
items specified by the PageSize property are displayed.
See Also
C1WebGrid Class | C1WebGrid Members | C1.Web.C1WebGrid Namespace
C1WebGrid.AllowGrouping Property
Determines whether grouping is enabled.

[Visual Basic]
Public Property AllowGrouping As Boolean

[C#]
public bool AllowGrouping {get;set;}

[Delphi]
public property AllowGrouping: Boolean read get_AllowGrouping write
set_AllowGrouping;
Property Value
The default value is False.
Remarks
This property allows your end users to drag and drop column headers into the grouping area of the grid. This
property only works if AutoGenerateColumns is set to False and AllowColMoving is True. You should
provide code in the GroupColumnMoved event.
See Also
C1WebGrid Class | C1WebGrid Members | C1.Web.C1WebGrid Namespace
C1WebGrid.AllowPaging Property
Determines whether paging is enabled.

[Visual Basic]
Public Property AllowPaging As Boolean

[C#]
public bool AllowPaging {get;set;}

[Delphi]
public property AllowPaging: Boolean read get_AllowPaging write
set_AllowPaging;
Property Value
The default value is False.
222 C1.Web.C1WebGrid Namespace

Remarks
Set this property to True to display the contents of the C1WebGrid component in page segments. You should
provide code to handle the PageIndexChanged event.
See Also
C1WebGrid Class | C1WebGrid Members | C1.Web.C1WebGrid Namespace
C1WebGrid.AllowSorting Property
Determines whether sorting is enabled.

[Visual Basic]
Overridable Public Property AllowSorting As Boolean

[C#]
virtual public bool AllowSorting {get;set;}

[Delphi]
public property AllowSorting: Boolean read get_AllowSorting write
set_AllowSorting;
Property Value
The default value is False.
Remarks
Set this property to True to enable sorting.
See Also
C1WebGrid Class | C1WebGrid Members | C1.Web.C1WebGrid Namespace
C1WebGrid.AlternatingItemStyle Property
Gets the style properties for alternating items.

[Visual Basic]
Overridable Public ReadOnly Property AlternatingItemStyle As
TableItemStyle

[C#]
virtual public TableItemStyle AlternatingItemStyle {get;}

[Delphi]
public property AlternatingItemStyle: TableItemStyle read
get_AlternatingItemStyle;
Remarks
This property is used to provide a custom style for the items of the C1WebGrid component.
See Also
C1WebGrid Class | C1WebGrid Members | C1.Web.C1WebGrid Namespace
C1WebGrid.AutoGenerateColumns Property
Determines whether C1BoundColumn objects are generated and displayed automatically.

C1WebGrid.BackImageUrl Property 223

[Visual Basic]
Overridable Public Property AutoGenerateColumns As Boolean

[C#]
virtual public bool AutoGenerateColumns {get;set;}

[Delphi]
public property AutoGenerateColumns: Boolean read get_AutoGenerateColumns
write set_AutoGenerateColumns;
Property Value
Set this property to True to automatically display and create C1BoundColumn objects. The default value is
True.
See Also
C1WebGrid Class | C1WebGrid Members | C1.Web.C1WebGrid Namespace
C1WebGrid.BackImageUrl Property
Sets or returns the URL for the background image of the C1WebGrid component.

[Visual Basic]
Overridable Public Property BackImageUrl As String

[C#]
virtual public string BackImageUrl {get;set;}

[Delphi]
public property BackImageUrl: String read get_BackImageUrl write
set_BackImageUrl;
Remarks
Use this property to specify the background image of the C1WebGrid component.
If the image is smaller than the control, the image will tile to fill in the background.
See Also
C1WebGrid Class | C1WebGrid Members | C1.Web.C1WebGrid Namespace
C1WebGrid.CellPadding Property
Sets or returns the cell padding of the rendered table.

[Visual Basic]
Overridable Public Property CellPadding As Integer

[C#]
virtual public int CellPadding {get;set;}

[Delphi]
public property CellPadding: Int32 read get_CellPadding write
set_CellPadding;
Property Value
The default is -1, which indicates that this property is not set.
224 C1.Web.C1WebGrid Namespace

Remarks
This property controls the distance (in pixels) between the contents of a cell and the cell's border.
See Also
C1WebGrid Class | C1WebGrid Members | C1.Web.C1WebGrid Namespace
C1WebGrid.CellSpacing Property
Sets or returns the cell padding of the rendered table.

[Visual Basic]
Overridable Public Property CellSpacing As Integer

[C#]
virtual public int CellSpacing {get;set;}

[Delphi]
public property CellSpacing: Int32 read get_CellSpacing write
set_CellSpacing;
Property Value
The default is -1, which indicates that this property is not set.
Remarks
This property controls the distance (in pixels) between the contents of a cell and the cell's border.
See Also
C1WebGrid Class | C1WebGrid Members | C1.Web.C1WebGrid Namespace
C1WebGrid.Columns Property
Gets a collection of objects representing the columns of the C1WebGrid component.

[Visual Basic]
Overridable Public ReadOnly Property Columns As C1ColumnCollection

[C#]
virtual public C1ColumnCollection Columns {get;}

[Delphi]
public property Columns: C1ColumnCollection read get_Columns;
See Also
C1WebGrid Class | C1WebGrid Members | C1.Web.C1WebGrid Namespace
C1WebGrid.Controls Property
Gets a System.Web.UI.ControlCollection that contains a collection of child controls in a data listing control.

[Visual Basic]
Overrides Public ReadOnly Property Controls As ControlCollection

[C#]
override public ControlCollection Controls {get;}
C1WebGrid.CurrentPageIndex Property 225


[Delphi]
public property Controls: ControlCollection read get_Controls;
See Also
C1WebGrid Class | C1WebGrid Members | C1.Web.C1WebGrid Namespace
C1WebGrid.CurrentPageIndex Property
Sets or returns the index of the current page.

[Visual Basic]
Public Property CurrentPageIndex As Integer

[C#]
public int CurrentPageIndex {get;set;}

[Delphi]
public property CurrentPageIndex: Int32 read get_CurrentPageIndex write
set_CurrentPageIndex;
Remarks
This property determines the page being displayed when paging is enabled.
See Also
C1WebGrid Class | C1WebGrid Members | C1.Web.C1WebGrid Namespace
C1WebGrid.DataKeyField Property
Sets or returns the key field of the data source.

[Visual Basic]
Public Property DataKeyField As String

[C#]
public string DataKeyField {get;set;}

[Delphi]
public property DataKeyField: String read get_DataKeyField write
set_DataKeyField;
See Also
C1WebGrid Class | C1WebGrid Members | C1.Web.C1WebGrid Namespace
C1WebGrid.DataKeys Property
Sets or returns the key field of the data source.

[Visual Basic]
Public ReadOnly Property DataKeys As DataKeyCollection

[C#]
public DataKeyCollection DataKeys {get;}


226 C1.Web.C1WebGrid Namespace

[Delphi]
public property DataKeys: DataKeyCollection read get_DataKeys;
See Also
C1WebGrid Class | C1WebGrid Members | C1.Web.C1WebGrid Namespace
C1WebGrid.DefaultColumnWidth Property
Sets or returns the width for columns in scrollable grid where no width has been specified.

[Visual Basic]
Public Property DefaultColumnWidth As Unit

[C#]
public Unit DefaultColumnWidth {get;set;}

[Delphi]
public property DefaultColumnWidth: Unit read get_DefaultColumnWidth write
set_DefaultColumnWidth;
See Also
C1WebGrid Class | C1WebGrid Members | C1.Web.C1WebGrid Namespace
C1WebGrid.DefaultRowHeight Property
Sets or returns the height for rows in scrollable grid.

[Visual Basic]
Public Property DefaultRowHeight As Unit

[C#]
public Unit DefaultRowHeight {get;set;}

[Delphi]
public property DefaultRowHeight: Unit read get_DefaultRowHeight write
set_DefaultRowHeight;
See Also
C1WebGrid Class | C1WebGrid Members | C1.Web.C1WebGrid Namespace
C1WebGrid.EditItemIndex Property
Sets or returns the index of the item to be edited.

[Visual Basic]
Overridable Public Property EditItemIndex As Integer

[C#]
virtual public int EditItemIndex {get;set;}

[Delphi]
public property EditItemIndex: Int32 read get_EditItemIndex write
set_EditItemIndex;

C1WebGrid.EditItemStyle Property 227

Property Value
The default value is -1, which indicates that no item in the C1WebGrid component is being edited.
See Also
C1WebGrid Class | C1WebGrid Members | C1.Web.C1WebGrid Namespace
C1WebGrid.EditItemStyle Property
Gets the style properties of the item to be edited.

[Visual Basic]
Overridable Public ReadOnly Property EditItemStyle As TableItemStyle

[C#]
virtual public TableItemStyle EditItemStyle {get;}

[Delphi]
public property EditItemStyle: TableItemStyle read get_EditItemStyle;
Remarks
This property is used to provide a custom style for the item selected for editing in the C1WebGrid component.
See Also
C1WebGrid Class | C1WebGrid Members | C1.Web.C1WebGrid Namespace
C1WebGrid.FooterStyle Property
Gets the style properties of the column footer.

[Visual Basic]
Overridable Public ReadOnly Property FooterStyle As TableItemStyle

[C#]
virtual public TableItemStyle FooterStyle {get;}

[Delphi]
public property FooterStyle: TableItemStyle read get_FooterStyle;
Remarks
This property is used to provide a custom style for the footer section of the column.
See Also
C1WebGrid Class | C1WebGrid Members | C1.Web.C1WebGrid Namespace
C1WebGrid.GridLines Property
Sets or returns the grid lines to be shown in the rendered table.

[Visual Basic]
Overridable Public Property GridLines As GridLines

[C#]
virtual public GridLines GridLines {get;set;}

228 C1.Web.C1WebGrid Namespace

[Delphi]
public property GridLines: GridLines read get_GridLines write
set_GridLines;
Remarks
This property is used to specify the style of the grid lines.
See Also
C1WebGrid Class | C1WebGrid Members | C1.Web.C1WebGrid Namespace
C1WebGrid.GroupByCaption Property
Caption of the grouping area.

[Visual Basic]
Public Property GroupByCaption As String

[C#]
public string GroupByCaption {get;set;}

[Delphi]
public property GroupByCaption: String read get_GroupByCaption write
set_GroupByCaption;
See Also
C1WebGrid Class | C1WebGrid Members | C1.Web.C1WebGrid Namespace
C1WebGrid.GroupedColumns Property
Returns the columns contained in a group.

[Visual Basic]
Overridable Public ReadOnly Property GroupedColumns As
GroupColumnCollection

[C#]
virtual public GroupColumnCollection GroupedColumns {get;}

[Delphi]
public property GroupedColumns: GroupColumnCollection read
get_GroupedColumns;
Property Value
A GroupColumnCollection that contains a collection of C1Column objects representing the grouped
columns in the C1WebGrid control.
See Also
C1WebGrid Class | C1WebGrid Members | C1.Web.C1WebGrid Namespace
C1WebGrid.GroupIndent Property
Gets or sets the indentation of your group.

[Visual Basic]
Public Property GroupIndent As Unit
C1WebGrid.GroupingStyle Property 229


[C#]
public Unit GroupIndent {get;set;}

[Delphi]
public property GroupIndent: Unit read get_GroupIndent write
set_GroupIndent;
See Also
C1WebGrid Class | C1WebGrid Members | C1.Web.C1WebGrid Namespace
C1WebGrid.GroupingStyle Property
The style to be applied to grouping area.

[Visual Basic]
Overridable Public ReadOnly Property GroupingStyle As TableItemStyle

[C#]
virtual public TableItemStyle GroupingStyle {get;}

[Delphi]
public property GroupingStyle: TableItemStyle read get_GroupingStyle;
See Also
C1WebGrid Class | C1WebGrid Members | C1.Web.C1WebGrid Namespace
C1WebGrid.HeaderStyle Property
Gets the style properties of the column header.

[Visual Basic]
Overridable Public ReadOnly Property HeaderStyle As TableItemStyle

[C#]
virtual public TableItemStyle HeaderStyle {get;}

[Delphi]
public property HeaderStyle: TableItemStyle read get_HeaderStyle;
Remarks
This property is used to provide a custom style for the header section of the column.
See Also
C1WebGrid Class | C1WebGrid Members | C1.Web.C1WebGrid Namespace
C1WebGrid.HorizontalAlign Property
Determines the horizontal alignment of C1WebGrid.

[Visual Basic]
Overridable Public Property HorizontalAlign As HorizontalAlign



230 C1.Web.C1WebGrid Namespace

[C#]
virtual public HorizontalAlign HorizontalAlign {get;set;}

[Delphi]
public property HorizontalAlign: HorizontalAlign read get_HorizontalAlign
write set_HorizontalAlign;
Remarks
The default value is NotSet.
See Also
C1WebGrid Class | C1WebGrid Members | C1.Web.C1WebGrid Namespace
C1WebGrid.HScrollBarStyle Property
Specifies the horizontal scrollbar style.

[Visual Basic]
Public Property HScrollBarStyle As C1ScrollBarStyle

[C#]
public C1ScrollBarStyle HScrollBarStyle {get;set;}

[Delphi]
public property HScrollBarStyle: C1ScrollBarStyle read get_HScrollBarStyle
write set_HScrollBarStyle;
Property Value
One of the C1ScrollBarStyle values. The default value is C1ScrollBarStyle.None.
Remarks
The Height and Width properties of C1WebGrid must be specified in order for the scrollbars to appear and
scroll properly.
See Also
C1WebGrid Class | C1WebGrid Members | C1.Web.C1WebGrid Namespace
C1WebGrid.ImageGroup Property
Determines the images used to show expanded nodes on the grid.

[Visual Basic]
Public Property ImageGroup As String

[C#]
public string ImageGroup {get;set;}

[Delphi]
public property ImageGroup: String read get_ImageGroup write
set_ImageGroup;
Remarks
By default, these properties are set to images that look like the '+' and '-' icons used in TreeView controls. You
can select your own images, and even use different images for different groups.
C1WebGrid.ImageSortAscending Property 231

See Also
C1WebGrid Class | C1WebGrid Members | C1.Web.C1WebGrid Namespace
C1WebGrid.ImageSortAscending Property
Allows you to change and customize the images the grid uses as sort indicators.

[Visual Basic]
Public Property ImageSortAscending As String

[C#]
public string ImageSortAscending {get;set;}

[Delphi]
public property ImageSortAscending: String read get_ImageSortAscending
write set_ImageSortAscending;
See Also
C1WebGrid Class | C1WebGrid Members | C1.Web.C1WebGrid Namespace
C1WebGrid.ImageSortDescending Property
Allows you to change and customize the images the grid uses as sort indicators.

[Visual Basic]
Public Property ImageSortDescending As String

[C#]
public string ImageSortDescending {get;set;}

[Delphi]
public property ImageSortDescending: String read get_ImageSortDescending
write set_ImageSortDescending;
See Also
C1WebGrid Class | C1WebGrid Members | C1.Web.C1WebGrid Namespace
C1WebGrid.ImageUngroup Property
Determines the images used to show collapsed nodes on the grid.

[Visual Basic]
Public Property ImageUngroup As String

[C#]
public string ImageUngroup {get;set;}

[Delphi]
public property ImageUngroup: String read get_ImageUngroup write
set_ImageUngroup;
Remarks
By default, these properties are set to images that look like the '+' and '-' icons used in TreeView controls. You
can select your own images, and even use different images for different groups.
232 C1.Web.C1WebGrid Namespace

See Also
C1WebGrid Class | C1WebGrid Members | C1.Web.C1WebGrid Namespace
C1WebGrid.Items Property
Gets a collection of objects representing the items in C1WebGrid.

[Visual Basic]
Overridable Public ReadOnly Property Items As C1ItemCollection

[C#]
virtual public C1ItemCollection Items {get;}

[Delphi]
public property Items: C1ItemCollection read get_Items;
Property Value
A C1ItemCollection that contains a collection of C1GridItem objects representing the individual items in the
C1WebGrid control.
See Also
C1WebGrid Class | C1WebGrid Members | C1.Web.C1WebGrid Namespace
C1WebGrid.ItemStyle Property
Gets the style properties of the item.

[Visual Basic]
Overridable Public ReadOnly Property ItemStyle As TableItemStyle

[C#]
virtual public TableItemStyle ItemStyle {get;}

[Delphi]
public property ItemStyle: TableItemStyle read get_ItemStyle;
Remarks
This property is used to provide a custom style for the items of the C1WebGrid component.
See Also
C1WebGrid Class | C1WebGrid Members | C1.Web.C1WebGrid Namespace
C1WebGrid.PageCount Property
Gets the total number of pages needed to display the items in the C1WebGrid component.

[Visual Basic]
Public ReadOnly Property PageCount As Integer

[C#]
public int PageCount {get;}

[Delphi]
public property PageCount: Int32 read get_PageCount;
C1WebGrid.PagerStyle Property 233

See Also
C1WebGrid Class | C1WebGrid Members | C1.Web.C1WebGrid Namespace
C1WebGrid.PagerStyle Property
Gets the style properties of the pager section.

[Visual Basic]
Overridable Public ReadOnly Property PagerStyle As C1PagerStyle

[C#]
virtual public C1PagerStyle PagerStyle {get;}

[Delphi]
public property PagerStyle: C1PagerStyle read get_PagerStyle;
Property Value
The C1PagerStyle object that represents the style properties for the paging section of the C1WebGrid.
Remarks
This property is used to provide a custom style for the paging section of the C1WebGrid component.
See Also
C1WebGrid Class | C1WebGrid Members | C1.Web.C1WebGrid Namespace
C1WebGrid.PageSize Property
Sets or returns the number of items to place on a single page.

[Visual Basic]
Public Property PageSize As Integer

[C#]
public int PageSize {get;set;}

[Delphi]
public property PageSize: Int32 read get_PageSize write set_PageSize;
Property Value
The default value is 10.
Remarks
The AllowPaging property must be set to True for this property have any effect.
See Also
C1WebGrid Class | C1WebGrid Members | C1.Web.C1WebGrid Namespace
C1WebGrid.SelectedIndex Property
Sets or returns the index of the selected item.

[Visual Basic]
Overridable Public Property SelectedIndex As Integer

234 C1.Web.C1WebGrid Namespace

[C#]
virtual public int SelectedIndex {get;set;}

[Delphi]
public property SelectedIndex: Int32 read get_SelectedIndex write
set_SelectedIndex;
Property Value
The default value is -1. Set this property to -1 to deselect an item in the C1WebGrid component.
See Also
C1WebGrid Class | C1WebGrid Members | C1.Web.C1WebGrid Namespace
C1WebGrid.SelectedItem Property
Gets a C1GridItem object that represents the selected item.

[Visual Basic]
Overridable Public ReadOnly Property SelectedItem As C1GridItem

[C#]
virtual public C1GridItem SelectedItem {get;}

[Delphi]
public property SelectedItem: C1GridItem read get_SelectedItem;
Remarks
This C1GridItem object can be used to access the properties of the selected item.
See Also
C1WebGrid Class | C1WebGrid Members | C1.Web.C1WebGrid Namespace
C1WebGrid.SelectedItemStyle Property
Gets the style to be applied to the selected item.

[Visual Basic]
Overridable Public ReadOnly Property SelectedItemStyle As TableItemStyle

[C#]
virtual public TableItemStyle SelectedItemStyle {get;}

[Delphi]
public property SelectedItemStyle: TableItemStyle read
get_SelectedItemStyle;
Remarks
This property is used to provide a custom style for the selected item in the C1WebGrid component.
See Also
C1WebGrid Class | C1WebGrid Members | C1.Web.C1WebGrid Namespace

C1WebGrid.ShowFooter Property 235

C1WebGrid.ShowFooter Property
Determines whether the footer is displayed.

[Visual Basic]
Overridable Public Property ShowFooter As Boolean

[C#]
virtual public bool ShowFooter {get;set;}

[Delphi]
public property ShowFooter: Boolean read get_ShowFooter write
set_ShowFooter;
Property Value
The default value is True.
Remarks
Set this property to True to display the footer.
See Also
C1WebGrid Class | C1WebGrid Members | C1.Web.C1WebGrid Namespace
C1WebGrid.ShowHeader Property
Determines whether the header is displayed.

[Visual Basic]
Overridable Public Property ShowHeader As Boolean

[C#]
virtual public bool ShowHeader {get;set;}

[Delphi]
public property ShowHeader: Boolean read get_ShowHeader write
set_ShowHeader;
Property Value
The default value is True.
Remarks
Set this property to True to display the header.
See Also
C1WebGrid Class | C1WebGrid Members | C1.Web.C1WebGrid Namespace
C1WebGrid.VirtualItemCount Property
Gets or sets the virtual number of items when custom paging is used.

[Visual Basic]
Overridable Public Property VirtualItemCount As Integer

[C#]
virtual public int VirtualItemCount {get;set;}
236 C1.Web.C1WebGrid Namespace


[Delphi]
public property VirtualItemCount: Int32 read get_VirtualItemCount write
set_VirtualItemCount;
Remarks
This property is only used when the AllowCustomPaging property is set to True.
See Also
C1WebGrid Class | C1WebGrid Members | C1.Web.C1WebGrid Namespace
C1WebGrid.VScrollBarStyle Property
Specifies the vertical scrollbar style.

[Visual Basic]
Public Property VScrollBarStyle As C1ScrollBarStyle

[C#]
public C1ScrollBarStyle VScrollBarStyle {get;set;}

[Delphi]
public property VScrollBarStyle: C1ScrollBarStyle read get_VScrollBarStyle
write set_VScrollBarStyle;
Property Value
One of the C1ScrollBarStyle values. The default value is C1ScrollBarStyle.None.
Remarks
The Height and Width properties of C1WebGrid must be specified in order for the scrollbars to appear and
scroll properly.
See Also
C1WebGrid Class | C1WebGrid Members | C1.Web.C1WebGrid Namespace
C1WebGrid Methods
The methods of the C1WebGrid class are listed here. For a complete list of C1WebGrid class members, see
the C1WebGrid Members topic.
Public Methods
DataBind Overloaded. Overriden. Binds the C1WebGrid
component to the specified data source.
LoadLayout Overloaded. Loads control layout properties from the
stream.
LoadPostData Processes post-back data from a server control.
RaisePostBackEvent Enables a server control to process an event raised
when a form is posted to the server.
RaisePostDataChangedEvent Signals the server control object to notify the
Microsoft ASP .NET application that the state of the
control has changed.
C1WebGrid.DataBind Method 237

SaveLayout Overloaded. Saves control layout properties to the
specified stream.
Update Saves end user changes in the data source.
See Also
C1WebGrid Class | C1.Web.C1WebGrid Namespace
C1WebGrid.DataBind Method
Overload List
Binds the C1WebGrid component to the specified data source.
[Visual Basic] Overloads Overrides Public Sub DataBind()
[C#] override public void DataBind();
[Delphi] public procedure DataBind(); overload; override;
Binds the C1WebGrid component to the specified data source.
[Visual Basic] Overloads Public Sub DataBind(Boolean)
[C#] public void DataBind(bool);
[Delphi] public procedure DataBind(Boolean); overload;
See Also
C1WebGrid Class | C1WebGrid Members | C1.Web.C1WebGrid Namespace
C1WebGrid.DataBind Method ()
Binds the C1WebGrid component to the specified data source.

[Visual Basic]
Overloads Overrides Public Sub DataBind()

[C#]
override public void DataBind()

[Delphi]
public procedure DataBind(); overload; override;
Remarks
Calling this method is the same as calling DataBind (False).
See Also
C1WebGrid Class | C1WebGrid Members | C1.Web.C1WebGrid Namespace | C1WebGrid.DataBind
Overload List
C1WebGrid.DataBind Method (Boolean)
Binds the C1WebGrid component to the specified data source.

[Visual Basic]
Overloads Public Sub DataBind( _
ByVal keepGroups As Boolean _
)

238 C1.Web.C1WebGrid Namespace

[C#]
new public void DataBind(
bool keepGroups
);

[Delphi]
public procedure DataBind(
keepGroups: Boolean
); overload;
Parameters
keepGroups
Indicates whether control must keep the expanded/collapsed state of the groups between postbacks or not.
Remarks
The DataBind method can be used to maintain the expanded/collapsed state of grouped rows when the grid is
bound to its datasource. Passing in True to this method keeps the current expanded/collapsed state of the
grouped rows. Passing in False (the same as calling DataBind()) uses the initial state as set in the
OutlineMode property.
See Also
C1WebGrid Class | C1WebGrid Members | C1.Web.C1WebGrid Namespace | C1WebGrid.DataBind
Overload List
C1WebGrid.LoadLayout Method
Overload List
Loads control layout properties from the stream.
[Visual Basic] Overloads Public Sub LoadLayout(Stream)
[C#] public void LoadLayout(Stream);
[Delphi] public procedure LoadLayout(Stream); overload;
Loads control layout properties from the file.
[Visual Basic] Overloads Public Sub LoadLayout(String)
[C#] public void LoadLayout(string);
[Delphi] public procedure LoadLayout(String); overload;
Loads control layout properties with specified types from the stream.
[Visual Basic] Overloads Public Sub LoadLayout(Stream, LayoutTypeFlags)
[C#] public void LoadLayout(Stream, LayoutTypeFlags);
[Delphi] public procedure LoadLayout(Stream; LayoutTypeFlags); overload;
Loads control layout properties with specified types from the file.
[Visual Basic] Overloads Public Sub LoadLayout(String, LayoutTypeFlags)
[C#] public void LoadLayout(string, LayoutTypeFlags);
[Delphi] public procedure LoadLayout(String; LayoutTypeFlags); overload;
See Also
C1WebGrid Class | C1WebGrid Members | C1.Web.C1WebGrid Namespace
C1WebGrid.LoadLayout Method 239

C1WebGrid.LoadLayout Method (Stream)
Loads control layout properties from the 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
Stream to load.
See Also
C1WebGrid Class | C1WebGrid Members | C1.Web.C1WebGrid Namespace | C1WebGrid.LoadLayout
Overload List
C1WebGrid.LoadLayout Method (String)
Loads control layout properties from the 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
XML file to load.
See Also
C1WebGrid Class | C1WebGrid Members | C1.Web.C1WebGrid Namespace | C1WebGrid.LoadLayout
Overload List
240 C1.Web.C1WebGrid Namespace

C1WebGrid.LoadLayout Method (Stream, LayoutTypeFlags)
Loads control layout properties with specified types from the stream.

[Visual Basic]
Overloads Public Sub LoadLayout( _
ByVal stream As Stream, _
ByVal layoutTypes As LayoutTypeFlags _
)

[C#]
public void LoadLayout(
Stream stream,
LayoutTypeFlags layoutTypes
);

[Delphi]
public procedure LoadLayout(
stream: Stream;
layoutTypes: LayoutTypeFlags
); overload;
Parameters
stream
Stream to load.
layoutTypes
Layout types to load.
See Also
C1WebGrid Class | C1WebGrid Members | C1.Web.C1WebGrid Namespace | C1WebGrid.LoadLayout
Overload List
C1WebGrid.LoadLayout Method (String, LayoutTypeFlags)
Loads control layout properties with specified types from the file.

[Visual Basic]
Overloads Public Sub LoadLayout( _
ByVal filename As String, _
ByVal layoutTypes As LayoutTypeFlags _
)

[C#]
public void LoadLayout(
string filename,
LayoutTypeFlags layoutTypes
);

[Delphi]
public procedure LoadLayout(
filename: String;
layoutTypes: LayoutTypeFlags
); overload;
C1WebGrid.LoadPostData Method 241

Parameters
filename
XML file to load.
layoutTypes
Layout types to load.
See Also
C1WebGrid Class | C1WebGrid Members | C1.Web.C1WebGrid Namespace | C1WebGrid.LoadLayout
Overload List
C1WebGrid.LoadPostData Method
Processes post-back data from a server control.

[Visual Basic]
Overridable Public Function LoadPostData( _
ByVal postDataKey As String, _
ByVal values As NameValueCollection _
) As Boolean Implements IPostBackDataHandler.LoadPostData

[C#]
virtual public bool LoadPostData(
string postDataKey,
NameValueCollection values
);

[Delphi]
public function LoadPostData(
postDataKey: String;
values: NameValueCollection
): Boolean; virtual;
Implements
IPostBackDataHandler.LoadPostData
Parameters
postDataKey
Required. The key identifier for the control.
values
Required. The collection of all incoming name values.
Return Value
True if the server control's state changes as a result of the post back; otherwise False.
See Also
C1WebGrid Class | C1WebGrid Members | C1.Web.C1WebGrid Namespace
C1WebGrid.RaisePostBackEvent Method
Enables a server control to process an event raised when a form is posted to the server.


242 C1.Web.C1WebGrid Namespace

[Visual Basic]
Overridable Public Sub RaisePostBackEvent( _
ByVal eventargs As String _
) Implements IPostBackEventHandler.RaisePostBackEvent

[C#]
virtual public void RaisePostBackEvent(
string eventargs
);

[Delphi]
public procedure RaisePostBackEvent(
eventargs: String
); virtual;
Implements
IPostBackEventHandler.RaisePostBackEvent
Parameters
eventargs
A String that represents an optional event argument to be passed to the event handler.
See Also
C1WebGrid Class | C1WebGrid Members | C1.Web.C1WebGrid Namespace
C1WebGrid.RaisePostDataChangedEvent Method
Signals the server control object to notify the Microsoft ASP .NET application that the state of the control has
changed.

[Visual Basic]
Overridable Public Sub RaisePostDataChangedEvent() Implements
IPostBackDataHandler.RaisePostDataChangedEvent

[C#]
virtual public void RaisePostDataChangedEvent()

[Delphi]
public procedure RaisePostDataChangedEvent(); virtual;
Implements
IPostBackDataHandler.RaisePostDataChangedEvent
See Also
C1WebGrid Class | C1WebGrid Members | C1.Web.C1WebGrid Namespace
C1WebGrid.SaveLayout Method
Overload List
Saves control layout properties to the specified stream.
[Visual Basic] Overloads Public Sub SaveLayout(Stream)
[C#] public void SaveLayout(Stream);
[Delphi] public procedure SaveLayout(Stream); overload;
C1WebGrid.SaveLayout Method 243

Saves control layout properties to the specified file.
[Visual Basic] Overloads Public Sub SaveLayout(String)
[C#] public void SaveLayout(string);
[Delphi] public procedure SaveLayout(String); overload;
See Also
C1WebGrid Class | C1WebGrid Members | C1.Web.C1WebGrid Namespace
C1WebGrid.SaveLayout Method (Stream)
Saves control layout properties to the specified stream.

[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
Stream to save.
See Also
C1WebGrid Class | C1WebGrid Members | C1.Web.C1WebGrid Namespace | C1WebGrid.SaveLayout
Overload List
C1WebGrid.SaveLayout Method (String)
Saves control layout properties to the specified file.

[Visual Basic]
Overloads Public Sub SaveLayout( _
ByVal filename As String _
)

[C#]
public void SaveLayout(
string filename
);

[Delphi]
public procedure SaveLayout(
filename: String
); overload;
244 C1.Web.C1WebGrid Namespace

Parameters
filename
XML file to save.
See Also
C1WebGrid Class | C1WebGrid Members | C1.Web.C1WebGrid Namespace | C1WebGrid.SaveLayout
Overload List
C1WebGrid.Update Method
Saves end user changes in the data source.

[Visual Basic]
Public Sub Update()

[C#]
public void Update()

[Delphi]
public procedure Update();
See Also
C1WebGrid Class | C1WebGrid Members | C1.Web.C1WebGrid Namespace
C1WebGrid Events
The events of the C1WebGrid class are listed here. For a complete list of C1WebGrid class members, see the
C1WebGrid Members topic.
Public Events
CancelingCommand Fires when the Cancel button of a item in edit mode is
clicked, but before the item exits edit mode.
ColumnMoved Raised when a column has been moved.
ColumnMoving Raised when a column is moved, but before the
C1WebGrid handles the operation.
DataBinding (inherited from Control) Fires when the control's data binding expressions are
to be evaluated.
DataBound (inherited from BaseDataBoundControl) Fires after the control has been databound.
DataChanged Fires when the data is changed.
DeletedCommand Fires when the Delete button is clicked.
DeletingCommand Fires when the Delete button is clicked, but before the
C1WebGrid instance handles the delete operation.
Disposed (inherited from Control) Fires when the control has been disposed.
EditingCommand Fires when the Edit button is clicked, but before the
C1WebGrid instance handles the operation.
C1WebGrid Events 245

GroupAggregate Raised when Aggregate property of the C1Column
class has been set to "Custom". This allows the
customization of aggregate cell contents for text
displayed in the group header or footer.
GroupColumnMoved Raised when a column in the grouping area has been
moved.
GroupColumnMoving Raised when a column in the grouping area is moved,
but before the C1WebGrid handles the operation.
GroupText Raised when the HeaderText or FooterText property
of the GroupInfo class has been set to "Custom". This
allows one to customize the text displayed for the
group header or footer.
Init (inherited from Control) Fires when the page has been initialized.
ItemCommand Raised when a CommandEvent occurs within an
item.
ItemCreated Fires when an item is created and is ready for
customization.
ItemDataBound Fires when an item is data-bound.
Load (inherited from Control) Fires when the page has been loaded.
PageIndexChanged Occurs when one of the pager buttons has been
clicked.
PageIndexChanging Occurs when one of the pager buttons is clicked, but
before the C1WebGrid control handles the paging
operation.
PreRender (inherited from Control) Fires before the page is rendered.
SelectedIndexChanged Fires when a item's Select button is clicked.
SelectedIndexChanging Fires when a item's Select button is clicked, but before
the C1WebGrid control handles the select operation.
SortedCommand Occurs when header is clicked to sort a column.
SortingCommand Occurs when header is clicked to sort a column, but
before the C1WebGrid control handles the sort
operation.
Unload (inherited from Control) Fires when the page is unloaded.
UpdatedCommand Fires when the Update button is clicked.
UpdatingCommand Fires when the Update button is clicked, but before
the C1WebGrid handles the update operation.
See Also
C1WebGrid Class | C1.Web.C1WebGrid Namespace
C1WebGrid.CancelingCommand Event
Fires when the Cancel button of a item in edit mode is clicked, but before the item exits edit mode.

[Visual Basic]
Public Event CancelingCommand As C1CancelCommandEventHandler
246 C1.Web.C1WebGrid Namespace


[C#]
public event C1CancelCommandEventHandler CancelingCommand

[Delphi]
public property CancelingCommand: C1CancelCommandEventHandler read
remove_CancelingCommand write add_CancelingCommand;
Remarks
To stop the operation set the Cancel property of the C1CancelCommandEventArgs object to True.
See Also
C1WebGrid Class | C1WebGrid Members | C1.Web.C1WebGrid Namespace
C1WebGrid.ColumnMoved Event
Raised when a column has been moved.

[Visual Basic]
Public Event ColumnMoved As C1ColMovedEventHandler

[C#]
public event C1ColMovedEventHandler ColumnMoved

[Delphi]
public property ColumnMoved: C1ColMovedEventHandler read
remove_ColumnMoved write add_ColumnMoved;
Remarks
You must implement this event if grid is not bound to a DataSource control.
See Also
C1WebGrid Class | C1WebGrid Members | C1.Web.C1WebGrid Namespace
C1WebGrid.ColumnMoving Event
Raised when a column is moved, but before the C1WebGrid handles the operation.

[Visual Basic]
Public Event ColumnMoving As C1ColMovingEventHandler

[C#]
public event C1ColMovingEventHandler ColumnMoving

[Delphi]
public property ColumnMoving: C1ColMovingEventHandler read
remove_ColumnMoving write add_ColumnMoving;
Remarks
To cancel the action set the Cancel property of the C1ColMovingEventArgs object to True.
See Also
C1WebGrid Class | C1WebGrid Members | C1.Web.C1WebGrid Namespace
C1WebGrid.DataChanged Event 247

C1WebGrid.DataChanged Event
Fires when the data is changed.

[Visual Basic]
Public Event DataChanged As EventHandler

[C#]
public event EventHandler DataChanged

[Delphi]
public property DataChanged: EventHandler read remove_DataChanged write
add_DataChanged;
See Also
C1WebGrid Class | C1WebGrid Members | C1.Web.C1WebGrid Namespace
C1WebGrid.DeletedCommand Event
Fires when the Delete button is clicked.

[Visual Basic]
Public Event DeletedCommand As C1DeletedCommandEventHandler

[C#]
public event C1DeletedCommandEventHandler DeletedCommand

[Delphi]
public property DeletedCommand: C1DeletedCommandEventHandler read
remove_DeletedCommand write add_DeletedCommand;
Remarks
The event occurs only if grid is bound to a DataSource control.
See Also
C1WebGrid Class | C1WebGrid Members | C1.Web.C1WebGrid Namespace
C1WebGrid.DeletingCommand Event
Fires when the Delete button is clicked, but before the C1WebGrid instance handles the delete operation.

[Visual Basic]
Public Event DeletingCommand As C1DeletingCommandEventHandler

[C#]
public event C1DeletingCommandEventHandler DeletingCommand

[Delphi]
public property DeletingCommand: C1DeletingCommandEventHandler read
remove_DeletingCommand write add_DeletingCommand;
Remarks
To cancel the operation set the Cancel property of the C1DeletingCommandEventHandler object to True.

248 C1.Web.C1WebGrid Namespace

See Also
C1WebGrid Class | C1WebGrid Members | C1.Web.C1WebGrid Namespace
C1WebGrid.EditingCommand Event
Fires when the Edit button is clicked, but before the C1WebGrid instance handles the operation.

[Visual Basic]
Public Event EditingCommand As C1CancelCommandEventHandler

[C#]
public event C1CancelCommandEventHandler EditingCommand

[Delphi]
public property EditingCommand: C1CancelCommandEventHandler read
remove_EditingCommand write add_EditingCommand;
Remarks
To cancel the operation set the Cancel property of the C1CancelCommandEventArgs object to True.
See Also
C1WebGrid Class | C1WebGrid Members | C1.Web.C1WebGrid Namespace
C1WebGrid.GroupAggregate Event
Raised when Aggregate property of the C1Column class has been set to "Custom". This allows the
customization of aggregate cell contents for text displayed in the group header or footer.

[Visual Basic]
Public Event GroupAggregate As C1GroupAggregateEventHandler

[C#]
public event C1GroupAggregateEventHandler GroupAggregate

[Delphi]
public property GroupAggregate: C1GroupAggregateEventHandler read
remove_GroupAggregate write add_GroupAggregate;
See Also
C1WebGrid Class | C1WebGrid Members | C1.Web.C1WebGrid Namespace
C1WebGrid.GroupColumnMoved Event
Raised when a column in the grouping area has been moved.

[Visual Basic]
Public Event GroupColumnMoved As C1GroupColMovedEventHandler

[C#]
public event C1GroupColMovedEventHandler GroupColumnMoved

[Delphi]
public property GroupColumnMoved: C1GroupColMovedEventHandler read
remove_GroupColumnMoved write add_GroupColumnMoved;
C1WebGrid.GroupColumnMoving Event 249

Remarks
You must implement this event if grid is not bound to a DataSource control.
See Also
C1WebGrid Class | C1WebGrid Members | C1.Web.C1WebGrid Namespace
C1WebGrid.GroupColumnMoving Event
Raised when a column in the grouping area is moved, but before the C1WebGrid handles the operation.

[Visual Basic]
Public Event GroupColumnMoving As C1GroupColMovingEventHandler

[C#]
public event C1GroupColMovingEventHandler GroupColumnMoving

[Delphi]
public property GroupColumnMoving: C1GroupColMovingEventHandler read
remove_GroupColumnMoving write add_GroupColumnMoving;
Remarks
To cancel the operation set the Cancel property of the C1GroupColMovingEventArgs object to True.
See Also
C1WebGrid Class | C1WebGrid Members | C1.Web.C1WebGrid Namespace
C1WebGrid.GroupText Event
Raised when the HeaderText or FooterText property of the GroupInfo class has been set to "Custom". This
allows one to customize the text displayed for the group header or footer.

[Visual Basic]
Public Event GroupText As C1GroupTextEventHandler

[C#]
public event C1GroupTextEventHandler GroupText

[Delphi]
public property GroupText: C1GroupTextEventHandler read remove_GroupText
write add_GroupText;
See Also
C1WebGrid Class | C1WebGrid Members | C1.Web.C1WebGrid Namespace
C1WebGrid.ItemCommand Event
Raised when a CommandEvent occurs within an item.

[Visual Basic]
Public Event ItemCommand As C1CommandEventHandler

[C#]
public event C1CommandEventHandler ItemCommand

250 C1.Web.C1WebGrid Namespace

[Delphi]
public property ItemCommand: C1CommandEventHandler read remove_ItemCommand
write add_ItemCommand;
See Also
C1WebGrid Class | C1WebGrid Members | C1.Web.C1WebGrid Namespace
C1WebGrid.ItemCreated Event
Fires when an item is created and is ready for customization.

[Visual Basic]
Public Event ItemCreated As C1ItemEventHandler

[C#]
public event C1ItemEventHandler ItemCreated

[Delphi]
public property ItemCreated: C1ItemEventHandler read remove_ItemCreated
write add_ItemCreated;
See Also
C1WebGrid Class | C1WebGrid Members | C1.Web.C1WebGrid Namespace
C1WebGrid.ItemDataBound Event
Fires when an item is data-bound.

[Visual Basic]
Public Event ItemDataBound As C1ItemEventHandler

[C#]
public event C1ItemEventHandler ItemDataBound

[Delphi]
public property ItemDataBound: C1ItemEventHandler read
remove_ItemDataBound write add_ItemDataBound;
See Also
C1WebGrid Class | C1WebGrid Members | C1.Web.C1WebGrid Namespace
C1WebGrid.PageIndexChanged Event
Occurs when one of the pager buttons has been clicked.

[Visual Basic]
Public Event PageIndexChanged As EventHandler

[C#]
public event EventHandler PageIndexChanged

[Delphi]
public property PageIndexChanged: EventHandler read
remove_PageIndexChanged write add_PageIndexChanged;
C1WebGrid.PageIndexChanging Event 251

See Also
C1WebGrid Class | C1WebGrid Members | C1.Web.C1WebGrid Namespace
C1WebGrid.PageIndexChanging Event
Occurs when one of the pager buttons is clicked, but before the C1WebGrid control handles the paging
operation.

[Visual Basic]
Public Event PageIndexChanging As C1PageChangingEventHandler

[C#]
public event C1PageChangingEventHandler PageIndexChanging

[Delphi]
public property PageIndexChanging: C1PageChangingEventHandler read
remove_PageIndexChanging write add_PageIndexChanging;
Remarks
To cancel the operation set the Cancel property of the C1PageChangingEventArgs object to True.
See Also
C1WebGrid Class | C1WebGrid Members | C1.Web.C1WebGrid Namespace
C1WebGrid.SelectedIndexChanged Event
Fires when a item's Select button is clicked.

[Visual Basic]
Public Event SelectedIndexChanged As EventHandler

[C#]
public event EventHandler SelectedIndexChanged

[Delphi]
public property SelectedIndexChanged: EventHandler read
remove_SelectedIndexChanged write add_SelectedIndexChanged;
See Also
C1WebGrid Class | C1WebGrid Members | C1.Web.C1WebGrid Namespace
C1WebGrid.SelectedIndexChanging Event
Fires when a item's Select button is clicked, but before the C1WebGrid control handles the select operation.

[Visual Basic]
Public Event SelectedIndexChanging As C1SelectedIndexChangingHandler

[C#]
public event C1SelectedIndexChangingHandler SelectedIndexChanging

[Delphi]
public property SelectedIndexChanging: C1SelectedIndexChangingHandler read
remove_SelectedIndexChanging write add_SelectedIndexChanging;
252 C1.Web.C1WebGrid Namespace

Remarks
To cancel the operation set the Cancel property of the C1SelectedIndexChangingEventArgs object to True.
See Also
C1WebGrid Class | C1WebGrid Members | C1.Web.C1WebGrid Namespace
C1WebGrid.SortedCommand Event
Occurs when header is clicked to sort a column.

[Visual Basic]
Public Event SortedCommand As EventHandler

[C#]
public event EventHandler SortedCommand

[Delphi]
public property SortedCommand: EventHandler read remove_SortedCommand
write add_SortedCommand;
See Also
C1WebGrid Class | C1WebGrid Members | C1.Web.C1WebGrid Namespace
C1WebGrid.SortingCommand Event
Occurs when header is clicked to sort a column, but before the C1WebGrid control handles the sort operation.

[Visual Basic]
Public Event SortingCommand As C1SortingCommandEventHandler

[C#]
public event C1SortingCommandEventHandler SortingCommand

[Delphi]
public property SortingCommand: C1SortingCommandEventHandler read
remove_SortingCommand write add_SortingCommand;
Remarks
To cancel the operation set the Cancel property of the C1SortingCommandEventArgs object to True.
See Also
C1WebGrid Class | C1WebGrid Members | C1.Web.C1WebGrid Namespace
C1WebGrid.UpdatedCommand Event
Fires when the Update button is clicked.

[Visual Basic]
Public Event UpdatedCommand As C1UpdatedEventHandler

[C#]
public event C1UpdatedEventHandler UpdatedCommand


C1WebGrid.UpdatingCommand Event 253

[Delphi]
public property UpdatedCommand: C1UpdatedEventHandler read
remove_UpdatedCommand write add_UpdatedCommand;
Remarks
The event occurs only if grid is bound to a DataSource control.
See Also
C1WebGrid Class | C1WebGrid Members | C1.Web.C1WebGrid Namespace
C1WebGrid.UpdatingCommand Event
Fires when the Update button is clicked, but before the C1WebGrid handles the update operation.

[Visual Basic]
Public Event UpdatingCommand As C1UpdatingEventHandler

[C#]
public event C1UpdatingEventHandler UpdatingCommand

[Delphi]
public property UpdatingCommand: C1UpdatingEventHandler read
remove_UpdatingCommand write add_UpdatingCommand;
Remarks
To cancel the update operation set the Cancel property of the C1UpdatingEventArgs object to True.
See Also
C1WebGrid Class | C1WebGrid Members | C1.Web.C1WebGrid Namespace
GridUpdateBindingCollection Class
GridUpdateBindingCollection contains GridUpdateBinding objects specifying bindings used in Update
method.
For a list of all members of this type, see GridUpdateBindingCollection Members.
System.Object
System.Collections.CollectionBase
C1.Web.Data.WebControls.UpdateBindingCollection
C1.Web.C1WebGrid.GridUpdateBindingCollection

[Visual Basic]
Public Class GridUpdateBindingCollection
Inherits UpdateBindingCollection

[C#]
public class GridUpdateBindingCollection : UpdateBindingCollection

[Delphi]
type GridUpdateBindingCollection = class (UpdateBindingCollection);
Namespace: C1.Web.C1WebGrid
254 C1.Web.C1WebGrid Namespace

Assembly: C1.Web.C1WebGrid.2 (in C1.Web.C1WebGrid.2.dll)
See Also
GridUpdateBindingCollection Members | C1.Web.C1WebGrid Namespace
GridUpdateBindingCollection Members
GridUpdateBindingCollection overview
Public Constructors
GridUpdateBindingCollection Constructor Constructor. Initializes a new instance of the
GridUpdateBindingCollection class.
Public Properties
Item Gets an GridUpdateBinding object from the collection
at the specified index. In C#, this property is the
indexer for the GridUpdateBindingCollection class.
Public Methods
Add Overloaded. Adds the specified GridUpdateBinding
element to the end of the collection.
See Also
GridUpdateBindingCollection Class | C1.Web.C1WebGrid Namespace
GridUpdateBindingCollection Constructor
Constructor. Initializes a new instance of the GridUpdateBindingCollection class.

[Visual Basic]
Public Function New()

[C#]
public GridUpdateBindingCollection()

[Delphi]
public constructor Create();
See Also
GridUpdateBindingCollection Class | GridUpdateBindingCollection Members | C1.Web.C1WebGrid
Namespace
GridUpdateBindingCollection Properties
The properties of the GridUpdateBindingCollection class are listed here. For a complete list of
GridUpdateBindingCollection class members, see the GridUpdateBindingCollection Members topic.
Public Properties
Item Gets an GridUpdateBinding object from the collection
at the specified index. In C#, this property is the
indexer for the GridUpdateBindingCollection class.

GridUpdateBindingCollection.Item Property 255

See Also
GridUpdateBindingCollection Class | C1.Web.C1WebGrid Namespace
GridUpdateBindingCollection.Item Property
Gets an GridUpdateBinding object from the collection at the specified index. In C#, this property is the
indexer for the GridUpdateBindingCollection class.

[Visual Basic]
Public Default Property Item( _
ByVal index As Integer _
) As GridUpdateBinding

[C#]
public GridUpdateBinding this[
int index
] {get;set;}

[Delphi]
public property Item[
index: Int32
]: GridUpdateBinding read get_Item write set_Item;
See Also
GridUpdateBindingCollection Class | GridUpdateBindingCollection Members | C1.Web.C1WebGrid
Namespace
GridUpdateBindingCollection Methods
The methods of the GridUpdateBindingCollection class are listed here. For a complete list of
GridUpdateBindingCollection class members, see the GridUpdateBindingCollection Members topic.
Public Methods
Add Overloaded. Adds the specified GridUpdateBinding
element to the end of the collection.
See Also
GridUpdateBindingCollection Class | C1.Web.C1WebGrid Namespace
GridUpdateBindingCollection.Add Method
Adds the specified GridUpdateBinding element to the end of the collection.

[Visual Basic]
Public Sub Add( _
ByVal binding As GridUpdateBinding _
)

[C#]
public void Add(
GridUpdateBinding binding
);


256 C1.Web.C1WebGrid Namespace

[Delphi]
public procedure Add(
binding: GridUpdateBinding
); overload;
Parameters
binding
The GridUpdateBinding object to add.
See Also
GridUpdateBindingCollection Class | GridUpdateBindingCollection Members | C1.Web.C1WebGrid
Namespace
GroupColumnCollection Class
Provides access to the columns that are contained in the grouping area.
For a list of all members of this type, see GroupColumnCollection Members.
System.Object
System.Collections.CollectionBase
C1.Web.C1WebGrid.C1ColumnCollection
C1.Web.C1WebGrid.GroupColumnCollection

[Visual Basic]
Public Class GroupColumnCollection
Inherits C1ColumnCollection

[C#]
public class GroupColumnCollection : C1ColumnCollection

[Delphi]
type GroupColumnCollection = class (C1ColumnCollection);
Namespace: C1.Web.C1WebGrid
Assembly: C1.Web.C1WebGrid.2 (in C1.Web.C1WebGrid.2.dll)
See Also
GroupColumnCollection Members | C1.Web.C1WebGrid Namespace
GroupColumnCollection Members
GroupColumnCollection overview
Public Properties
Item (inherited from C1ColumnCollection) Gets a C1Column derived column object from the
C1ColumnCollection collection at the specified
index. In C#, this property is the indexer for the
C1ColumnCollection class.


GroupColumnCollection Properties 257

Public Methods
Add Overriden. Adds the specified C1Column derived
column object to the end of the
GroupColumnCollection.
Insert Overriden. Inserts the specified C1Column derived
column object into the collection at specified index.
Remove Overriden. Removes the specified C1Column derived
column object from the GroupColumnCollection.
See Also
GroupColumnCollection Class | C1.Web.C1WebGrid Namespace
GroupColumnCollection Properties
The properties of the GroupColumnCollection class are listed here. For a complete list of
GroupColumnCollection class members, see the GroupColumnCollection Members topic.
Public Properties
Item (inherited from C1ColumnCollection) Gets a C1Column derived column object from the
C1ColumnCollection collection at the specified
index. In C#, this property is the indexer for the
C1ColumnCollection class.
See Also
GroupColumnCollection Class | C1.Web.C1WebGrid Namespace
GroupColumnCollection Methods
The methods of the GroupColumnCollection class are listed here. For a complete list of
GroupColumnCollection class members, see the GroupColumnCollection Members topic.
Public Methods
Add Overriden. Adds the specified C1Column derived
column object to the end of the
GroupColumnCollection.
Insert Overriden. Inserts the specified C1Column derived
column object into the collection at specified index.
Remove Overriden. Removes the specified C1Column derived
column object from the GroupColumnCollection.
See Also
GroupColumnCollection Class | C1.Web.C1WebGrid Namespace
GroupColumnCollection.Add Method
Adds the specified C1Column derived column object to the end of the GroupColumnCollection.

[Visual Basic]
Overrides Public Sub Add( _
ByVal col As C1Column _
)
258 C1.Web.C1WebGrid Namespace


[C#]
override public void Add(
C1Column col
);

[Delphi]
public procedure Add(
col: C1Column
); override;
Parameters
col
The C1Column derived column object to append to the GroupColumnCollection.
See Also
GroupColumnCollection Class | GroupColumnCollection Members | C1.Web.C1WebGrid Namespace
GroupColumnCollection.Insert Method
Inserts the specified C1Column derived column object into the collection at specified index.

[Visual Basic]
Overrides Public Sub Insert( _
ByVal index As Integer, _
ByVal col As C1Column _
)

[C#]
override public void Insert(
int index,
C1Column col
);

[Delphi]
public procedure Insert(
index: Int32;
col: C1Column
); override;
Parameters
index
The zero-based index at which col should be inserted.
col
The C1Column derived column object to insert.
See Also
GroupColumnCollection Class | GroupColumnCollection Members | C1.Web.C1WebGrid Namespace


GroupColumnCollection.Remove Method 259

GroupColumnCollection.Remove Method
Removes the specified C1Column derived column object from the GroupColumnCollection.

[Visual Basic]
Overrides Public Sub Remove( _
ByVal col As C1Column _
)

[C#]
override public void Remove(
C1Column col
);

[Delphi]
public procedure Remove(
col: C1Column
); override;
Parameters
col
The C1Column derived column object to remove.
See Also
GroupColumnCollection Class | GroupColumnCollection Members | C1.Web.C1WebGrid Namespace
GroupInfo Class
GroupInfo is used to customize the appearance and position of groups.
For a list of all members of this type, see GroupInfo Members.
System.Object
C1.Web.C1WebGrid.GroupInfo

[Visual Basic]
Public Class GroupInfo
Implements IStateManager

[C#]
public class GroupInfo : IStateManager


[Delphi]
type GroupInfo = class (TObject, IStateManager);
Namespace: C1.Web.C1WebGrid
Assembly: C1.Web.C1WebGrid.2 (in C1.Web.C1WebGrid.2.dll)
See Also
GroupInfo Members | C1.Web.C1WebGrid Namespace
260 C1.Web.C1WebGrid Namespace

GroupInfo Members
GroupInfo overview
Public Constructors
GroupInfo Constructor Constructror. Creates a new instance of the
GroupInfo class.
Public Properties
FooterStyle Determines the style used to render group header and
footer rows.
FooterText Determines the text that is displayed in the group
footer rows.
GroupSingleRow Determines whether groupings containing a single
row are grouped.
HeaderStyle Determines the style used to render group header
rows.
HeaderText Determines the text that is displayed in the group
header rows.
ImageCollapsed Determines the images used to show collapsed nodes
on the grid.
ImageExpanded Determines the images used to show expanded nodes
on the grid.
OutlineMode Determines whether the user will be able to collapse
and expand the groups by clicking on the group
headers, and also determines whether groups will be
initially collapsed or expanded.
Position Determines whether the C1WebGrid control should
insert group header and/or group footer rows for this
column.
Public Methods
ToString Overriden. Returns a string that represents the current
object.
See Also
GroupInfo Class | C1.Web.C1WebGrid Namespace
GroupInfo Constructor
Constructror. Creates a new instance of the GroupInfo class.

[Visual Basic]
Public Function New()

[C#]
public GroupInfo()

[Delphi]
public constructor Create();
GroupInfo Properties 261

See Also
GroupInfo Class | GroupInfo Members | C1.Web.C1WebGrid Namespace
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
FooterStyle Determines the style used to render group header and
footer rows.
FooterText Determines the text that is displayed in the group
footer rows.
GroupSingleRow Determines whether groupings containing a single
row are grouped.
HeaderStyle Determines the style used to render group header
rows.
HeaderText Determines the text that is displayed in the group
header rows.
ImageCollapsed Determines the images used to show collapsed nodes
on the grid.
ImageExpanded Determines the images used to show expanded nodes
on the grid.
OutlineMode Determines whether the user will be able to collapse
and expand the groups by clicking on the group
headers, and also determines whether groups will be
initially collapsed or expanded.
Position Determines whether the C1WebGrid control should
insert group header and/or group footer rows for this
column.
See Also
GroupInfo Class | C1.Web.C1WebGrid Namespace
GroupInfo.FooterStyle Property
Determines the style used to render group header and footer rows.

[Visual Basic]
Overridable Public ReadOnly Property FooterStyle As TableItemStyle

[C#]
virtual public TableItemStyle FooterStyle {get;}

[Delphi]
public property FooterStyle: TableItemStyle read get_FooterStyle;
Remarks
This style is based on the grid's FooterStyle property. If you are grouping on a single column, you probably
won't have to change this style. If you are creating several levels of grouping, however, you will usually set the
262 C1.Web.C1WebGrid Namespace

BackColor and ForeColor of each group header/footer to a different value to emphasize the structure of the
data.
See Also
GroupInfo Class | GroupInfo Members | C1.Web.C1WebGrid Namespace
GroupInfo.FooterText Property
Determines the text that is displayed in the group footer rows.

[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
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
The text may also include html tags which you can use to add formatting commands.
The text may be set to "Custom". Doing so causes the GroupText event to be raised when processing a
grouped footer.
Example
This sample shows how to use html tags and placeholders.
col.GroupInfo.FooterText = "Totals for
{0}
See Also
GroupInfo Class | GroupInfo Members | C1.Web.C1WebGrid Namespace
GroupInfo.GroupSingleRow Property
Determines whether groupings containing a single row are grouped.

[Visual Basic]
Public Property GroupSingleRow As Boolean

[C#]
public bool GroupSingleRow {get;set;}

[Delphi]
public property GroupSingleRow: Boolean read get_GroupSingleRow write
set_GroupSingleRow;
Property Value
If False, groupings which contain a single row will not be grouped. The default value is True.

GroupInfo.HeaderStyle Property 263

See Also
GroupInfo Class | GroupInfo Members | C1.Web.C1WebGrid Namespace
GroupInfo.HeaderStyle Property
Determines the style used to render group header rows.

[Visual Basic]
Overridable Public ReadOnly Property HeaderStyle As TableItemStyle

[C#]
virtual public TableItemStyle HeaderStyle {get;}

[Delphi]
public property HeaderStyle: TableItemStyle read get_HeaderStyle;
Remarks
This style is based on the grid's HeaderStyle property. If you are grouping on a single column, you probably
won't have to change this style. If you are creating several levels of grouping, however, you will usually set the
BackColor and ForeColor of each group header/footer to a different value to emphasize the structure of the
data.
See Also
GroupInfo Class | GroupInfo Members | C1.Web.C1WebGrid Namespace
GroupInfo.HeaderText Property
Determines the text that is displayed in the group header rows.

[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
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
The text may also include html tags which you can use to add formatting commands.
The text may be set to "Custom". Doing so causes the GroupText event to be raised when processing a
grouped header.
Example
This sample shows how to use html tags and placeholders.
col.GroupInfo.HeaderText = "Totals for
{0}
See Also
GroupInfo Class | GroupInfo Members | C1.Web.C1WebGrid Namespace
264 C1.Web.C1WebGrid Namespace

GroupInfo.ImageCollapsed Property
Determines the images used to show collapsed nodes on the grid.

[Visual Basic]
Public Property ImageCollapsed As String

[C#]
public string ImageCollapsed {get;set;}

[Delphi]
public property ImageCollapsed: String read get_ImageCollapsed write
set_ImageCollapsed;
Remarks
By default, these properties are set to images that look like the '+' and '-' icons used in TreeView controls. You
can select your own images, and even use different images for different groups.
See Also
GroupInfo Class | GroupInfo Members | C1.Web.C1WebGrid Namespace
GroupInfo.ImageExpanded Property
Determines the images used to show expanded nodes on the grid.

[Visual Basic]
Public Property ImageExpanded As String

[C#]
public string ImageExpanded {get;set;}

[Delphi]
public property ImageExpanded: String read get_ImageExpanded write
set_ImageExpanded;
Remarks
By default, these properties are set to images that look like the '+' and '-' icons used in TreeView controls. You
can select your own images, and even use different images for different groups.
See Also
GroupInfo Class | GroupInfo Members | C1.Web.C1WebGrid Namespace
GroupInfo.OutlineMode Property
Determines whether the user will be able to collapse and expand the groups by clicking on the group headers,
and also determines whether groups will be initially collapsed or expanded.

[Visual Basic]
Public Property OutlineMode As OutlineModeEnum

[C#]
public OutlineModeEnum OutlineMode {get;set;}



GroupInfo.Position Property 265

[Delphi]
public property OutlineMode: OutlineModeEnum read get_OutlineMode write
set_OutlineMode;
Property Value
One of the OutlineModeEnum values. The default value is OutlineModeEnum.StartExpanded.
See Also
GroupInfo Class | GroupInfo Members | C1.Web.C1WebGrid Namespace
GroupInfo.Position Property
Determines whether the C1WebGrid control should insert group header and/or group footer rows for this
column.

[Visual Basic]
Public Property Position As GroupPositionEnum

[C#]
public GroupPositionEnum Position {get;set;}

[Delphi]
public property Position: GroupPositionEnum read get_Position write
set_Position;
Property Value
One of the GroupPositionEnum values. The default value is GroupPositionEnum.None.
Remarks
Set value to GroupPositionEnum.None to disable grouping for the column. Set to
GroupPositionEnum.Header, GroupPositionEnum.Footer or GroupPositionEnum.HeaderAndFooter to
create groups and define the position of the group rows.
To group by a column, remember to sort the data on the column. The grid inserts group header and footer
rows whenever the value being grouped on changes. If you don't sort the data, there will be a lot of group
header and footer rows.
See Also
GroupInfo Class | GroupInfo Members | C1.Web.C1WebGrid Namespace
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. Returns a string that represents the current
object.
See Also
GroupInfo Class | C1.Web.C1WebGrid Namespace
GroupInfo.ToString Method
Returns a string that represents the current object.
266 C1.Web.C1WebGrid Namespace


[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
GroupInfo Class | GroupInfo Members | C1.Web.C1WebGrid Namespace
GroupMoveEnum Enumeration
Use the members of this enumeration to determine the action that raised the GroupColumnMoving and the
GroupColumnMoved events.

[Visual Basic]
Public Enum GroupMoveEnum

[C#]
public enum GroupMoveEnum

[Delphi]
type GroupMoveEnum = (FromGroup, InGroup, ToGroup);
Namespace: C1.Web.C1WebGrid
Assembly: C1.Web.C1WebGrid.2 (in C1.Web.C1WebGrid.2.dll)
Members
Member name Description
FromGroup Columns were moved from the grouping area to the
grid.
InGroup Columns were rearranged within the grouping area.
ToGroup Columns were moved from the grid to the grouping
area.
See Also
C1.Web.C1WebGrid Namespace
GroupPositionEnum Enumeration
Use the members of this enumeration to set the value of the Position property in the GroupInfo class.

[Visual Basic]
Public Enum GroupPositionEnum
OutlineModeEnum Enumeration 267


[C#]
public enum GroupPositionEnum

[Delphi]
type GroupPositionEnum = (Footer, Header, HeaderAndFooter, None);
Namespace: C1.Web.C1WebGrid
Assembly: C1.Web.C1WebGrid.2 (in C1.Web.C1WebGrid.2.dll)
Members
Member name Description
Footer Inserts footer rows.
Header Inserts header rows.
HeaderAndFooter Inserts header and footer rows.
None Disables grouping for the column.
See Also
C1.Web.C1WebGrid Namespace
OutlineModeEnum Enumeration
Use the members of this enumeration to set the value of the OutlineMode property in the GroupInfo class.

[Visual Basic]
Public Enum OutlineModeEnum

[C#]
public enum OutlineModeEnum

[Delphi]
type OutlineModeEnum = (None, StartCollapsed, StartExpanded);
Namespace: C1.Web.C1WebGrid
Assembly: C1.Web.C1WebGrid.2 (in C1.Web.C1WebGrid.2.dll)
Members
Member name Description
None Disables collapsing and expanding.
StartCollapsed Groups are initially collapsed.
StartExpanded Groups are initially expanded.
See Also
C1.Web.C1WebGrid Namespace
RowMergeEnum Enumeration
Use the members of this enumeration to set the value of the RowMerge property in the C1Column derived
column object.
268 C1.Web.C1WebGrid Namespace


[Visual Basic]
Public Enum RowMergeEnum

[C#]
public enum RowMergeEnum

[Delphi]
type RowMergeEnum = (Free, None, Restricted);
Namespace: C1.Web.C1WebGrid
Assembly: C1.Web.C1WebGrid.2 (in C1.Web.C1WebGrid.2.dll)
Members
Member name Description
Free Allows row with identical text to merge.
None No row merging.
Restricted Keeps rows with identical text from merging if rows in
the previous column are merged.
See Also
C1.Web.C1WebGrid Namespace
Index 269

Index
2
2 assembly (C1.Web.C1WebGrid) 85
A
Add method 124, 255, 257
AffectedRows property 132, 204
Aggregate property 116
AggregateEnum enumeration 92
AllowColMoving property 219
AllowColSizing property 220
AllowCustomPaging property 220
AllowGroup property 116
AllowGrouping property 221
AllowMove property 117
AllowPaging property 221
AllowSizing property 117
AllowSorting property 222
AlternatingItem enumeration member 176
AlternatingItemStyle property 222
Always enumeration member 187
Ascending enumeration member 192
AutoGenerateColumns property 222
Automatic enumeration member 187
Average enumeration member 92
B
BackImageUrl property 223
ButtonType property 101, 142
C
C1BoundColumn class 93
about C1BoundColumn class 92
all members 93
constructor 94
methods 97
properties 94
C1BoundColumn.C1BoundColumn constructor 94
C1BoundColumn.DataField property 96
C1BoundColumn.DataFormatString property 96
C1BoundColumn.ReadOnly property 97
C1BoundColumn.ToString method 97
C1BoundColumn.ValueList property 97
C1ButtonColumn class 98
about C1ButtonColumn class 98
all members 98
constructor 99
methods 103
properties 100
C1ButtonColumn.ButtonType property 101
C1ButtonColumn.C1ButtonColumn constructor 99
C1ButtonColumn.CommandName property 101
C1ButtonColumn.DataTextField property 102
C1ButtonColumn.DataTextFormatString property 102
C1ButtonColumn.Text property 102
C1ButtonColumn.ToString method 103
C1CancelCommandEventArgs class 104
about C1CancelCommandEventArgs class 103
all members 104
constructor 104
properties 106
C1CancelCommandEventArgs.C1CancelCommandEve
ntArgs constructor 104
C1CancelCommandEventArgs.Cancel property 106
C1CancelCommandEventHandler delegate 106
C1ColMovedEventArgs class 108
about C1ColMovedEventArgs class 107
all members 108
constructor 108
fields 108
C1ColMovedEventArgs.C1ColMovedEventArgs
constructor 108
C1ColMovedEventArgs.Column field 109
C1ColMovedEventArgs.DestIndex field 109
C1ColMovedEventHandler delegate 109
C1ColMovingEventArgs class 111
about C1ColMovingEventArgs class 110
all members 111
constructor 111
fields 111
C1ColMovingEventArgs.C1ColMovingEventArgs
constructor 111
C1ColMovingEventArgs.Column field 112
C1ColMovingEventArgs.DestIndex field 112
C1ColMovingEventHandler delegate 112
C1Column class 114
about C1Column class 113
all members 114
constructor 115
methods 122
properties 115
C1Column.Aggregate property 116
C1Column.AllowGroup property 116
C1Column.AllowMove property 117
C1Column.AllowSizing property 117
C1Column.C1Column constructor 115
C1Column.Fixed property 117
C1Column.FooterStyle property 118
C1Column.FooterText property 118
C1Column.GroupInfo property 118
C1Column.HeaderImageUrl property 119
C1Column.HeaderStyle property 119
C1Column.HeaderText property 119
270 Index

C1Column.ItemStyle property 120
C1Column.RowMerge property 120
C1Column.SortDirection property 120
C1Column.SortExpression property 121
C1Column.ToString method 122
C1Column.Visible property 121
C1ColumnCollection class 123
about C1ColumnCollection class 122
all members 123
methods 124
properties 123
C1ColumnCollection.Add method 124
C1ColumnCollection.ColumnByName method 125
C1ColumnCollection.IndexOf method 125
C1ColumnCollection.Insert method 126
C1ColumnCollection.Item property 123
C1ColumnCollection.Remove method 127
C1CommandEventArgs class 128
about C1CommandEventArgs class 127
all members 128
constructor 128
properties 129
C1CommandEventArgs.C1CommandEventArgs
constructor 128
C1CommandEventArgs.CommandSource property 129
C1CommandEventArgs.Item property 129
C1CommandEventHandler delegate 130
C1DeletedCommandEventArgs class 131
about C1DeletedCommandEventArgs class 130
all members 131
constructor 131
properties 132
C1DeletedCommandEventArgs.AffectedRows property
132
C1DeletedCommandEventArgs.C1DeletedCommandE
ventArgs constructor 131
C1DeletedCommandEventArgs.Exception property 133
C1DeletedCommandEventArgs.ExceptionHandled
property 133
C1DeletedCommandEventArgs.Keys property 133
C1DeletedCommandEventArgs.Values property 134
C1DeletedCommandEventHandler delegate 134
C1DeletingCommandEventArgs class 135
about C1DeletingCommandEventArgs class 135
all members 135
constructor 136
properties 137
C1DeletingCommandEventArgs.C1DeletingCommand
EventArgs constructor 136
C1DeletingCommandEventArgs.Keys property 138
C1DeletingCommandEventArgs.Values property 138
C1DeletingCommandEventHandler delegate 138
C1EditCommandColumn class 140
about C1EditCommandColumn class 139
all members 140
constructor 141
methods 144
properties 141
C1EditCommandColumn.ButtonType property 142
C1EditCommandColumn.C1EditCommandColumn
constructor 141
C1EditCommandColumn.CancelText property 143
C1EditCommandColumn.EditText property 143
C1EditCommandColumn.ToString method 144
C1EditCommandColumn.UpdateText property 143
C1GridItem class 145
about C1GridItem class 144
all members 145
constructor 147
events 150
properties 147
C1GridItem.C1GridItem constructor 147
C1GridItem.DataItem property 149
C1GridItem.Fixed property 149
C1GridItem.ItemIndex property 150
C1GridItem.ItemType property 150
C1GroupAggregateEventHandler delegate 151
C1GroupColMovedEventArgs class 152
about C1GroupColMovedEventArgs class 151
all members 152
constructor 152
fields 153
C1GroupColMovedEventArgs.C1GroupColMovedEve
ntArgs constructor 152
C1GroupColMovedEventArgs.Column field 153
C1GroupColMovedEventArgs.DestIndex field 154
C1GroupColMovedEventArgs.GroupMove field 154
C1GroupColMovedEventHandler delegate 154
C1GroupColMovingEventArgs class 156
about C1GroupColMovingEventArgs class 155
all members 156
constructor 156
fields 157
C1GroupColMovingEventArgs.C1GroupColMovingEv
entArgs constructor 156
C1GroupColMovingEventArgs.Column field 157
C1GroupColMovingEventArgs.DestIndex field 157
C1GroupColMovingEventArgs.GroupMove field 158
C1GroupColMovingEventHandler delegate 158
C1GroupTextEventArgs class 159
about C1GroupTextEventArgs class 159
all members 159
properties 160
C1GroupTextEventArgs.Col property 160
C1GroupTextEventArgs.EndItemIndex property 160
C1GroupTextEventArgs.GroupText property 161
C1GroupTextEventArgs.ItemType property 161
C1GroupTextEventArgs.StartItemIndex property 161
C1GroupTextEventArgs.Text property 161
C1GroupTextEventHandler delegate 162
C1HyperLinkColumn class 163
about C1HyperLinkColumn class 162
Index 271

all members 163
constructor 164
methods 169
properties 165
C1HyperLinkColumn.C1HyperLinkColumn
constructor 164
C1HyperLinkColumn.DataNavigateUrlField property
166
C1HyperLinkColumn.DataNavigateUrlFormatString
property 166
C1HyperLinkColumn.DataTextField property 167
C1HyperLinkColumn.DataTextFormatString property
167
C1HyperLinkColumn.NavigateUrl property 167
C1HyperLinkColumn.Target property 168
C1HyperLinkColumn.Text property 168
C1HyperLinkColumn.ToString method 169
C1ItemCollection class 170
about C1ItemCollection class 169
all members 170
methods 172
properties 170
C1ItemCollection.CopyTo method 172
C1ItemCollection.Count property 170
C1ItemCollection.GetEnumerator method 173
C1ItemCollection.IsSynchronized property 171
C1ItemCollection.Item property 171
C1ItemCollection.SyncRoot property 172
C1ItemEventArgs class 174
about C1ItemEventArgs class 173
all members 174
constructor 174
properties 175
C1ItemEventArgs.C1ItemEventArgs constructor 174
C1ItemEventArgs.Item property 175
C1ItemEventHandler delegate 175
C1ListItemType enumeration 176
C1PageChangingEventArgs class 177
about C1PageChangingEventArgs class 177
all members 177
constructor 178
properties 178
C1PageChangingEventArgs.C1PageChangingEventArg
s constructor 178
C1PageChangingEventArgs.CommandSource property
178
C1PageChangingEventArgs.NewPageIndex property
179
C1PageChangingEventHandler delegate 179
C1PagerStyle class 180
about C1PagerStyle class 180
all members 180
constructor 181
methods 186
properties 182
C1PagerStyle.C1PagerStyle constructor 181
C1PagerStyle.CopyFrom method 186
C1PagerStyle.MergeWith method 187
C1PagerStyle.Mode property 183
C1PagerStyle.NextPageText property 183
C1PagerStyle.PageButtonCount property 184
C1PagerStyle.Position property 184
C1PagerStyle.PrevPageText property 185
C1PagerStyle.Reset method 187
C1PagerStyle.Visible property 185
C1ScrollBarStyle enumeration 187
C1SelectedIndexChangingEventArgs class 189
about C1SelectedIndexChangingEventArgs class 188
all members 189
constructor 189
properties 191
C1SelectedIndexChangingEventArgs.C1SelectedIndex
ChangingEventArgs constructor 189
C1SelectedIndexChangingEventArgs.NewSelectedInde
x property 191
C1SelectedIndexChangingHandler delegate 191
C1SortDirection enumeration 192
C1SortingCommandEventArgs class 193
about C1SortingCommandEventArgs class 193
all members 193
constructor 193
properties 194
C1SortingCommandEventArgs.C1SortingCommandEv
entArgs constructor 193
C1SortingCommandEventArgs.Column property 194
C1SortingCommandEventArgs.CommandSource
property 195
C1SortingCommandEventArgs.SortExpression
property 195
C1SortingCommandEventHandler delegate 195
C1TemplateColumn class 197
about C1TemplateColumn class 196
all members 197
constructor 198
methods 201
properties 198
C1TemplateColumn.C1TemplateColumn constructor
198
C1TemplateColumn.EditItemTemplate property 199
C1TemplateColumn.FooterTemplate property 200
C1TemplateColumn.HeaderTemplate property 200
C1TemplateColumn.ItemTemplate property 200
C1TemplateColumn.ToString method 201
C1TemplateColumn.UpdateBindings property 201
C1UpdatedEventArgs class 202
about C1UpdatedEventArgs class 201
all members 202
constructor 202
properties 203
C1UpdatedEventArgs.AffectedRows property 204
C1UpdatedEventArgs.C1UpdatedEventArgs
constructor 202
272 Index

C1UpdatedEventArgs.Exception property 204
C1UpdatedEventArgs.ExceptionHandled property 204
C1UpdatedEventArgs.Keys property 205
C1UpdatedEventArgs.NewValues property 205
C1UpdatedEventArgs.OldValues property 205
C1UpdatedEventHandler delegate 206
C1UpdatingEventArgs class 207
about C1UpdatingEventArgs class 206
all members 207
constructor 207
properties 209
C1UpdatingEventArgs.C1UpdatingEventArgs
constructor 207
C1UpdatingEventArgs.Keys property 209
C1UpdatingEventArgs.NewValues property 210
C1UpdatingEventArgs.OldValues property 210
C1UpdatingEventHandler delegate 210
C1WebGrid class 212
about C1WebGrid class 211
all members 212
constructor 216
events 244
methods 236
properties 216
C1WebGrid hierarchy (C1.Web) 90
C1WebGrid namespace (C1.Web) 87
C1WebGrid.AllowColMoving property 219
C1WebGrid.AllowColSizing property 220
C1WebGrid.AllowCustomPaging property 220
C1WebGrid.AllowGrouping property 221
C1WebGrid.AllowPaging property 221
C1WebGrid.AllowSorting property 222
C1WebGrid.AlternatingItemStyle property 222
C1WebGrid.AutoGenerateColumns property 222
C1WebGrid.BackImageUrl property 223
C1WebGrid.C1WebGrid constructor 216
C1WebGrid.CancelingCommand event 245
C1WebGrid.CellPadding property 223
C1WebGrid.CellSpacing property 224
C1WebGrid.ColumnMoved event 246
C1WebGrid.ColumnMoving event 246
C1WebGrid.Columns property 224
C1WebGrid.Controls property 224
C1WebGrid.CurrentPageIndex property 225
C1WebGrid.DataBind method 237
C1WebGrid.DataChanged event 247
C1WebGrid.DataKeyField property 225
C1WebGrid.DataKeys property 225
C1WebGrid.DefaultColumnWidth property 226
C1WebGrid.DefaultRowHeight property 226
C1WebGrid.DeletedCommand event 247
C1WebGrid.DeletingCommand event 247
C1WebGrid.EditingCommand event 248
C1WebGrid.EditItemIndex property 226
C1WebGrid.EditItemStyle property 227
C1WebGrid.FooterStyle property 227
C1WebGrid.GridLines property 227
C1WebGrid.GroupAggregate event 248
C1WebGrid.GroupByCaption property 228
C1WebGrid.GroupColumnMoved event 248
C1WebGrid.GroupColumnMoving event 249
C1WebGrid.GroupedColumns property 228
C1WebGrid.GroupIndent property 228
C1WebGrid.GroupingStyle property 229
C1WebGrid.GroupText event 249
C1WebGrid.HeaderStyle property 229
C1WebGrid.HorizontalAlign property 229
C1WebGrid.HScrollBarStyle property 230
C1WebGrid.ImageGroup property 230
C1WebGrid.ImageSortAscending property 231
C1WebGrid.ImageSortDescending property 231
C1WebGrid.ImageUngroup property 231
C1WebGrid.ItemCommand event 249
C1WebGrid.ItemCreated event 250
C1WebGrid.ItemDataBound event 250
C1WebGrid.Items property 232
C1WebGrid.ItemStyle property 232
C1WebGrid.LoadLayout method 238
C1WebGrid.LoadPostData method 241
C1WebGrid.PageCount property 232
C1WebGrid.PageIndexChanged event 250
C1WebGrid.PageIndexChanging event 251
C1WebGrid.PagerStyle property 233
C1WebGrid.PageSize property 233
C1WebGrid.RaisePostBackEvent method 241
C1WebGrid.RaisePostDataChangedEvent method 242
C1WebGrid.SaveLayout method 242
C1WebGrid.SelectedIndex property 233
C1WebGrid.SelectedIndexChanged event 251
C1WebGrid.SelectedIndexChanging event 251
C1WebGrid.SelectedItem property 234
C1WebGrid.SelectedItemStyle property 234
C1WebGrid.ShowFooter property 235
C1WebGrid.ShowHeader property 235
C1WebGrid.SortedCommand event 252
C1WebGrid.SortingCommand event 252
C1WebGrid.Update method 244
C1WebGrid.UpdatedCommand event 252
C1WebGrid.UpdatingCommand event 253
C1WebGrid.VirtualItemCount property 235
C1WebGrid.VScrollBarStyle property 236
Cancel property 106
CancelingCommand event 245
CancelText property 143
CellPadding property 223
CellSpacing property 224
Col property 160
Column field 109, 112, 153, 157
Column property 194
ColumnByName method 125
ColumnMoved event 246
ColumnMoving event 246
Index 273

Columns property 224
CommandName property 101
CommandSource property 129, 178, 195
Controls property 224
CopyFrom method 186
CopyTo method 172
Count enumeration member 92
Count property 170
CurrentPageIndex property 225
Custom enumeration member 92
D
DataBind method 237
DataChanged event 247
DataField property 96
DataFormatString property 96
DataItem property 149
DataKeyField property 225
DataKeys property 225
DataNavigateUrlField property 166
DataNavigateUrlFormatString property 166
DataTextField property 102, 167
DataTextFormatString property 102, 167
DefaultColumnWidth property 226
DefaultRowHeight property 226
DeletedCommand event 247
DeletingCommand event 247
Descending enumeration member 192
DestIndex field 109, 112, 154, 157
E
EditingCommand event 248
EditItem enumeration member 176
EditItemIndex property 226
EditItemStyle property 227
EditItemTemplate property 199
EditText property 143
EndItemIndex property 160
Exception property 133, 204
ExceptionHandled property 133, 204
F
Fixed property 117, 149
Footer enumeration member 176, 266
FooterStyle property 118, 227, 261
FooterTemplate property 200
FooterText property 118, 262
Free enumeration member 267
FromGroup enumeration member 266
G
GetEnumerator method 173
GridLines property 227
GridUpdateBindingCollection class 254
about GridUpdateBindingCollection class 253
all members 254
constructor 254
methods 255
properties 254
GridUpdateBindingCollection.Add method 255
GridUpdateBindingCollection.GridUpdateBindingColle
ction constructor 254
GridUpdateBindingCollection.Item property 255
GroupAggregate event 248
GroupArea enumeration member 176
GroupByCaption property 228
GroupColumn enumeration member 176
GroupColumnCollection class 256
about GroupColumnCollection class 256
all members 256
methods 257
properties 257
GroupColumnCollection.Add method 257
GroupColumnCollection.Insert method 258
GroupColumnCollection.Remove method 259
GroupColumnMoved event 248
GroupColumnMoving event 249
GroupedColumns property 228
GroupFooter enumeration member 176
GroupHeader enumeration member 176
GroupIndent property 228
GroupInfo class 260
about GroupInfo class 259
all members 260
constructor 260
methods 265
properties 261
GroupInfo property 118
GroupInfo.FooterStyle property 261
GroupInfo.FooterText property 262
GroupInfo.GroupInfo constructor 260
GroupInfo.GroupSingleRow property 262
GroupInfo.HeaderStyle property 263
GroupInfo.HeaderText property 263
GroupInfo.ImageCollapsed property 264
GroupInfo.ImageExpanded property 264
GroupInfo.OutlineMode property 264
GroupInfo.Position property 265
GroupInfo.ToString method 265
GroupingStyle property 229
GroupMove field 154, 158
GroupMoveEnum enumeration 266
GroupPositionEnum enumeration 266
GroupSingleRow property 262
GroupText event 249
GroupText property 161
274 Index

H
Header enumeration member 176, 266
HeaderAndFooter enumeration member 266
HeaderImageUrl property 119
HeaderStyle property 119, 229, 263
HeaderTemplate property 200
HeaderText property 119, 263
HorizontalAlign property 229
HScrollBarStyle property 230
I
ImageCollapsed property 264
ImageExpanded property 264
ImageGroup property 230
ImageSortAscending property 231
ImageSortDescending property 231
ImageUngroup property 231
IndexOf method 125
InGroup enumeration member 266
Insert method 126, 258
IsSynchronized property 171
Item enumeration member 176
Item property 123, 129, 171, 175, 255
ItemCommand event 249
ItemCreated event 250
ItemDataBound event 250
ItemIndex property 150
Items property 232
ItemStyle property 120, 232
ItemTemplate property 200
ItemType property 150, 161
K
Keys property 133, 138, 205, 209
L
LoadLayout method 238
LoadPostData method 241
M
Max enumeration member 92
MergeWith method 187
Min enumeration member 92
Mode property 183
N
NavigateUrl property 167
NewPageIndex property 179
NewSelectedIndex property 191
NewValues property 205, 210
NextPageText property 183
None enumeration member 92, 187, 266, 267
NotSet enumeration member 192
O
OldValues property 205, 210
OutlineMode property 264
OutlineModeEnum enumeration 267
P
PageButtonCount property 184
PageCount property 232
PageIndexChanged event 250
PageIndexChanging event 251
Pager enumeration member 176
PagerStyle property 233
PageSize property 233
Position property 184, 265
PrevPageText property 185
R
RaisePostBackEvent method 241
RaisePostDataChangedEvent method 242
ReadOnly property 97
Remove method 127, 259
Reset method 187
Restricted enumeration member 267
RowMerge property 120
RowMergeEnum enumeration 267
S
SaveLayout method 242
SelectedIndex property 233
SelectedIndexChanged event 251
SelectedIndexChanging event 251
SelectedItem enumeration member 176
SelectedItem property 234
SelectedItemStyle property 234
Separator enumeration member 176
ShowFooter property 235
ShowHeader property 235
SortDirection property 120
SortedCommand event 252
SortExpression property 121, 195
SortingCommand event 252
StartCollapsed enumeration member 267
StartExpanded enumeration member 267
StartItemIndex property 161
Std enumeration member 92
StdPop enumeration member 92
Sum enumeration member 92
SyncRoot property 172
Index 275

T
Target property 168
Text property 102, 161, 168
ToGroup enumeration member 266
ToString method 97, 103, 122, 144, 169, 201, 265
U
Update method 244
UpdateBindings property 201
UpdatedCommand event 252
UpdateText property 143
UpdatingCommand event 253
V
ValueList property 97
Values property 134, 138
Var enumeration member 92
VarPop enumeration member 92
VirtualItemCount property 235
Visible property 121, 185
VScrollBarStyle property 236

Vous aimerez peut-être aussi