Invoke this method to return a reference to an object's UIElement. The reference can be used to set properties of, and invoke methods on, the UIElement object associated with an object. You can use this reference to access any of the UIElement's properties or methods.
The Type property can be used to determine what type of UIElement was returned. If no UIElement exists, meaning the object is not displayed, Nothing is returned.
The ParentUIElement property can be used to return a reference to a UIElement's parent UIElement object. The UIElements property can be used to return a reference to a collection of child UIElement objects for a UIElement.
The UIElementFromPoint method can be invoked to return a reference to a UIElement object residing at specific coordinates.
The CanResolveUIElement method can be invoked to determine whether an object or one of its ancestors can be resolved as a specific type of UIElement.
Invoke this method to return a reference to an object's UIElement. The reference can be used to set properties of, and invoke methods on, the UIElement object associated with an object. You can use this reference to access any of the UIElement's properties or methods.
The Type property can be used to determine what type of UIElement was returned. If no UIElement exists, meaning the object is not displayed, Nothing is returned.
The ParentUIElement property can be used to return a reference to a UIElement's parent UIElement object. The UIElements property can be used to return a reference to a collection of child UIElement objects for a UIElement.
The UIElementFromPoint method can be invoked to return a reference to a UIElement object residing at specific coordinates.
The CanResolveUIElement method can be invoked to determine whether an object or one of its ancestors can be resolved as a specific type of UIElement.
Invoke this method to return a reference to an object's UIElement. The reference can be used to set properties of, and invoke methods on, the UIElement object associated with an object. You can use this reference to access any of the UIElement's properties or methods.
The Type property can be used to determine what type of UIElement was returned. If no UIElement exists, meaning the object is not displayed, Nothing is returned.
The ParentUIElement property can be used to return a reference to a UIElement's parent UIElement object. The UIElements property can be used to return a reference to a collection of child UIElement objects for a UIElement.
The UIElementFromPoint method can be invoked to return a reference to an UltraGridUIElement object residing at specific coordinates.
The CanResolveUIElement method can be invoked to determine whether an object or one of its ancestors can be resolved as a specific type of UIElement.
Invoke this method to return a reference to an object's UIElement. The reference can be used to set properties of, and invoke methods on, the UIElement object associated with an object. You can use this reference to access any of the UIElement's properties or methods.
The Type property can be used to determine what type of UIElement was returned. If no UIElement exists, meaning the object is not displayed, Nothing is returned.
The ParentUIElement property can be used to return a reference to a UIElement's parent UIElement object. The UIElements property can be used to return a reference to a collection of child UIElement objects for a UIElement.
The UIElementFromPoint method can be invoked to return a reference to an UltraGridUIElement object residing at specific coordinates.
The CanResolveUIElement method can be invoked to determine whether an object or one of its ancestors can be resolved as a specific type of UIElement.
Invoke this method to return a reference to an object's UIElement. The reference can be used to set properties of, and invoke methods on, the UIElement object associated with an object. You can use this reference to access any of the UIElement's properties or methods.
The Type property can be used to determine what type of UIElement was returned. If no UIElement exists, meaning the object is not displayed, Nothing is returned.
The ParentUIElement property can be used to return a reference to a UIElement's parent UIElement object. The UIElements property can be used to return a reference to a collection of child UIElement objects for a UIElement.
The UIElementFromPoint method can be invoked to return a reference to an UltraGridUIElement object residing at specific coordinates.
The CanResolveUIElement method can be invoked to determine whether an object or one of its ancestors can be resolved as a specific type of UIElement.
The Band property of an object refers to a specific band in the grid as defined by an Band object. You use the Band property to access the properties of a specified Band object, or to return a reference to the Band object that is associated with the current object.
Band objects are the foundation of the hierarchical data structure used by UltraWinGrid. Any row or cell in the grid must be accessed through its Band object. Bands are also used to apply consistent formatting and behavior to the rows that they comprise. A Band object is used to display all the data rows from a single level of a data hierarchy. Band objects contain multiple sets of child Row objects that actually display the data of the recordset. All of the rows that are drawn from a single Command in the DataEnvironment make up a band.
The rows of a band are generally displayed in groups of one more in order to show rows from subsequent bands that are linked to rows in the current band via the structure of the data hierarchy. For example, if a hierarchical recordset has Commands that display Customer, Order and Order Detail data, each one of these Commands maps to its own Band in the UltraWinGrid. The rows in the Customer band will appear separated by any Order data rows that exist for the customers. By the same token, rows in the Order band will be appear separated to make room for Order Detail rows. How this looks depends on the ViewStyle settings selectedValue for the grid, but the concept of visual separation is readily apparent when the UltraWinGrid is used with any hierarchical recordset.
Although the rows in a band may appear to be separated, they are treated contiguously. When selecting a column in a band, you will see that the cells of that column become selectedValue in all rows for the band, regardless of any intervening rows. Also, it is possible to collapse the hierarchical display so that any children of the rows in the current band are hidden.
This property returns a reference to an AddNewBox object that can be used to set properties of, and invoke methods on, the AddNew box. You can use this reference to access any of the AddNew box's properties or methods.
Use the returned reference to show or hide the AddNew box or adjust its or its buttons' appearance.
This property specifies the display style of the AddNew box. When set to 0 (AddNewBoxStyleFull) the full AddNew Box will be displayed, with the arrangement of the buttons corresponding to the the hierarchical relationships of the bands in the grid. When the 1 (AddNewBoxStyleCompact) setting is used, the AddNew Box will be displayed using as little real estate as possible while still maintaining a visually acceptable appearance.
Note that in the compact view the AddNew buttons appear in the same horizontal row, regardless of the hierarchical structure. Buttons for sibling bands do not necessarily appear adjacent to one another; if a band has child bands, their AddNew buttons will appear immediately following that of their parent band.
You can use the ButtonAppearance property to control the appearance of
buttons that the add-new box displays. Note that you can specify the
overall look of all the buttons that the UltraGrid displays using the
Override's
ButtonStyle property specifies the style of buttons in the add-new box.
Note that you can specify the overall look of all the buttons that
the UltraGrid displays using the Override's
When a grid is being used to display a flat recordset, the conventional approach for adding data has been to place an empty row at the bottom of the grid. New data is entered into this row and appended to the data source, then the row reserved for new data entry is cleared and moved down to appear below the newly added row. However, when working with a hierarchical recordset, this metaphor is no longer effective. Multiple bands of data are represented as distinct groups of rows, and which group of rows receives the new data is significant. Simply adding new data to the last row in a band will not position the new record correctly with respect to the band's parent recordset.
To effectively add new data to a hierarchical recordset, the UltraGrid implements a new interface called the "AddNew Box." The AddNew Box displays one or more buttons that are used to trigger the addition of new data. The number of buttons corresponds to the number of hierarchical bands displayed. Each band has its own AddNew button, and connecting lines link the buttons, illustrating a hierarchical relationship that mirrors that of the data.
To use the AddNew Box, you first set focus to a row or cell in the band to which you want to add data. You should determine where in the hierarchy you want the record to appear, then select a record that corresponds to that location. You then click the AddNew button for the band you want to contain the new data, and an empty data entry row appears in the band a the point you selected. For example, if you have a Customers/Orders hierarchy and you wanted to add data for a new order, you would first locate the customer to whom the order belonged, select that customer's record (or one of that customer's existing order records) and click the AddNew button for the Orders band. A blank row would appear below any existing orders that were displayed for the customer.
The AddNewBox object contains properties that control the various attributes of the AddNew Box interface. For example, you can use the Hidden property of the AddNewBox object to selectively display or hide the interface, thus enabling or disabling the user's ability to add new data. You can also use this object to control the appearance of the AddNew buttons, and specify other formatting features.
The border style of the AddNew box buttons can be set by the ButtonBorderStyle property.
Note that not all styles are available on all operating systems. If the version of the OS that your program is running on does not support a particular border style, borders formatted with that style will be drawn using solid lines.
Note Derived elements that plan to return an accessible object must override
the
The UltraGridBand object represents all the records at one level of a hierarchical recordset. Bands are the foundation of hierarchical data in the UltraWinGrid. When bound to a recordset, each band corresponds to a single Command. (A band can also be considered as roughly equivalent to the table or query level of organization within a database.) Although the rows in a band may be visually separated (appearing grouped under the rows of the next higher band in the hierarchy) they are in fact one set of records. In the data hierarchy of the grid, bands come after the grid itself, but before rows and cells.
There is always at least one UltraGridBand present in the UltraWinGrid, even when it is displaying a single-level (flat) recordset. Most of the properties that apply to the control at the topmost (grid) level also apply to the UltraGridBand object, since the band rather than the control is the primary container object for data. There is also broad support for applying different formatting and behavior attributes to individual bands. Since a band is effectively "a grid within a grid" you may want to have bands be markedly different from one another. For example, one band might display column headers and row selectors for each group of records, while another might display only data cells.
Bands can be displayed either horizontally or vertically within the grid, depending on the setting of the ViewStyleBand property. You can also hide entire bands from view by setting the Hidden property of the UltraGridBand object.
Note that not all styles are available on all operating systems. If the version of the OS that your program is running on does not support a particular border style, borders formatted with that style will be drawn using solid lines.
Note Derived elements that plan to return an accessible object must override
the
Note: A parameterless constructor is required for all derived classes.
An UltraGridBand object represents a set of related columns in an
The following sample code shows how to set some UltraGridBand properties.
Private Sub CheckBox1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox1.CheckedChanged
Dim band As Infragistics.Win.UltraWinGrid.UltraGridBand
band = Me.UltraGrid1.DisplayLayout.Bands(0)
band.AddButtonCaption = "Customers"
band.AddButtonToolTipText = "Adds a new Customer record."
band.AutoPreviewEnabled = False
band.AutoPreviewField = ""
band.AutoPreviewIndentation = 15
band.AutoPreviewMaxLines = 3
band.ColHeadersVisible = True
band.ColHeaderLines = 2
band.HeaderVisible = True
band.ScrollTipField = "Cust_ID"
band.Override.BorderStyleRow = Infragistics.Win.UIElementBorderStyle.InsetSoft
band.CardView = True
band.CardSettings.CaptionField = "Name"
band.CardSettings.AllowLabelSizing = True
band.CardSettings.AllowSizing = True
band.CardSettings.Style = Infragistics.Win.UltraWinGrid.CardStyle.MergedLabels
band.CardSettings.ShowCaption = True
band.CardSettings.AutoFit = True
End Sub
You can use the GetExtent method to return leftmost point on a band, using the scale mode of the grid's container. The coordinate returned by GetOrigin is relative to the absolute left edge of the grid's virtual area. The grid's virtual area is the total space occupied by the grid's data, independent of any display issues. The size of the virtual area is not dependent on the size of the size of the control, it's container, or the system's display settings. How the grid is scrolled and what portion of the band is currently visible on screen will have no effect on the value returned by this method.
Note that to get the actual origin of the band in a specific column scrolling region, you must subtract the ColScrollRegion's Position property from the value returned by GetOrigin
You can use the GetExtent method to return leftmost point on a band, using the scale mode of the grid's container. The coordinate returned by GetOrigin is relative to the absolute left edge of the grid's virtual area. The grid's virtual area is the total space occupied by the grid's data, independent of any display issues. The size of the virtual area is not dependent on the size of the size of the control, it's container, or the system's display settings. How the grid is scrolled and what portion of the band is currently visible on screen will have no effect on the value returned by this method.
Note that to get the actual origin of the band in a specific column scrolling region, you must subtract the ColScrollRegion's Position property from the value returned by GetOrigin
You can use the GetExtent method to return the total width of a band, using the scale mode of the grid's container. This method does not take into account how much of the band is visible, the size of the ColScrollRegion, or even how much screen area is available on the system. It simply calculates the total width that would be required to display the band in its entirety, starting with the position you specify.
You can use the GetExtent method to return the total width of a band, using the scale mode of the grid's container. This method does not take into account how much of the band is visible, the size of the ColScrollRegion, or even how much screen area is available on the system. It simply calculates the total width that would be required to display the band in its entirety.
The AddNew method will display a data entry row for the user to enter data for a new record. When this method is invoked, the AddNew row appears at the bottom of the group of rows (in the current band) that contains the active row. If there is no active row, and the control does not have enough context to determine where the add row should appear, an error occurs.
If you attempt to invoke the AddNew method on a read-only data source, you will also receive an error.
If the band is in Group-By mode, the rows in the band will appear grouped according to the columns added to the SortedColumns collection as group-by columns. The user can add columns to this collection through the grid's UI by dragging column headers into the Group-By box. As columns are added, the rows in the band are dynamically re-grouped. By clearing the contents of the collection, all rows are ungrouped and the GroupBy box is cleared.
Use this method to determine which is the first (leftmost) visible column in a specific column scrolling region.
Use this method to determine which is the first (leftmost) visible column in a specific column scrolling region.
UltraGridBand keeps a back reference to the
The chaptered column is the column which links the child band with the parent band. This column is typically invisible in the parent band.
You can specify what gets shown in the summary footers' captions by setting this property to a substitution string. The format of the substition string is as follows:
Any column names surrounded by square brakets will be substituted by that column's value. The column must be from the parent band. There are three tokens with special meaning:
[BANDHEADER],
[SCROLLTIPFIELD]and
[GROUPBYROWVALUE].
[BANDHEADER]will be substituted by the band header's caption
[SCROLLTIPFIELD]will be substitued by the value of the column associated with
GROUPBYROWVALUEwill be substituted by the parent group-by row's value. This only makes sense for summary footers of rows that belong to a group-by row.
NOTE: Columns you specify for substitution must be from the parent band. ScrollTipField used is also from parent band. If there is no parent band, they will not be substituted with anything and left as they are.
Default value for the root rows is
"Grand Summaries"and for child rows it's
"Summaries for [BANDHEADER]: [SCROLLTIPFIELD]".
You can hide the summary footer caption by using the
The Columns property returns a collection that contains all the columns of the band.
The returned collection contains
The Override object contains properties for controlling the appearance and behavior of
the band and objects (like rows, cells, columns, headers etc...) associated with the band.
The
To enable the Card-View functionality set the Band's
Card View mode is a view style of the band that presents row data as a series of note cards instead of the traditional rows and columns. This view style is similar to the card view style of the Contacts section of Microsoft Outlook. Card View mode replaces the rows and columns of the child band with a card view area which contains the cards. The card view area scrolls horizontally to display as many cards as are required by the data in the band.
In Card View mode, you have a number of choices that control the way the cards will appear. You can choose to display labels on cards, control the size of the card view area, set guidelines for how cards will be arranged, and specify how the data field labels (analogous to column headers) will appear. These options are set by manipulating the properties of the
Note that when a band is in Card View mode, no children of that band will be displayed. In card view, there is no effective interface for displaying a child band, so the display of child bands is disabled. Child bands may still exist, but they cannot be shown by the control.
When the AddNew box is displayed, it contains a button for each band in the grid. The buttons are arranged in a hierarchical display that mimics the arrangement of the bands in the grid. The user can click the appropriate button to add a new row to the indicated band. The AddButtonCaption property determines what will be displayed on the AddNew box button for the current band.
By default, this property uses a keyvalue (the name of the recordset) that it retrieves from the data provider (if it is available).If the AddButtonCaption property is not set (the string is empty) then the caption of the button will be this band's key. If the key is empty, then the first visible header's caption will be used.
When the AddNew box is displayed, it contains a button for each band in the grid. The buttons are arranged in a hierarchical display that mimics the arrangement of the bands in the grid. The user can click the appropriate button to add a new row to the indicated band. The AddButtonToolTipText property determines what will be displayed in the tooltip that appears when the mouse is over the AddNew box button for the current band. By default, this property is set to an empty string("") indicating that no tooltip will be displayed.
When the AddNew box is displayed, it contains a button for each band in the grid. The buttons are arranged in a hierarchical display that mimics the arrangement of the bands in the grid. The user can click the appropriate button to add a new row to the indicated band. The AddButtonCaption property determines what will be displayed on the AddNew box button for the current band.
By default, this property uses a keyvalue (the name of the recordset) that it retrieves from the data provider (if it is available).If the AddButtonCaption property is not set (the string is empty) then the caption of the button will be this band's key. If the key is empty, then the first visible header's caption will be used.
The AutoPreview area appears under a row and provides a way to display multiple lines of text associated with that row. You can specify how many lines of text should be displayed, and choose to either display the value from a cell in the row or a custom text string that you specify. One common use might be to display the contents of a memo field that initially appears off-screen when the grid is loaded.
The AutoPreviewField property specifies the data field that will be used to populate the AutoPreview area. Whatever value is present in the specified field will be displayed in the AutoPreview area.
The AutoPreview area appears under a row and provides a way to display multiple lines of text associated with that row. You can specify how many lines of text should be displayed, and choose to either display the value from a cell in the row or a custom text string that you specify. One common use might be to display the contents of a memo field that initially appears off-screen when the grid is loaded.
The AutoPreviewEnabled property determines whether the AutoPreview area can be displayed for rows in the specified band. Once AutoPreview has been enabled, it can be displayed for any row by setting the UltraGridRow object's AutoPreviewHidden property to False.
The Description property of the row determines the text to be displayed in the AutoPreview area. Description can be automatically set using the field in the row specified by the AutoPreviewField property, or it can be explicitly set through code (for example, in the InitializeRow event handler).
The AutoPreview area appears under a row and provides a way to display multiple lines of text associated with that row. You can specify how many lines of text should be displayed, and choose to either display the value from a cell in the row or a custom text string that you specify. One common use might be to display the contents of a memo field that initially appears off-screen when the grid is loaded.
The AutoPreviewMaxLines property specifies the maximum number of lines of text that will appear in the AutoPreview area. The default value is 3.
The Description property of the row determines the text to be displayed in the AutoPreview area. Description can be automatically set using the field in the row specified by the AutoPreviewField property, or it can be explicitly set through code (for example, in the InitializeRow event handler).
The ColHeaderLines property determines how many lines of text can appear inside of a column header. Setting the value of this property will change the height of the column headers to accommodate the specified number of lines, whether or not any column header actually contains enough text to fill multiple lines. The minimum value for this property is 1. The maximum value is 10.
If you want the UltraGrid to automatically wrap the header caption and also
change the height of the headers to accomodate wrapped header caption, then
set the
Pixel level control over the heights of headers can be achieved using the
Row-Layout functionality. See
The ColHeadersVisible property is used to toggle the visibility of column headers. When column headers are not visible, certain header-related functionality, such as column selection, moving and swapping, may become unavailable.
Headers of individual columns can be hidden using the Row-Layout functionality.
Row-Layout functionality allows you to create flexible cell arrangements.
See
The Expandable property determines whether the rows in a band can be expanded. If set to False the row expansion (plus/minus) indicators become inactive.
The ExpansionIndicator property can be used to hide the expansion indicators.
The GroupHeadersVisible property is used to toggle the visibility of group headers. When group headers are not visible, certain header-related functionality, such as group selection, moving and swapping, may become unavailable.
The Hidden property determines whether an object is visible. Hiding an object may have have effects that go beyond simply removing it from view. For example, hiding a band also hides all the rows in that band. Also, changing the Hidden property of an object affects all instances of that object. For example, a hidden column or row is hidden in all scrolling regions.
There may be instances where the Hidden property cannot be changed. For example, you cannot hide the currently active rowscrollregion or colscrollregion. If you attempt to set the Hidden property of the active rowscrollregion to True, an error will occur.
This property is ignored for chaptered columns; that is, columns whose DataType property is set to 136 (DataTypeChapter).
The Index property is set by default to the order of the creation of objects in a collection. The index for the first object in a collection will always be zero.
The value of the Index property of an object can change when objects in the collection are reordered, such as when objects are added to or deleted from the collection. Since the Index property may change dynamically, it may be more useful to refer to objects in a collection by using its Key property.
Not all objects in a collection support an Index property. For certain objects, the Index value is essentially meaningless except as an internal placeholder within the collection. In these cases, the object will not have an Index property, even though it is in a collection. You can use other mechanisms, such as the Key property or the For Each... loop structure, to access the objects in the collection.
Typically, each data record in a band occupies a single row of the grid, with all of the cells stretching from left to right. In some circumstances, you may want to have a single record occupy more than one row. For example, if you have address data stored in a record, you may want to have the first and last name fields on one level, the street address on a second level, and city, state and postal code fields on a third level. The LevelCount property is used to specify how many levels of data a band will display for each record in the data source.
Levels work in conjunction with groups to create blocks of fields within a band. If you do not have any groups specified for a band, the LevelCount property will have no effect. If one or more groups are specified (and column moving is enabled within the group or band) you can re-arrange fields vertically within the group by dragging their column headers to different levels.
The minimum value for this property is 1. The maximum value for this property is 50. When you specify a value greater than 1 for LevelCount, the control will automatically expand the band to create room for the number of levels you have requested, regardless of whether you actually have cells occupying those levels. Note that if you specify too high a number of levels, the user may initially see only column headers - the data itself may be pushed off the screen and may not be visible. Also, the amount of blank space allocated for each record may break up the visual continuity of the band and create confusion for the user.
The ScrollTipField property specifies which field should be used to supply the text for the scroll tips. Scroll tips appear over the scrollbar as the user is scrolling through a recordset. They display the specified data as a navigational aid; the user can release the mouse button and the recordset will be positioned on the record containing the data indicated in the scroll tip.
Note that scroll tips are only displayed if
The UltraGrid maintains sort and group-by columns in the SortedColumns collection.
You can use this property to sort and group rows by a column in code. To do that
add the column you want to sort or group rows by to the the SortedColumns collection
using the
Use
Due to the nature of the row-layout functionality column swapping, and column moving are disabled.
Set
When RowLayoutLabelStyle is set to Separate, the column labels are shown in a separate header area above the rows. This is the default.
When RowLayoutLabelStyle is set to WithCellData, the column labels are shown with cells and repeated in each row.
Label position indicates where to position the column label in relation to the associated cell in row layout mode.
Specifies the key of the column whose cell to position the special row prompts in. Default value is null which specifies that the prompt should not be positioned in any particular cell but rather it should be overlaid on the special row spanning multiple cells if necessary.
You can use the IndentationGroupByRow property to specify how much indenting should be applied to the GroupBy rows in a band. The default value for this property is -1, which indicates that the grid's default indenting should be used.
The indentation of the GroupBy rows is a function of the IndentationGroupByRow value and the row's zero-based depth-level. In other words, the top-level GroupBy rows in a band will always be flush against the left edge of the band because the top-level GroupBy rows have a depth-level of zero.
Note: If this property is set to 0 then the left edge of all the GroupBy rows in the band will be at the same X coordinate. In this situation the grid automatically determines the location of the expansion indicators in each GroupBy row such that the relationships between the groupings are visually represented via the relative location of said expansion indicators. The indentation of the GroupBy row expansion indicators is, in this case, a function of a GroupBy row's "depth level" and the
Note: If the
MaxRows and MinRows will prevent the user from adding or removing rows if the RowsCollection will violate the MaxRows and MinRows constrants. These properties do not control what the data source can contain. It only controls whether the user is allowed to add or remove rows beyond a certain point.
MaxRows and MinRows will prevent the user from adding or removing rows if the RowsCollection will violate the MaxRows and MinRows constrants. These properties do not control what the data source can contain. It only controls whether the user is allowed to add or remove rows beyond a certain point.
Set the ExcludeFromColumnChooser property of a band to True if you want to
exlude it from the column chooser. Excluding a band from the column chooser will cause
the
The Column object also exposes
The VisiblePosition property determines the order in which sibling bands are displayed relative to each other. The band with the lowest VisiblePosition will be displayed first and then it's siblings will be displayed in ascending numeric order. If two bands have the same VisiblePosition, then the order will be determined by the Index of the bands in the
When RowLayoutStyle is not set to None, the VisiblePosition property will be overridden by the column’s RowLayoutColumnInfo.OriginX property. If the OriginX is not set, it will be resolved relative to the other columns in the band or group based on the VisiblePosition of the column.
The SortedIndex property returns the index of the band in the SortedBands collection.
A Header object represents a column or group header that specifies information about the column or group, and can also serve as the interface for functionality such as moving, swapping or sorting the column or group. Group headers have the added functionality of serving to aggregate multiple columns under a single heading.
The Header property provides access to the header that is associated with an object. The Header property provides access to the header that is associated with an object. In some instances, the type of header may be ambiguous, such as when accessing the Header property of a UIElement object. You can use the Type property of the Header object returned by the Header property to determine whether the header belongs to a column or a group.
Examining the value of an Appearance object property that has not been set will return the "use default" value, not the internal value that is actually being used to display the object affected by the Appearance object. In order to find out what values are being used, you must use the ResolveAppearance method. This method will evaluate the property values of an Appearance object and return an Appearance object with all of its properties set to meaningful values that can be used to determine how the object will look.
When you change the properties of an Appearance object, you are not required to specify a value for every property that object supports. Whether the Appearance object is a stand-alone object you are creating from scratch, or an intrinsic object that is already attached to some other object, you can set certain properties and ignore others. The properties you do not explicitly set are given a "use default" value that indicates there is no specific setting for that property.
Properties that are set to the "use default" value derive their settings from other objects by following an appearance hierarchy. In the appearance hierarchy, each object has a parent object from which it can inherit the actual numeric values to use in place of the "use default" values. The "use default" value should not be confused with the initial setting of the property, which is generally referred to as the default value. In many cases, the default setting of an object's property will be "use default"; this means that the property is initially set not to use a specific value. The "use default" value will be 0 for an enumerated property (usually indicated by a constant ending in the word "default", such as AlignDefault) or -1 (0xFFFFFFFF) for a numeric setting, such as that used by color-related properties.
So for example, if the Appearance object of a cell has its BackColor property set to -1, the control will use the setting of the row's BackColor property for the cell, because the row is above the cell in the appearance hierarchy. The top level of the appearance hierarchy is the UltraWinGrid control itself. If any of the UltraWinGrid's Appearance object properties are set to their "use default" values, the control uses built-in values (the "factory presets") for those properties. For example, the factory preset of the BackColor property of the grid's Appearance object is the system button face color (0x8000000F). This is the value that will be used for the grid's background color when the BackColor property of the grid's Appearance object is set to the "use default" value.
The ResolveAppearance method will return an Appearance object with all of its "use default" settings converted into actual values. It does this by navigating the appearance hierarchy for each property until an explicit setting or a factory preset is encountered. If you simply place a grid on a form, run the project, and examine the setting of the BackColor property of the grid's intrinsic Appearance object:
MsgBox Hex(UltraWinGrid1.Appearance.BackColor)
...you will see that it is set to the "use default" value (0xFFFFFFFF). However, if you use the ResolveAppearance method to return the same value:
MsgBox Hex(UltraWinGrid1.ResolveAppearance.BackColor)
...you will see that it is set to the system button face color (0x8000000F). Note that this code takes advantage of the fact that the ResolveAppearance method returns an Appearance object to simplify the code that must be written. This code could be written out in a longer form as follows:
Dim objAppearance as UltraWinGrid.Appearance
Set objAppearance = UltraWinGrid1.ResolveAppearance
MsgBox Hex(objAppearance.BackColor)
Examining the value of an Appearance object property that has not been set will return the "use default" value, not the internal value that is actually being used to display the object affected by the Appearance object. In order to find out what values are being used, you must use the ResolveAppearance method. This method will evaluate the property values of an Appearance object and return an Appearance object with all of its properties set to meaningful values that can be used to determine how the object will look.
When you change the properties of an Appearance object, you are not required to specify a value for every property that object supports. Whether the Appearance object is a stand-alone object you are creating from scratch, or an intrinsic object that is already attached to some other object, you can set certain properties and ignore others. The properties you do not explicitly set are given a "use default" value that indicates there is no specific setting for that property.
Properties that are set to the "use default" value derive their settings from other objects by following an appearance hierarchy. In the appearance hierarchy, each object has a parent object from which it can inherit the actual numeric values to use in place of the "use default" values. The "use default" value should not be confused with the initial setting of the property, which is generally referred to as the default value. In many cases, the default setting of an object's property will be "use default"; this means that the property is initially set not to use a specific value. The "use default" value will be 0 for an enumerated property (usually indicated by a constant ending in the word "default", such as AlignDefault) or -1 (0xFFFFFFFF) for a numeric setting, such as that used by color-related properties.
So for example, if the Appearance object of a cell has its BackColor property set to -1, the control will use the setting of the row's BackColor property for the cell, because the row is above the cell in the appearance hierarchy. The top level of the appearance hierarchy is the UltraWinGrid control itself. If any of the UltraWinGrid's Appearance object properties are set to their "use default" values, the control uses built-in values (the "factory presets") for those properties. For example, the factory preset of the BackColor property of the grid's Appearance object is the system button face color (0x8000000F). This is the value that will be used for the grid's background color when the BackColor property of the grid's Appearance object is set to the "use default" value.
The ResolveAppearance method will return an Appearance object with all of its "use default" settings converted into actual values. It does this by navigating the appearance hierarchy for each property until an explicit setting or a factory preset is encountered. If you simply place a grid on a form, run the project, and examine the setting of the BackColor property of the grid's intrinsic Appearance object:
MsgBox Hex(UltraWinGrid1.Appearance.BackColor)
...you will see that it is set to the "use default" value (0xFFFFFFFF). However, if you use the ResolveAppearance method to return the same value:
MsgBox Hex(UltraWinGrid1.ResolveAppearance.BackColor)
...you will see that it is set to the system button face color (0x8000000F). Note that this code takes advantage of the fact that the ResolveAppearance method returns an Appearance object to simplify the code that must be written. This code could be written out in a longer form as follows:
Dim objAppearance as UltraWinGrid.Appearance
Set objAppearance = UltraWinGrid1.ResolveAppearance
MsgBox Hex(objAppearance.BackColor)
Invoke this method to return a reference to an object's UIElement. The reference can be used to set properties of, and invoke methods on, the UIElement object associated with an object. You can use this reference to access any of the UIElement's properties or methods.
The Type property can be used to determine what type of UIElement was returned. If no UIElement exists, meaning the object is not displayed, Nothing is returned.
The ParentUIElement property can be used to return a reference to a UIElement's parent UIElement object. The UIElements property can be used to return a reference to a collection of child UIElement objects for a UIElement.
The UIElementFromPoint method can be invoked to return a reference to an UltraGridUIElement object residing at specific coordinates.
The CanResolveUIElement method can be invoked to determine whether an object or one of its ancestors can be resolved as a specific type of UIElement.
The Caption property is used to determine the text that will be displayed for an object. Generally, text specified by Caption is static (cannot be edited by the user). Editable text is usually specified by the Value property of an object.
If Caption is set to null or to a zero length string, then the property returns the default text of the object (the Key value of the object associated with the Header.)
The Appearance property of an object is used to associate the object with an Appearance object that will determine its appearance. The Appearance object has properties that control settings such as color, borders, font, transparency, etc. For many of the objects in the UltraWinGrid, you do not set formatting properties directly. Instead, you set the properties of an Appearance object, which controls the formatting of the object it is attached to.
There are two ways of working with the Appearance property and assigning the attributes of an Appearance object to other objects. One way is to create a new Appearance object, adding it directly to the Appearances collection. Then you assign the new Appearance object to the Appearance property of the object you want to format. This method uses a "named" Appearance object that you must explicitly create (and to which you must assign property settings) before it can be used. For instance, you could create an object in the grid's Appearances collection and assign it some values as follows:
UltraWinGrid1.Appearances.Add "New1"
UltraWinGrid1.Appearances("New1").BorderColor = vbBlue
UltraWinGrid1.Appearances("New1").ForeColor = vbRed
Creating the object in this way does not apply formatting to any visible part of the grid. The object simply exists in the collection with its property values, waiting to be used. To actually use the object, you must assign it to the grid's (or another object's) Appearance property:
UltraWinGrid1.Appearance = UltraWinGrid1.Appearances("New1")
In this case, only one Appearance object exists. The grid's appearance is governed by the settings of the "New1" object in the collection. Any changes you make to the object in the collection will immediately be reflected in the grid.
The second way of working with the Appearance property is to use it to set property values directly, such as:
UltraWinGrid1.Appearance.ForeColor = vbBlue
In this case, an Appearance object is automatically created by the control. This Appearance object is not a member of an Appearances collection and it does not have a name. It is specific to the object for which it was created; it is an "intrinsic" Appearance object. Changes to the properties of an intrinsic Appearance object are reflected only in the object to which it is attached.
Note that you can assign properties from a named Appearance object to an intrinsic Appearance object without creating a dependency relationship. For example, the following code...
UltraWinGrid1.Appearance.ForeColor = UltraWinGrid1.Appearances("New1").ForeColor
...does not establish a relationship between the foreground color of the intrinsic object and that of the named object. It is simply a one-time assignment of the named object's value to that of the intrinsic object. In this case, two Appearance objects exist - one in the collection and one attached to the grid - and they operate independently of one another.
If you wish to assign all the properties of a named object to an intrinsic object at once without creating a dependency relationship, you can use the Clone method of the Appearance object to duplicate its settings and apply them. So if you wanted to apply all the property settings of the named Appearance object "New1" to the grid's intrinsic Appearance object, but you did not want changes made to "New1" automatically reflected in the grid, you would use the following code:
UltraWinGrid1.Appearance = UltraWinGrid1.Appearances("New1").Clone
Note that the properties of an Appearance object can also operate in a hierarchical fashion. Certain properties can be set to a "use default" value, which indicates to the control that the property should take its setting from the object's parent. This functionality is enabled by default, so that unless you specify otherwise, child objects resemble their parents, and formatting set at higher levels of the grid hierarchy is inherited by objects lower in the hierarchy.
This property returns a reference to a ColScrollRegion object that can be used to set properties of, and invoke methods on, the colscrollregion whose value will be modified. You can use this reference to access any of the returned colscrollregion's properties or methods.
When this property is set, the column will only appear in the specified colscrollregion; it will not appear in any other colscrollregion. When a colscrollregion is first made exclusive, only the column whose header had this property set will appear in the scrolling region. However, additional columns can be added to the colscrollregion by setting this property for their headers.
If an exclusive colscrollregion is unable to display its columns because their headers have been hidden, the colscrollregion will display all visible columns.
The VisibleHeaders property of a colscrollregion can be used to return references to the columns that are displayed in a colscrollregion.
The Height property is used to determine the vertical dimension of an object. It is generally expressed in the scale mode of the object's container, but can also be specified in pixels.
For the Header object, this property is read-only. In a particular band, each column header has the same height. This height is determined by taking the largest height that results from the resolution of each column's header's Appearance attributes and the band's ColHeaderLines property.
This property can be used to specify the ordinal positions of groups and columns.
For group headers, this property returns or sets the position of the group within that group's band. For column headers, this property returns or sets the position of the column within its group, if the column belongs to a group, or its band, if the column belongs to a band.
Fill indicates whether to resize the item to fill the extra spance if the layout item's display area is larger than its size,
OriginX and OriginY define where the layout item will be placed in the virtual grid of the grid-bag layout. OriginX specifies the location horizontally while specifies the location vertically. These locations are the coordinates of the cells in the virtual grid that the grid-bag layout represents.
The leftmost cell has OriginX of 0. The constant
The default value is
OriginX and OriginY define where the layout item will be placed in the virtual grid of the grid-bag layout. OriginX specifies the location horizontally while specifies the location vertically. These locations are the coordinates of the cells in the virtual grid that the grid-bag layout represents.
The topmost cell has OriginY of 0. The constant
The default value is
Specifies the number of cells this item will span horizontally. The constant
Specifies the number of cells this item will span vertically. The constant
Specifies whether the header is fixed. When a header is fixed column(s) associated with the header remain in view when the grid is scrolled horizontally.
Specifies whether the header is fixed. This property is settable on column headers and group headers. Attempting to set it on a BandHeader object will lead to a NonSupportedException.
You must enable the fixed-headers functionality by setting
NOTE: This property is ignored in Row-Layout mode as headers can't be fixed in Row-Layout mode. Also if there are groups, then the Fixed settings off the column headers will be ignored and Fixed settings off the group headers will be used.
FixedHeaderIndicator property specifies whether the user is allowed to fix or unfix the header.
NOTE: This property is ignored in Row-Layout mode as headers can't be fixed in Row-Layout mode.
Specifies the tooltip to display when the user hovers the mouse over the header. No tooltip is displayed if this property is set to null or empty string.
The Band property of an object refers to a specific band in the grid as defined by an UltraGridBand object. You use the Band property to access the properties of a specified UltraGridBand object, or to return a reference to the UltraGridBand object that is associated with the current object.
UltraGridBand objects are the foundation of the hierarchical data structure used by UltraWinGrid. Any row or cell in the grid must be accessed through its UltraGridBand object. Bands are also used to apply consistent formatting and behavior to the rows that they comprise. A UltraGridBand object is used to display all the data rows from a single level of a data hierarchy. UltraGridBand objects contain multiple sets of child UltraGridRow objects that actually display the data of the recordset. All of the rows that are drawn from a single Command in the DataEnvironment make up a band.
The rows of a band are generally displayed in groups of one more in order to show rows from subsequent bands that are linked to rows in the current band via the structure of the data hierarchy. For example, if a hierarchical recordset has Commands that display Customer, Order and Order Detail data, each one of these Commands maps to its own UltraGridBand in the UltraWinGrid. The rows in the Customer band will appear separated by any Order data rows that exist for the customers. By the same token, rows in the Order band will be appear separated to make room for Order Detail rows. How this looks depends on the ViewStyle settings selected for the grid, but the concept of visual separation is readily apparent when the UltraWinGrid is used with any hierarchical recordset.
Although the rows in a band may appear to be separated, they are treated contiguously. When selecting a column in a band, you will see that the cells of that column become selected in all rows for the band, regardless of any intervening rows. Also, it is possible to collapse the hierarchical display so that any children of the rows in the current band are hidden.
The Height property is used to determine the vertical dimension of an object. It is generally expressed in the scale mode of the object's container, but can also be specified in pixels.
For a Header object, this property is read-only.
For band headers, this property is read-only and always returns zero.
This method always throws an exception since this is not applicable to band headers.
Overridden. This property is not applicable to BandHeaders.
The UltraGridBand object represents all the records at one level of a hierarchical recordset. Bands are the foundation of hierarchical data in the UltraWinGrid. When bound to a recordset, each band corresponds to a single Command. (A band can also be considered as roughly equivalent to the table or query level of organization within a database.) Although the rows in a band may be visually separated (appearing grouped under the rows of the next higher band in the hierarchy) they are in fact one set of records. In the data hierarchy of the grid, bands come after the grid itself, but before rows and cells.
There is always at least one UltraGridBand present in the UltraWinGrid, even when it is displaying a single-level (flat) recordset. Most of the properties that apply to the control at the topmost (grid) level also apply to the UltraGridBand object, since the band rather than the control is the primary container object for data. There is also broad support for applying different formatting and behavior attributes to individual bands. Since a band is effectively "a grid within a grid" you may want to have bands be markedly different from one another. For example, one band might display column headers and row selectors for each group of records, while another might display only data cells.
Bands can be displayed either horizontally or vertically within the grid, depending on the setting of the ViewStyleBand property. You can also hide entire bands from view by setting the Hidden property of the UltraGridBand object.
Note that not all styles are available on all operating systems. If the version of the OS that your program is running on does not support a particular border style, borders formatted with that style will be drawn using solid lines.
Note that not all styles are available on all operating systems. If the version of the OS that your program is running on does not support a particular border style, borders formatted with that style will be drawn using solid lines.
Note that not all styles are available on all operating systems. If the version of the OS that your program is running on does not support a particular border style, borders formatted with that style will be drawn using solid lines.
Note that not all styles are available on all operating systems. If the version of the OS that your program is running on does not support a particular border style, borders formatted with that style will be drawn using solid lines.
The Header property of an object refers to a column or group header, as defined by an Header object. You use the Header property to access the properties of a specified Header object, or to return a reference to a Header object.
A Header object represents a column or group header that specifies information about the column or group, and can also serve as the interface for functionality such as moving, swapping or sorting the column or group. Group headers have the added functionality of serving to aggregate multiple columns under a single heading.
The Header property provides access to the header that is associated with an object. In some instances, the type of header may be ambiguous, such as when accessing the Header property of a UIElement object. You can use the Type property of the Header object returned by the Header property to determine whether the header belongs to a column or a group.
Note that not all styles are available on all operating systems. If the version of the OS that your program is running on does not support a particular border style, borders formatted with that style will be drawn using solid lines.
When a band is displayed in card view, each card can display a caption. You can use the CaptionField property to specify the data field that will be used to set the caption text of the card. You can then choose whether or not to display that data field on the card itself. (Data displayed in the card's caption cannot be edited.)
If you want to set the card's caption to something other than the value of one of the data fields, you can do so through code in the
You can determine whether the width of the label area can be changed by using the AllowLabelSizing property. If this property is set to allow label sizing, the user can resize the area occupied by the labels in card view by positioning their mouse pointer over the right edge of the label area then clicking and dragging to the left or right.
All labels which are displayed shared the same width. In a card view with standard labels, sizing the label area on any card will resize the label area used by all cards. (In merged label card view, only one label area exists.) You can determine which view is in effect by setting the
The AllowResizing property is used to determine whether the width of cards in the card view can be changed by the user. All cards in a band share the same width. Resizing a single card changes the with of all the cards.
If this property is set to allow card resizing, the user can resize a card's width by positioning the mouse pointer over the right edge of the card, then clicking and dragging to the left or right.
If this property is set to allow card resizing, the user can resize a card's width by positioning the mouse pointer over the right edge of the card, then clicking and dragging to the left or right.
When card view is used for a band, the cards that correpond to data records appear in a rectangular section of the grid called the card area. The horizontal size of the card area is determined by the number of cards being displayed, but it is also dependent on the visible size of the grid. The card area will always extend horizontally from its left origin to the right edge of the control. If there are more cards than can fit within the available area, a horizontal scroll bar appears.
Cards are arranged in the card area in one of three ways, depending on the setting of the UltraGridCardSettings object's
The AutoFit property specifies whether cards will expand to fill the card area based on their width. When AutoFit is True, the cards "snap" to specific size when being resized. The control calculates how many cards can fill the area and then divides their widths evenly, until the width is changed enough to alter the number of cards that will fit in the area.
For example, suppose you have a card view band that is displaying three "stacks" of cards, and has AutoFit set to True. The cards' width is set to take up one-third of the card area. Then, suppose click on the right edge of a card and begin reducing the width. At first, nothing will happen, as the width remains at one-third of the available card area width. However, as you pass a threshold point, the control will determine that four cards can be displayed in the card area, and the width of all cards will be changed to one-fourth of the card area's width. If you begin to widen the cards, four will be displayed horizontally until the threshold width is passed, when the display will snap to show three cards across.
If AutoFit is set to False, card width will not be automatically adjusted, and you will see blank parts of the card area where no cards are being displayed.
The CaptionLines property specifies the number of lines of text in the caption area of the cards in card view. The setting of this property applies to all cards in the band.
The setting of this property allocates the space for the specified number of lines in the card caption. The caption area of the card will be enlarged vertically to accommodate the specified number of lines whether or not there is actually enough text to fill that many lines. Even cards with no text in their caption will display an area sufficient to show the specified number of lines.
In standard card view, this is the width of the label area for each card. In merged card view, this is the width of the common label area. The setting of this property will change when the label area is resized by the user.
When a band is in card view mode, the card area is the container for the cards that are displayed. The vertical size of the card area is fixed (the card area only scrolls horizontally) but it can be changed by the user. Clicking the bottom edge of the card area and dragging resizes the card area's vertical dimension.
The cards in the card area will re-arrange themselves when it is resized. By default, the control will display as many rows of cards as will fit in the space, based on the size of a card with all fields visible. Using the MaxCardAreaRows property, you can limit the number of rows of cards that will be displayed. Once the maximum number of rows are visible, further expanding the height of the card area will only reveal more blank space.
When a band is in card view mode, the MaxCardAreaCols property specifies the maximum number of "stacks" of cards that will be visible in the card area. This property applies to visibility only; it does not limit the number of cards that will be displayed.
The default behavior is to display as many cards as will fit within the width of the card area, based on the width of the cards. So for example, if you have a card area that is wide enough to display six card widths across, and you set MaxCardAreaCols to 4, only 4 cards across will be displayed at one time. You can then scroll horizontally to see more of the cards, but only four "stacks" of cards will be visible at once.
The text of the card caption is determined by the
Note In compressed card view style captions are always displayed and this property has no effect.
When a band is in card view mode, all the cards share a common width. The width of the card will depend on whether each card is displaying labels (as determined by the
When you place a band in card view mode, the data from each row from that band is displayed as a card. These cards are arranged in a rectangular card view area, which replaces the row in the visible grid. The column headers of the band become the labels for the cards. The cards are arranged in "stacks" or columns of cards, with each stack consisting of one or more "layers" or rows of individual cards. The Style property specifies how the cards will be arranged within the card view area.
There are three styles of card display. Standard Labels style displays the data labels on each card. Cards are arranged into columns (or "stacks") each having an identical number of rows of cards (or "levels") and each card is the the same height. In Merged Labels style, there is one area for labels on the left side of the card area and the cards themselves contain only the data. Merged Labels style also displays symmetrical stacks of cards with a fixed number of levels that share a common height.
When using the Variable Height style, labels are displayed on each card, but the height of the individual cards changes based on the contents of the card. If a data field has an empty value (a data value of DBNULL or an empty string for string fields) that field does not appear on the card. Note that when using Variable Height style there is no way to add values to empty fields, since empty fields are inaccessible.
Each stack of cards in the Variable Height view style may contain a different number of levels, and the levels may not line up into neat rows and columns as they do with the other styles. Because the number of levels per stack is variable, there is a difference in the way certain properties are applied in this mode. For example, the
You can use CardScrollbars property to control the scrollbars in card area.
Examining the value of an Appearance object property that has not been set will return the "use default" value, not the internal value that is actually being used to display the object affected by the Appearance object. In order to find out what values are being used, you must use the ResolveAppearance method. This method will evaluate the property values of an Appearance object and return an Appearance object with all of its properties set to meaningful values that can be used to determine how the object will look.
When you change the properties of an Appearance object, you are not required to specify a value for every property that object supports. Whether the Appearance object is a stand-alone object you are creating from scratch, or an intrinsic object that is already attached to some other object, you can set certain properties and ignore others. The properties you do not explicitly set are given a "use default" value that indicates there is no specific setting for that property.
Properties that are set to the "use default" value derive their settings from other objects by following an appearance hierarchy. In the appearance hierarchy, each object has a parent object from which it can inherit the actual numeric values to use in place of the "use default" values. The "use default" value should not be confused with the initial setting of the property, which is generally referred to as the default value. In many cases, the default setting of an object's property will be "use default"; this means that the property is initially set not to use a specific value. The "use default" value will be 0 for an enumerated property (usually indicated by a constant ending in the word "default", such as AlignDefault) or -1 (0xFFFFFFFF) for a numeric setting, such as that used by color-related properties.
So for example, if the Appearance object of a cell has its BackColor property set to -1, the control will use the setting of the row's BackColor property for the cell, because the row is above the cell in the appearance hierarchy. The top level of the appearance hierarchy is the UltraWinGrid control itself. If any of the UltraWinGrid's Appearance object properties are set to their "use default" values, the control uses built-in values (the "factory presets") for those properties. For example, the factory preset of the BackColor property of the grid's Appearance object is the system button face color (0x8000000F). This is the value that will be used for the grid's background color when the BackColor property of the grid's Appearance object is set to the "use default" value.
The ResolveAppearance method will return an Appearance object with all of its "use default" settings converted into actual values. It does this by navigating the appearance hierarchy for each property until an explicit setting or a factory preset is encountered. If you simply place a grid on a form, run the project, and examine the setting of the BackColor property of the grid's intrinsic Appearance object:
MsgBox Hex(UltraWinGrid1.Appearance.BackColor)
...you will see that it is set to the "use default" value (0xFFFFFFFF). However, if you use the ResolveAppearance method to return the same value:
MsgBox Hex(UltraWinGrid1.ResolveAppearance.BackColor)
...you will see that it is set to the system button face color (0x8000000F). Note that this code takes advantage of the fact that the ResolveAppearance method returns an Appearance object to simplify the code that must be written. This code could be written out in a longer form as follows:
Dim objAppearance as UltraWinGrid.Appearance
Set objAppearance = UltraWinGrid1.ResolveAppearance
MsgBox Hex(objAppearance.BackColor)
Examining the value of an Appearance object property that has not been set will return the "use default" value, not the internal value that is actually being used to display the object affected by the Appearance object. In order to find out what values are being used, you must use the ResolveAppearance method. This method will evaluate the property values of an Appearance object and return an Appearance object with all of its properties set to meaningful values that can be used to determine how the object will look.
When you change the properties of an Appearance object, you are not required to specify a value for every property that object supports. Whether the Appearance object is a stand-alone object you are creating from scratch, or an intrinsic object that is already attached to some other object, you can set certain properties and ignore others. The properties you do not explicitly set are given a "use default" value that indicates there is no specific setting for that property.
Properties that are set to the "use default" value derive their settings from other objects by following an appearance hierarchy. In the appearance hierarchy, each object has a parent object from which it can inherit the actual numeric values to use in place of the "use default" values. The "use default" value should not be confused with the initial setting of the property, which is generally referred to as the default value. In many cases, the default setting of an object's property will be "use default"; this means that the property is initially set not to use a specific value. The "use default" value will be 0 for an enumerated property (usually indicated by a constant ending in the word "default", such as AlignDefault) or -1 (0xFFFFFFFF) for a numeric setting, such as that used by color-related properties.
So for example, if the Appearance object of a cell has its BackColor property set to -1, the control will use the setting of the row's BackColor property for the cell, because the row is above the cell in the appearance hierarchy. The top level of the appearance hierarchy is the UltraWinGrid control itself. If any of the UltraWinGrid's Appearance object properties are set to their "use default" values, the control uses built-in values (the "factory presets") for those properties. For example, the factory preset of the BackColor property of the grid's Appearance object is the system button face color (0x8000000F). This is the value that will be used for the grid's background color when the BackColor property of the grid's Appearance object is set to the "use default" value.
The ResolveAppearance method will return an Appearance object with all of its "use default" settings converted into actual values. It does this by navigating the appearance hierarchy for each property until an explicit setting or a factory preset is encountered. If you simply place a grid on a form, run the project, and examine the setting of the BackColor property of the grid's intrinsic Appearance object:
MsgBox Hex(UltraGrid1.Appearance.BackColor)
...you will see that it is set to the "use default" value (0xFFFFFFFF). However, if you use the ResolveAppearance method to return the same value:
MsgBox Hex(UltraGrid1.ResolveAppearance.BackColor)
...you will see that it is set to the system button face color (0x8000000F). Note that this code takes advantage of the fact that the ResolveAppearance method returns an Appearance object to simplify the code that must be written. This code could be written out in a longer form as follows:
Dim objAppearance as Infragistics.Win.Appearance
Set objAppearance = UltraGrid1.ResolveAppearance
MsgBox Hex(objAppearance.BackColor)
Generally, painting a control is handled automatically while no events are occurring. However, there may be situations where you want the form or control updated immediately, for example, after some external event has caused a change to the form. In such a case, you would use the Refresh method.
The Refresh method can also be used to ensure that the user is viewing the latest copy of the data from the record source.
There may be times when you need to work with the text of an object in a particular format, but do not wish to change the settings of any of the masking properties (MaskClipMode, MaskDataMode or MaskDisplayMode). For example, if you want to retrieve the text of an object with all literals and prompt characters intact, but don't want to change the way data will be sent to the the database and don't want to use the clipboard. This is the purpose of the GetText method.
GetText returns a string value, containing the text of the object, in the format you specify. When you invoke the GetText method, you pass it a maskmode parameter that determines how the object's text will be returned. This gives you the ability to bypass the settings of the object's masking properties and determine on an ad hoc basis whether to use prompt characters, literals or just the raw text the user has entered.
When the CancelUpdate method is invoked for a cell, the cell's contents return to their original value. The OriginalValue property of the UltraGridCell can be used to determine what this value is before invoking the method.
When the CancelUpdate method is invoked for a row, any changes made to the cells of the active row are removed. The cells display their original values, and the row is taken out of edit mode. The row selector picture changes from the "Write" image back to the "Current" image. The DataChanged property will be set to false.
Invoke this method to return a reference to an object's UIElement. The reference can be used to set properties of, and invoke methods on, the UIElement object associated with an object. You can use this reference to access any of the UIElement's properties or methods.
The Type property can be used to determine what type of UIElement was returned. If no UIElement exists, meaning the object is not displayed, Nothing is returned.
The ParentUIElement property can be used to return a reference to a UIElement's parent UIElement object. The UIElements property can be used to return a reference to a collection of child UIElement objects for a UIElement.
The UIElementFromPoint method can be invoked to return a reference to an UIElement object residing at specific coordinates.
The CanResolveUIElement method can be invoked to determine whether an object or one of its ancestors can be resolved as a specific type of UIElement.
The GetUIElement method does not take into account the presence of a pop-up edit window or the drop-down portion of a combo if these elements are present, and will never return a UIElement that corresponds to one of these elements. The GetUIElementPopup method can be invoked to return a reference to a popup window's UIElement.
The Appearance property of an object is used to associate the object with an Appearance object that will determine its appearance. The Appearance object has properties that control settings such as color, borders, font, transparency, etc. For many of the objects in the UltraWinGrid, you do not set formatting properties directly. Instead, you set the properties of an Appearance object, which controls the formatting of the object it is attached to.
There are two ways of working with the Appearance property and assigning the attributes of an Appearance object to other objects. One way is to create a new Appearance object, adding it directly to the Appearances collection. Then you assign the new Appearance object to the Appearance property of the object you want to format. This method uses a "named" Appearance object that you must explicitly create (and to which you must assign property settings) before it can be used. For instance, you could create an object in the grid's Appearances collection and assign it some values as follows:
UltraWinGrid1.Appearances.Add "New1"
UltraWinGrid1.Appearances("New1").BorderColor = System.Drawing.Color.Blue
UltraWinGrid1.Appearances("New1").ForeColor = System.Drawing.Color.Red
Creating the object in this way does not apply formatting to any visible part of the grid. The object simply exists in the collection with its property values, waiting to be used. To actually use the object, you must assign it to the grid's (or another object's) Appearance property:
UltraWinGrid1.Appearance = UltraWinGrid1.Appearances("New1")
In this case, only one Appearance object exists. The grid's appearance is governed by the settings of the "New1" object in the collection. Any changes you make to the object in the collection will immediately be reflected in the grid.
The second way of working with the Appearance property is to use it to set property values directly, such as:
UltraWinGrid1.Appearance.ForeColor = System.Drawing.Color.Blue
In this case, an Appearance object is automatically created by the control. This Appearance object is not a member of an Appearances collection and it does not have a name. It is specific to the object for which it was created; it is an "intrinsic" Appearance object. Changes to the properties of an intrinsic Appearance object are reflected only in the object to which it is attached.
Note that you can assign properties from a named Appearance object to an intrinsic Appearance object without creating a dependency relationship. For example, the following code...
UltraWinGrid1.Appearance.ForeColor = UltraWinGrid1.Appearances("New1").ForeColor
...does not establish a relationship between the foreground color of the intrinsic object and that of the named object. It is simply a one-time assignment of the named object's value to that of the intrinsic object. In this case, two Appearance objects exist - one in the collection and one attached to the grid - and they operate independently of one another.
If you wish to assign all the properties of a named object to an intrinsic object at once without creating a dependency relationship, you can use the Clone method of the Appearance object to duplicate its settings and apply them. So if you wanted to apply all the property settings of the named Appearance object "New1" to the grid's intrinsic Appearance object, but you did not want changes made to "New1" automatically reflected in the grid, you would use the following code:
UltraWinGrid1.Appearance = UltraWinGrid1.Appearances("New1").Clone
Note that the properties of an Appearance object can also operate in a hierarchical fashion. Certain properties can be set to a "use default" value, which indicates to the control that the property should take its setting from the object's parent. This functionality is enabled by default, so that unless you specify otherwise, child objects resemble their parents, and formatting set at higher levels of the grid hierarchy is inherited by objects lower in the hierarchy.
Note: To set this appearance on the grid or band level, use the Override's
This property returns True when a cell or row's data has changed, but has not yet been committed to the data source; otherwise, it returns False.
When the value of a cell is changed, either programmatically by setting its Value property, or by user interaction, this property is set to True and the BeforeCellUpdate and AfterCellUpdate events are generated. Note that the cell's new value is not necessarily committed to the data source at this time, however, since various factors such as the type of record locking employed by the data source, as well as the value of the UpdateMode property, can affect when the actual update occurs. Once the data source is actually updated, the BeforeRowUpdate and AfterRowUpdate events are generated and this property is set back to False.
The OriginalValue property of the cell can be used to determine a cell's value before it was changed.
Use this property to cause a cell's dropdown list to be dropped down programmatically, or to determine whether the list is currently displayed.
When a cell's dropdown list is dropped down, the BeforeCellListDropDown event is generated.
When a cell's dropdown list is closed, theAfterCellListCloseUpevent is generated.
The Activation property of the UltraGridCell object is subordinate to the settings of the Activation properties of the UltraGridRow and UltraGridColumn objects that contain the cell. If either the cell's row or column has its Activation property set to False, the cell cannot be activated, regardless of its own setting for Activation. The setting of the other type of parent also has no effect; setting Activation to False on a cell's row makes the cell inactive regardless of the setting of its column.
Specifies whether to ignore the activation settings of the row and column for this cell. Normally if the row or column's Activation is set to Disabled, then the cell uses that even if the cell's Activation is set to something else. Basically the cell ends up using most restrictive of the activation settings. Setting this property to true will cause the cell to use it's Activation settings and ignore the row's and column's activation settings.
Setting the Selected property of an object causes it to become selected. This property can also be used to determine whether the object has been selected.
Depending on the settings of the selection style property that applies to this object (SelectTypeCell) and maximum selection property (MaxSelectedCells) changing the value of the Selected property may affect the selection of other objects within the band or the control.
For example, if SelectTypeRow is set to 2 (SelectTypeSingle) so that only one row may be selected at a time, when you set the Selected property of an UltraGridRow object to True, the Selected properies of all other UltraGridRow objects will be set to False. As another example, if you have set the MaxSelectedRows property to 3, then attempt to set the Selected property to True for four rows, a run-time error will occur when you set the Selected property to True for the fourth row.
When an object is selected or deselected, the BeforeSelectChange event is generated.
Use this property to specify whether the user can navigate to a cell or the cells in a column by pressing the TAB key.
The TabNavigation property is used to specify how the control will respond when the TAB key is pressed.
OriginalValue returns the cell's original value before it was last set. NOTE: While in edit mode,
Use this property to retrieve or modify a cell's value. When the value of a cell is changed, the BeforeCellUpdate and the AfterCellUpdate events are generated and the cell's DataChanged property is set to True. Note that the cell's new value is not necessarily committed to the data source when this property is set, however, since various factors such as the type of record locking employed by the data source, as well as the value of the UpdateMode property, can affect when the actual update occurs.
The OriginalValue property of the cell can be used to determine the cell's value before it was changed.
The GetText method can be invoked to return the formatted value of a cell.
The Width property is used to determine the horizontal dimension of an object. It is generally expressed in the scale mode of the object's container, but can also be specified in pixels.
This property, in conjunction with the SelLength and SelText properties, is useful for tasks such as setting the insertion point, establishing an insertion range, selecting substrings, or clearing text in the cell being edited.
The valid range for this property is 0 to the length of the cell text. Attempting to set this property to a value outside that range will reset this property to the highest acceptable value.
This property can only be set or retrieved when the control is in edit mode, which can be determined by using the IsInEditMode property. If the control is in edit mode, the ActiveCell property can be used to determine which cell is currently being edited. If the control is not in edit mode, attempting to use this property will generate an error.
Setting this property changes the selection to an insertion point and sets the SelLength property to 0.
This property, in conjunction with the SelStart and SelText properties, is useful for tasks such as setting the insertion point, establishing an insertion range, selecting substrings, or clearing text in the cell being edited.
The valid range for this property is 0 to the length of the cell text. Attempting to set this property to a value outside that range will reset this property to the highest acceptable value.
This property can only be set or retrieved when the control is in edit mode, which can be determined by using the IsInEditMode property. If the control is in edit mode, the ActiveCell property can be used to determine which cell is currently being edited. If the control is not in edit mode, attempting to use this property will generate an error.
This property, in conjunction with the SelLength and SelStart properties, is useful for tasks such as setting the insertion point, establishing an insertion range, selecting substrings, or clearing text in the cell being edited.
Setting this property to a new value sets the SelLength property to 0 and replaces the selected text with the specified text.
This property can only be set or retrieved when the control is in edit mode, which can be determined by using the IsInEditMode property. If the control is in edit mode, the ActiveCell property can be used to determine which cell is currently being edited. If the control is not in edit mode, attempting to use this property will generate an error.
Note: Accessing this property will throw an exception if the cell is not in edit mode or the underlying editor being used does not support selectable text, that is its
This property indicates whether a cell is in edit mode. The ActiveCell property can be used to determine which cell is in edit mode.
The BeforeEnterEditMode event is generated before a cell enters edit mode.
The BeforeExitEditMode event is generated before a cell exits edit mode.
The Row property of an object refers to a specific row in the grid as defined by an UltraGridRow object. You use the Row property to access the properties of a specified UltraGridRow object, or to return a reference to the UltraGridRow object that is associated with the current object.
An UltraGridRow object represents a single row in the grid that displays the data from a single record in the underlying data source. The UltraGridRow object is one mechanism used to manage the updating of data records either singly or in batches (the other is the UltraGridCell object). When the user is interacting with the grid, one UltraGridRow object is always the active row, and determines both the input focus of the grid and the position context of the data source to which the grid is bound.
The Column property of an object refers to a specific column in the grid as defined by an UltraGridColumn object. You use the Column property to access the properties of a specified UltraGridColumn object, or to return a reference to an UltraGridColumn object.
An UltraGridColumn object represents a single column in the grid. The UltraGridColumn object is closely linked with a single underlying data field that is used to supply the data for all the cells in the column (except in the case of unbound columns, which have no underlying data field). The UltraGridColumn object determines what type of interface (edit, dropdown list, calendar, etc.) will be used for individual cells, as well as controlling certain formatting and behavior-related settings, such as data masking, for the cells that make up the column.
Specifies the text to display in the tooltip that's displayed when the user hovers mouse over the cell.
Returns true if the cell is associated with a cell in the data source. This property returns false for cells associated with unbound columns, group-by rows, filter rows, template add-rows, summary rows etc...
Note: To set this appearance on the grid or band level, use the Override's
The Column property of an object refers to a specific column in the grid as defined by an UltraGridColumn object. You use the Column property to access the properties of a specified UltraGridColumn object, or to return a reference to an UltraGridColumn object.
An UltraGridColumn object represents a single column in the grid. The UltraGridColumn object is closely linked with a single underlying data field that is used to supply the data for all the cells in the column (except in the case of unbound columns, which have no underlying data field). The UltraGridColumn object determines what type of interface (edit, dropdown list, calendar, etc.) will be used for individual cells, as well as controlling certain formatting and behavior-related settings, such as data masking, for the cells that make up the column.
The Column property of an object refers to a specific column in the grid as defined by an UltraGridColumn object. You use the Column property to access the properties of a specified UltraGridColumn object, or to return a reference to an UltraGridColumn object.
An UltraGridColumn object represents a single column in the grid. The UltraGridColumn object is closely linked with a single underlying data field that is used to supply the data for all the cells in the column (except in the case of unbound columns, which have no underlying data field). The UltraGridColumn object determines what type of interface (edit, dropdown list, calendar, etc.) will be used for individual cells, as well as controlling certain formatting and behavior-related settings, such as data masking, for the cells that make up the column.
CellsCollection creates cells lazily for efficiency reasons. It creates cells as they are accessed via the indexer or the GetItem method. HasCell can be used to find out if a cell has already been created for a column. Note that there must be a column with the specified key in the associated band's columns collection otherwise this method will throw an exception. If the intention is to find out if a column with the specified key exists then use the Exists method instead.
Note that for better efficiency you may want to use HasCell overloads that take in column index or a column object as they do not require searching the collection for the matching column key.
The UltraGridRow object represents a single row of data, and corresponds to a single record in the underlying recordset. Rows occupy a position in the data hierarchy of the UltraWinGrid between Cells and Bands. The UltraGridRow object is always the child of an UltraGridBand object, and its children are UltraGridCell objects.
Much of the data-binding functionality of the grid involves working with the UltraGridRow object. Whenever an UltraGridRow object is loaded by the grid, the InitializeRow event is fired.
UltraGridRow objects can influence the formatting of the cells they contain through the setting of the UltraGridRow's CellAppearance property. Rows can also be formatted independently of the cells they contain. Frequently, cells are drawn from the top of the row to the bottom and are aligned edge to edge so that they occupy the entire area of the row; the row itself is not visible because cells are always "above" the row in the grid's z-order. However it is possible to specify spacing between and around cells that lets the underlying UltraGridRow object show through. Only then will formatting applied directly to the UltraGridRow object be visible to the user.
The Column property of an object refers to a specific column in the grid as defined by an UltraGridColumn object. You use the Column property to access the properties of a specified UltraGridColumn object, or to return a reference to an UltraGridColumn object.
An UltraGridColumn object represents a single column in the grid. The UltraGridColumn object is closely linked with a single underlying data field that is used to supply the data for all the cells in the column (except in the case of unbound columns, which have no underlying data field). The UltraGridColumn object determines what type of interface (edit, dropdown list, calendar, etc.) will be used for individual cells, as well as controlling certain formatting and behavior-related settings, such as data masking, for the cells that make up the column.
The Cell property of an object refers to a specific cell in the grid as defined by an UltraGridCell object. You use the Cell property to access the properties of a specified UltraGridCell object, or to return a reference to an UltraGridCell object.
Note that not all styles are available on all operating systems. If the version of the OS that your program is running on does not support a particular border style, borders formatted with that style will be drawn using solid lines.
The CheckedListSettings class provides a way to designate a
The
When EditorValueSource is set to 'CheckedItems', the value for each row in the
When the CheckStateMember property is not set, or is set to a non-existent column, no other properties of
the
The CheckStateMember property need not necessarily reference a boolean column,
but the column's data type must be one that can convert to and from the boolean data type. For example, a column of the string data type could be used,
in accompaniment with a column
A collection of the
The elements of this collection can be indexed by their associated
"data values", i.e., the value of the cell that intersects with the column referenced by the
This indexer provides a way to access a
The Band property of an object refers to a specific band in the grid as defined by an UltraGridBand object. You use the Band property to access the properties of a specified UltraGridBand object, or to return a reference to the UltraGridBand object that is associated with the current object.
UltraGridBand objects are the foundation of the hierarchical data structure used by UltraWinGrid. Any row or cell in the grid must be accessed through its UltraGridBand object. Bands are also used to apply consistent formatting and behavior to the rows that they comprise. An UltraGridBand object is used to display all the data rows from a single level of a data hierarchy. UltraGridBand objects contain multiple sets of child UltraGridRow objects that actually display the data of the recordset. All of the rows that are drawn from a single Command in the DataEnvironment make up a band.
The rows of a band are generally displayed in groups of one more in order to show rows from subsequent bands that are linked to rows in the current band via the structure of the data hierarchy. For example, if a hierarchical recordset has Commands that display Customer, Order and Order Detail data, each one of these Commands maps to its own UltraGridBand in the UltraWinGrid. The rows in the Customer band will appear separated by any Order data rows that exist for the customers. By the same token, rows in the Order band will be appear separated to make room for Order Detail rows. How this looks depends on the ViewStyle settings selected for the grid, but the concept of visual separation is readily apparent when the UltraWinGrid is used with any hierarchical recordset.
Although the rows in a band may appear to be separated, they are treated contiguously. When selecting a column in a band, you will see that the cells of that column become selected in all rows for the band, regardless of any intervening rows. Also, it is possible to collapse the hierarchical display so that any children of the rows in the current band are hidden.
This property returns a reference to a ColScrollRegion object that can be used to set properties of, and invoke methods on, the colscrollregion to which the UIElement belongs. You can use this reference to access any of the returned colscrollregion's properties or methods.
If the UIElement does not belong to a colscrollregion, Nothing is returned.
The RowScrollRegion property can be used to return a reference to a RowScrollRegion object to which a UIElement belongs.
The Layout property of an object is used to access the Layout object that determines the settings of various properties related to the appearance and behavior of the object. The Layout object provides a simple way to maintain multiple layouts for the grid and apply them as needed. You can also save grid layouts to disk, the registry or a storage stream and restore them later.
The Layout object has properties such as Appearance and Override, so the Layout object has sub-objects of these types, and their settings are included as part of the layout. However, the information that is actually persisted depends on how the settings of these properties were assigned. If the properties were set using the Layout object's intrinsic objects, the property settings will be included as part of the layout. However, if a named object was assigned to the property from a collection, the layout will only include the reference into the collection, not the actual settings of the named object. (For an overview of the difference between named and intrinsic objects, please see the
For example, if the Layout object's Appearance property is used to set values for the intrinsic Appearance object like this:
UltraGrid1.DisplayLayout.Appearance.ForeColor = vbBlue
Then the setting (in this case, ForeColor) will be included as part of the layout, and will be saved, loaded and applied along with the other layout data. However, suppose you apply the settings of a named object to the Layout's Appearance property in this manner:
UltraWinGrid1.Appearances.Add "New1"
UltraWinGrid1.Appearances("New1").ForeColor = vbBlue
UltraWinGrid1.Layout.Appearance = UltraWinGrid1.Appearances("New1")
In this case, the ForeColor setting will not be persisted as part of the layout. Instead, the layout will include a reference to the "New1" Appearance object and use whatever setting is present in that object when the layout is applied.
By default, the layout includes a copy of the entire Appearances collection, so if the layout is saved and restored using the default settings, the object should always be present in the collection when it is referred to. However, it is possible to use the Load and Save methods of the Layout object in such a way that the collection will not be re-created when the layout is applied. If this is the case, and the layout contains a reference to a nonexistent object, the default settings for that object's properties will be used.
The Hidden property determines whether an object is visible. Hiding an object may have have effects that go beyond simply removing it from view. For example, hiding a band also hides all the rows in that band. Also, changing the Hidden property of an object affects all instances of that object. For example, a hidden column or row is hidden in all scrolling regions.
There may be instances where the Hidden property cannot be changed. For example, you cannot hide the currently active rowscrollregion or colscrollregion. If you attempt to set the Hidden property of the active rowscrollregion to True, an error will occur.
This property determines whether a scroll bar should be displayed for a scrolling region.
When a colscrollregion is scrolled, the BeforeColRegionScroll event is generated. When a rowscrollregion is scrolled, the BeforeRowRegionScroll event is generated.
A scrolling region can be scrolled programmatically, even if no scroll bars are displayed, by invoking its Scroll method.
The user can be prevented from scrolling a colscrollregion or rowscrollregion, even if its scroll bars are displayed, by setting the cancel argument of the BeforeColRegionScroll or BeforeRowRegionScroll event, respectively, to True.
The current, as well as maximum, position of a colscrollregion's scroll bar can be determined by its Range and Position properties, respectively.
The ScrollBars property can be used to set the value of the ScrollBar property for all colscrollregions and rowscrollregions that have their ScrollBar property set to 0 (ScrollBarDefault).
When this property is set for a colscrollregion, it either frees or restricts the splitter bar between that colscrollregion and the one to its right, unless the current colscrollregion is the rightmost region, in which case the splitter bar between that colscrollregion and the one to its right is affected.
When a colscrollregion is sized, the BeforeColRegionSize event is generated.
When this property is set for a rowscrollregion, it either frees or restricts the splitter bar between that rowscrollregion and the one beneath it, unless the current rowscrollregion is the bottommost region, in which case the splitter bar between that rowscrollregion and the one above it is affected.
When a rowscrollregion is sized, the BeforeRowRegionSize event is generated.
Invoke this method to scroll a scrolling region.
When a colscrollregion is scrolled, the value of the colscrollregion's Position property changes and the BeforeColRegionScroll event is generated
The ScrollCellIntoView, ScrollColIntoView, ScrollGroupIntoView, ScrollHeaderIntoView and ScrollRowIntoView methods can be invoked to scroll an object into a scrolling region's viewable area.
Invoke this method to ensure that a cell is viewable in a column or row scrolling region.
If this method is invoked for a colscrollregion and the column is already in the viewable area of the region, this method does not perform any scrolling.
If the colscrollregion is scrolled as a result of invoking this method, the value of the column scrolling region's Position property changes and the BeforeColRegionScroll event is generated. If the rowscrollregion is scrolled as a result of invoking this method, the BeforeRowRegionScroll event is generated.
The Scroll, ScrollColIntoView, ScrollGroupIntoView, ScrollHeaderIntoView and ScrollRowIntoView methods can also be invoked to scroll an object into a scrolling region's viewable area.
Invoke this method to ensure that a cell is viewable in a column or row scrolling region.
If this method is invoked for a colscrollregion and the column is already in the viewable area of the region, this method does not perform any scrolling.
If the colscrollregion is scrolled as a result of invoking this method, the value of the column scrolling region's Position property changes and the BeforeColRegionScroll event is generated. If the rowscrollregion is scrolled as a result of invoking this method, the BeforeRowRegionScroll event is generated.
The Scroll, ScrollColIntoView, ScrollGroupIntoView, ScrollHeaderIntoView and ScrollRowIntoView methods can also be invoked to scroll an object into a scrolling region's viewable area.
Invoke this method to ensure that a column is viewable in a column scrolling region.
If the column is already in the viewable area of the column scrolling region, this method does not perform any scrolling.
If the colscrollregion is scrolled as a result of invoking this method, the value of the column scrolling region's Position property changes and the BeforeColRegionScroll event is generated.
The Scroll, ScrollCellIntoView, ScrollGroupIntoView and ScrollHeaderIntoView methods can also be invoked to scroll an object into a colscrollregion's viewable area.
Invoke this method to ensure that a column is viewable in a column scrolling region.
If the column is already in the viewable area of the column scrolling region, this method does not perform any scrolling.
If the colscrollregion is scrolled as a result of invoking this method, the value of the column scrolling region's Position property changes and the BeforeColRegionScroll event is generated.
The Scroll, ScrollCellIntoView, ScrollGroupIntoView and ScrollHeaderIntoView methods can also be invoked to scroll an object into a colscrollregion's viewable area.
Invoke this method to ensure that a group is viewable in a column scrolling region. If the group is already in the viewable area of the column scrolling region, this method does not perform any scrolling.
If invoking this method does cause the column scrolling region to be scrolled, the value of the column scrolling region's Position property changes and the BeforeColRegionScroll event is generated.
The Scroll, ScrollCellIntoView, ScrollColIntoView and ScrollHeaderIntoView methods can also be invoked to scroll an object into a column scrolling region's viewable area.
Invoke this method to ensure that a group is viewable in a column scrolling region. If the group is already in the viewable area of the column scrolling region, this method does not perform any scrolling.
If invoking this method does cause the column scrolling region to be scrolled, the value of the column scrolling region's Position property changes and the BeforeColRegionScroll event is generated.
The Scroll, ScrollCellIntoView, ScrollColIntoView and ScrollHeaderIntoView methods can also be invoked to scroll an object into a column scrolling region's viewable area.
Invoke this method to ensure that a column or group header is viewable in a column scrolling region.
If the header is already in the viewable area of the column scrolling region, this method does not perform any scrolling.
If the colscrollregion is scrolled as a result of invoking this method, the value of the column scrolling region's Position property changes and the BeforeColRegionScroll event is generated.
The Scroll, ScrollCellIntoView, ScrollColIntoView and ScrollGroupIntoView methods can also be invoked to scroll an object into a colscrollregion's viewable area.
Invoke this method to ensure that a row is viewable in a rowscrollregion.
If the row is already in the viewable area of the row scrolling region, this method does not perform any scrolling.
If the rowscrollregion is scrolled as a result of invoking this method, the BeforeRowRegionScroll event is generated.
The Scroll and ScrollCellIntoView methods can also be invoked to scroll an object into a rowscrollregion's viewable area.
Invoke this method to ensure that a row is viewable in a rowscrollregion.
If the row is already in the viewable area of the row scrolling region, this method does not perform any scrolling.
If the rowscrollregion is scrolled as a result of invoking this method, the BeforeRowRegionScroll event is generated.
The Scroll and ScrollCellIntoView methods can also be invoked to scroll an object into a rowscrollregion's viewable area.
Invoke this method to split one scrolling region into two scrolling regions. This method returns a ColScrollRegion object or a RowScrollRegion object that corresponds to the new scrolling region that is created by the split.
ColScrollRegions are split from right to left, with the new region created by the split appearing to the left of the existing region. RowScrollRegions are split from bottom to top, with the new region created by the split appearing above the existing region.
Specifying width when splitting a ColScrollRegion will set the width of the new region (leftmost of the two resulting ColScrollRegions.) Specifying height when splitting a RowScrollRegion will set the height of the new region (topmost of the two resulting RowScrollRegions.)
When a ColScrollRegion is split, the BeforeColRegionSplit and the AfterColRegionSplit events are generated. When a RowsScrollRegion is split, the BeforeRowRegionSplit and the AfterRowRegionSplit events are generated.
Invoke this method to split one scrolling region into two scrolling regions. This method returns a ColScrollRegion object or a RowScrollRegion object that corresponds to the new scrolling region that is created by the split.
ColScrollRegions are split from right to left, with the new region created by the split appearing to the left of the existing region. RowScrollRegions are split from bottom to top, with the new region created by the split appearing above the existing region.
Specifying width when splitting a ColScrollRegion will set the width of the new region (leftmost of the two resulting ColScrollRegions.) Specifying height when splitting a RowScrollRegion will set the height of the new region (topmost of the two resulting RowScrollRegions.)
When a ColScrollRegion is split, the BeforeColRegionSplit and the AfterColRegionSplit events are generated. When a RowsScrollRegion is split, the BeforeRowRegionSplit and the AfterRowRegionSplit events are generated.
The valid range for this property is from 0 to the value of the colscrollregion's Range property, inclusive. This property equals the Range property when the scroll bar is in its rightmost position.
In addition to using this property, a colscrollregion can be scrolled by invoking its Scroll method. When a colscrollregion is scrolled, the BeforeColRegionScroll event is generated.
A colscrollregion's scroll bar can be hidden by setting the colscrollregion's ScrollBar property to 3 (ScrollBarHide). When a colscrollregion's scroll bar is not displayed, the value of this property is 0.
The Height property is used to determine the vertical dimension of an object. It is generally expressed in the scale mode of the object's container, but can also be specified in pixels.
For the ColScrollRegion object, this property returns the height available to row data. This value excludes the height of the grid's outer border. The height occupied by the scrollbars does not affect the value of this property.
The Width property is used to determine the horizontal dimension of an object. It is generally expressed in the scale mode of the object's container, but can also be specified in pixels.
For the ColScrollRegion object, this property always includes the vertical scrollbar's Width for the RowScrollRegion.
For the ColScrollRegion object, the value returned is expressed in terms of the coordinate system specified by the control's container.
This property indicates the value of a scroll bar's Position property when the scroll box is in its rightmost position.
The value of this property, itself, is the width of the area not in view in the colscrollregion, expressed in terms of the coordinate system set by the scale mode of the control's container.
When the total area is viewable in the colscrollregion, this value of this property is 0.
UltraGrid1.DisplayLayout.Appearance.ForeColor = vbBlueUltraGrid1.Appearances.Add "New1"
UltraGrid1.Appearances("New1").ForeColor = System.Drawing.Color.Blue
UltraGrid1.Layout.Appearance = UltraGrid1.Appearances("New1")
Use this method to remove a ColScrollRegion object from an ColScrollRegions collection.
Removing a colscrollregion from the control will cause the BeforeColRegionRemoved event to be generated.
To add a ColScrollRegion object to a ColScrollRegions collection, invoke the colscrollregion's Split method.
This property returns a reference to a ColScrollRegion object that can be used to set properties of, and invoke methods on, the colscrollregion to which the UIElement belongs. You can use this reference to access any of the returned colscrollregion's properties or methods.
If the UIElement does not belong to a colscrollregion, Nothing is returned.
The RowScrollRegion property can be used to return a reference to a RowScrollRegion object to which a UIElement belongs.
Note that not all styles are available on all operating systems. If the version of the OS that your program is running on does not support a particular border style, borders formatted with that style will be drawn using solid lines.
The Column property of an object refers to a specific column in the grid as defined by an UltraGridColumn object. You use the Column property to access the properties of a specified UltraGridColumn object, or to return a reference to an UltraGridColumn object.
An UltraGridColumn object represents a single column in the grid. The UltraGridColumn object is closely linked with a single underlying data field that is used to supply the data for all the cells in the column (except in the case of unbound columns, which have no underlying data field). The UltraGridColumn object determines what type of interface (edit, dropdown list, calendar, etc.) will be used for individual cells, as well as controlling certain formatting and behavior-related settings, such as data masking, for the cells that make up the column.
With the 2008 Volume 2 release of NetAdvantage, the AutoEdit property has been deprecated, and replaced by the
With the 2008 Volume 2 release of NetAdvantage, the AutoEdit property has been deprecated, and replaced by the
UltraGridColumn maintains a reference to the band that the column belongs to. The Band property returns that band.
The Hidden property determines whether an object is visible. Hiding an object may have have effects that go beyond simply removing it from view. For example, hiding a band also hides all the rows in that band. Also, changing the Hidden property of an object affects all instances of that object. For example, a hidden column or row is hidden in all scrolling regions.
There may be instances where the Hidden property cannot be changed. For example, you cannot hide the currently active rowscrollregion or colscrollregion. If you attempt to set the Hidden property of the active rowscrollregion to True, an error will occur.
This property is ignored for chaptered columns; that is, columns whose DataType property is set to 136 (DataTypeChapter).
The Header property of an object refers to a column or group header, as defined by an Header object. You use the Header property to access the properties of a specified Header object, or to return a reference to an Header object.
A Header object represents a column or group header that specifies information about the column or group, and can also serve as the interface for functionality such as moving, swapping or sorting the column or group. Group headers have the added functionality of serving to aggregate multiple columns under a single heading.
The Header property provides access to the header that is associated with an object. In some instances, the type of header may be ambiguous, such as when accessing the Header property of a UIElement object. You can use the Type property of the Header object returned by the Header property to determine whether the header belongs to a column or a group.
The Width property is used to determine the horizontal dimension of an object. It is generally expressed in the scale mode of the object's container, but can also be specified in pixels.
When proportional resizing is used for the UltraGridColumn and UltraGridGroup objects, the width of the column increases or decreases proportionally as the area occupied by the column changes size, due to the resizing of adjacent columns or of the grid itself. This property is ignored for chaptered columns; that is, columns whose DataType property is set to 136 (DataTypeChapter).
Typically, each data record in a band occupies a single row of the grid, with all of the cells stretching from left to right. In some circumstances, you may want to have a single record occupy more than one row. For example, if you have address data stored in a record, you may want to have the first and last name fields on one level, the street address on a second level, and city, state and postal code fields on a third level. The LevelCount property is used to specify how many levels of data a band will display for each record in the data source. The Level property is used to determine which level of the band a column occupies.
Levels work in conjunction with groups to create blocks of fields within a band. If you do not have any groups specified for a band, the Level property will have no effect. If one or more groups are specified (and column moving is enabled within the group or band) you can re-arrange fields vertically within the group by dragging their column headers to different levels.
This property is 0-based; to specify that a column should reside in the first level of a band, set this property to 0.
The Index property is set by default to the order of the creation of objects in a collection. The index for the first object in a collection will always be zero.
The value of the Index property of an object can change when objects in the collection are reordered, such as when objects are added to or deleted from the collection. Since the Index property may change dynamically, it may be more useful to refer to objects in a collection by using its Key property.
The Format property is similar to the Visual Basic Format function, and supports all of the named arguments and literal strings supported by that function when the UltraGrid is being used in Visual Basic. In other host environments, the Format property provides a subset of the Format function's capabilites, including the use of named arguments.
The Format property applies only to cells that are not in edit mode.
The underlying .NET formatting mechanism is used to format the value. See .NET help for more information regarding list of the named formats that are supported.
The Group property of an object refers to a specific group of columns in the grid as defined by an UltraGridGroup object. You use the Group property to access the properties of a specified UltraGridGroup object, or to return a reference to an UltraGridGroup object. An UltraGridGroup is a group of columns that appear together in the grid, and can be resized, moved or swapped together as a unit. Columns in the same group share a group header, and can be arranged into a multi-row layout within the group, with different columns occupying different vertical levels within a single row of data. UltraGridGroups also help with the logical arrangement of columns within the grid.
The Key property is a unique, user-defined object identification string that can be used interchangeably with the Index of an object when accessing it through code. If you attempt to assign a value to the Key property is not unique in the collection, an error will occur.
The value of the Index property of an object can change when objects in the collection are reordered, such as when you add or remove objects. If you expect the Index property to change dynamically, refer to objects in a collection using the Key property. In addition, you can use the Key property to make your program "self-documenting" by assigning meaningful names to the objects in a collection.
You can set the Key property when you use the Add method to add an object to a collection. In some instances, the Key property of an object may be blank if that object does not appear in a collection.
Also, note that the uniqueness of keys is only enforced when the Key property is set to a value. If a collection supports objects with blank keys, that collection may contain multiple objects that whose Key property is empty. In that case, you must use Index property to differentiate between the objects that have blank keys.
The Activation property of the UltraGridCell object is subordinate to the settings of the Activation properties of the UltraGridRow and UltraGridColumn objects that contain the cell. If either the cell's row or column has its Activation property set to False, the cell cannot be activated, regardless of its own setting for Activation. The setting of the other type of parent also has no effect; setting Activation to False on a cell's row makes the cell inactive regardless of the setting of its column.
The CellAppearance property is used to specify the appearance of all the cells in a band or the grid. When you assign an Appearance object to the CellAppearance property, the properties of that object will be applied to all the cells belonging to the object specified. You can use the CellAppearance property to examine or change any of the appearance-related properties that are currently assigned to the cells, for example:
UltraWinGrid1.Override.CellAppearance.BackColor = vbYellow
Because you may want the cells to look different at different levels of a hierarchical record set, CellAppearance is a property of the UltraGridOverride object. This makes it easy to specify different cell appearances for each band by assigning each Band object its own UltraGridOverride object. If a band does not have an override assigned to it, the control will use the override at the next higher level of the override hierarchy to determine the properties for that band. In other words, any band without an override will use its parent band's override, and the top-level band will use the grid's override. Therefore, if the top-level band does not have its override set, the cells of that band will use the grid-level setting of CellAppearance.
You can override the CellAppearance setting for specific cells by setting the Appearance property of the UltraGridCell object directly. The cell will always use the values of its own Appearance object before it will use the values inherited from the Appearance object specified by the CellAppearance property of the band it occupies.
If any of the properties of the Appearance object specified for the CellAppearance property are set to default values, the properties from the Appearance object of the row containing the cell are used.
This property returns a reference to a ValueList object that can be used to set properties of, and invoke methods on, the valuelist that is associated with a column. You can use this reference to access any of the returned valuelist's properties or methods.
This property is also used to assign a particular valuelist object to a column. Once assigned, the valuelist enables a column to use the dropdown list styles and intelligent data entry, specified by the Style and AutoEdit properties, respectively, of the column for which this property is set.
With the 2008 Volume 2 release of NetAdvantage, the AutoEdit property has been deprecated, and replaced by the
Note: This property replaces the
Prior to the addition of the AutoCompleteMode property, automatic value completion was supported in the form of the now obsolete AutoComplete property, which, when enabled, modified the control's text by appending characters to the string typed by the end user so as to match the text of the first item found in the list whose text begins with the typed characters. For example, given a list which contains an item whose text is "Apple", when the end user types the string "Ap", the edit portion would then be updated to include the remaining characters, "ple", so that the text of the first item that matches the typed string, "Apple", becomes selected. That same functionality is now enabled by setting AutoCompleteMode to 'Append'. The appended characters are selected so that continuing to type causes these characters to be removed.
The AutoCompleteMode property extends two additional modes for value completion, 'Suggest' and 'SuggestAppend'. When the property is set to 'Suggest', no characters are appended to the edit portion, but rather the dropdown is automatically displayed, showing only the items whose text begins with the string that was typed by the end user. For example, given a list containing the items, "Apple", "Application", and "Apprehend", upon typing the "A" character, the dropdown list will appear, displaying all of those items. The list is continually filtered as more characters are typed, eliminating the entries whose text no longer matches the typed string. For example, if the continues typing until the edit portion contains "Appl", the "Apprehend" item would be removed from the list, since the presence of the character "l" in the typed string now precludes that item.
The 'SuggestAppend' setting essentially combines the funtionality extended by the 'Append' and 'Suggest' settings. The dropdown list is automatically displayed and filtered as needed, and text is appended to the edit portion to complete the typed text to match the first item with matching text.
Setting the
When a
In the absence of an explicit setting, the AutoCompleteMode property resolves to 'Append'.
One of the features the UltraWinGrid offers is the ability to expand a cell when it is in edit mode to provide a greater area for the user to enter data. This is controlled by the AutoSizeEdit property. When set to True, text editing for any cell takes place in a pop-up window that expands to accommodate the amount of text being entered. When the user shifts the input focus away, the edit window disappears and the cell is shown normally.
The attributes of the pop-up edit window are determined by the properties of the
This property is used to indicate how cell buttons are displayed for the cells of a column. Setting 1 (ButtonDisplayStyleAlways) always displays the buttons while the other settings cause the buttons to be displayed only as a result of user interaction with the control.
This property only has an effect if the column's Style property is set to 2 (StyleEditButton), 4 (StyleDropDown), 5 (StyleDropDownList), 6 (StyleDropDownValidate), 7 (StyleDropDownButton), or 8 (StyleDropDownCalendar).
The Case property specifies whether the column should display text in a specific case and change the case of the text being edited. This property actually changes the case of edited text; if you set Case to a non-zero value, any text you edit or enter will be stored in the database as either all uppercase or all lowercase. Note that while the text is displayed using the specified case, the changed case text is not committed back into the database unless a change is made to the value of the cell. Simply placing the cell into edit mode will not change the data to the displayed case.
The Case property specifies whether the column should display text in a specific case and change the case of the text being edited. This property actually changes the case of edited text; if you set Case to a non-zero value, any text you edit or enter will be stored in the database as either all uppercase or all lowercase. Note that while the text is displayed using the specified case, the changed case text is not committed back into the database unless a change is made to the value of the cell. Simply placing the cell into edit mode will not change the data to the displayed case.
This property performs a function similar to the COLSPAN attribute used in HTML tables. ColSpan is commonly used with the multi-band vertical view style when a band is indented from its parent. You can use it to "unlock" column synchronization for the first column in the child band so that it does not become too narrow by aligning itself with the edge of a column that ends directly above it in the parent band.
ColSpan and column synchronization have no effect on bands that contain groups; only bands that do not have groups will participate in column synchronization.
This property is used to determine how mask literals and prompt characters are handled when the text of a masked cell is copied to the Windows clipboard. Based on the setting of this property, the text in the clipboard will contain no prompt characters or literals (just the raw data), the data and just the literals, the data and just the prompt characters, or all the text including both prompt characters and literals. The formatted spacing of partially masked values can be preserved by indicating to include literals with padding, which includes data and literal characters, but replaces prompt characters with spaces.
The MaskInput property is used to specify how data input will be masked for the cells in a column. The mask usually includes literal characters that are used to delimit the data entered by the user. This property has no effect unless the MaskInput property is set, meaning that data masking is enabled.
When data masking is enabled, the MaskDataMode property determines how cell values are stored by the data source, the MaskDisplayMode property indicates how cell values are displayed, and the PromptChar property specifies which character will be used to prompt the user to input data.
This property is used to determine how mask literals and prompt characters are handled when a cell values are stored by the data source. Based on the setting of this property, the text in the clipboard will contain no prompt characters or literals (just the raw data), the data and just the literals, the data and just the prompt characters, or all the text including both prompt characters and literals. The formatted spacing of partially masked values can be preserved by indicating to include literals with padding, which includes data and literal characters, but replaces prompt characters with spaces.
Generally, simply the raw data is committed to the data source and data masking is used to format the data when it is displayed. In some cases, however, it may be appropriate in your application to store mask literals as well as data.
The MaskInput property is used to specify how data input will be masked for the cells in a column. The mask usually includes literal characters that are used to delimit the data entered by the user. This property has no effect unless the MaskInput property is set, meaning that data masking is enabled.
When data masking is enabled, the MaskClipMode property determines how cell values are copied to the clipboard, the MaskDisplayMode property indicates how cell values are displayed, and the PromptChar property specifies which character will be used to prompt the user to input data.
This property is used to determine how mask literals and prompt characters are displayed when a cell is not in edit mode. Based on the setting of this property, the text in the clipboard will contain no prompt characters or literals (just the raw data), the data and just the literals, the data and just the prompt characters, or all the text including both prompt characters and literals. The formatted spacing of partially masked values can be preserved by indicating to include literals with padding, which includes data and literal characters, but replaces prompt characters with spaces.
Generally, prompt characters disappear when a cell is no longer in edit mode, as a visual cue to the user. In some cases, however, it may be appropriate in your application to display mask literals as well as data when a cell is no longer in edit mode.
The MaskInput property is used to specify how data input will be masked for the cells in a column. The mask usually includes literal characters that are used to delimit the data entered by the user. This property has no effect unless the MaskInput property is set, meaning that data masking is enabled. You should also note that masking can only be applied to single-line cells. If a cell is displaying ultiple lines of text, no masking will be applied to the cell.
When data masking is enabled, the MaskClipMode property determines how cell values are copied to the clipboard, the MaskDataMode property indicates how cell values are stored by the data source, and the PromptChar property specifies which character will be used to prompt the user to input data.
By default the UltraGrid maskes use of MaskDataMode, MaskDisplayMode and MaskClipMode settings of the column ignoring any settings off the editor's default owner. This is due to the fact that the associated MaskMode enum doesn't have Default as its member. You can override this default behavior by setting this property to true. When this property is set to true, UltraGrid will always use the settings off the editor's owner. This fascilitates different mask data/display/clip modes on different cells of the same column by using the cell's Editor property and specifying the mask settings on the editors assigned to cells of the column. This property will also change the resolution order for MaskInput property. It will use the editor's MaskInput settings if they are non-nulls or else use the column's MaskInput settings.
The FieldLen property gives you the ability to limit the amount of text that can be entered in column cells. You can use this property to enforce database-specific or application specific limitations.
You can use this property to determine what type of data from the data source is expected or supplied by the field that is bound to the column. DataType values correspond to the standard data field types available through the data provider.
When this property is set to 136 (DataTypeChapter), the Hidden, Locked, Width, MinWidth, MaxWidth, and Selected properties are ignored for the column.
This property cannot be set to 72 (DataTypeGuid) or 136 (DataTypeChapter) for unbound columns.
When a group is resized, all columns with this property set to True and the AllowColSizing property of their band set to 2 (AllowColSizingSync) or 3 (AllowColSizingFree) will have their width's adjusted proportionally. If no columnin the group satisfies these conditions, the rightmost column in a band with its AllowColSizing property set to 2 (AllowColSizingSync) or 3 (AllowColSizingFree) will be adjusted when the group is resized.
You can use the LockedWidth property to disable user resizing of a column. Columns can still be resized through code even when this property is True. Note that setting this property to True may disable the resizing of other columns than the one specified. If the specified column is synchronized with a column in a child band, that column will also become locked. Similarly, setting the LockedWidth property to True for certain columns in a group may result in the user being unable to resize the group, depending on the position of the locked columns.
This property is ignored for chaptered columns; that is, columns whose DataType property is set to 136 (DataTypeChapter).
When an input mask is defined, placeholders are defined by the
The input mask can consist of the following characters:
Character | Description |
# | Digit placeholder. Character must be numeric (0-9) and entry is required. |
. | Decimal placeholder. The actual character used is the one specified as the decimal placeholder by the system's international settings. This character is treated as a literal for masking purposes. |
, | Thousands separator. The actual character used is the one specified as the thousands separator by the system's international settings. This character is treated as a literal for masking purposes. |
| : | Time separator. The actual character used is the one specified as the time separator by the system's international settings. This character is treated as a literal for masking purposes |
| / | Date separator. The actual character used is the one specified as the date separator by the system's international settings. This character is treated as a literal for masking purposes. |
| \ | Treat the next character in the mask string as a literal. This allows you to include the '#', '&', 'A', and '?' as well as other characters with special meanings in the mask. This character is treated as a literal for masking purposes. |
| & | Character placeholder. Valid values for this placeholder are ANSI characters in the following ranges: 32-126 and 128-255 (keyboard and foreign symbol characters). |
| > | Convert all the characters that follow to uppercase. |
| < | Convert all the characters that follow to lowercase. |
| A | Alphanumeric character placeholder. For example: a-z, A-Z, or 0-9. Character entry is required. |
| a | Alphanumeric character placeholder. For example: a-z, A-Z, or 0-9. Character entry is not required. |
| 9 | Digit placeholder. Character must be numeric (0-9) but entry is not required. |
| - | Minus sign when followed by a number section defined by series of 'n's (like in "-nn,nnn.nn") indicates that negative numbers are allowed. When not followed by a series of 'n's, it's taken as a literal. Minus sign will only be shown when the number is actually negative. |
| + | Plus sign when followed by a number section defined by series of 'n's (like in "-nn,nnn.nn") indicates that negative numbers are allowed. However, it differs from '-' in the respect that it will always show a '+' or a '-' sign depending on whether the number is positive or negative. |
| C | Character or space placeholder. Character entry is not required. This operates exactly like the '&' placeholder, and ensures compatibility with Microsoft Access. |
| ? | Letter placeholder. For example: a-z or A-Z. Character entry is not required. |
| n | Digit placeholder. A group of n's can be used to create a numeric section where numbers are entered from right to left. Character must be numeric (0-9) but entry is not required. |
| mm, dd, yy | Combination of these three special tokens can be used to define a date mask. mm for month, dd for day, yy for two digit year and yyyy for four digit year. Examples: mm/dd/yyyy, yyyy/mm/dd, mm/yy. |
| hh, mm, ss, tt | Combination of these three special tokens can be used to define a time mask. hh for hour, mm for minute, ss for second, and tt for AP/PM. Examples: hh:mm, hh:mm tt, hh:mm:ss. |
| {date} | {date} token is a place holder for short date input. The date mask is derived using the underlying culture settings. |
| {time} | {time} token is a place holder for short time input. Short time typically does not include the seconds portion. The time mask is derived using the underlying culture settings. |
| {longtime} | {longtime} token is a place holder for long time input. Long time typically includes the seconds portion. The long time mask is derived using the underlying culture settings. |
| {double:i.f:c} | {double:i.f:c} is a place holder for a mask that allows floating point input where i and f in i.f specify the number of digits in the integer and fraction portions respectively. The :c portion of the mask is optional and it specifies that the inputting of the value should be done continous across fraction and integer portions. For example, with :c in the mask, in order to enter 12.34 the user types in "1234". Notice that the decimal separator character is missing. This allevietes the user from having to type in the decimal separator. |
| {double:-i.f:c} | Same as {double:i.f:c} except this allows negative numbers. |
| {currency:i.f:c} | Same as {double:i.f:c} except the mask is constructed based on currency formatting information of the underlying format provider or the culture. It typically has the currency symbol and also displays the group characters. |
| {currency:-i.f:c} | Same as {currency:i.f:c} except this allows negative numbers. |
| Literal | All other symbols are displayed as literals; that is, they appear as themselves. |
You can also escape the mask with {LOC} character sequence to indicate that symbols in the following table should be mapped to the associated symbols in the underlying culture settings.
Character | Description |
| $ | Currency symbol. |
| / | Date seperator. |
| : | Time seperator. |
| , | Thousands seperator. |
| . | Decimal seperator. |
| + | Positive sign. |
| - | Negative sign. |
Different databases deal with null values in different ways. Since the UltraGrid is designed to work with a variety of data sources, it has the ability to query the back end and find out which way to store null values. Depending on the type of connection to the database, this can have a significant impact on performance. If you know how the database handles the storage of null values, you can improve performance by setting the Nullable property to either 1 (NullableNull) or 2 (NullableEmptyString). Setting this value to 0 (NullableAutomatic) will provide a greater range of compatibility, but performance will suffer.
If the database does not support null values, and you attempt to force the storage of nulls by setting Nullable to 1 (NullableNull), an error will result. If you encounter problems when you attempt to save a record that contains a null value, you can change the setting of Nullable which should fix the problem. In any case, you should implement error-checking code to insure that the storage operation succeeded.
The setting of this property controls how the UltraWinGrid control will attempt to store the null value. In some cases, the mechanism used for data binding may change the null value before actually committing it to the database.
Use this property to set the character used to indicate that user input is required at a specific location in the input mask. Although you can use any character, the standard input prompt character is the underscore.
This property will only accept a single character. If an attempt is made to assign a multi-character string to it, an error will occur.
The MaskInput property is used to specify how data input will be masked for the cells in a column. The mask usually includes literal characters that are used to delimit the data entered by the user. This property has no effect unless the MaskInput property is set, meaning that data masking is enabled.
When data masking is enabled, the MaskClipMode property determines how cell values are copied to the clipboard, the MaskDataMode property indicates how cell values are stored by the data source, and the MaskDisplayMode property specifies how cell values are displayed.
The PadChar has effect when the
This GroupByEvaluator object will be used for determining which rows are included in group by rows. Essentially it lets you use custom logic for grouping rows.
Care should be taken to ensure that the GroupByEvaluator is logically consistent with the
This IComparer instance will be used for sorting group-by rows associated with this column if this column were a group-by column.
This IComparer object will be used for sorting the rows by this column.
The values passed in the ICompare.Compare will be UltraGridCell objects needing comparison.
Care should be taken to ensure that the
RowFilterComparer is used to evaluate comparison operators for the row filtering functionality. This is useful if you want to compare values using custom logic for row filtering functionality.
Unlike the
The UltraGrid can automatically sort the contents of columns without the addition of any code. While the UltraGrid can sort the data in columns automatically, it also gives you tools to implement your own sorting behavior through code.
Column headers can display a sort indicator in a column's header. When clicked and the HeaderClickAction property is set to HeaderClickAction.SortSingle or HeaderClickAction.SortMulti, the SortIndicator property is set to specify the order in which the column should be sorted, and the column is added to a special Columns collection just for sorted columns. If automatic sorting is disabled, in addition to adding the column to the Columns collection accessed by SortedCols, the control fires the BeforeSortChange and AfterSortChange events so that you can examine the contents of the collection, check the value of the SortIndicator property of each column, and perform the sort.
This property specifies what type of cell will be used to display and input data for the column.
The setting of this property for a column may affect other aspects of the control's operation. For example, using one of the dropdown styles requires the ValueList property of the column to be set in order to fill the dropdown list with text. It will also cause the CellListSelect event to be fired whenever an item is selected from the list. Similarly, setting this property to one of the button styles will cause the control to fire the ClickCellButton event.
Note: This property is for convenience. It lets you set the edit style of a column to one of the
commonly used edit styles. This list does not include all the styles that are available. If a
style is not listed in this enum then you can use the
Use this property to specify whether the user can navigate to a cell or the cells in a column by pressing the TAB key.
The TabNavigation property is used to specify how the control will respond when the TAB key is pressed.
This property can be used to allow the user to scroll a column whose cells contain too much text to be displayed at once.
If the CellMultiLine property, which is used to indicate whether a cell's text should be displayed in multiple lines, is set to False for the column, this property is ignored.
The MinWidth property limits the width of the object to no less than the value specified. Setting the value of MinWidth to 0 indicates that there is no minimum width limit for the object, although a 120 twip minimum is imposed system-wide.
You cannot set MinWidth to a value greater than that specified by the MaxWidth property.
This property is ignored for chaptered columns; that is, columns whose IsChaptered property returns true.
The MaxWidth property limits the width of the object to no more than the value specified. Setting the value of MaxWidth to 0 indicates that there is no maximum width limit for the object, or that the object's width is limited only by available screen area.
If the object has a MinWidth property, you cannot set MaxWidth to a value less than that specified by the MinWidth property.
This property is ignored for chaptered columns; that is, columns whose IsChaptered property returns true.
This property controls the display of multiple lines of text in edit cells in the band or the grid controlled by the specified override. When True, text will wrap in the area of the cell. If the RowSizing property is set to automatically resize the row, the row will expand in height until all lines of text are displayed (or the number of lines specified by the RowSizingAutoMaxLines property is reached).
The CellMultiLine property does not pertain to multi-line editing, only display. Also, you should note that setting a cell to multi-line mode will disable data masking. Only single-line cells can be masked (using the MaskInput and MaskDisplayMode properties.)
UltraGrid1.DisplayLayout.Appearance.ForeColor = vbBlueSSUltraGrid1.Appearances.Add "New1"
SSUltraGrid1.Appearances("New1").ForeColor = vbBlue
SSUltraGrid1.Layout.Appearance = SSUltraGrid1.Appearances("New1")
The AllowGroupBy property determines whether the user is allowed to group-by the column. If set the False the user won't be allowed to add or remove this column from the group-by box. This property does not prevent you from grouping the rows by the column in code.
To enable the funtionality for grouping rows, set the Layout's
When set the None, the user is not allowed to auto resize a column. If set to VisibleRows, then the column is resized based on the data in the visible rows. If set to SiblingRowsOnly, then the column is autoresized based on data in all the sibling rows. If set to AllRowsInBand, then the column is auto resized based on data in all rows in the band.
You can set various properties in the returned object to customize where the cell associated with this column shows up.
By default all the columns are visible. Set
Set
Set
Fill indicates whether to resize the item to fill the extra spance if the layout item's display area is larger than its size,
OriginX and OriginY define where the layout item will be placed in the virtual grid of the grid-bag layout. OriginX specifies the location horizontally while specifies the location vertically. These locations are the coordinates of the cells in the virtual grid that the grid-bag layout represents.
The leftmost cell has OriginX of 0. The constant
The default value is
OriginX and OriginY define where the layout item will be placed in the virtual grid of the grid-bag layout. OriginX specifies the location horizontally while specifies the location vertically. These locations are the coordinates of the cells in the virtual grid that the grid-bag layout represents.
The topmost cell has OriginY of 0. The constant
The default value is
Specifies the number of cells this item will span horizontally. The constant
Specifies the number of cells this item will span vertically. The constant
CellDisplayStyle specifies how the cells get rendered. You can use this property to speed up rendering of cells by setting it to FormattedText or PlainText. Default is resolved to FullEditorDisplay.
FormattedText draws the formatted cell value in the cells. PlainText draws the cell value converted to text withought applying any formatting. It simply calls ToString on the cell value and draws the resulting text in the cell.FullEditorDisplay embedds an embeddable ui element which draws the cell value as well as draws any edit elements like buttons. This is a bit more performance intensive than PlainText and FormattedText. The advantage of using FullEditorDisplay which is the default is that any edit elements that the editor may render in cells do not get rendered until the cell enters the edit mode.
You can use ShowInkButton property to explicitly turn on or turn off inck buttons.
You can use ShowCalculatingText property to explicitly turn on or turn off the display of the text during calculations.
Note:
FormulaValueConverter allows you to write custom logic for converting cell values to values that the formulas will use for calculations. It also allows you to write custom logic for converting results of formula calculations to cell values.
The FormulaErrorAppearance property is used to specify the appearance of the cells with formula errors.
Specifies whether to make use of IDataErrorInfo interface implemented on the underlying row objects to display error info in the associated cells.
You can set this property to change the default behavior of when the UltraGrid applies the filter that the user types into the cells of a filter row. Default behavior is to apply as soon as the user changes the value of a filter cell.
Specifies the style of operand input in the filter row cells. Default is be resolved to UseColumnEditor for DateTime and Boolean columns and Combo for other types of columns. This can be overridden on each column using the column's
Filter rows by default display user interface for selecting filter operators in addition to the filter operands. FilterOperatorLocation property can be used to hide this user interface so the user can't change the filter operator. You can specify what items are available in the filter operators drop down list using the
Filter rows by default display user interface for selecting filter operators in addition to the filter operands.
FilterOperatorDropDownItems property can be used to specify which operators to include in the operator drop down list.
Specifies the style of operand input in the filter row cells. Default will be resolved to Combo. This can be overridden on each column using the
Specifies the default value of the operator cells in the filter row. If operator cells are hidden, this is used as the filter operator for values entered in the associated filter operand cells. This can be overridden on each column. Default is resolved to StartsWith.
By default the UltraGrid performs filtering using case-insensitive string comparison. You can set the FilterComparisonType property to CaseSensitive to perform filtering using case sensitve string comparisons.
Specifies whether to display the filter clear button in the filter cells fo this column. Default is resolved to True.
You can use the
The MaxLength property gives you the ability to limit the amount of text that can be entered in column cells. You can use this property to enforce database-specific or application specific limitations.
The MinLength property gives you the ability to require a certain amount of text that must be entered in column cells. You can use this property to enforce database-specific or application specific limitations.
The regular expression given to this property will be used during validation of the cell values in the column. As the user attempts to move the input focus out of the cell, the text in the cell will be validated against the regular expression. For the validation to succeed, all of the text in the cell must constitute a single match. If the cell contains a match and other characters then the validation will fail. For example, if the regular expression is "\d{2}" (meaning, two consecutive digit characters) and the cell's text is "12" then the validation will succeed. However, if the cell's text is "123" then the validation will fail because of the extra digit ("3") that follows the match ("12"). This behavior can be altered by appending or prepending ".*" to the regular expression, meaning that any number of characters can precede or follow the target match.
This property is of type
To enable the funtionality for grouping rows, set the Layout's
Set the ExcludeFromColumnChooser property of a column to True if you want to
exlude it from the column chooser. Excluding a column from the column chooser will cause
the
The Band object also exposes
The CellClickAction property specifies what will occur when the user navigates through the grid by clicking on cells in the band or the grid controlled by the specified override. You can choose whether cells that are clicked will put the cell into edit mode or select the cell or its row. Depending on your application, you may want to enable the user to edit any cell just by clicking on it, or you may want to require a separate action to trigger cell editing, such as double-clicking or a keystroke combination. Similarly, you can choose whether cells should be individually selectable, or if selecting the row is a sufficient response to clicking on a cell.
By default the UltraGrid determines the tab order of the cells based on their locations. You can use the TabIndex property to control the order in which the UltraGrid traverses cells of a row when tab key is used. The default value of the property is -1 which means the column will follow the default tab order. You can set the TabIndex of two or more columns to the same value in which case the tab order of those columns will follow the default tab order. You can also specify the TabIndex only on some columns and leave the TabIndex to the default value on other columns. In such a scenario the columns that have their TabIndex set to non-default values take precedence over the columns that do not have their TabIndex set.
InvalidValueBehavior property is used to specify what actions are taken
by the UltraGrid when the user attempts to leave a cell after entering an invalid
value. This property provides the default values for the properties on
IgnoreMultiCellOperation specifies whether to ignore multi-cell operations on cells of this column. Default value of the property is Default which is resolved to False. If set to True, any multi cell operations that will end up modifying the cell values will be ignored for the cells associated with this column. This is useful for read-only or ID columns when you would typically not want to allow cutting/pasting on cells of such columns. Note that operations that do not modify the values, such as Copy operation, will still be allowed on the associated cells.
When set to ImeMode.Inherit, the ImeMode of the owning UltraGrid will be used.
Note: The Errors and NonErrors options will only be shown in the list if the
IGroupByEvaluator interface is used to supply custom logic for grouping rows.
If none of the
The following example shows how to implement a IGroupByEvaluator so that rows are grouped by the 1st 2 characters of a string field:
private void ultraGrid1_InitializeLayout(object sender, Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs e)
{
// set the view style to outlook group by
e.Layout.ViewStyleBand = ViewStyleBand.OutlookGroupBy;
Infragistics.Win.UltraWinGrid.UltraGridColumn column;
// get the CompanyName column
column = e.Layout.Bands[0].Columns["CompanyName"];
// set the GroupByEvaluator on the column to an instance of MyGroupByEvaluator
column.GroupByEvaluator = new MyGroupByEvaluator();
// set the column's HiddenWhenGroupBy property to false since we are
// grouping by the 1st 2 characters of each string we want the full
// company name to show in each row
//
column.HiddenWhenGroupBy = DefaultableBoolean.False;
}
public class MyGroupByEvaluator : Infragistics.Win.UltraWinGrid.IGroupByEvaluator
{
public object GetGroupByValue( UltraGridGroupByRow groupbyRow, UltraGridRow row )
{
string val;
// get the default value from the groupbyRow
if (groupbyRow.Value == null )
val = "";
else
val = groupbyRow.Value.ToString();
// if it is longer than 2 characters truncate it
if ( val.Length > 2 )
val = val.Substring( 0, 2 );
// Convert the string to uppercase for display
// in the groupbyrow description.
return val.ToUpper();
}
public bool DoesGroupContainRow( UltraGridGroupByRow groupbyRow, UltraGridRow row )
{
// get the related cell's value as a string
string cellValue = row.Cells[groupbyRow.Column].Value.ToString();
// if it is longer than 2 characters truncate it
if ( cellValue.Length > 2 )
cellValue = cellValue.Substring(0, 2);
// Do a case insensitive compare
return string.Compare(groupbyRow.Value.ToString(), cellValue, true) == 0;
}
}
In order to keep the default value use the following code:
public object GetGroupByValue( UltraGridGroupByRow groupByRow, UltraGridRow row )
{
return groupByRow.Value;
}
This interface is extended from the
This dialog embeds a UltraGridColumnChooser which can be accessed via the
The UltraGridColumnChooser displays the list of columns. It exposes various properties for controlling appearance and behavior related aspects of the column chooser. For example it can be used to control which columns are dispalyed.
The UltraGridColumnChooser occupies the entire client area of the form. It's Dock is set to Fill and therefore resizing this dialog will also automatically resize the control.
You can set this property to False to prevent the dialog from being disposed when it's closed.
Setting the property to True will cause it to be disposed in the Closing event handler.
Leaving this property to Default will perform the default behavior as documented in the
A FilterCondition object defines a single condition.
Multiple FilterCondition instances can be added to the
A FilterCondition object defines a single condition.
Multiple FilterCondition instances can be added to the
Columns are matched by their
This method can be used to specify the ordinal positions of groups and columns.
For group headers, this methos sets the position of the group within that group's band. For column headers, this method sets the position of the column within its group, if the column belongs to a group, or its band, if the column belongs to a band.
Note: This method does the same thing as the
The Group property of an object refers to a specific group of columns in the grid as defined by an UltraGridGroup object. You use the Group property to access the properties of a specified Group object, or to return a reference to a Group object. A Group is a group of columns that appear together in the grid, and can be resized, moved or swapped together as a unit. Columns in the same group share a group header, and can be arranged into a multi-row layout within the group, with different columns occupying different vertical levels within a single row of data. Groups also help with the logical arrangement of columns within the grid.
The Height property is used to determine the vertical dimension of an object. It is generally expressed in the scale mode of the object's container, but can also be specified in pixels.
For a Header object, this property is read-only. In a particular band, each column header has the same height. This height is determined by taking the largest height that results from the resolution of each column's header's Appearance attributes and the band's ColHeaderLines property.
If you are using the Row-Layout functionality then then height of the header can be controlled using the
If you want to auto-wrap the header caption if the width is not sufficient to fully display the caption then set the
This property can be used to specify the ordinal positions of groups and columns.
For group headers, this property returns or sets the position of the group within that group's band. For column headers, this property returns or sets the position of the column within its group, if the column belongs to a group, or its band, if the column belongs to a band.
UltraGrid1.DisplayLayout.Appearance.ForeColor = vbBlueUltraGrid1.Appearances.Add "New1"
UltraGrid1.Appearances("New1").ForeColor = System.Drawing.Color.Blue
UltraGrid1.Layout.Appearance = UltraGrid1.Appearances("New1")
Note that not all styles are available on all operating systems. If the version of the OS that your program is running on does not support a particular border style, borders formatted with that style will be drawn using solid lines.
Use this method to reset the properties of an DisplayLayout object to their default values. The appearance of any object associated with the DisplayLayout object will change accordingly. You can specify which groups of properties should be reset using the categories parameter. If you do not specify a value for this parameter, all property values are reset. You can also specify whether the InitializeLayout event will fire as a result of this method being invoked. If you do not specify this parameter, the event does not occur.
When specifying 256 (PropCatGeneral), the following property settings for the DisplayLayout object are reset:
|
|
|
Multiple DisplayLayout categories can be copied by combining them using logical Or.
The DisplayLayout property of an object is used to access the DisplayLayout object that determines the settings of various properties related to the appearance and behavior of the object. The DisplayLayout object provides a simple way to maintain multiple layouts for the grid and apply them as needed. You can also save grid layouts to disk, the registry or a storage stream and restore them later.
The DisplayLayout object has properties such as Appearance and Override, so the DisplayLayout object has sub-objects of these types, and their settings are included as part of the layout. However, the information that is actually persisted depends on how the settings of these properties were assigned. If the properties were set using the DisplayLayout object's intrinsic objects, the property settings will be included as part of the layout. However, if a named object was assigned to the property from a collection, the layout will only include the reference into the collection, not the actual settings of the named object. (For an overview of the difference between named and intrinsic objects, please see the Appearance property.
For example, if the DisplayLayout object's Appearance property is used to set values for the intrinsic Appearance object like this:
UltraWinGrid1.Layout.Appearance.ForeColor = vbBlue
Then the setting (in this case, ForeColor) will be included as part of the layout, and will be saved, loaded and applied along with the other layout data. However, suppose you apply the settings of a named object to the DisplayLayout's Appearance property in this manner:
UltraWinGrid1.Appearances.Add "New1"
UltraWinGrid1.Appearances("New1").ForeColor = vbBlue
UltraWinGrid1.DisplayLayout.Appearance = UltraWinGrid1.Appearances("New1")
In this case, the ForeColor setting will not be persisted as part of the layout. Instead, the layout will include a reference to the "New1" Appearance object and use whatever setting is present in that object when the layout is applied.
By default, the layout includes a copy of the entire Appearances collection, so if the layout is saved and restored using the default settings, the object should always be present in the collection when it is referred to. However, it is possible to use the Load and Save methods of the DisplayLayout object in such a way that the collection will not be re-created when the layout is applied. If this is the case, and the layout contains a reference to a nonexistent object, the default settings for that object's properties will be used.
The BeforeDropDown event can be canceled; when this happens, the dropdown list is not displayed, and the
The layout argument returns a reference to a DisplayLayout object that can be used to set properties of, and invoke methods on, the layout of the control. You can use this reference to access any of the returned layout's properties or methods.
Like a form's oad event, this event provides an opportunity to configure the control before it is displayed. It is in this event procedure that actions such as creating appearances, valuelists, and unbound columns should take place.
This event is generated when the control is first preparing to display data from the data source. This may occur when the data source changes, or when the Refresh method is invoked.
The row argument returns a reference to an UltraGridRow object that can be used to set properties of, and invoke methods on, the row being displayed. You can use this reference to access any of the returned row's properties or methods.
The reinitialize argument can be used to determine whether the row's data has been changed since it was last displayed. The value of reinitialize can also be controlled when invoking the control or row's Refresh method, which causes this event to be generated.
This event is generated once for each row being displayed or printed and provides an opportunity to perform actions on the row before it is rendered, such as populating an unbound cell or changing a cell's color based on its value.
The ViewStyle and ViewStyleBand properties of the control and DisplayLayout object are read-only in this event procedure.
If true will act as a combo with a style of DropDownList.
Do NOT call the Dispose method on the graphics object returned from this method.
Instead, each call to this method should be paired with a call to
During graphics caching calls to
Do NOT call the Dispose method on the graphics object returned from
During graphics caching calls to
The default implementation returns ShowInkButton.Default.
GetEditorContext and
Implementing owner will return the object that was last cached using SetEditorContext method.
Implementing owner will return the object that was last cached using SetEditorContext method.
Note: This method only has significance to the
The
GetEditorContext and
Implementing owner will return the object that was last cached using SetEditorContext method.
Implementing owner will return the object that was last cached using SetEditorContext method.
Style specifies if and how to extend the empty rows all the way to the left so they are aligned with the left edge of the scroll region (grid). The default is ExtendFirstCell.
UltraGridEmptyRow instances represent empty rows.
Invoke this method to return a reference to an object's UIElement. The reference can be used to set properties of, and invoke methods on, the UIElement object associated with an object. You can use this reference to access any of the UIElement's properties or methods.
The Type property can be used to determine what type of UIElement was returned. If no UIElement exists, meaning the object is not displayed, Nothing is returned.
The ParentUIElement property can be used to return a reference to a UIElement's parent UIElement object. The UIElements property can be used to return a reference to a collection of child UIElement objects for a UIElement.
The UIElementFromPoint method can be invoked to return a reference to an UIElement object residing at specific coordinates.
CanResolveUIElement method can be invoked to determine whether an object or one of its ancestors can be resolved as a specific type of UIElement.
The GetUIElement method does not take into account the presence of a pop-up edit window or the drop-down portion of a combo if these elements are present, and will never return a UIElement that corresponds to one of these elements. The GetUIElementPopup method can be invoked to return a reference to a popup window's UIElement.
HasCell method indicates whether the cell for a column has been allocated yet. UltraGrid allocates cells and cell collections lazily - as they are accessed. This is useful for example if you want to perform an operation on a cell, such as resetting previously set appearance settings, that would only be necessary if the cell has been allocated previously. In such a case you can use this method to find out if the cell has been allocated and only perform the operation if it is. This ensures that the cell doesn't get unnecessarily allocated.
HasCell method indicates whether the cell for a column has been allocated yet. UltraGrid allocates cells and cell collections lazily - as they are accessed. This is useful for example if you want to perform an operation on a cell, such as resetting previously set appearance settings, that would only be necessary if the cell has been allocated previously. In such a case you can use this method to find out if the cell has been allocated and only perform the operation if it is. This ensures that the cell doesn't get unnecessarily allocated.
HasCell method indicates whether the cell for a column has been allocated yet. UltraGrid allocates cells and cell collections lazily - as they are accessed. This is useful for example if you want to perform an operation on a cell, such as resetting previously set appearance settings, that would only be necessary if the cell has been allocated previously. In such a case you can use this method to find out if the cell has been allocated and only perform the operation if it is. This ensures that the cell doesn't get unnecessarily allocated.
Note that there must be a column with the specified key in the associated band's columns collection otherwise this method will throw an exception. If the intention is to find out if a column with the specified key exists then use the CellCollection's Exists method instead.
Note that for better efficiency you may want to use HasCell overloads that take column index or a column object as they do not require searching the collection for the matching column key.
Invoke this method to return a reference to the first, last, next, or previous sibling row of a row. If a sibling row does not exist, this method returns Nothing.
The spanbands argument can be used to indicate whether rows in other bands are considered siblings.
The HasNextSibling and HasPrevSibling methods can be invoked to determine whether a row has a sibling row after it and before it, respectively.
The GetChild method and HasParent property can be used to return references to a child row and a parent row, respectively.
Invoke this method to return a reference to the first, last, next, or previous sibling row of a row. If a sibling row does not exist, this method returns Nothing.
The spanbands argument can be used to indicate whether rows in other bands are considered siblings.
The HasNextSibling and HasPrevSibling methods can be invoked to determine whether a row has a sibling row after it and before it, respectively.
The GetChild method and HasParent property can be used to return references to a child row and a parent row, respectively.
Invoke this method to return a reference to the first, last, next, or previous sibling row of a row. If a sibling row does not exist, this method returns Nothing.
The spanbands argument can be used to indicate whether rows in other bands are considered siblings.
The HasNextSibling and HasPrevSibling methods can be invoked to determine whether a row has a sibling row after it and before it, respectively.
The GetChild method and HasParent property can be used to return references to a child row and a parent row, respectively.
Returns true if the row meets the criteria specified by the passed in filter condition.
Returns true if the row meets the criteria specified by the passed in filter conditions and the logical operator. If the logical operator is And and the row meets all the conditions in the filterConditions array then this method returns true. If the logical operator is Or and the row meets at least one filter condition then this method returns true. Otherwise it returns false.
Returns true if the row meets the criteria specified by the passed in column filter.
Returns true if the row meets the criteria specified by the passed in column filters and the logical operator. If the logical operator is And and the row meets all the conditions in the column filters array then this method returns true. If the logical operator is Or and the row meets at least one of the column filter then this method returns true. Otherwise it returns false.
The CollapseAll method collapses the child rows of a band and discards any information about which children were themselves expanded.
When you invoke the CollapseAll method, the control fires the BeforeRowCollapsed event for every row in the band. In that event, you have the opportunity to cancel the collapse of any row. For all rows except those for which the event was cancelled, the control then collapses the row and any of its children. If those children have children, they are also collapsed, and so on down to the bottom level of the hierarchy. Any context information that was previously accumulated as the result of the user expanding and collapsing child rows is discarded.
The ExpandAll method expands all the child rows of a band. If those rows have any children, they are also expanded, and so on until the bottom level of the hierarchy is reached.
When you invoke the ExpandAll method, the control fires the BeforeRowExpanded event for every row in the band. In that event, you have the opportunity to cancel the expansion of any row. For all rows except those for which the event was cancelled, the control then expands the row and any of its children. If those children have children, they are also expanded, and so on down to the bottom level of the hierarchy. Any context information that was previously accumulated as the result of the user expanding and collapsing child rows is discarded.
The
The
The
Invoke this method to return a reference to either the first or last child row of a parent row. If a child row does not exist, this method returns Nothing.
The band argument can be used to specify a child rowset in which a child row should be sought. If band is not specified, this method attempts to find a child row in all child rowsets.
The GetChild method can be invoked to determine whether a row has a child row.
The HasParent property and GetSibling method can be used to return references to a parent row and a sibling row, respectively.
Invoke this method to return a reference to either the first or last child row of a parent row. If a child row does not exist, this method returns Nothing.
The band argument can be used to specify a child rowset in which a child row should be sought. If band is not specified, this method attempts to find a child row in all child rowsets.
The HasChild method can be invoked to determine whether a row has a child row.
The HasParent and GetSibling methods can be invoked to return references to a parent row and a sibling row, respectively.
Invoke this method to determine whether a row has at least one child row. If a child row exists, this method returns True; otherwise, this method returns False.
The band argument can be used to specify a child band in which a child row should be sought. If band is not specified, this method attempts to find a child row in all child bands.
A reference to the first or last child row can be returned by invoking the GetChild method.
The HasParent, HasNextSibling, and HasPrevSibling methods can be invoked to determine if a row has a parent row, sibling row above it, and sibling row below it, respectively.
Invoke this method to determine whether a row has at least one child row. If a child row exists, this method returns True; otherwise, this method returns False.
The band argument can be used to specify a child band in which a child row should be sought. If band is not specified, this method attempts to find a child row in all child bands.
A reference to the first or last child row can be returned by invoking the GetChild method.
The HasParent, HasNextSibling, and HasPrevSibling methods can be invoked to determine if a row has a parent row, sibling row above it, and sibling row below it, respectively.
Invoke this method to determine whether a row has at least one child row. If a child row exists, this method returns True; otherwise, this method returns False.
The band argument can be used to specify a child band in which a child row should be sought. If band is not specified, this method attempts to find a child row in all child bands.
A reference to the first or last child row can be returned by invoking the GetChild method.
The HasParent, HasNextSibling, and HasPrevSibling methods can be invoked to determine if a row has a parent row, sibling row above it, and sibling row below it, respectively.
Invoke this method to determine whether a row has at least one child row. If a child row exists, this method returns True; otherwise, this method returns False.
The band argument can be used to specify a child band in which a child row should be sought. If band is not specified, this method attempts to find a child row in all child bands.
A reference to the first or last child row can be returned by invoking the GetChild method.
The HasParent, HasNextSibling, and HasPrevSibling methods can be invoked to determine if a row has a parent row, sibling row above it, and sibling row below it, respectively.
Invoke this method to determine whether a row has a parent row. If a parent row exists, this method returns True; otherwise, this method returns False. If you specify an UltraGridBand for the band parameter, the control will determine whether the row has an ancestor row in that band.
If a parent row exists, a reference to it can be returned by invoking the HasParent method.
The HasChild, HasNextSibling, and HasPrevSibling methods can be invoked to determine whether a row has a child row, sibling row above it, and sibling row below it, respectively.
Invoke this method to determine whether a row has a sibling row below it. If a sibling row exists below the row, this method returns True; otherwise, this method returns False.
The spanbands argument can be used to indicate whether rows in other bands are considered siblings.
A reference to sibling row can be returned by invoking the GetSibling method.
The HasChild, HasParent, and HasPrevSibling methods can be invoked to determine whether a row has a child row, a parent row, and sibling row below it, respectively.
Invoke this method to determine whether a row has a sibling row below it. If a sibling row exists below the row, this method returns True; otherwise, this method returns False.
The spanbands argument can be used to indicate whether rows in other bands are considered siblings.
A reference to sibling row can be returned by invoking the GetSibling method.
The HasChild, HasParent, and HasPrevSibling methods can be invoked to determine whether a row has a child row, a parent row, and sibling row below it, respectively.
Invoke this method to determine whether a row has a sibling row below it. If a sibling row exists below the row, this method returns True; otherwise, this method returns False.
The spanbands argument can be used to indicate whether rows in other bands are considered siblings.
A reference to sibling row can be returned by invoking the GetSibling method.
The HasChild, HasParent, and HasPrevSibling methods can be invoked to determine whether a row has a child row, a parent row, and sibling row below it, respectively.
Invoke this method to determine whether a row has a sibling row above it. If a sibling row exists above the row, this method returns True; otherwise, this method returns False.
The spanbands argument can be used to indicate whether rows in other bands are considered siblings.
A reference to a sibling row can be returned by invoking the GetSibling method.
The HasChild, HasNextSibling, and HasParent methods can be invoked to determine whether a row has a child row, a sibling row after it, and a parent row, respectively.
Invoke this method to determine whether a row has a sibling row above it. If a sibling row exists above the row, this method returns True; otherwise, this method returns False.
The spanbands argument can be used to indicate whether rows in other bands are considered siblings.
A reference to a sibling row can be returned by invoking the GetSibling method.
The HasChild, HasNextSibling, and HasParent methods can be invoked to determine whether a row has a child row, a sibling row after it, and a parent row, respectively.
Invoke this method to determine whether a row has a sibling row above it. If a sibling row exists above the row, this method returns True; otherwise, this method returns False.
The spanbands argument can be used to indicate whether rows in other bands are considered siblings.
A reference to a sibling row can be returned by invoking the GetSibling method.
The HasChild, HasNextSibling, and HasParent methods can be invoked to determine whether a row has a child row, a sibling row after it, and a parent row, respectively.
Generally, painting a control is handled automatically while no events are occurring. However, there may be situations where you want the form or control updated immediately, for example, after some external event has caused a change to the form. In such a case, you would use the Refresh method.
The Refresh method can also be used to ensure that the user is viewing the latest copy of the data from the record source.
Generally, painting a control is handled automatically while no events are occurring. However, there may be situations where you want the form or control updated immediately, for example, after some external event has caused a change to the form. In such a case, you would use the Refresh method.
The Refresh method can also be used to ensure that the user is viewing the latest copy of the data from the record source.
Generally, painting a control is handled automatically while no events are occurring. However, there may be situations where you want the form or control updated immediately, for example, after some external event has caused a change to the form. In such a case, you would use the Refresh method.
The Refresh method can also be used to ensure that the user is viewing the latest copy of the data from the record source.
This method can be useful in situations where a new row is added to the rows collection (which by default is appended at the end of the collection) and you want to ensure the row is positioned at the right position in the collection based on the sort criteria without having to resort the whole collection. This method should not be used if the sort criteria itself changes which effects the whole rows collection.
To resort all the rows of a band, call
The Update method updates any modified information in the grid, sending it to the data provider. When the update is complete, any rows that were marked as having modified data will have that mark cleared. The DataChanged property will be set to False.
Normally, the grid handles the updating of data automatically, so there will be few situations in which you will need to invoke this method. The major exception is when you have set the UpdateMode property to 'OnUpdate'. When using that setting, the grid will not send any data to the data provider until you invoke the Update method. You must use the method to manually update the data provider whenever data has been changed and you are ready to commit the changes.
When the CancelUpdate method is invoked for a row, any changes made to the cells of the active row are removed. The cells display their original values, and the row is taken out of edit mode. The row selector picture changes from the "Write" image back to the "Current" image. The DataChanged property will be set to false.
When a row is deleted, the BeforeRowsDeleted event is generated. Afterwards, the row is removed from the control and its corresponding record is deleted from the data source. If the record cannot be removed from the data source, the Error event is generated.
The DeleteSelectedRows method of the control can be invoked to delete all selected rows.
When a row is deleted, the BeforeRowsDeleted event is generated. Afterwards, the row is removed from the control and its corresponding record is deleted from the data source. If the record cannot be removed from the data source, the Error event is generated.
The DeleteSelectedRows method of the control can be invoked to delete all selected rows.
Examining the value of the Appearance property that has not been set will return the "use default" value, not the internal value that is actually being used to display the object affected by the Appearance object. In order to find out what values are being used, you must use the ResolveAppearance method. This method initializes the specified AppearanceData structur with values that can be used to determine how the object will look.
When you change the properties of an Appearance object, you are not required to specify a value for every property that object supports. Whether the Appearance object is a stand-alone object you are creating from scratch, or an intrinsic object that is already attached to some other object, you can set certain properties and ignore others. The properties you do not explicitly set are given a "use default" value that indicates there is no specific setting for that property.
Properties that are set to the "use default" value derive their settings from other objects by following an appearance hierarchy. In the appearance hierarchy, each object has a parent object from which it can inherit the actual numeric values to use in place of the "use default" values. The "use default" value should not be confused with the initial setting of the property, which is generally referred to as the default value. In many cases, the default setting of an object's property will be "use default"; this means that the property is initially set not to use a specific value. The "use default" value will be 0 for an enumerated property (usually indicated by a constant ending in the word "default", such as AlignDefault) or -1 (0xFFFFFFFF) for a numeric setting, such as that used by color-related properties.
So for example, if the Appearance object of a cell has its BackColor property set to -1, the control will use the setting of the row's BackColor property for the cell, because the row is above the cell in the appearance hierarchy. The top level of the appearance hierarchy is the UltraGrid control itself. If any of the UltraWinGrid's Appearance object properties are set to their "use default" values, the control uses built-in values (the "factory presets") for those properties. For example, the factory preset of the BackColor property of the grid's Appearance object is the system button face color (0x8000000F). This is the value that will be used for the grid's background color when the BackColor property of the grid's Appearance object is set to the "use default" value.
The ResolveAppearance method will initialize the specified AppearanceData structure with all of its "use default" settings converted into actual values. It does this by navigating the appearance hierarchy for each property until an explicit setting or a factory preset is encountered. If you simply place a grid on a form, run the project, and examine the setting of the BackColor property of the grid's intrinsic Appearance object:
MsgBox Hex(UltraWinGrid1.Rows(0).Appearance.BackColor)
...you will see that it is set to the "use default" value (0xFFFFFFFF). However, if you use the ResolveAppearance method to display the same value:
Dim appData as AppearanceData = new AppearanceData()
UltraWinGrid1.Rows(0).ResolveAppearance(ByRef appData)
MsgBox Hex(appData.BackColor)
...you will see that it is set to the system button face color (0x8000000F).
Examining the value of the Appearance property that has not been set will return the "use default" value, not the internal value that is actually being used to display the object affected by the Appearance object. In order to find out what values are being used, you must use the ResolveAppearance method. This method initializes the specified AppearanceData structur with values that can be used to determine how the object will look.
When you change the properties of an Appearance object, you are not required to specify a value for every property that object supports. Whether the Appearance object is a stand-alone object you are creating from scratch, or an intrinsic object that is already attached to some other object, you can set certain properties and ignore others. The properties you do not explicitly set are given a "use default" value that indicates there is no specific setting for that property.
Properties that are set to the "use default" value derive their settings from other objects by following an appearance hierarchy. In the appearance hierarchy, each object has a parent object from which it can inherit the actual numeric values to use in place of the "use default" values. The "use default" value should not be confused with the initial setting of the property, which is generally referred to as the default value. In many cases, the default setting of an object's property will be "use default"; this means that the property is initially set not to use a specific value. The "use default" value will be 0 for an enumerated property (usually indicated by a constant ending in the word "default", such as AlignDefault) or -1 (0xFFFFFFFF) for a numeric setting, such as that used by color-related properties.
So for example, if the Appearance object of a cell has its BackColor property set to -1, the control will use the setting of the row's BackColor property for the cell, because the row is above the cell in the appearance hierarchy. The top level of the appearance hierarchy is the UltraGrid control itself. If any of the UltraWinGrid's Appearance object properties are set to their "use default" values, the control uses built-in values (the "factory presets") for those properties. For example, the factory preset of the BackColor property of the grid's Appearance object is the system button face color (0x8000000F). This is the value that will be used for the grid's background color when the BackColor property of the grid's Appearance object is set to the "use default" value.
The ResolveAppearance method will initialize the specified AppearanceData structure with all of its "use default" settings converted into actual values. It does this by navigating the appearance hierarchy for each property until an explicit setting or a factory preset is encountered. If you simply place a grid on a form, run the project, and examine the setting of the BackColor property of the grid's intrinsic Appearance object:
MsgBox Hex(UltraWinGrid1.Rows(0).Appearance.BackColor)
...you will see that it is set to the "use default" value (0xFFFFFFFF). However, if you use the ResolveAppearance method to display the same value:
Dim appData as AppearanceData = new AppearanceData()
UltraWinGrid1.Rows(0).ResolveAppearance(ByRef appData)
MsgBox Hex(appData.BackColor)
...you will see that it is set to the system button face color (0x8000000F).
Examining the value of the Appearance property that has not been set will return the "use default" value, not the internal value that is actually being used to display the object affected by the Appearance object. In order to find out what values are being used, you must use the ResolveAppearance method. This method initializes the specified AppearanceData structur with values that can be used to determine how the object will look.
When you change the properties of an Appearance object, you are not required to specify a value for every property that object supports. Whether the Appearance object is a stand-alone object you are creating from scratch, or an intrinsic object that is already attached to some other object, you can set certain properties and ignore others. The properties you do not explicitly set are given a "use default" value that indicates there is no specific setting for that property.
Properties that are set to the "use default" value derive their settings from other objects by following an appearance hierarchy. In the appearance hierarchy, each object has a parent object from which it can inherit the actual numeric values to use in place of the "use default" values. The "use default" value should not be confused with the initial setting of the property, which is generally referred to as the default value. In many cases, the default setting of an object's property will be "use default"; this means that the property is initially set not to use a specific value. The "use default" value will be 0 for an enumerated property (usually indicated by a constant ending in the word "default", such as AlignDefault) or -1 (0xFFFFFFFF) for a numeric setting, such as that used by color-related properties.
So for example, if the Appearance object of a cell has its BackColor property set to -1, the control will use the setting of the row's BackColor property for the cell, because the row is above the cell in the appearance hierarchy. The top level of the appearance hierarchy is the UltraGrid control itself. If any of the UltraWinGrid's Appearance object properties are set to their "use default" values, the control uses built-in values (the "factory presets") for those properties. For example, the factory preset of the BackColor property of the grid's Appearance object is the system button face color (0x8000000F). This is the value that will be used for the grid's background color when the BackColor property of the grid's Appearance object is set to the "use default" value.
The ResolveAppearance method will initialize the specified AppearanceData structure with all of its "use default" settings converted into actual values. It does this by navigating the appearance hierarchy for each property until an explicit setting or a factory preset is encountered. If you simply place a grid on a form, run the project, and examine the setting of the BackColor property of the grid's intrinsic Appearance object:
MsgBox Hex(UltraWinGrid1.Rows(0).Appearance.BackColor)
...you will see that it is set to the "use default" value (0xFFFFFFFF). However, if you use the ResolveAppearance method to display the same value:
Dim appData as AppearanceData = new AppearanceData()
UltraWinGrid1.Rows(0).ResolveAppearance(ByRef appData)
MsgBox Hex(appData.BackColor)
...you will see that it is set to the system button face color (0x8000000F).
Resizes the row based on its contents. This method
does nothing when the
Cells are lazily allocated. They are allocated as they are accessed. However once a cell is allocated, it remains referenced until the row is removed. You can use this method to release references to the cells that have been allocated. Note that they will be re-allocated when they are accessed next time.
One use for this method is to reset all the cells to their default settings. For example,
if you have set some settings on the cells of a row and you want to clear all those settings
then you can use this method to simply clear the cell collection. This will have the same
effect as having reset all the cells of the row with one added benefit that the references
to the cells will have been released and thus may result in improved memory usage. Note
that the cells will be re-allocated when they are accessed the next time. This method is
exposed on the
Note: If one of the cells of this row is the current active cell or is selected then it will not be cleared from the collection as the ActiveCell property of the grid (or the SelectedCellsCollection in the case of selected cells) is holding reference to the cell. Such cells will not be cleared. They will remain part of the cell collection. However their settings will be reset. In other words, the end result will be the same.
Note that any references to the cells from this row after ClearCells call should be considered invalid (except for the active cell and selected cells as noted above). Also the cell collection itself is released, which is also lazily allocated.
The Band property of an object refers to a specific band in the grid as defined by an UltraGridBand object. You use the Band property to access the properties of a specified UltraGridBand object, or to return a reference to the UltraGridBand object that is associated with the current object.
UltraGridBand objects are the foundation of the hierarchical data structure used by UltraWinGrid. Any row or cell in the grid must be accessed through its UltraGridBand object. Bands are also used to apply consistent formatting and behavior to the rows that they comprise. An UltraGridBand object is used to display all the data rows from a single level of a data hierarchy. UltraGridBand objects contain multiple sets of child UltraGridRow objects that actually display the data of the recordset. All of the rows that are drawn from a single Command in the DataEnvironment make up a band.
The rows of a band are generally displayed in groups of one more in order to show rows from subsequent bands that are linked to rows in the current band via the structure of the data hierarchy. For example, if a hierarchical recordset has Commands that display Customer, Order and Order Detail data, each one of these Commands maps to its own UltraGridBand in the UltraWinGrid. The rows in the Customer band will appear separated by any Order data rows that exist for the customers. By the same token, rows in the Order band will be appear separated to make room for Order Detail rows. How this looks depends on the ViewStyle settings selected for the grid, but the concept of visual separation is readily apparent when the UltraWinGrid is used with any hierarchical recordset.
Although the rows in a band may appear to be separated, they are treated contiguously. When selecting a column in a band, you will see that the cells of that column become selected in all rows for the band, regardless of any intervening rows. Also, it is possible to collapse the hierarchical display so that any children of the rows in the current band are hidden.
If the
This property only applies when the band is in card view (IsCard property returns true for this row) and the
Also this does not apply to group by rows and for group by rows returned value will be undefined.
The Index property is set by default to the order of the creation of objects in a collection. The index for the first object in a collection will always be zero.
The value of the Index property of an object can change when objects in the collection are reordered, such as when objects are added to or deleted from the collection. Since the Index property may change dynamically, it may be more useful to refer to objects in a collection by using its Key property.
Not all objects in a collection support an Index property. For certain objects, the Index value is essentially meaningless except as an internal placeholder within the collection. In these cases, the object will not have an Index property, even though it is in a collection. You can use other mechanisms, such as the Key property or the For Each... loop structure, to access the objects in the collection.
This property will return -1 if the UltraGridRow's Hidden property is set.
If the row doesn't have any parent row then it this property will return true.
This property returns a reference to a collection of UltraGridCell objects that can be used to retrieve references to the UltraGridCell objects that belong to a row. You can use this reference to access any of the returned collection's properties or methods, as well as the properties or methods of the objects within the collection.
For the UltraGridRow object, the returned collection provides a way to work with the cells that constitute the row.
The Count property of the returned collection can be used to determine the number of cells that belong to a row.
You can use the RowSpacingBefore property to specify the space that precedes a row in the band or the grid. Space between rows allows the background area of the grid to show through, and can be useful when you have specified a picture or a texture for the background. To control the space that follows a row, use the RowSpacingAfter property.
You can use the RowSpacingAfter property to specify the space that follows a row in the band or the grid. Space between rows allows the background area of the grid to show through, and can be useful when you have specified a picture or a texture for the background. To control the space that precedes a row, use the RowSpacingBefore property.
To specify the row spacing of all rows in a grid or band, use the Override's
You can use the RowSpacingAfter property to specify the space that follows a row in the band or the grid. Space between rows allows the background area of the grid to show through, and can be useful when you have specified a picture or a texture for the background. To control the space that precedes a row, use the RowSpacingBefore property.
To specify the row spacing of all rows in a grid or band, use the Override's
The Height property is used to determine the vertical dimension of an object. It is generally expressed in the scale mode of the object's container, but can also be specified in pixels.
The Override's
The Hidden property determines whether an object is visible. Hiding an object may have have effects that go beyond simply removing it from view. For example, hiding a band also hides all the rows in that band. Also, changing the Hidden property of an object affects all instances of that object. For example, a hidden column or row is hidden in all scrolling regions.
The bahavior of Hidden property with Row Filtering functionality has changed in UltaGrid Version 3.0. In previous version the Hidden property of a row returned false if the row was filtered out where as in Version 3.x the Hidden property will return the value it was set to regardless of whether the row is filtered out or not. Instead in Version 3.x
Indicates whether the row is filtered out or not. A filtered out row is a row that does not pass the filter criteria. Filter criteria can be sepcified by
You can use the
The Activation property of the UltraGridCell object is subordinate to the settings of the Activation properties of the UltraGridRow and UltraGridColumn objects that contain the cell. If either the cell's row or column has its Activation property set to Disabled, the cell cannot be activated, regardless of its own setting for Activation. The setting of the other type of parent also has no effect; setting Activation to False on a cell's row makes the cell inactive regardless of the setting of its column.
The Appearance property of an object is used to associate the object with an Appearance object that will determine its appearance. The Appearance object has properties that control settings such as color, borders, font, transparency, etc. For many of the objects in the UltraWinGrid, you do not set formatting properties directly. Instead, you set the properties of an Appearance object, which controls the formatting of the object it is attached to.
There are two ways of working with the Appearance property and assigning the attributes of an Appearance object to other objects. One way is to create a new Appearance object, adding it directly to the Appearances collection. Then you assign the new Appearance object to the Appearance property of the object you want to format. This method uses a "named" Appearance object that you must explicitly create (and to which you must assign property settings) before it can be used. For instance, you could create an object in the grid's Appearances collection and assign it some values as follows:
UltraWinGrid1.Appearances.Add "New1"
UltraWinGrid1.Appearances("New1").BorderColor = System.Drawing.Color.Blue
UltraWinGrid1.Appearances("New1").ForeColor = System.Drawing.Color.Red
Creating the object in this way does not apply formatting to any visible part of the grid. The object simply exists in the collection with its property values, waiting to be used. To actually use the object, you must assign it to the grid's (or another object's) Appearance property:
UltraWinGrid1.Appearance = UltraWinGrid1.Appearances("New1")
In this case, only one Appearance object exists. The grid's appearance is governed by the settings of the "New1" object in the collection. Any changes you make to the object in the collection will immediately be reflected in the grid.
The second way of working with the Appearance property is to use it to set property values directly, such as:
UltraWinGrid1.Appearance.ForeColor = System.Drawing.Color.Blue
In this case, an Appearance object is automatically created by the control. This Appearance object is not a member of an Appearances collection and it does not have a name. It is specific to the object for which it was created; it is an "intrinsic" Appearance object. Changes to the properties of an intrinsic Appearance object are reflected only in the object to which it is attached.
Note that you can assign properties from a named Appearance object to an intrinsic Appearance object without creating a dependency relationship. For example, the following code...
UltraWinGrid1.Appearance.ForeColor = UltraWinGrid1.Appearances("New1").ForeColor
...does not establish a relationship between the foreground color of the intrinsic object and that of the named object. It is simply a one-time assignment of the named object's value to that of the intrinsic object. In this case, two Appearance objects exist - one in the collection and one attached to the grid - and they operate independently of one another.
If you wish to assign all the properties of a named object to an intrinsic object at once without creating a dependency relationship, you can use the Clone method of the Appearance object to duplicate its settings and apply them. So if you wanted to apply all the property settings of the named Appearance object "New1" to the grid's intrinsic Appearance object, but you did not want changes made to "New1" automatically reflected in the grid, you would use the following code:
UltraWinGrid1.Appearance = UltraWinGrid1.Appearances("New1").Clone
Note that the properties of an Appearance object can also operate in a hierarchical fashion. Certain properties can be set to a "use default" value, which indicates to the control that the property should take its setting from the object's parent. This functionality is enabled by default, so that unless you specify otherwise, child objects resemble their parents, and formatting set at higher levels of the grid hierarchy is inherited by objects lower in the hierarchy.
The CellAppearance property is used to specify the appearance of all the cells in a row. When you assign an Appearance object to the CellAppearance property, the properties of that object will be applied to all the cells belonging to the row. You can use the CellAppearance property to examine or change any of the appearance-related properties that are currently assigned to the cells, for example:
UltraWinGrid1.Override.CellAppearance.BackColor = vbYellow
You can override the CellAppearance setting for specific cells by setting the Appearance property of the UltraGridCell object directly. The cell will always use the values of its own Appearance object before it will use the values inherited from the Appearance object specified by the CellAppearance property of the row or band it occupies.
If any of the properties of the Appearance object specified for the CellAppearance property are set to default values, the properties from the Appearance object of the row containing the cell are used.
The auto preview area of a row is a blank area that appears at the bottom of a row across the row's entire width. This area can be used to display the text of the row's description, as determined by the Description property of the UltraGridRow object.
The AutoPreviewEnabled property determines whether the AutoPreview area can be displayed for rows in the specified band. Once AutoPreview has been enabled, it can be displayed for any row by setting the UltraGridRow object's AutoPreviewHidden property to False.
This property returns True when a cell or row's data has changed, but has not yet been committed to the data source; otherwise, it returns False.
When the value of a cell is changed, either programmatically by setting ;its Value property, or by user interaction, this property is set to True and the BeforeCellUpdate and AfterCellUpdate events are generated. Note that the cell's new value is not necessarily committed to the data source at this time, however, since various factors such as the type of record locking employed by the data source, as well as the value of the UpdateMode property, can affect when the actual update occurs. Once the data source is actually updated, the BeforeRowUpdate and AfterRowUpdate events are generated and this property is set back to False.
The OriginalValue property of the cell can be used to determine a cell's value before it was changed.
When the band containing the Row is in Card View mode, the CardCaption property specifies the text that will be displayed in the caption area of the card that contains the row's data. This property will be read-only if the CaptionField property has been set to a valid field or column name in the
Typically, you would set the value of the CardCaption property in the
The Description property determines the text that will be displayed in the AutoPreview area for a row. This property will be read-only if its band's AutoPreviewField property is set to a valid field or column name.
The following sample code enables the row previews in the
C#:
private void ultraGrid1_InitializeLayout(object sender, Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs e)
{
// Enable the row previews.
//
this.ultraGrid1.DisplayLayout.Bands[0].AutoPreviewEnabled = true;
}
private void ultraGrid1_InitializeRow(object sender, Infragistics.Win.UltraWinGrid.InitializeRowEventArgs e)
{
Infragistics.Win.UltraWinGrid.UltraGridBand band;
band = this.ultraGrid1.DisplayLayout.Bands[0];
// Check for the row being from the same band.
//
if ( e.Row.Band == band )
{
// Create a custom description that we want shown in the row's
// row preview area.
//
System.Text.StringBuilder description = new System.Text.StringBuilder( );
description.Append( e.Row.GetCellText( band.Columns["ContactName"] ) );
description.Append( "\n" );
description.Append( e.Row.GetCellText( band.Columns["City"] ) );
description.Append( ", " );
description.Append( e.Row.GetCellText( band.Columns["Country"] ) );
// Set the row's Description to our custom description text.
//
e.Row.Description = description.ToString( );
}
}
If set to False, the row will be collapsed but child row expand/collapse information will not be discarded. An error occurs if this property is set to True and the Expandable property of the UltraGridBand object is False.
To expand or collapse all the rows of a grid or a specific row collection
use the RowsCollection's
To expand or collapse a row, use the row's
This property can be used to show expansion indicators for a row that has no children or hide them for a row that does.
The Expanded property can be used to indicate whether the expansion indicator appears expanded (minus) or collapsed (plus).
The BeforeRowExpanded and BeforeRowCollapsed events are generated when the user expands or collapses a row by clicking an expansion indicator.
This property can be used to indicate a specific row should not be resized, regardless of whether the RowSizing property enables the user to resize rows.
If this property is set to 1 (FixedHeightTrue) for a particular row, the user may still indirectly resize that row if the RowSizing property is set to 3, since the row's size may be affected by the sizing of another row.
This property only affects whether the user can resize a row. A row can be sized programmatically, regardless of the value of this property, by setting its Height property.
The RowSelectorAppearance property is used to specify the appearance of the row selectors. When you assign an Appearance object to the RowSelectorAppearance property, the properties of that object will be applied to the row selectors of all all rows in the band or the rid, depending on where the UltraGridOverride object is being used. You can use the RowSelectorAppearance property to examine or change any of the appearance-related properties that are currently assigned to the active cell, for example:
UltraWinGrid1.Override.RowSelectorAppearance.ForeColor = vbBlack
Because you may want the row selectors to look different at different levels of a hierarchical record set, RowSelectorAppearance is a property of the UltraGridOverride object. This makes it easy to specify different row selector appearances for each band by assigning each UltraGridBand object its own UltraGridOverride object. If a band does not have an override assigned to it, the control will use the override at the next higher level of the override hierarchy to determine the properties for that band. In other words, any band without an override will use its parent band's override, and the top-level band will use the grid's override. Therefore, if the top-level band does not have its override set, the row selectors will use the grid-level setting of RowSelectorAppearance.
To display row selectors set the
The PreviewAppearance property provides access to the Appearance object being used to control the preview area of the UltraGridRow object. The Appearance object has properties that control settings such as color, borders, font, transparency, etc. For more information on how to use properties that end in "Appearance", consult the topic for the Appearance property.
You can also use the RowPreviewAppearance property of the UltraGridOverride object to control the settings of the row preview area. To determine the settings for a given row, use the ResolvePreviewAppearance method.
Activated property returns true if this row is the active row. You
can get or set the active row using the UltraGrid's
The UltraGrid maintains selected rows, cells and columns in
NOTE: If you want to select a lot of rows at once then use the
The Override's
IsGroupByRow can be used to check if a row is a group-by row or a non-group-by row.
The AutoPreview area appears under a row and provides a way to display multiple lines of text associated with that row. You can specify how many lines of text should be displayed, and choose to either display the value from a cell in the row or a custom text string that you specify. One common use might be to display the contents of a memo field that initially appears off-screen when the grid is loaded.
The AutoPreviewEnabled property determines whether the AutoPreview area can be displayed for rows in the specified band. Once AutoPreview has been enabled, it can be displayed for any row by setting the UltraGridRow object's AutoPreviewHidden property to False.
The user interface for fixing/unfixing rows can be enabled/disabled band-wide or grid-wide
using the
You can enable user interface for fixing and unfixing rows using the
Setting Fixed property of the row to true has the effect of adding
the row to its parent row collection's FixedRows collection (
Note that fixed rows are not supported in child row collections. Setting this
property to true on a child row will not actually fix the row. It will however add the row to the
associated row collection's FixedRows collection (
Also note that when a fixed row is expanded any sibling fixed rows occuring after it will not be fixed. They will remain non-fixed until the expanded fixed row is collapsed. They will however remain in the FixedRows collection and keep their fixed row appearances.
Note that fixed rows are not supported in child row collections. Setting
Fixed property to true on a child row will not actually fix the row. It will however add
the row to the associated row collection's FixedRows collection (
Also note that when a fixed row is expanded any sibling fixed rows occuring after it will not be fixed. They will remain non-fixed until the expanded fixed row is collapsed. They will however remain in the FixedRows collection and keep their fixed row appearances.
To get the filter row associated with a row colleciton, use the RowsCollection's
To enable the filter row functionality, set the
To display row numbers in the row selectors set the Override's
To display row numbers in the row selectors set the Override's
Returns true if this row is an instance of
Specifies the tooltip to display when the user hovers the mouse over the header. No tooltip is displayed if this property is set to null or empty string.
The Row property of an object refers to a specific row in the grid as defined by an UltraGridRow object. You use the Row property to access the properties of a specified UltraGridRow object, or to return a reference to the UltraGridRow object that is associated with the current object.
An UltraGridRow object represents a single row in the grid that displays the data from a single record in the underlying data source. The UltraGridRow object is one mechanism used to manage the updating of data records either singly or in batches (the other is the UltraGridCell object). When the user is interacting with the grid, one UltraGridRow object is always the active row, and determines both the input focus of the grid and the position context of the data source to which the grid is bound.
Note that not all styles are available on all operating systems. If the version of the OS that your program is running on does not support a particular border style, borders formatted with that style will be drawn using solid lines.
This enum is used for specifying UltraGridColumn's
This enum is used for specifying the
The AllowAddNew enum is used for specifying the
Override's
AllowColMoving enum is used for specifying the Override's
AllowColSizing enum is used for specifying the Override's
AllowColSwapping enum is used for specifying the Override's
AllowGroupMoving enum is used for specifying the Override's
AllowRowSummaries enum is used for specifying the
Override's
CellClickAction enum is used for specifying the Override's
The ColScrollAction enum is used for specifying what kind of scroll action
should be performed when calling
This property is for convenience. It lets you set the edit style of a column to one of the
commonly used edit styles. This list does not include all the styles that are available. If a
style is not listed in this enum then you can use the
The ErrorType enum is used by the
The FilterLogicalOperator enum is used for specifying the
ColumnFilter's
The FixedHeaderIndicator enum is used for specifying Override's
The ShowBandLabels enum is used for specifying the
The SiblingRow enum is used for specifying parameter to various methods
like the
The SizingMode enum is used for specifying the
The SortIndicator enum is used for specifying the Column's
The UltraComboStyle enum is used for specifying the
UltraCombo's
The VisibleRelation enum is used for specifying which column to get
in when calling Column's
See Override's
When ForceExit is true, value set to Cancel property will be ignored.
This happens when grid is in certain situations where exitting the edit mode is required (like when grid is being disposed). If it's one of those situations, then this property will be true.
CancellingEditOperation is true when the user has canceled the editing the cell, for example by pressing the Escape key.
The contents of the filter drop down as a ValueList. You can add or remove items from this ValueList. When an item is added to the value list, it's DataValue will be used for comparision. DataValue can be a data value or it can be an instance of FilterCondition or ColumnFilter object. Setting the DataValue to a FilterCondition or ColumnFilter instance allows you to add items that have custom filter conditions.
There are two row filtering modes: SiblingRowsOnly and AllRowsInBand. When it's AllRowsInBand all the rows in a band are being filtered and thus there is no particular rows collection that's being filtered. As a result this property returns null. However if the row filter mode is SiblingRowsOnly where rows of a particular rows collection are being filtered, then this property will return that rows collection.
You can add items to this ValueList. When an item is added to the value list, it's DataValue will be used for comparision. DataValue can be a data value or it can be an instance of FilterCondition or ColumnFilter object. Setting the DataValue to a FilterCondition or ColumnFilter instance allows you to add items that have custom filter conditions.
If the value list is populated set Handled to true. Failing to do so will result in UltraGrid clearing the value list and populating it with the cell values.
The Type property value depends on whether change in the selection of cells (UltraGridCell), rows (UltraGridRow), group-by rows (UltraGridGroupByRow) or columns (ColumnHeader) took place.
To determine if this is a SpanX or SpanY, see the
This is not used when when
To determine if this is a SpanX or SpanY, see the
This is not used when when
During the process of performing multi-cell operations, a cell can have an error. For example,
when pasting values to cells, a cell might not accept the value being pasted to it because it's
the wrong data type, or it doesn't satisfy the column constraints. In that case the
If however the Error event is fired in response to an error that is not associated with a specific cell, then this property has no effect. For example, when pasting, if the number of cells available for pasting is smaller than the number of cells being pasted, then the Error event will be fired. However such an error is not associated with a specific cell, but rather it applies to the whole operation. In such a case this property won't be honored since the whole operations can't be performed. Note that in such a scenario, none of the cells will be modified.
Note: If you want to prevent the UltraGrid from displaying an error message, set the
Cancel to true on the ErrorEventArgs. Alternatively you can also set the
The default value of this property is ClearCellAndContinue except for read-only cells in which case the default value is Continue since the values of read-only cells can not be cleared.
See remarks section of
Depending on what type of error lead to firing of this event, all or all except one of DataErrorInfo, MaskErrorInfo and MultiCellOperationErrorInfo will be null. If the ErrorType is Generic, all of DataErrorInfo, MaskErroInfo and MultiCellOperationErrorInfo will be null. If error type is Data, then DataErrorInfo will contain a valid DataErrorInfo object. If it's a Mask error then MaskErrorInfo will return a valid MaskErroInfo object.
New values of cells. This has different meaning depending on which operation is being performed. When copy operation is being performed, this contains the text representation of the cell values. You can write custom logic to convert the cell values to text by getting the original cell value from the Cell object (from the Cells collection) and perform a custom conversion. When pasting, this contains the text representation of the cell value from the clipboard. You can convert the value to the cell’s data type using custom logic. After converting, set the new value back in this collection. When cutting, the new values are all DBNull. When performing Undo or Redo, the raw cell values are the values that are going to be set on the cells.
To traverse through the cell values, traverse through the
If StayInEditMode is true, then the cell won't exit the edit mode unless the ForceExit is true in which case the cell will exit the edit mode regardless.
If RaiseErrorEvent is true, then Error event will be fired. If this is false, then Error event will not be fired.
RestoreOriginalValue indicates whether to restore the original value in the cell.
This property has been deprecated. Just set the Cancel property to true to prevent the cell from performing AutoSizeEdit.
This property is read-only. You can set the margins in the
This property is read-only. You can set the margins in the
This property is read-only. You can set the margins in the
This property is read-only. You can set the margins in the
The UltraGridRow object represents a single row of data, and corresponds to a single record in the underlying recordset. Rows occupy a position in the data hierarchy of the UltraWinGrid between Cells and Bands. The UltraGridRow object is always the child of an UltraGridBand object, and its children are UltraGridCell objects.
Much of the data-binding functionality of the grid involves working with the UltraGridRow object. Whenever an UltraGridRow object is loaded by the grid, the InitializeRow event is fired.
UltraGridRow objects can influence the formatting of the cells they contain through the setting of the UltraGridRow's CellAppearance property. Rows can also be formatted independently of the cells they contain. Frequently, cells are drawn from the top of the row to the bottom and are aligned edge to edge so that they occupy the entire area of the row; the row itself is not visible because cells are always "above" the row in the grid's z-order. However it is possible to specify spacing between and around cells that lets the underlying UltraGridRow object show through. Only then will formatting applied directly to the UltraGridRow object be visible to the user.
Note that not all styles are available on all operating systems. If the version of the OS that your program is running on does not support a particular border style, borders formatted with that style will be drawn using solid lines.
The initialize filter operator value is controlled by the
Note that this emulates user selecting the value from the filter operator. When the new filter
operator gets applied depends on the
A FilterCondition object defines a single condition.
Multiple FilterCondition instances can be added to the
A FilterCondition object defines a single condition.
Multiple FilterCondition instances can be added to the
Note that not all styles are available on all operating systems. If the version of the OS that your program is running on does not support a particular border style, borders formatted with that style will be drawn using solid lines.
The Hidden property determines whether an object is visible. Hiding an object may have have effects that go beyond simply removing it from view. For example, hiding a band also hides all the rows in that band. Also, changing the Hidden property of an object affects all instances of that object. For example, a hidden column or row is hidden in all scrolling regions.
Note that not all styles are available on all operating systems. If the version of the OS that your program is running on does not support a particular border style, borders formatted with that style will be drawn using solid lines.
Note that not all styles are available on all operating systems. If the version of the OS that your program is running on does not support a particular border style, borders formatted with that style will be drawn using solid lines.
Note that not all styles are available on all operating systems. If the version of the OS that your program is running on does not support a particular border style, borders formatted with that style will be drawn using solid lines.
The Hidden property determines whether an object is visible. Hiding an object may have have effects that go beyond simply removing it from view. For example, hiding a band also hides all the rows in that band. Also, changing the Hidden property of an object affects all instances of that object. For example, a hidden column or row is hidden in all scrolling regions.
There may be instances where the Hidden property cannot be changed. For example, you cannot hide the currently active rowscrollregion or colscrollregion. If you attempt to set the Hidden property of the active rowscrollregion to True, an error will occur.
A Header object represents a column or group header that specifies information about the column or group, and can also serve as the interface for functionality such as moving, swapping or sorting the column or group. Group headers have the added functionality of serving to aggregate multiple columns under a single heading.
The Header property provides access to the header that is associated with an object. The Header property provides access to the header that is associated with an object. In some instances, the type of header may be ambiguous, such as when accessing the Header property of a UIElement object. You can use the Type property of the Header object returned by the Header property to determine whether the header belongs to a column or a group.
The CellAppearance property is used to specify the appearance of all the cells in a row. When you assign an Appearance object to the CellAppearance property, the properties of that object will be applied to all the cells belonging to the row. You can use the CellAppearance property to examine or change any of the appearance-related properties that are currently assigned to the cells, for example:
UltraWinGrid1.Override.CellAppearance.BackColor = vbYellow
You can override the CellAppearance setting for specific cells by setting the Appearance property of the UltraGridCell object directly. The cell will always use the values of its own Appearance object before it will use the values inherited from the Appearance object specified by the CellAppearance property of the row or band it occupies.
If any of the properties of the Appearance object specified for the CellAppearance property are set to default values, the properties from the Appearance object of the row containing the cell are used.
The Width property is used to determine the horizontal dimension of an object. It is generally expressed in the scale mode of the object's container, but can also be specified in pixels.
When proportional resizing is used for the UltraGridColumn and UltraGridGroup objects, the width of the column increases or decreases proportionally as the area occupied by the column changes size, due to the resizing of adjacent columns or of the grid itself.
Set
You can set various properties in the returned object to customize where the header associated with this group shows up.
By default all the groups are visible. Set
Set
There are two row-layout modes concerning column label positioning. Column labels can be displayed with the cells inside of each row or in a separate area. This any setting of this property is honored when the column labels are displayed with the cells however only the None and LabelOnly are honored when the labels are in separate area. By default, the column labels are not displayed with the cells.
When column labels are displayed with cells, they are repeated in every row while in the other mode, they are displayed in a separate area. In card-view, that separate area is the card-label area left of the rows and in non-card-view, it is the header area above the rows. In card-view, setting
If MinimumLabelSize property is set to a size with width greater then 0, then the bigger of the MinimumLabelSize width and PreferredLabelSize width will be used as the size of the label. The same applies to height as well.
Headers with the same OriginX and SpanX (vertically stacked) with different PreferredLabelSize settings will result in all such cells having the max of the widths when displayed. Likewise headers with the same OriginY and SpanY (horizontally aligned) with different PreferredCellSize settings will result in all such cells having the max of the heights when displayed.
If MinimumLabelSize property is set to a size with width greater then 0, then the bigger of the MinimumLabelSize width and PreferredLabelSize width will be used as the size of the label. The same applies to height as well.
If MinimumCellSize property is set to a size with width greater then 0, then the bigger of the MinimumCellSize width and PreferredCellSize width will be used as the size of the cell. The same applies to height as well.
If the Width of the PreferredCellSize is set to 0, then the value of
Cells with the same OriginX and SpanX (vertically stacked) with different PreferredCellSize settings will result in all such cells having the max of the widths when displayed. Likewise Cells with the same OriginY and SpanY (horizontally aligned) with different PreferredCellSize settings will result in all such cells having the max of the heights when displayed.
If MinimumCellSize property is set to a size with width greater then 0, then the bigger of the MinimumCellSize width and PreferredCellSize width will be used as the size of the cell. The same applies to height as well.
Setting this property will resize the column to the specified size. However note that row-layout constraints of other columns may prevent the column from actually realizing the specified size. In other words setting the property and then reading it may return a different value. Also note that setting this property on one column can modify the widths of the other columns if auto-fit columns functionality is enabled or row-layout constraints on other columns require it so. This method emulates resizing of the column via user interface (UI).
You can specify width or height component of the value as 0 in which case that component will not be resized.
Setting this property will resize the column header to the specified size. However note that row-layout constraints of other columns may prevent the column header from actually realizing the specified size. In other words setting the property and then reading it may return a different value. Also note that setting this property on one column can modify the widths of the other columns if auto-fit columns functionality is enabled or row-layout constraints on other columns require it so. This method emulates resizing of the column header via user interface (UI).
You can specify width or height component of the value as 0 in which case that component will not be resized.
OriginX specifies the horizontal cell coordinate in the row layout. If OriginX is set to
OriginY specifies the vertical cell coordinate in the row layout. If OriginY is set to
Number of cells this item will span in the the row-layout horizontally.
Number of cells this item will span in the row layout vertically.
Indicates whether the user is allowed to resize the cell associated with the column associated with this RowLayoutInfoColumn object.
Indicates whether the user is allowed to resize the cell associated with the column associated with this RowLayoutInfoColumn object.
Insets property sepcifies the insets or spacing around the cells.
Insets property sepcifies the insets or spacing around the cells.
OriginX and OriginY define where the layout item will be placed in the virtual grid of the row layout. OriginX specifies the location horizontally while specifies the location vertically. These locations are the coordinates of the cells in the virtual grid that the row layout represents.
The leftmost cell has OriginX of 0. The constant
The default value is
OriginX and OriginY define where the layout item will be placed in the virtual grid of the row-layout. OriginX specifies the location horizontally while specifies the location vertically. These locations are the coordinates of the cells in the virtual grid that the row-layout represents.
The topmost cell has OriginY of 0. The constant
The default value is
Fill indicates whether to resize the item to fill the extra spance if the layout item's display area is larger than its size,
OriginX and OriginY define where the layout item will be placed in the virtual grid of the grid-bag layout. OriginX specifies the location horizontally while specifies the location vertically. These locations are the coordinates of the headers in the virtual grid that the grid-bag layout represents.
The leftmost cell has OriginX of 0. The constant
The default value is
OriginX and OriginY define where the layout item will be placed in the virtual grid of the grid-bag layout. OriginX specifies the location horizontally while specifies the location vertically. These locations are the coordinates of the headers in the virtual grid that the grid-bag layout represents.
The topmost cell has OriginY of 0. The constant
The default value is
Specifies the number of headers this item will span horizontally. The constant
Specifies the number of headers this item will span vertically. The constant
Note Derived elements that plan to return an accessible object must override
the
This property returns a reference to a GroupByBox object that can be used to set properties of, and invoke methods on, a GroupBy box. You can use this reference to access any of the GroupBy box's properties or methods.
Use this method to retrieve the actual values that are being used to format the Band labels of the GroupByBox. This method returns a value for all Appearance properties, tracing up the Appearance hierarchy if necessary.
Use this method to retrieve the actual values that are being used to format the GroupBy buttons of the GroupByBox. This method returns a value for all Appearance properties or only for specified ones, tracing up the Appearance hierarchy if necessary. You can combine the bit flags for this method to specify which properties should be resolved.
Use this method to retrieve the actual values that are being used to format the GroupBy buttons of the GroupByBox. This method returns a value for all Appearance properties or only for specified ones, tracing up the Appearance hierarchy if necessary. You can combine the bit flags for this method to specify which properties should be resolved.
Use this method to retrieve the actual values that are being used to format the prompt of the GroupByBox. This method returns a value for all Appearance properties or only for specified ones, tracing up the Appearance hierarchy if necessary. You can combine the bit flags for this method to specify which properties should be resolved.
Use this method to retrieve the actual values that are being used to format the Band labels of the GroupByBox. This method returns a value for all Appearance properties or only for specified ones, tracing up the Appearance hierarchy if necessary. You can combine the bit flags for this method to specify which properties should be resolved.
You can assign an
You can assign an
This property specifies the display style of the GroupBy box. When set to 0 (GroupByBoxStyle.Full) the full GroupBy Box will be displayed, with the arrangement of the buttons corresponding to the group by columns and bands. When the 1 (AddNewBoxStyleCompact) setting is used, the GroupBy Box will be displayed using as little real estate as possible while still maintaining a visually acceptable appearance.
Note that not all styles are available on all operating systems. If the version of the OS that your program is running on does not support a particular border style, borders formatted with that style will be drawn using solid lines.
Note Derived elements that plan to return an accessible object must override
the
Note that not all styles are available on all operating systems. If the version of the OS that your program is running on does not support a particular border style, borders formatted with that style will be drawn using solid lines.
Note Derived elements that plan to return an accessible object must override
the
Note Derived elements that plan to return an accessible object must override
the
The GroupBy Row appears in a Band of the grid that has been placed in GroupBy mode and has had at least one field specified for grouping data. GroupBy Rows are similar to regular grid Rows except that they do not display data from multiple fields. Instead, they serve to visually separate rows of data according to the grouping to which they belong. A GroupBy Row displays only the data value from the filed or fields being used to group the data.
For example, if you have a Band that contains address data and you use GroupBy mode to group the data according to the value of the City field, You will see the a GroupBy Row appear for every city that appears in the data; the GroupBy Row displays just the name of each city. Following each GroupBy Row will be all the data records contain the same value for the City field as that displayed in the GroupBy Row.
GroupBy Rows can be expanded or collapsed to display or hide the rows corresponding to a particular value. The GroupBy Row also contains the user interface elements needed to expand and collapse rows. Programmatically, you can use this object to find out information about the state of the row grouping, such as whether the grouping can be expanded and how many rows are grouped under the GroupBy Row.
Use this method to determine the actual values that are being used to format the GroupByRow. This method initializes the specified AppearanceData structure with the actual values that will be used to display the object. You can combine the bit flags for this method to specify which properties should be resolved.
Invoke this method to return a reference to an object's UIElement. The reference can be used to set properties of, and invoke methods on, the UIElement object associated with an object. You can use this reference to access any of the UIElement's properties or methods.
The Type property can be used to determine what type of UIElement was returned. If no UIElement exists, meaning the object is not displayed, Nothing is returned.
The ParentUIElement property can be used to return a reference to a UIElement's parent UIElement object. The UIElements property can be used to return a reference to a collection of child UIElement objects for a UIElement.
The UIElementFromPoint method can be invoked to return a reference to an UIElement object residing at specific coordinates.
CanResolveUIElement method can be invoked to determine whether an object or one of its ancestors can be resolved as a specific type of UIElement.
The GetUIElement method does not take into account the presence of a pop-up edit window or the drop-down portion of a combo if these elements are present, and will never return a UIElement that corresponds to one of these elements. The GetUIElementPopup method can be invoked to return a reference to a popup window's UIElement.
IsGroupByRow can be used to check if a row is a group-by row or a non-group-by row.
This property is used to indicate whether the GroupBy Row should display an expansion indicator. Generally, an expansion indicator is present whenever there are one or more data rows associated with the GroupBy Row.
When a Band is in GroupBy mode, the data is grouped according to data fields, which correspond to columns in the grid. To create a grouping, the user can drag a column header into the Band's GroupByBox and the data will be grouped according to the values found in that column.
The Column property of the GroupByRow specifies which column is being used to create the grouping of the current GroupBy Row.
When a Band is in GroupBy mode, the Rows of the band are grouped together under GroupByRows, based on the values of specified fields (columns) in the Band. When the user drags a column header into the Band's GroupByBox (which specifies the field to use for grouping Rows) the Rows of the grid are grouped together under GroupByRows that represent the values found in the field being used for grouping.
Each GroupByRow will have one or more data rows that share the same grouping criteria. The Rows property of the GroupByRow returns a collection of all the data rows that appear under the GroupByRow.
The AutoPreview area appears under a row and provides a way to display multiple lines of text associated with that row. You can specify how many lines of text should be displayed, and choose to either display the value from a cell in the row or a custom text string that you specify. One common use might be to display the contents of a memo field that initially appears off-screen when the grid is loaded.
The Hidden property determines whether an object is visible. Hiding an object may have have effects that go beyond simply removing it from view. For example, hiding a band also hides all the rows in that band. Also, changing the Hidden property of an object affects all instances of that object. For example, a hidden column or row is hidden in all scrolling regions.
Note that not all styles are available on all operating systems. If the version of the OS that your program is running on does not support a particular border style, borders formatted with that style will be drawn using solid lines.
Note that not all styles are available on all operating systems. If the version of the OS that your program is running on does not support a particular border style, borders formatted with that style will be drawn using solid lines.
Note that not all styles are available on all operating systems. If the version of the OS that your program is running on does not support a particular border style, borders formatted with that style will be drawn using solid lines.
Note that not all styles are available on all operating systems. If the version of the OS that your program is running on does not support a particular border style, borders formatted with that style will be drawn using solid lines.
The Group property of an object refers to a specific group of columns in the grid as defined by a Group object. You use the Group property to access the properties of a specified Group object, or to return a reference to a Group object. A Group is a group of columns that appear together in the grid, and can be resized, moved or swapped together as a unit. Columns in the same group share a group header, and can be arranged into a multi-row layout within the group, with different columns occupying different vertical levels within a single row of data. Groups also help with the logical arrangement of columns within the grid.
The Height property is used to determine the vertical dimension of an object. It is generally expressed in the scale mode of the object's container, but can also be specified in pixels.
For a Header object, this property is read-only. In a particular band, each column header has the same height. This height is determined by taking the largest height that results from the resolution of each column's header's Appearance attributes and the band's ColHeaderLines property.
This property can be used to specify the ordinal positions of groups and columns.
For group headers, this property returns or sets the position of the group within that group's band. For column headers, this property returns or sets the position of the column within its group, if the column belongs to a group, or its band, if the column belongs to a band.
rows argument is the rows collection from the band that the summarySettings object is assigned to.
rows argument is the rows collection from the band that the summarySettings object is assigned to.
rows argument is the rows collection from the band that the summarySettings object is assigned to.
rows argument is the rows collection from the band that the summarySettings object is assigned to.
rows argument is the rows collection from the band that the summarySettings object is assigned to.
rows argument is the rows collection from the band that the summarySettings object is assigned to.
rows argument is the rows collection from the band that the summarySettings object is assigned to.
rows argument is the rows collection from the band that the summarySettings object is assigned to.
rows argument is the rows collection from the band that the summarySettings object is assigned to.
rows argument is the rows collection from the band that the summarySettings object is assigned to.
rows argument is the rows collection from the band that the summarySettings object is assigned to.
rows argument is the rows collection from the band that the summarySettings object is assigned to.
Note: The grid will not cache the editor returned from this method, so it is up to the implementor to use a caching mechanism, if applicable.
Note: It is the responsibility of the implementer to apply the filtering to the column.
The DisplayLayout property of an object is used to access the UltraGridLayout object that determines the settings of various properties related to the appearance and behavior of the object. The UltraGridLayout object provides a simple way to maintain multiple layouts for the grid and apply them as needed. You can also save grid layouts to disk, the registry or a storage stream and restore them later.
The UltraGridLayout object has properties such as Appearance and Override, so the UltraGridLayout object has sub-objects of these types, and their settings are included as part of the layout. However, the information that is actually persisted depends on how the settings of these properties were assigned. If the properties were set using the UltraGridLayout object's intrinsic objects, the property settings will be included as part of the layout. However, if a named object was assigned to the property from a collection,
the layout will only include the reference into the collection, not the actual settings of the named object. (For an overview of the difference between named and intrinsic objects, please see the
For example, if the Layout object's Appearance property is used to set values for the intrinsic Appearance object like this:
UltraGrid1.DisplayLayout.Appearance.ForeColor = vbBlue
Then the setting (in this case, ForeColor) will be included as part of the layout, and will be saved, loaded and applied along with the other layout data. However, suppose you apply the settings of a named object to the UltraGridLayout's Appearance property in this manner:
UltraWinGrid1.Appearances.Add "New1"
UltraWinGrid1.Appearances("New1").ForeColor = vbBlue
UltraWinGrid1.Layout.Appearance = UltraWinGrid1.Appearances("New1")
In this case, the ForeColor setting will not be persisted as part of the layout. Instead, the layout will include a reference to the "New1" Appearance object and use whatever setting is present in that object when the layout is applied.
By default, the layout includes a copy of the entire Appearances collection, so if the layout is saved and restored using the default settings, the object should always be present in the collection when it is referred to. However, it is possible to use the Load and Save methods of the UltraGridLayout object in such a way that the collection will not be re-created when the layout is applied. If this is the case, and the layout contains a reference to a nonexistent object, the default settings for that object's properties will be used.
The following sample code shows how to set some UltraGridLayout properties in the InitializeLayout event.
Private Sub UltraGrid1_InitializeLayout(ByVal sender As System.Object, ByVal e As Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs) Handles UltraGrid1.InitializeLayout
e.Layout.ViewStyle = Infragistics.Win.UltraWinGrid.ViewStyle.MultiBand
e.Layout.ViewStyleBand = Infragistics.Win.UltraWinGrid.ViewStyleBand.OutlookGroupBy
e.Layout.AutoFitStyle = AutoFitStyle.ResizeAllColumns
e.Layout.MaxRowScrollRegions = 3
e.Layout.CaptionAppearance.ForeColor = Color.Red
e.Layout.GroupByBox.BandLabelBorderStyle = Infragistics.Win.UIElementBorderStyle.Dotted
e.Layout.GroupByBox.ShowBandLabels = Infragistics.Win.UltraWinGrid.ShowBandLabels.IntermediateBandsOnly
e.Layout.Override.CellAppearance.BackColor = Color.White
e.Layout.Override.CellAppearance.BackColor2 = Color.Blue
e.Layout.Override.CellAppearance.BackGradientStyle = Infragistics.Win.GradientStyle.VerticalBump
e.Layout.AddNewBox.Hidden = False
e.Layout.AddNewBox.Style = Infragistics.Win.UltraWinGrid.AddNewBoxStyle.Compact
e.Layout.AddNewBox.ButtonStyle = Infragistics.Win.UIElementButtonStyle.PopupBorderless
e.Layout.AddNewBox.ButtonConnectorStyle = Infragistics.Win.UIElementBorderStyle.Dotted
End Sub
The DisplayLayout property of an object is used to access the UltraGridLayout object that determines the settings of various properties related to the appearance and behavior of the object. The UltraGridLayout object provides a simple way to maintain multiple layouts for the grid and apply them as needed. You can also save grid layouts to disk, the registry or a storage stream and restore them later.
The UltraGridLayout object has properties such as Appearance and Override, so the UltraGridLayout object has sub-objects of these types, and their settings are included as part of the layout. However, the information that is actually persisted depends on how the settings of these properties were assigned. If the properties were set using the UltraGridLayout object's intrinsic objects, the property settings will be included as part of the layout. However, if a named object was assigned to the property from a collection,
the layout will only include the reference into the collection, not the actual settings of the named object. (For an overview of the difference between named and intrinsic objects, please see the
For example, if the Layout object's Appearance property is used to set values for the intrinsic Appearance object like this:
UltraGrid1.DisplayLayout.Appearance.ForeColor = vbBlue
Then the setting (in this case, ForeColor) will be included as part of the layout, and will be saved, loaded and applied along with the other layout data. However, suppose you apply the settings of a named object to the UltraGridLayout's Appearance property in this manner:
UltraWinGrid1.Appearances.Add "New1"
UltraWinGrid1.Appearances("New1").ForeColor = vbBlue
UltraWinGrid1.Layout.Appearance = UltraWinGrid1.Appearances("New1")
In this case, the ForeColor setting will not be persisted as part of the layout. Instead, the layout will include a reference to the "New1" Appearance object and use whatever setting is present in that object when the layout is applied.
By default, the layout includes a copy of the entire Appearances collection, so if the layout is saved and restored using the default settings, the object should always be present in the collection when it is referred to. However, it is possible to use the Load and Save methods of the UltraGridLayout object in such a way that the collection will not be re-created when the layout is applied. If this is the case, and the layout contains a reference to a nonexistent object, the default settings for that object's properties will be used.
The following sample code shows how to set some UltraGridLayout properties in the InitializeLayout event.
Private Sub UltraGrid1_InitializeLayout(ByVal sender As System.Object, ByVal e As Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs) Handles UltraGrid1.InitializeLayout
e.Layout.ViewStyle = Infragistics.Win.UltraWinGrid.ViewStyle.MultiBand
e.Layout.ViewStyleBand = Infragistics.Win.UltraWinGrid.ViewStyleBand.OutlookGroupBy
e.Layout.AutoFitStyle = AutoFitStyle.ResizeAllColumns
e.Layout.MaxRowScrollRegions = 3
e.Layout.CaptionAppearance.ForeColor = Color.Red
e.Layout.GroupByBox.BandLabelBorderStyle = Infragistics.Win.UIElementBorderStyle.Dotted
e.Layout.GroupByBox.ShowBandLabels = Infragistics.Win.UltraWinGrid.ShowBandLabels.IntermediateBandsOnly
e.Layout.Override.CellAppearance.BackColor = Color.White
e.Layout.Override.CellAppearance.BackColor2 = Color.Blue
e.Layout.Override.CellAppearance.BackGradientStyle = Infragistics.Win.GradientStyle.VerticalBump
e.Layout.AddNewBox.Hidden = False
e.Layout.AddNewBox.Style = Infragistics.Win.UltraWinGrid.AddNewBoxStyle.Compact
e.Layout.AddNewBox.ButtonStyle = Infragistics.Win.UIElementButtonStyle.PopupBorderless
e.Layout.AddNewBox.ButtonConnectorStyle = Infragistics.Win.UIElementBorderStyle.Dotted
End Sub
You can use the InProgress property in your event code to determine whether the code is being executed by the object that fired the event. This property is also useful when you have multiple instances of a control, as it will always apply to a specific instance.
Invoke this method to return a reference to a copy of an object. This is different from setting a variable equal to an object, which does not make a new copy.
This method is also useful when you want to base one object on another. For example, if you wanted one Appearance object to be the same as another, with the exception of several properties, you could clone the existing Appearance object, make changes to the copy, and use it to change an object's appearance.
Invoke this method to return a reference to a copy of an object. This is different from setting a variable equal to an object, which does not make a new copy.
This method is also useful when you want to base one object on another. For example, if you wanted one Appearance object to be the same as another, with the exception of several properties, you could clone the existing Appearance object, make changes to the copy, and use it to change an object's appearance.
When specifying 256 (PropCatGeneral), the following property settings for the UltraGridLayout object are copied:
|
|
|
Multiple Layout categories can be copied by combining them using logical Or.
The UltraGridLayout object supports an additional way to copy from an Layout object, the CopyFrom method.
Invoke this method to copy some or all of an existing UltraGridLayout object's property settings to another UltraGridLayout object. This method does not create a new UltraGridLayout object - it merely copies settings from one object to another.
Invoke the Clone method to make a copy of the current UltraGridLayout object. Clone returns a reference to an UltraGridLayout object, whereas this method does not.
Multiple categories can be copied by combining them using logical Or.
When specifying 256 (PropCatGeneral), the following property settings for the UltraGridLayout object are copied:
|
|
|
Invoke this method to copy some or all of an existing UltraGridLayout object's property settings to another UltraGridLayout object. This method does not create a new UltraGridLayout object - it merely copies settings from one object to another.
Invoke the Clone method to make a copy of the current UltraGridLayout object. Clone returns a reference to an UltraGridLayout object, whereas this method does not.
Multiple categories can be copied by combining them using logical Or.
When specifying 256 (PropCatGeneral), the following property settings for the UltraGridLayout object are copied:
|
|
|
Invoking this method loads a layout, created by invoking the
The Clone and CopyFrom methods can be invoked to make a duplicate of a layout.
Invoking this method loads a layout, created by invoking the
The Clone and CopyFrom methods can be invoked to make a duplicate of a layout.
Invoking this method loads a layout, created by invoking the Save method, from a stream. The stream can be used to retrieve the Layout data from different sources, such as a file on disk, an Internet location or from memory.
When specifying 256 (PropCatGeneral), the following property settings for the UltraGridLayout object are loaded:
|
|
|
Multiple Layout categories can be copied by combining them using logical Or.
The Clone and CopyFrom methods can be invoked to make a duplicate of a layout.
Invoking this method loads a layout, created by invoking the
When specifying 256 (PropCatGeneral), the following property settings for the UltraGridLayout object are loaded:
|
|
|
Multiple Layout categories can be copied by combining them using logical Or.
The Clone and CopyFrom methods can be invoked to make a duplicate of a layout.
Invoking this method loads a layout, created by invoking the
The Clone and CopyFrom methods can be invoked to make a duplicate of a layout.
Invoking this method loads a layout, created by invoking the
When specifying 256 (PropCatGeneral), the following property settings for the UltraGridLayout object are loaded:
|
|
|
Multiple Layout categories can be copied by combining them using logical Or.
The Clone and CopyFrom methods can be invoked to make a duplicate of a layout.
Invoking this method loads a layout, created by invoking the
When specifying 256 (PropCatGeneral), the following property settings for the UltraGridLayout object are loaded:
|
|
|
Multiple Layout categories can be copied by combining them using logical Or.
The Clone and CopyFrom methods can be invoked to make a duplicate of a layout.
Invoking this method loads a Layout using another UltraGridLayout object as the source.
When specifying 256 (PropCatGeneral), the following property settings for the Layout object are loaded:
|
|
|
Multiple Layout categories can be copied by combining them using logical Or.
The Clone and CopyFrom methods can be invoked to make a duplicate of a layout.
Invoking this method saves a layout to a stream. The stream can be used to save the Layout data to different locations, such as a file on disk, an Internet location or to memory.
Invoke the Load method to restore the saved layout.
The Clone and CopyFrom methods can be invoked to make a duplicate of a layout.
Invoking this method saves a layout to a file.
Invoke the
The Clone and CopyFrom methods can be invoked to make a duplicate of a layout.
Invoking this method saves a layout to a stream. The stream can be used to save the Layout data to different locations, such as a file on disk, an Internet location or to memory.
Invoke the Load method to restore the saved layout.
When specifying 256 (PropCatGeneral), the following property settings for the UltraGridLayout object are saved:
|
|
|
Multiple Layout categories can be saved by combining them using logical Or.
The Clone and CopyFrom methods can be invoked to make a duplicate of a layout.
Invoking this method saves a layout to a file.
Invoke the
When specifying 256 (PropCatGeneral), the following property settings for the UltraGridLayout object are saved:
|
|
|
Multiple Layout categories can be saved by combining them using logical Or.
The Clone and CopyFrom methods can be invoked to make a duplicate of a layout.
Invoking this method saves a layout to a stream. The stream can be used to save the Layout data to different locations, such as a file on disk, an Internet location or to memory.
Invoke the
The Clone and CopyFrom methods can be invoked to make a duplicate of a layout.
Invoking this method saves a layout to a file.
Invoke the
The Clone and CopyFrom methods can be invoked to make a duplicate of a layout.
Invoking this method saves a layout to a stream. The stream can be used to save the Layout data to different locations, such as a file on disk, an Internet location or to memory.
Invoke the
When specifying 256 (PropCatGeneral), the following property settings for the UltraGridLayout object are saved:
|
|
|
Multiple Layout categories can be saved by combining them using logical Or.
The Clone and CopyFrom methods can be invoked to make a duplicate of a layout.
Invoking this method saves a layout to a file.
Invoke the
When specifying 256 (PropCatGeneral), the following property settings for the UltraGridLayout object are saved:
|
|
|
Multiple Layout categories can be saved by combining them using logical Or.
The Clone and CopyFrom methods can be invoked to make a duplicate of a layout.
Ultragrid does not evaluate the filter conditions on rows when data changes. This can be useful when the data has changed and you want the row filters conditions evaluated on the rows.
Do NOT call the Dispose method on the graphics object returned from this method.
Instead, each call to this method should be paired with a call to
During graphics caching calls to
Do NOT call the Dispose method on the graphics object returned from
During graphics caching calls to
Since you may want to apply different layouts for display and printing, this property indicates that this layout is being used for display purposes. Use
Since you may want to apply different layouts for display and printing, this property indicates that this layout is being used for printing purposes. Use
The ColScrollRegions collection contains the ColScrollRegion objects that represent all of the column scrolling regions that exist in the grid.
The RowScrollRegions collection contains the RowScrollRegion objects that represent all of the row scrolling regions that exist in the grid.
The Appearance property of an object is used to associate the object with an Appearance object that will determine its appearance. The Appearance object has properties that control settings such as color, borders, font, transparency, etc. For many objects, you do not set formatting properties directly. Instead, you set the properties of an Appearance object, which controls the formatting of the object it is attached to.
There are two ways of working with the Appearance property and assigning the attributes of an Appearance object to other objects. One way is to create a new Appearance object, adding it directly to the Appearances collection. (Both the Appearance object and the Appearances collection are parts of the control's persistable layout and are therefore located in the
UltraWinGrid1.DisplayLayout.Appearances.Add "New1"
UltraWinGrid1.DisplayLayout.Appearances("New1").BorderColor = vbBlue
UltraWinGrid1.DisplayLayout.Appearances("New1").ForeColor = vbRed
Creating the object in this way does not apply formatting to any visible part of the control. The object simply exists in the collection with its property values, waiting to be used. To actually use the object, you must assign it to the control's (or another object's) Appearance property:
UltraWinGrid1.DisplayLayout.Appearance = UltraWinGrid1.DisplayLayout.Appearances("New1")
In this case, only one Appearance object exists. The control's appearance is governed by the settings of the "New1" object in the collection. Any changes you make to the object in the collection will immediately be reflected in the control.
The second way of working with the Appearance property is to use it to set property values directly, such as:
UltraWinGrid1.DisplayLayout.Appearance.ForeColor = vbBlue
In this case, an Appearance object is automatically created by the control. This Appearance object is not a member of an Appearances collection and it does not have a name. It is specific to the object for which it was created; it is an "intrinsic" Appearance object. Changes to the properties of an intrinsic Appearance object are reflected only in the object to which it is attached.
Note that you can assign properties from a named Appearance object to an intrinsic Appearance object without creating a dependency relationship. For example, the following code...
UltraWinGrid1.DisplayLayout.Appearance.ForeColor = UltraWinGrid1.DisplayLayout.Appearances("New1").ForeColor
...does not establish a relationship between the foreground color of the intrinsic object and that of the named object. It is simply a one-time assignment of the named object's value to that of the intrinsic object. In this case, two Appearance objects exist - one in the collection and one attached to the control - and they operate independently of one another.
If you wish to assign all the properties of a named object to an intrinsic object at once without creating a dependency relationship, you can use the Clone method of the Appearance object to duplicate its settings and apply them. So if you wanted to apply all the property settings of the named Appearance object "New1" to the control's intrinsic Appearance object, but you did not want changes made to "New1" automatically reflected in the grid, you would use the following code:
UltraWinGrid1.DisplayLayout.Appearance = UltraWinGrid1.DisplayLayout.Appearances("New1").Clone
Note that the properties of an Appearance object can also operate in a hierarchical fashion. Certain properties can be set to a "use default" value, which indicates to the control that the property should take its setting from the object's parent. This functionality is enabled by default, so that unless you specify otherwise, child objects resemble their parents, and formatting set at higher levels of the grid hierarchy is inherited by objects lower in the hierarchy.
The Appearances collection is used to contain Appearance objects that you have created and added to the control as pre-defined formatting templates. It does not represent a collection of all the Appearance objects that exist in the control. The intrinsic Appearance objects that are stored by objects such as the UltraGridBand, UltraGridRow, UltraGridCell are not included in the grid's Appearances collection.
The CaptionAppearance property is used to specify the appearance of the grid's caption (the grid's caption is visible whenever the Caption property of the grid is set to a non-empty string). When you assign an Appearance object to the CaptionAppearance property, the properties of that object will be applied to the grid's caption. You can use the CaptionAppearance property to examine or change any of the appearance-related properties that are currently assigned to the caption, for example:
UltraWinGrid1.CaptionAppearance.ForeColor = vbBlue
The Bands collection contains all of the UltraGridBand objects in the grid. Each UltraGridBand object represents a single level of a hierarchical data set.
Because the UltraWinGrid was designed primarily to work with hierarchical data, hierarchical concepts are built into the control at many levels. One of the fundamental design attributes of the Grid is that the objects that make up the control exist in hierarchies, and are influenced by the other objects in a hierarchical fashion. Through the concept of inheritance, objects in the Grid can derive the settings of their properties from the settings of objects that exist above them in a given hierarchy.
Two of the main hierarchies you will encounter in the UltraWinGrid are the Appearance hierarchy and the Override hierarchy. The Appearance hierarchy provides a way for Grid objects to inherit the settings of the properties that affect the object's appearance, such as properties related to color, font and transparency. The Override hierarchy provides the inheritance framework for other properties of the grid that are not necessarily related to appearance. These two hierarchies are implemented through two objects: the Appearance object and the UltraGridOverride object. Both of these objects serve as "formatters" - they offer collections of properties that are applied to other objects in order to produce a desired appearance or behavior. For example, the UltraGridBand object has an Override sub-object. All of the UltraGridBand's properties that can inherit their values exist as properties of the UltraGridBand's UltraGridOverride object; they do not appear directly as properties of the UltraGridBand object itself.
You will encounter two types of UltraGridOverride objects. Intrinsic UltraGridOverride objects are built in to other objects. They contain the Override properties associated with that object. They do not appear in the control's Overrides collection. The other type of UltraGridOverride is the stand-alone object that you can create by invoking the Add method of the Overrides collection. The settings of a stand-alone UltraGridOverride's properties do not have any effect on the Grid until the stand-alone object is applied to one of the intrinsic UltraGridOverride objects. Stand-alone Overrides give you an easy way to create groups of attributes and apply them to objects as needed.
When you change the properties of an UltraGridOverride object, you are not required to specify a value for every property that object supports. Whether the UltraGridOverride object is a stand-alone object you are creating from scratch, or an intrinsic object that is already attached to some other object, you can set certain properties and ignore others. The properties you do not explicitly set are given a "use default" value that indicates there is no specific setting for that property.
Properties that are set to the "use default" value derive their settings from other objects by following an override hierarchy. In the override hierarchy, each object has a parent object from which it can inherit the actual numeric values to use in place of the "use default" values. The "use default" value should not be confused with the initial setting of the property, which is generally referred to as the default value. In many cases, the default setting of an object's property will be "use default"; this means that the property is initially set not to use a specific value. The "use default" value will be 0 for an enumerated property (usually indicated by a constant ending in the word "default," such as HeaderClickActionDefault) or -1 (0xFFFFFFFF) for a numeric setting, such as that used by size and position-related properties.
So for example, if the UltraGridOverride object of the top-level band has its HeaderClickAction property set to 0 (HeaderClickActionDefault), the control will use the setting of the grid's HeaderClickAction property for the band, because the grid is above the top-level band in the override hierarchy. The top-most level of the override hierarchy is the UltraWinGrid control itself. If any of the UltraWinGrid's UltraGridOverride object properties are set to their "use default" values, the control uses built-in values (the "factory presets") for those properties. For example, the factory preset of the HeaderClickAction property of the grid's UltraGridOverride object is the value that causes the column headers to be used for selecting columns: 1 (HeaderClickActionSelect). This is the value that will be used to determine how column headers in the grid will behave when the HeaderClickAction property of the grid's Override object is set to the "use default" value.
The ValueLists property is used to access the collection of ValueList objects associated with the UltraWinGrid. ValueList objects are used to provide the contents of the dropdown lists that are displayed in a cell when the column containing the cell has its Style property set to one of the dropdown list styles.
Each ValueList object in the collection can be accessed by using its Index or Key values. Using the Key value is preferable, because the order of an object within the collection (and therefore its Index value) may change as objects are added to and removed from the collection.
The GroupBy Box is an interface element that gives you a way to dynamically group row data for display. When the GroupBy Box is visible, you can drag column headers into it using the mouse. The data will then be grouped according to the field you have specified. The grid creates a series of GroupBy rows whihc serve to aggregate data that has a common field value. You can then expand or collapse the GroupBy row to display or hide the data for a particular value.
For example, suppose you have a band in the grid that displays address information, including a field for City. If you drag the header of the City column into the GroupBy box, the grid will display a GroupBy row for every city that occurs in the rows of the band. You can expand the GroupBy row for a particular city to see all the data that relates to that city (i.e. all the data that has the name of the chosen city specified in its City field.)
The GroupBy Box object supports properties that give you control over the look of the GroupBy Box interface element (including an Appearance property.)
When a grid is being used to display a flat recordset, the conventional approach for adding data has been to place an empty row at the bottom of the grid. New data is entered into this row and appended to the data source, then the row reserved for new data entry is cleared and moved down to appear below the newly added row. However, when working with a hierarchical recordset, this metaphor is no longer effective. Multiple bands of data are represented as distinct groups of rows, and which group of rows receives the new data is significant. Simply adding new data to the last row in a band will not position the new record correctly with respect to the band's parent recordset.
To effectively add new data to a hierarchical recordset, the UltraGrid implements an interface called the "AddNew Box." The AddNew Box displays one or more buttons that are used to trigger the addition of new data. The number of buttons corresponds to the number of hierarchical bands displayed. Each band has its own AddNew button, and connecting lines link the buttons, illustrating a hierarchical relationship that mirrors that of the data.
To use the AddNew Box, you first set focus to a row or cell in the band to which you want to add data. You should determine where in the hierarchy you want the record to appear, then select a record that corresponds to that location. You then click the AddNew button for the band you want to contain the new data, and an empty data entry row appears in the band a the point you selected. For example, if you have a Customers/Orders hierarchy and you wanted to add data for a new order, you would first locate the customer to whom the order belonged, select that customer's record (or one of that customer's existing order records) and click the AddNew button for the Orders band. A blank row would appear below any existing orders that were displayed for the customer.
The AddNewBox object contains properties that control the various attributes of the AddNew Box interface. For example, you can use the Hidden property of the AddNewBox object to selectively display or hide the interface, thus enabling or disabling the user's ability to add new data. You can also use this object to control the appearance of the AddNew buttons, and specify other formatting features. You can also chose between the standard and compact display styles for the AddNew Box. The compact style preserves screen space by compressing the display of the AddNew buttons and eliminating the display of a hierarchical structure.
Grid property returns the UltraGridBase instance this UltraGridLayout object is associated with. UltraGridLayout object keeps a reference back to the UltraGridBase instance it belongs to. For example, given ultraGrid1 of type UltraGrid, ultraGrid1 == ultraGrid1.DisplayLayout.Grid will always evaluate to true. The same applies to UltraCombo and UltraDropDown as well since they all derive from UltraGridBase class.
This is the vertical space between the last child row of parent record A, and the first child row of Parent Record B, where Parent record B is the next sibling record after parent record A.
The InterbandSpacing property determines the spacing between bands in a hierarchical record set. Specifically, it determines the vertical space between the last row of one band and the first row of that band's child band. The higher the value, the greater the space between bands and their children.
The MaxColScrollRegions property can be used to limit the number of column scrolling regions that may be present at one time in the UltraWinGrid. When the maximum number of regions has been created, no more may be added either through code or by using the user interface of the grid.
The default setting of this property is 10. The minimum setting for this property is 1.
The MaxRowScrollRegions property can be used to limit the number of row scrolling regions that may be present at one time in the UltraGrid. When the maximum number of regions has been created, no more may be added either through code or by using the user interface of the grid.
The default setting of this property is 10. The minimum setting for this property is 1.
The RowConnectorColor property determines the color of the lines used to connect rows and bands when hierarchical data is being displayed by the grid. In addition to specifying the color of these lines, you can also set their style using the RowConnectorStyle property.
The RowConnectorStyle property is used to determine the type of line that will be used to connect child bands to their parents. You can choose from several line styles. Note that not all styles are available on all operating systems. If the version of the OS that is running your program does not support a particular line style, row connector lines formatted with that style will be drawn using solid lines.
Note: This property has been obsoleted. Use
AutoFitColumns provides automatic resizing of the columns in a band to fit within the visible area of a grid. When set to True, the columns of the band will automatically resize themselves proportionallly so that all columns for the band are visible. If you have set up the grid so that it can be resized (for example, by automatically adjusting its size based on that of its container) the columns will resize themselves dynamically as the size of the grid changes.
Note that while you can apply this setting at run-time, resetting AutoFitColumns to False will not restore the columns to their previous widths. The internally stored column width is altered by setting this property; if you wish to restore column widths after changing the setting of AutoFitColumns you must write code to store and re-apply the widths.
For UltraDropDown and UltraCombo this feature auto-fits the columns to
Note that this is different from having the column resize itself to ensure that all the cell contents are fully visible. For that use
When AutoFitStyle is set to ResizeAllColumns, UltraGrid automatically resizes columns in a band to fit within the visible area of the grid.
When AutoFitStyle is set to ExtendLastColumn, UltraGrid automatically resizes the last column to fit within the visible area of the grid.
In Row-Layout mode if you enable this functionality and then disable it the widths of the columns will be restored to their previous settings. In non non-row-layout mode however this is not the case. In non-row-layout mode if you set the property to ResizeAllColumns and reset it back to None the UltraGrid will not restore the columns to their previous widths. The internally stored column width is altered by setting this property; if you wish to restore column widths after changing the setting of AutoFitStyle then you must write code to store and re-apply the widths.
For UltraDropDown and UltraCombo this feature auto-fits the columns to
Note that this is different from having the column resize itself to ensure that all the cell contents are fully visible. For that feature use the
When this property is set to 0 (TabNavigationNextCell) and a cell has focus, pressing TAB will give focus to the cell to the right, or the first cell in the row below the active row if the active cell is the rightmost cell in the row. If a row has focus, pressing TAB will give focus to the row below the active row, unless the active row is the last row in the control, in which case the next control in the form's tab order will receive focus.
When this property is set to 1 (TabNavigationNextControl) the control passes focus from itself to the next control in the tab order when the TAB key is pressed.
The 2 (TabNavigationNextControlOnLastCell) combines these two kinds of functionality. The TAB key will shift focus to the next control on the form only when the last cell in the grid has focus, otherwise it will move between cells. (Similarly, when the first cell in the grid has focus, pressing SHIFT+TAB will shift focus to the previous control on the form.)
Use the TabStop property of a cell or column to determine whether an individual cell or the cells in a column should receive focus when the user presses the TAB key.
Setting ScrollBounds to ScrollToFill will disallow the user from scrolling further down once the last row becomes visible. While setting it to ScrollToLastItem will allow the user to continue scrolling until last row is the only visible row in the row scroll region.
This is applied to both the splitbox for splitting the row scroll region as well as the splitter bar that gets shown between the split row scroll regions.
This is applied to both the splitbox for splitting the col scroll region as well as the splitter bar that gets shown between the split col scroll regions.
If the grid is bound to a valid data source, the grid checks the ViewStyle property and determines if the data source is supplying a hierarchical recordset or a flat recordset.
If the data source is supplying hierarchical data and the ViewStyle property is set to 1 (ViewStyleMultiBand) the grid displays a hierarchical recordset. Otherwise, the grid displays a flat, single-band recordset.
The ViewStyleBand property of the UltraWinGrid determines how bands will be arranged within the control. The arrangement of bands also depends on the type of recordset to which the control is bound - a flat (non-hierarchical) recordset will only appear in a single band, regardless of the setting of this property.
If the control is bound to a hierarchical recordset, you have a choice of styles for viewing the bands of hierarchical data. You can choose to view the data in a single band (in which case only the top-most level of the hierarchy will be shown). You can select a horizontal view, where bands are separated into columns that break the data up from left to right.
You can also choose a vertical view, where bands are separated into groups of rows, and indented in a manner similar to that of an outline or tree view.
In general, the vertical view style fits more data into a smaller area, while the horizontal view style makes the divisions between the levels of the hierarchy more apparent. Which view style you choose will depend on the requirements of your application.
FilterOperatorsValueList returns the value list that will be used for the
operator drop down list in the filter row as well as in the custom filter dialog.
Data values of value list items are
Use this property to force the grid to load upto only a certain number of bands. This can come in use where you have a recursive data relation where a table is related to itself and you only want the grid to drill down the band hierarchy only upto a certain level.
Default value for this property is 100 and range is 1-100 inclusive. Throws an ArgumentOutOfRange exception if set to a value below 1 or greater than 100.
Note: You must set the MaxBandDepth before binding the UltraGrid to a data source in order for this property to have any effect.
Use
Use
Fixed headers functionality lets you fix columns so they always remain in view even when the grid is scrolled horizontally.
After enabling the fixed headers functionality, you can fix a header by setting the
Use
Use
Use
Use
You can use ColumnScrollbarSmallChange property to change the small change of the scrollbar in the column scroll region. By default it is 30. Small change of the scrollbar specifies how much the it will scroll when the arrow is clicked.
Set LoadStyle to LoadOnDemand to load rows as needed instead of loading all rows at once. NOTE: Some operations, like sorting rows, will cause the all rows to be loaded regardless of the load style setting because they require access to all rows. For example if you have a summary that sums the values of a column then when the summary is calculated all the rows will be loaded.
Note: Due to the nature of UltraCombo and UltraDropDown, load-on-demand is not supported on these controls.
NewColumnLoadStyle property can be used specify how new columns are loaded when a data source is bound. If set to Hide any new columns and bands contained in the data source are hidden. With this feature you can define columns at design time and set a datasource at runtime that has more columns and bands and have them automatically hidden.
NewBandLoadStyle property can be used specify how new columns are loaded when a data source is bound. If set to Hide any new columns and bands contained in the data source are hidden. With this feature you can define columns at design time and set a datasource at runtime that has more columns and bands and have them automatically hidden.
This specifies that the column chooser user interface is enabled for this UltraGrid. The UltraGrid uses this as a hint to let the user hide columns by dragging and dropping them outside of the UltraGrid and also unhide an explicitly hidden group-by column by dragging and dropping it over the column headers.
The UltraGrid supports a built in user interface element that the user can use to
display the column chooser dialog from whithin the UltraGrid. You can enable this
ui element by setting the
You can also create custom column chooser dialog using the
This property is resolved to True if the UltraGrid determines that a column
chooser user interface is enabled. Column chooser is considered to be enabled if
the
EmptyRowSettings object contains the settings for empty rows.
Note: This property should only be enabled when the underlying DataSource does not have an efficient implementation of the IndexOf method, such as by performing a linear search. By enabling this property, all the items in the underlying DataSource will be accessed in order to provide a more efficient caching mechanism for when the grid receives a Reset notification.
By default, the grid will not print cards, it will always print in tabular view. By setting this property, you can specify that the grid should print the root band using in CardView if CardView is set to true on the band.
The SortedBands collection mirrors the
Note: If either this property or the
The border color will be resolved to
Note: If this property is set without the SelectionOverlayColor being set, the borders will surround the selected area. If either of these properties are set, however, any selected appearances (i.e. cell, row, column) that would normally apply to the cell are now ignored.
When you print a report using UltraWinGrid, you may find that the data from the grid does not easily fit onto a single sheet of paper. Although this is usually because there are too many rows to fit vertically, it is also possible that your data consists of too many columns to fit horizonatally. For this reason, the control must sometimes make a distinction between a single "logical" page and the "physical" page (or sheets of paper) that may be required to print it. Essentially, logical pages break only on row boundaries. If you print a report with enough columns to fill the widths of three sheets of paper, the first logical page will comprise three physical pages.
The FitWidthToPages property limits the number of physical pages that a report may span. The default value for this property is 0, which indicates that the report may span as many physical pages are required to print all of the columns. If you set this property to a non-zero value, the control will scale the output so that the columns in the report will fit onto the specified number of pages. Note that scaling is proportional; if the data is reduced in width to fit, it will also be reduced in height, resulting in smaller print and more rows on each page.
There are inconsistencies in the way certain printer drivers implement the printing APIs that UltraWinGrid uses to create its reports. In most instances, the control can detect the presence of these drivers and compensate automatically.
Some printer drivers handle the clipping of text regions inconsistently. Without compensation, reports printed using these drivers may have text that overlaps multiple cells, or letters may extend below the grid lines dividing headers from rows, or rows from rows. Text wrapping may also be affected.
Note that, while rows can automatically resize themselves vertically to accommodate larger font sizes, column and group headers cannot. If the text in a column or group header is being clipped, you may simply need to resize the header so that all the text is showing. However, under normal circumstances the header text should never extend past the borders of the header, either vertically or horizontally.
The ClippingOverride property gives you the ability to determine how UltraWinGrid will handle the detection and correction of printer driver clipping inconsistencies. The default setting, ClippingOverrideAuto, causes the control to automatically detect whether the current driver requires compensation, and apply it if it does. This setting should work in most cases, and should not be changed unless you absolutely have to.
The other settings of ClippingOverride give you manual control over whether clipping compensation is applied. Setting the property to ClippingOverrideYes will apply text clipping compensation even if the control determines the driver does not require it. A setting of ClippingOverrideNo will turn off compensation, even if the control determines that it is necessary.
You may find that you only need to apply correction to certain versions of a particular printer driver. You can use the properties of the PrintDocument object to determine which printer dirver is being used to print the report and what the version of that driver is.
Note An incorrect setting for the ClippingOverride property may produce unpredictable results when printing reports. You may see text overlapping the lines in the grid, text extending outside the cell that contains it, or you may see a gap between the edge of the printed text and the edge of the cell. If you experience problems such as these, first try setting ClippingOverride to its default setting. If you find these types of problems occurring when using the default value, try setting the property to one of the other values.
You should also note that problems of this nature may stem from problems completely external to UltraWinGrid and your application, such as insufficient printer memory. When attempting to troubleshoot printing problems, make sure your printer settings are correct and try using different driver settings (such as printing TrueType fonts as graphics or printing at a lower resolution) before changing the value of this property.
The border styles available for report headers are the same as those available for other types of UltraWinGrid objects, such as cells, rows and column headers. If you choose the default setting, the page header will be drawn without borders.
Note that not all styles are available on all operating systems. If the version of the OS that your program is running on does not support a particular border style, borders formatted with that style will be drawn using solid lines.
The border styles available for report footers are the same as those available for other types of UltraWinGrid objects, such as cells, rows and column headers. If you choose the default setting, the page footer will be drawn without borders.
Note that not all styles are available on all operating systems. If the version of the OS that your program is running on does not support a particular border style, borders formatted with that style will be drawn using solid lines.
The text you specify for the page footer will appear at the bottom of each physical page. If you want to make changes to the text of the footer, you can do so in the InitializeLogicalPrintPage event handler. This will change the footer for the logical page only. (See the
You can insert the page number in to the text of your page footer by using a substitution code. The code will be replaced with the physical page number of the page being printed. To insert the physical page number into the page footer, add the following substitution code to the text string you assign to the PageFooter property: <#>
You can choose to include the physical page number, the logical page number or some combination of the two on each page. To insert the physical page number on each page, simply include the substitution code in the text of your page footer. To insert the logical page number, you can intitalize a logical page counter variable in the IntializePrint event, then use the InitializeLogicalPrintPage event to increment the counter variable and change the text of the page footer to include the new logical page count value.
You can justify individual sections of the page footer by specifying a tab-delimited string for the PageFooter property. Text specified will be left-aligned until a tab character is encountered. Text following the first tab character that comes before the second tab character will be centered. Text following the second tab character will be right-aligned. For example, you could right align the entire page footer by beginning the text string with two tab characters.
Including a tab character in the footer text will override any alignments specified for the footer. If no tab characters are included in the text, the default alignment will be used (as determined by the settings of the Appearance object returned by PageFooterAppearance.)
The text you specify for the page header will appear at the top of each physical page. If you want to make changes to the text of the header, you can do so in the InitializeLogicalPrintPage event. This will change the header for the logical page only. (See the
You can insert the page number in to the text of your page header by using a substitution code. The code will be replaced with the physical page number of the page being printed. To insert the physical page number into the page header, add the following substitution code to the text string you assign to the PageHeader property: <#>
You can choose to include the physical page number, the logical page number or some combination of the two on each page. To insert the physical page number on each page, simply include the substitution code in the text of your page header. To insert the logical page number, you can intitalize a logical page counter variable in the IntializePrint event, then use the InitializeLogicalPrintPage event to increment the counter variable and change the text of the page header to include the new logical page count value.
You can justify individual sections of the page header by specifying a tab-delimited string for the PageHeader property. Text specified will be left-aligned until a tab character is encountered. Text following the first tab character that comes before the second tab character will be centered. Text following the second tab character will be right-aligned. For example, you could right align the entire page header by beginning the text string with two tab characters.
Including a tab character in the header text will override any alignments specified for the header. If no tab characters are included in the text, the default alignment will be used (as determined by the settings of the Appearance object returned by PageHeaderAppearance.)
The PageHeaderHeight property determines the amount of space reserved on each page of the report for the page header information. The default value for this property is -1, which causes the control to allocate space for the header based on the size of the text specified in the PageHeader property.
The PageFooterHeight property determines the amount of space reserved on each page of the report for the page header information. The default value for this property is -1, which causes the control to allocate space for the footer based on the size of the text specified in the PageFooter property.
The PageFooterAppearance property provides access to the Appearance object being used to control the formatting of the text that appears at the bottom of the printout. The Appearance object has properties that control settings such as color, font, etc. For more information on how to use properties that end in "Appearance", consult the topic for the Appearance property.
The PageHeaderAppearance property provides access to the Appearance object being used to control the formatting of the text that appears at the top of the printout. The Appearance object has properties that control settings such as color, font, etc. For more information on how to use properties that end in "Appearance", consult the topic for the Appearance property.
If you set this property, make sure you also set the IsValueDisplayText property based on whether the value you are setting is a display text or not. If IsValueDisplayText is set to true, then the editor data filter conversions (namely DisplayToEditor and then EditorToOwner) will be performed on the set value.
Please see the remarks of the
The Override object has properties which define the look and behavior of Bands in the grid.
The Override property exists both on the
In VB:
Me.UltraGrid1.DisplayLayout.Override.CellAppearance.BackColor = Color.Blue
Me.UltraGrid1.DisplayLayout.Bands(1).Override.CellAppearance.BackColor = Color.White
Me.UltraGrid1.DisplayLayout.Bands(1).Columns(0).CellAppearance.BackColor = Color.Red
In C#:
this.ultraGrid1.DisplayLayout.Override.CellAppearance.BackColor = Color.Blue;
this.ultraGrid1.DisplayLayout.Bands[1].Override.CellAppearance.BackColor = Color.White;
this.ultraGrid1.DisplayLayout.Bands[1].Columns[0].CellAppearance.BackColor = Color.Red;
In this case, the first line of code will affect all cells in the grid and set their BackColor to Blue. The second line set the BackColor of all cells in Band 1 to White. The third line sets all the cells of Column 0 in Band 1 to Red. In general, the smaller object will take precedence over a larger object. So since the column is the smallest (most limited) object, it's property settings take precedence over the Band Override. The band is smaller (more limited) that the DisplayLayout. So the Band Override settings take precedence over the DisplayLayout Override settings.
The ActiveRowAppearance property is used to specify the appearance of the active row (as determined by the ActiveRow property). When you assign an Appearance object to the ActiveRowAppearance property, the properties of that object will be applied to any row that becomes the active row. You can use the ActiveRowAppearance property to examine or change any of the appearance-related properties that are currently assigned to the active row, for example:
UltraWinGrid1.Override.ActiveRowAppearance.BackColor = vbBlue
Because you may want the active row to look different at different levels of a hierarchical record set, ActiveRowAppearance is a property of the UltraGridOverride object. This makes it easy to specify different active row appearances for each band by assigning each UltraGridBand object its own UltraGridOverride object. If a band does not have an override assigned to it, the control will use the override at the grid level to determine the properties for that band. In other words, any band without an override will use the grid's override, therefore the active row in that band will use the grid-level setting of ActiveRowAppearance.
The ActiveCellAppearance property is used to specify the appearance of the active cell (as determined by the ActiveCell property). When you assign an Appearance object to the ActiveCellAppearance property, the properties of that object will be applied to any cell that becomes the active cell. You can use the ActiveCellAppearance property to examine or change any of the appearance-related properties that are currently assigned to the active cell, for example:
UltraWinGrid1.Override.ActiveCellAppearance.BackColor = vbBlue
Because you may want the active cell to look different at different levels of a hierarchical record set, ActiveCellAppearance is a property of the UltraGridOverride object. This makes it easy to specify different active cell appearances for each band by assigning each UltraGridBand object its own UltraGridOverride object. If a band does not have an override assigned to it, the control will use the override at the next higher level of the override hierarchy to determine the properties for that band. In other words, any band without an override will use its parent band's override, and the top-level band will use the grid's override. Therefore, if the top-level band does not have its override set, the active cell will use the grid-level setting of ActiveCellAppearance.
The CellAppearance property is used to specify the appearance of all the cells in a band or the grid. When you assign an Appearance object to the CellAppearance property, the properties of that object will be applied to all the cells belonging to the object specified. You can use the CellAppearance property to examine or change any of the appearance-related properties that are currently assigned to the cells, for example:
UltraWinGrid1.Override.CellAppearance.BackColor = vbYellow
Because you may want the cells to look different at different levels of a hierarchical record set, CellAppearance is a property of the UltraGridOverride object. This makes it easy to specify different cell appearances for each band by assigning each UltraGridBand object its own UltraGridOverride object. If a band does not have an override assigned to it, the control will use the override at the next higher level of the override hierarchy to determine the properties for that band. In other words, any band without an override will use its parent band's override, and the top-level band will use the grid's override. Therefore, if the top-level band does not have its override set, the cells of that band will use the grid-level setting of CellAppearance.
You can override the CellAppearance setting for specific cells by setting the Appearance property of the UltraGridCell object directly. The cell will always use the values of its own Appearance object before it will use the values inherited from the Appearance object specified by the CellAppearance property of the band it occupies.
If any of the properties of the Appearance object specified for the CellAppearance property are set to default values, the properties from the Appearance object of the row containing the cell are used.
The EditCellAppearance property is used to specify the appearance of the cell that is in edit mode. (The ActiveCell property indicates which cell is currently active; a cell that is being edited is always the active cell. You can use the IsInEditMode property of the control to determine whether the cell is currently being edited.) When you assign an Appearance object to the EditCellAppearance property, the properties of that object will be applied to any cell that is in edit mode. You can use the EditCellAppearance property to examine or change any of the appearance-related properties that are currently assigned to the cell being edited, for example:
UltraWinGrid1.Override.EditCellAppearance.BackColor = vbRed
Because you may want the edit cell to look different at different levels of a hierarchical record set, EditCellAppearance is a property of the UltraGridOverride object. This makes it easy to specify different appearances for each band by assigning each UltraGridBand object its own UltraGridOverride object. If a band does not have an override assigned to it, the control will use the override at the next higher level of the override hierarchy to determine the properties for that band. In other words, any band without an override will use its parent band's override, and the top-level band will use the grid's override. Therefore, if the top-level band does not have its override set, the edit cell will use the grid-level setting of EditCellAppearance.
The HeaderAppearance property is used to specify the appearance of all the headers in a band or the grid. When you assign an Appearance object to the HeaderAppearance property, the properties of that object will be applied to all the column or group headers associated with the object that you specified. You can use the HeaderAppearance property to examine or change any of the appearance-related properties that are currently assigned to headers, for example:
UltraWinGrid1.Override.HeaderAppearance.BackColor = vbBlack
Because you may want the headers to look different at different levels of a hierarchical record set, HeaderAppearance is a property of the UltraGridOverride object. This makes it easy to specify different header appearances for each band by assigning each UltraGridBand object its own UltraGridOverride object. If a band does not have an override assigned to it, the control will use the override at the next higher level of the override hierarchy to determine the properties for that band. In other words, any band without an override will use its parent band's override, and the top-level band will use the grid's override. Therefore, if the top-level band does not have its override set, the headers of that band will use the grid-level setting of HeaderAppearance.
You can override the HeaderAppearance setting for specific headers by setting the Appearance property of the Header object directly. The header will always use the values of its own Appearance object before it will use the values inherited from the Appearance object specified by the HeaderAppearance property of the band it occupies.
The RowAlternateAppearance property is used in conjunction with the RowAppearance property to apply different formatting options to odd and even rows in the grid. Even-numbered rows will use the Appearance specified by the RowAlternateAppearance property. If you do not specify a value for RowAlternateAppearance, the Appearance specified by RowAlternateAppearance will apply to all the rows in the band or the grid.
When you assign an Appearance object to the RowAlternateAppearance property, the properties of that object will be applied to the even-numbered rows belonging to the object specified. You can use the RowAlternateAppearance property to examine or change any of the appearance-related properties that are currently assigned to the rows, for example:
UltraWinGrid1.Override.RowAppearance.ForeColor = vbRed
Because you may want the alternate rows to look different at different levels of a hierarchical record set, RowAlternateAppearance is a property of the UltraGridOverride object. This makes it easy to specify different alternate row appearances for each band by assigning each UltraGridBand object its own UltraGridOverride object. If a band does not have an override assigned to it, the control will use the override at the next higher level of the override hierarchy to determine the properties for that band. In other words, any band without an override will use its parent band's override, and the top-level band will use the grid's override. Therefore, if the top-level band does not have its override set, the alternate rows of that band will use the grid-level setting of RowAlternateAppearance.
You can override the RowAlternateAppearance setting for specific rows by setting the Appearance property of the UltraGridRow object directly. The row will always use the values of its own Appearance object before it will use the values inherited from the Appearance object specified by the RowAlternateAppearance property of the band it occupies.
The RowSelectorAppearance property is used to specify the appearance of the row selectors. When you assign an Appearance object to the RowSelectorAppearance property, the properties of that object will be applied to the row selectors of all all rows in the band or the rid, depending on where the UltraGridOverride object is being used. You can use the RowSelectorAppearance property to examine or change any of the appearance-related properties that are currently assigned to the active cell, for example:
UltraWinGrid1.Override.RowSelectorAppearance.ForeColor = vbBlack
Because you may want the row selectors to look different at different levels of a hierarchical record set, RowSelectorAppearance is a property of the UltraGridOverride object. This makes it easy to specify different row selector appearances for each band by assigning each UltraGridBand object its own UltraGridOverride object. If a band does not have an override assigned to it, the control will use the override at the next higher level of the override hierarchy to determine the properties for that band. In other words, any band without an override will use its parent band's override, and the top-level band will use the grid's override. Therefore, if the top-level band does not have its override set, the row selectors will use the grid-level setting of RowSelectorAppearance.
The RowSelectorHeaderAppearance property is used to specify the appearance of the row selector header. When you assign an Appearance object to the RowSelectorHeaderAppearance property, the properties of that object will be applied to the row selector header for the band or all bands in the grid, depending on where the UltraGridOverride object is being used. You can use the RowSelectorHeaderAppearance property to examine or change any of the appearance-related properties that are currently assigned to the active cell, for example:
UltraWinGrid1.Override.RowSelectorHeaderAppearance.ForeColor = vbBlack
Because you may want the row selector header to look different at different levels of a hierarchical record set, RowSelectorHeaderAppearance is a property of the UltraGridOverride object. This makes it easy to specify different row selector header appearances for each band by assigning each UltraGridBand object its own UltraGridOverride object. If a band does not have an override assigned to it, the control will use the override at the next higher level of the override hierarchy to determine the properties for that band. In other words, any band without an override will use its parent band's override, and the top-level band will use the grid's override. Therefore, if the top-level band does not have its override set, the row selector header will use the grid-level setting of RowSelectorHeaderAppearance.
The SelectedCellAppearance property is used to specify the appearance of any selected cells (you can determine which cells are selected by using the Cells property of the Selected object). When you assign an Appearance object to the SelectedCellAppearance property, the properties of that object will be applied to any cell that becomes selected. You can use the SelectedCellAppearance property to examine or change any of the appearance-related properties that are currently assigned to selected cells, for example:
UltraWinGrid1.Override.SelectedCellAppearance.BackColor = vbRed
Because you may want the selected cell(s) to look different at different levels of a hierarchical record set, SelectedCellAppearance is a property of the UltraGridOverride object. This makes it easy to specify different selected cell appearances for each band by assigning each UltraGridBand object its own UltraGridOverride object. If a band does not have an override assigned to it, the control will use the override at the next higher level of the override hierarchy to determine the properties for that band. In other words, any band without an override will use its parent band's override, and the top-level band will use the grid's override. Therefore, if the top-level band does not have its override set, the selected cell(s) will use the grid-level setting of SelectedCellAppearance.
The SelectedRowAppearance property is used to specify the appearance of any selected rows (you can determine which rows are selected by using the Rows property of the Selected object). When you assign an Appearance object to the SelectedRowAppearance property, the properties of that object will be applied to any row that becomes selected. You can use the SelectedRowAppearance property to examine or change any of the appearance-related properties that are currently assigned to selected rows, for example:
UltraWinGrid1.Override.SelectedRowAppearance.BackColor = vbYellow
Because you may want the selected row(s) to look different at different levels of a hierarchical record set, SelectedRowAppearance is a property of the UltraGridOverride object. This makes it easy to specify different selected row appearances for each band by assigning each UltraGridBand object its own UltraGridOverride object. If a band does not have an override assigned to it, the control will use the override at the next higher level of the override hierarchy to determine the properties for that band. In other words, any band without an override will use its parent band's override, and the top-level band will use the grid's override. Therefore, if the top-level band does not have its override set, the selected row(s) will use the grid-level setting of SelectedRowAppearance.
The RowAppearance property is used to specify the appearance of all the rows in a band or the grid. You can use this property in combination with RowAlternateAppearance to apply different formatting options to odd and even rows in the grid. Odd-numbered rows will use the Appearance specified by the RowAppearance property. If you do not specify a value for RowAlternateAppearance, the Appearance specified by RowAppearance will apply to all the rows in the band or the grid.
When you assign an Appearance object to the RowAppearance property, the properties of that object will be applied to all the applicable rows belonging to the object specified. You can use the RowAppearance property to examine or change any of the appearance-related properties that are currently assigned to the rows, for example:
UltraWinGrid1.Override.RowAppearance.ForeColor = vbYellow
Because you may want the rows to look different at different levels of a hierarchical record set, RowAppearance is a property of the UltraGridOverride object. This makes it easy to specify different row appearances for each band by assigning each UltraGridBand object its own UltraGridOverride object. If a band does not have an override assigned to it, the control will use the override at the next higher level of the override hierarchy to determine the properties for that band. In other words, any band without an override will use its parent band's override, and the top-level band will use the grid's override. Therefore, if the top-level band does not have its override set, the rows of that band will use the grid-level setting of RowAppearance.
You can override the RowAppearance setting for specific rows by setting the Appearance property of the UltraGridRow object directly. The row will always use the values of its own Appearance object before it will use the values inherited from the Appearance object specified by the RowAppearance property of the band it occupies.
The RowPreviewAppearance property provides access to the Appearance object being used to control the AutoPreview area of the rows in a band or the grid. The Appearance object has properties that control settings such as color, borders, font, transparency, etc. For more information on how to use properties that end in "Appearance", consult the topic for the Appearance property.
To determine the settings of the AutoPreview area for a given row, use the ResolvePreviewAppearance method of the UltraGridRow object.
The SummaryFooterAppearance property provides access to the Appearance object being used to control the summary footers in a band or the grid. The Appearance object has properties that control settings such as color, borders, font, transparency, etc. For more information on how to use properties that end in "Appearance", consult the topic for the Appearance property.
The SummaryFooterCaptionAppearance property provides access to the Appearance object being used to control the captions over summary footers in a band or the grid. The Appearance object has properties that control settings such as color, borders, font, transparency, etc. For more information on how to use properties that end in "Appearance", consult the topic for the Appearance property.
The SummaryValueAppearance property provides access to the Appearance object being used to control the summaries in summary footers for a band or the grid. The Appearance object has properties that control settings such as color, borders, font, transparency, etc. For more information on how to use properties that end in "Appearance", consult the topic for the Appearance property.
By default summary footers have captions. Use this property to hide them for a particular band by setting it on that band's
This property determines whether the user can add new rows to the data in the band or the grid controlled by the specified override. It also specifies the kind of user interface used for adding rows.
If using Yes, you must enable the AddNew box by setting the ultraGrid1.DisplayLayout.AddNewBox.Hidden to false. When the AddNew box is visible, this property also controls the appearance of the buttons in the AddNew box. If AllowAddNew is set to 2 (No) for a particular band, that band's button will be disabled in the AddNew box. This prevents the user from adding new data to the specified band.
TabRepeat provides for the rapid entry of new data.
This value makes it possible to enter multiple rows of data efficiently using
only the keyboard. When the user enters data in the last cell of the AddNew row,
pressing the Tab key will automatically add a new row and
position data input to the first cell of that row. TemplateOnBottom,
TemplateOnTopWithTabRepeat, FixedOnBottom and
FixedOnTop settings also facilitate rapid entry of new data using only
the keyboard. See
The AllowColMoving property determines how columns can be moved by the user in the band or the grid controlled by the specified override. Depending on the setting of AllowColMoving, users can move columns anywhere within the band, only within a group, or not at all. In order for the user to be able to move columns, column headers must be visible. If AllowColMoving is set to allow column moving within the band or the group, column headers become draggable, and are used to re-arrange the order of the columns via the mouse.
This property does not affect the ability of users to swap columns using the column swapping dropdown found in the column header (controlled by the AllowColSwapping property) or on the ability of the user to move groups within the grid (controlled by the AllowGroupMoving property).
The AllowColSizing property specifies how column resizing will be handled in the band or the grid controlled by the specified override. The AllowColSizing property determines not only whether columns can be resized, but how resizing columns within one band will affect the width of columns in other bands. By default, columns are aligned across multiple bands and the change in their widths is synchronized; when you resize one column, the others resize also. (You can change how columns align across bands by using the ColSpan property.) When AllowColSizing is set to 2 (AllowColSizingSync) a column resized in one band will resize all columns in other bands that occupy the same position. When AllowColSizing is set to 3 (AllowColSizingFree) the width of columns in the specified band can be changed independently of the widths of columns in other bands.
Due to the nature of Row-Layout functionality,
The AllowColSwapping property determines how columns can be swapped by the user in the band or the grid controlled by the specified override. Depending on the setting of AllowColSwapping, users can swap columns within the band, within a group, or not at all. In order for the user to be able to swap columns, column headers must be visible. If AllowColSwapping is set to allow column swapping within the band or the group, the column headers will display a dropdown interface that is used to select the column that will be swapped with the current one. The contents of the dropdown list are also affected by the setting of AllowColSwapping.
This property does not affect the ability of users to move columns using the column moving functionality of the column headers (controlled by the AllowColMoving property) or on the ability of the user to swap groups within the grid (controlled by the AllowGroupSwapping property).
This property determines whether the user can delete rows of data from the band or the grid controlled by the specified override. It does not control the deletion of data within individual cells (field-level deletion) only the removal of complete records from the data source (record-level deletion).
The AllowGroupMoving property determines whether groups can be moved by the user in the band or the grid controlled by the specified override. Depending on the setting of AllowGroupMoving, users can move groups anywhere within the band, or not at all. In order for the user to be able to move groups, group headers must be visible. If AllowGroupMoving is set to allow group moving, group headers become draggable, and are used to re-arrange the order of the groups via the mouse.
This property does not affect the ability of users to swap groups using the group swapping dropdown found in the group header (controlled by the AllowGroupSwapping property) or on the ability of the user to move columns within the grid (controlled by the AllowColMoving property).
The AllowGroupSwapping property determines whether groups can be swapped by the user in the band or the grid controlled by the specified override. Depending on the setting of AllowGroupSwapping, users can swap groups within the band, or not at all. In order for the user to be able to swap groups, group headers must be visible. If AllowGroupSwapping is set to allow group swapping, the group headers will display a dropdown interface that is used to select the group that will be swapped with the current one.
This property does not affect the ability of users to move groups using the group moving functionality of the group headers (controlled by the AllowGroupMoving property) or on the ability of the user to swap columns within the grid (controlled by the AllowColSwapping property).
When
This property determines determines whether row filtering is done at the band level or individual rows collection level. If this property is set to AllRowsInBand then when the user selects a filter criteria all row islands in that band are applied that filer. If the property is set to SiblingRowsOnly then the filter criteria is only applied to the current row island.
NOTE: This property affects how you specify filter criteria in code. If this property is set to AllRowsInBand then you must use UltraGridBand's ColumnFilters property (
This property determines whether the user is allowed to filter rows. This property does not dictate whether you can specify filter criteria in code.
You can specify filter criteria in code via
RowFilterAction specifies what action is taken on rows that are filtered out. AppearancesOnly keeps the rows that are filtered out visible. DisableFilteredOutRows keeps the filtered out rows visible however it disables them so the user can't modify their contents. HideFilteredOutRows hides the rows that are filtered out.
When there are active row filters, FilteredOutRowAppearance and FilteredOutCellAppearance are applied to filtered out rows and their cells and FilteredInRowAppearance and FilteredInCellAppearance are applied to filtered in rows and their cells.
When there are active row filters, FilteredOutRowAppearance applies to rows for which the filter conditions evaluate to false.
When there are active row filters, FilteredOutCellAppearance applies to cells of rows for which the filter conditions evaluate to false.
When there are active row filters, FilteredInRowAppearance applies to rows for which the filter conditions evaluate to true.
When there are active row filters, FilteredInCellAppearance applies to cells of rows for which the filter conditions evaluate to true.
AllowRowSummaries property determines whether the user will be allowed to add or remove row summaries. Enabling the row summaries will display a button in each column header that the user can use to summarize the column. By default the row summaries are disabled.
Note that this property controls whether the user interface for changing
the summaries is enabled. It does not control whether you can display summaries
or not. You can still display the summaries by adding them to the
The AllowUpdate property determines whether to permit changes to the data displayed in the band or the grid controlled by the specified override. All data entry functionality is disabled when AllowUpdate is set to False. Cells may be selected and placed in edit mode, but their contents cannot be edited. Users can still view data, select all or part of it and copy it to the clipboard. They can also re-arrange the layout of the grid by moving and resizing columns, groups, rows, etc.
This property is used to set the border appearance of a row in the band or the grid controlled by the specified override. You can choose from several line styles. Note that not all styles are available on all operating systems. If the version of the OS that is running your program does not support a particular line style, borders formatted with that style will be drawn using solid lines.
This property is used to set the border appearance of summary footers in the band or the grid controlled by the specified override. You can choose from several line styles. Note that not all styles are available on all operating systems. If the version of the OS that is running your program does not support a particular line style, borders formatted with that style will be drawn using solid lines.
This property is used to set the border appearance of summaries in summary footers for the band or the grid controlled by the specified override. You can choose from several line styles. Note that not all styles are available on all operating systems. If the version of the OS that is running your program does not support a particular line style, borders formatted with that style will be drawn using solid lines.
This property is used to set the border appearance of summary footer caption for the band or the grid controlled by the specified override. You can choose from several line styles. Note that not all styles are available on all operating systems. If the version of the OS that is running your program does not support a particular line style, borders formatted with that style will be drawn using solid lines.
This property is used to set the border appearance of cells in the band or the grid controlled by the specified override. You can choose from several line styles. Note that not all styles are available on all operating systems. If the version of the OS that is running your program does not support a particular line style, borders formatted with that style will be drawn using solid lines.
This property is used to set the border appearance of cards in the band or the grid controlled by the specified override. You can choose from several line styles. Note that not all styles are available on all operating systems. If the version of the OS that is running your program does not support a particular line style, borders formatted with that style will be drawn using solid lines.
This property is used to set the border appearance of a column or group header in the band or the grid controlled by the specified override. You can choose from several line styles. Note that not all styles are available on all operating systems. If the version of the OS that is running your program does not support a particular line style, borders formatted with that style will be drawn using solid lines.
The CellClickAction property specifies what will occur when the user navigates through the grid by clicking on cells in the band or the grid controlled by the specified override. You can choose whether cells that are clicked will put the cell into edit mode or select the cell or its row. Depending on your application, you may want to enable the user to edit any cell just by clicking on it, or you may want to require a separate action to trigger cell editing, such as double-clicking or a keystroke combination. Similarly, you can choose whether cells should be individually selectable, or if selecting the row is a sufficient response to clicking on a cell.
This property controls the display of multiple lines of text in edit cells in the band or the grid controlled by the specified override. When True, text will wrap in the area of the cell. If the RowSizing property is set to automatically resize the row, the row will expand in height until all lines of text are displayed (or the number of lines specified by the RowSizingAutoMaxLines property is reached).
The CellMultiLine property does not pertain to multi-line editing, only display. Also, you should note that setting a cell to multi-line mode will disable data masking. Only single-line cells can be masked (using the MaskInput and MaskDisplayMode properties.)
The CellPadding property determines the amount of space between the edges of a cell and the text of the cell in the band or the grid controlled by the specified override. It is similar to an internal margin for the cell. If you want to control the amount of space that surrounds the cell itself, use the CellSpacing property.
Setting CellPadding to a value of -1 will cause it to use the value from the next highest object in the override hierarchy.
The CellSpacing property determines the amount of empty space in a row that will surround each cell in the band or the grid controlled by the specified override. Spacing between cells allows the background of the underlying row to become visible, along with any color, transparency or background picture that was assigned to the UltraGridRow object. Cell spacing adds space equally on all sides of the cell - top, bottom, left and right.
Setting CellSpacing to a value of -1 will cause it to use the value from the next highest object in the override hierarchy.
This property does not have any effect on the inside of the cell. To control the cell's interior spacing, use the CellPadding property.
The CardSpacing property determines the amount of empty space
Setting CardSpacing to a value of -1 will cause it to use the value from the next highest object in the override hierarchy.
This property does not have any effect on the inside of the card. To control the card's interior spacing, use the CardSpacing property.
You can use this property to specify the width that columns will start with when the band or the grid controlled by the specified override is first displayed. Setting this property to 0 will cause the control to use the largest font size specified for the column to determine the column's width. Pictures are not taken into account by the control when calculating the default column width, so large pictures in cells may be clipped when they are displayed.
Setting DefaultColWidth to a value of -1 will cause it to use the value from the next highest object in the override hierarchy.
You can use this property to specify the height that rows will start with when the band or the grid controlled by the specified override is first displayed. Setting this property to 0 will cause the control to use the largest font size specified for the row to determine the row's height. Pictures are not taken into account by the control when calculating the default row height, so large pictures in cells may be clipped when they are displayed.
Setting DefaultRowHeight to a value of -1 will cause it to use the value from the next highest object in the override hierarchy.
This property can be used to show expansion indicators for a row that has no children or hide them for a row that does.
The Expanded property can be used to indicate whether the expansion indicator appears expanded (minus) or collapsed (plus).
The BeforeRowExpanded and BeforeRowCollapsed events are generated when the user expands or collapses a row by clicking an expansion indicator.
Setting HeaderClickAction to enable column sorting disables selection via group headers. Group headers cannot be used for sorting; the HeaderClickAction.SortSingle and HeaderClickAction.SortMulti settings only affect column headers.
When this property is set to HeaderClickAction.SortMulti, the user can use the SHIFT key in combination with the mouse to select multiple columns for sorting. The order in which columns are selected is significant, determining the order in which the data will be sorted.
The MaxSelectedCells property determines the maximum number of cells that can be selected at any one time in the band or the grid controlled by the specified override. This is an UltraGridOverride object property that can apply at either the grid level or the band level. When set at the band level, it determines how many cells may be simultaneously selected within the band. When applied at the grid level, it determines how many cells may be simultaneously selected in the entire control. The grid-level setting will override any band-level settings.
Setting MaxSelectedCells to 0 means there is no limit to the number of cells that may be selected simultaneously. Setting this property to a value of -1 will cause it to use the value from the next highest object in the override hierarchy.
This property operates independently of any column or row scrolling regions.
The MaxSelectedRows property determines the maximum number of rows that can be selected at any one time in the band or the grid controlled by the specified override. This is an UltraGridOverride object property that can apply at either the grid level or the band level. When set at the band level, it determines how many rows may be simultaneously selected within the band. When applied at the grid level, it determines how many rows may be simultaneously selected in the entire control. The grid-level setting will override any band-level settings.
Setting MaxSelectedRows to 0 means there is no limit to the number of rows that may be selected simultaneously. Setting this property to a value of -1 will cause it to use the value from the next highest object in the override hierarchy.
This property operates independently of any row scrolling regions.
Row selectors are the part of the grid interface that appears at the left edge of each row. Row selectors provide information about the rows (which row is currently active, which rows have uncommitted edits) and you can click on a row selector to select the entire row at once. You can choose to display record selectors or not, either for the whole grid or on a band-by-band basis. The RowSelectors property specifies whether row selectors will be displayed in the band or the grid controlled by the specified override.
The RowSizing property specifies whether the user can resize rows using the mouse in the band or the grid controlled by the specified override and, if they can, how that resizing is accomplished. The grid can also resize rows automatically, based on the amount of data present in the cells that make up the row. If one cell contains a large amount of text, the row can be resized to accommodate all the text, or a particular number of lines of text, provided the cell is capable of displaying multiple lines of text. The RowSizing property also determines whether rows are resized independently of one another, or whether their heights are synchronized.
When using one of the auto-sizing settings, the size of each row is determined by the number of lines of text required to display the contents of a cell. The cell in the row that displays the most lines of text determines the size of the entire row. The CellMultiLine property is used to specify whether the text in a cell will wrap to multiple lines. You can limit the number of lines used by setting the RowSizingAutoMaxLines property.
If row resizing is enabled (as determined by the RowSizing property) the user can resize rows using the mouse. Resizing is always accomplished by clicking on the bottom edge of the row and dragging the mouse. The RowSizingArea property specifies which part of the row responds to the mouse pointer to initiate resizing of the row. You can choose to have just the record selectors, just the borders of the data area, or both be active forrow resizing. When the mouse pointer passes over the active area of the row, the cursor changes to a resizing cursor.
When setting a value for this property, you may want to consider whether the record selectors will remain visible at all times as your application runs, or whether they can be scrolled out of view, and what effect this will have on the ability of users to resize rows. Also, you will need to determine if having the row borders in the data area active for row resizing will interfere with other mouse operations in the grid and distract the user.
You can use the RowSpacingBefore property to specify the space that precedes a row in the band or the grid controlled by the specified override. Space between rows allows the background area of the grid to show through, and can be useful when you have specified a picture or a texture for the background. To control the space that follows a row, use the RowSpacingAfter property.
You can use the RowSpacingAfter property to specify the space that follows a row in the band or the grid controlled by the specified override. Space between rows allows the background area of the grid to show through, and can be useful when you have specified a picture or a texture for the background. To control the space that precedes a row, use the RowSpacingBefore property.
You can use the RowSpacingBefore property to specify the space that precedes a row in the band or the grid controlled by the specified override. Space between rows allows the background area of the grid to show through, and can be useful when you have specified a picture or a texture for the background. To control the space that follows a row, use the RowSpacingAfter property.
You can use the RowSpacingAfter property to specify the space that follows a row in the band or the grid controlled by the specified override. Space between rows allows the background area of the grid to show through, and can be useful when you have specified a picture or a texture for the background. To control the space that precedes a row, use the RowSpacingBefore property.
You can use the RowSizing property to specify that the control should automatically adjust the height of rows to accommodate multiple lines of text in the band or the grid controlled by the specified override. If a row contains one or more cells with the CellMultiLine property set to display more than one line of text, the row can resize itself so that all the text in the cell(s) is visible. Depending on the setting of RowSizing, just the row containing a multiline cell may be resized, or all the rows in the band or grid may be resized to match the one containing the multiline cell.
The RowSizingAutoMaxLines property is used to limit amount of row resizing the control will use to accommodate multiline cells. If one or more rows are being resized to display multiple lines of text, their height will only be increased enough to display the number of lines of text specified by this property. Use this property when you have rows that are being automatically resized and you want to display memo or long text fields in a multiline cell, but do not want rows growing too tall and disrupting the overall layout of the grid.
This property is used to specify which selection type will be used for the cells in the band or the grid controlled by the specified override. You can choose to allow the user to have multiple cells selected, only one cell at a time selected, or to disallow the selection of cells.
You can use the SelectTypeCol and SelectTypeRow properties to specify the way in which columns and rows may be selected.
Because you may want to enable different types of selection at different levels of a hierarchical record set, SelectTypeCell is a property of the UltraGridOverride object. This makes it easy to specify different selection options for each band by assigning each UltraGridBand object its own UltraGridOverride object. If a band does not have an override assigned to it, the control will use the override at the next higher level of the override hierarchy to determine the properties for that band. In other words, any band without an override will use its parent band's setting for SelectTypeCell, and the top-level band will use the grid's setting.
This property is used to specify which selection type will be used for the columns in the band or the grid controlled by the specified override. You can choose to allow the user to have multiple columns selected, only one column at a time selected, or to disallow the selection of columns.
You can use the SelectTypeCell and SelectTypeRow properties to specify the way in which cells and rows may be selected.
Because you may want to enable different types of selection at different levels of a hierarchical record set, SelectTypeCol is a property of the UltraGridOverride object. This makes it easy to specify different selection options for each band by assigning each UltraGridBand object its own UltraGridOverride object. If a band does not have an override assigned to it, the control will use the override at the next higher level of the override hierarchy to determine the properties for that band. In other words, any band without an override will use its parent band's setting for SelectTypeCol, and the top-level band will use the grid's setting.
This property is used to specify which selection type will be used for the rows in the band or the grid controlled by the specified override. You can choose to allow the user to have multiple rows selected, only one row at a time selected, or to disallow the selection of rows.
You can use the SelectTypeCol and SelectTypeCell properties to specify the way in which columns and cells may be selected.
Because you may want to enable different types of selection at different levels of a hierarchical record set, SelectTypeRow is a property of the UltraGridOverride object. This makes it easy to specify different selection options for each band by assigning each UltraGridBand object its own UltraGridOverride object. If a band does not have an override assigned to it, the control will use the override at the next higher level of the override hierarchy to determine the properties for that band. In other words, any band without an override will use its parent band's setting for SelectTypeRow, and the top-level band will use the grid's setting.
This property determines whether the cells of the band or the grid controlled by the specified override will be capable of displaying pop-up tips. Cell tips display the contents of the cell, and generally only appear when the cell's area is not large enough to display all the data it contains, and the mouse has come to rest over the cell for a period of time.
This property determines whether the headers of the band or the grid controlled by this
override will be capable of displaying pop-up tool-tips. By default the header tips display
the caption of the header if the caption is not fully visible. You can use the
This property determines whether the lines connecting the rows of the band or the grid controlled by the specified override will be capable of displaying pop-up tips. When using hierarchical recordsets, often the parent record of a band will be out of view, above the top or below the bottom of the control. Row connector tips are a convenient way to discover which record is the parent of the data currently being displayed without having to scroll the control.
Row connector tips display data from a record that is attached to the connector line when the mouse has come to rest over the line for a period of time. The tip displays the name and value of one field in the record, as determined by the ScrollTipField property of the band in which the line is located.
When the mouse pointer passes over a connector line, it changes to a special connector line cursor that indicates the direction of the record whose data is being displayed in the pop-up tip. Normally, this cursor is an upward-pointing double arrow and the pop-up tip displays data from the previous record connected to line. But if the CTRL key on the keyboard is depressed, the mouse pointer changes to a downward-pointing double arrow and the pop-up tip displays data from the following record connected to line.
This property determines whether the scrollbar of the band or the grid controlled by the specified override will display pop-up tool-tips. By default when you drag the scrollbar thumb to scroll through a recordset, the data is not scrolled in the grid until you release the mouse button to reposition the thumb. When TipStyleScroll is set to display scroll tips, a pop-up tip will appear over the thumb indicating which record will appear at the top of the grid when the scrollbar is released. The ScrollTipField property is used to specify which field from the data record will be displayed in the pop-up tip.
NOTE:
Note: the replaceable mask items are:
[caption] replaced with the groupby column headers caption.
[value] replaced by the common cell value for this group by.
[count] - the number of visible child rows.
[count,x,y,z] - If count is 0 will substitute the x string, or if count is 1 will substitute the y string otherwise will substitute the z string.
The RowSelectorHeaderStyle determines the look and position of the area above the Row Selectors if Row Selectors are visible.
If the RowSelectorHeaderStyle is set to None there will be no visible element assigned to this area and the header of the first column will be aligned with the left edge of the column.
If the RowSelectorHeaderStyle is set to ExtendFirstColumn the header of the first column will extend to the left over the area above the Row Selectors.
If the RowSelectorHeaderStyle is set to SeparateElement a RowSelectorHeaderUIElement will be positioned above the Row Selectors and the header of the first column will be aligned with the left edge of the column.
The Default value is ExtendFirstColumn.
If the RowSelectorHeaderStyle is set to SeparateElement the
RowSelectorWidth property can be used to control the widths of the row selectors. Default value is 0 which means a reasonable default width will be used for row selectors.
You can use this property to change the border style of the row selectors. If this preoprty is set to Default, then
You can set
You can set
When set the None, the user is not allowed to auto resize a column. If set to VisibleRows, then the column is resized based on the data in the visible rows. If set to SiblingRowsOnly, then the column is autoresized based on data in all the sibling rows. If set to AllRowsInBand, then the column is auto resized based on data in all rows in the band.
Note that this property determines if and how columns are auto-resized when the user auto-resizes one through the user interface by double-clicking on the right edge of the column header. It does not affect how the
CellDisplayStyle specifies how the cells get rendered. You can use this property to speed up rendering of cells by setting it to FormattedText or PlainText. Default is resolved to FullEditorDisplay.
FormattedText draws the formatted cell value in the cells. PlainText draws the cell value converted to text withought applying any formatting. It simply calls ToString on the cell value and draws the resulting text in the cell.FullEditorDisplay embedds an embeddable ui element which draws the cell value as well as draws any edit elements like buttons. This is a bit more performance intensive than PlainText and FormattedText. The advantage of using FullEditorDisplay which is the default is that any edit elements that the editor may render in cells do not get rendered until the cell enters the edit mode.
FixedHeaderIndicator property specifies whether the user is allowed to fix or unfix headers.
NOTE: This property is ignored in Row-Layout mode as headers can't be fixed in Row-Layout mode.
TemplateAddRowSpacingBefore is set to default,
TemplateAddRowSpacingAfter is set to default,
This property is used to set the border appearance of template add-rows in the band or the grid controlled by the specified override. You can choose from several line styles. Note that not all styles are available on all operating systems. If the version of the OS that is running your program does not support a particular line style, borders formatted with that style will be drawn using solid lines.
MinRowHeight specifies the minimum row height. By default the row heights are restricted by the font size and any drop down buttons that the cell may have. You can use this property to prevent the UltraGrid from imposing such a limit so you can programmatically set the row height to a smaller value than what UltraGrid calculates the minimum row height to be. UltraGrid will use this as the minimum row height. Setting this property to 0 will throw an exception since minimum row height has to be at least 1.
You can use ShowInkButton property to explicitly turn on or turn off inck buttons.
You can use ShowCalculatingText property to explicitly turn on or turn off the display of the text during calculations.
The FormulaErrorAppearance property is used to specify the appearance of the cells with formula errors.
FormulaRowIndexSource specifies which rows to use for calculations, all rows or just the visible rows. It also specifies which index to use in relative refereneces. ListIndex and Index specify that all rows should be used in calculations. VisibleIndex specifies that only the visible rows should be used for calculations. The summaries will be based on either all rows or just the visible ones depending on this property setting. Also if a column has a formula containing relative reference (like [column1(-1)] which references the column1 cell in the previous row), this property specifies whether to use list index, row index or the visible index for finding the relative cell. List index is the index of the data row in the underlying data list. It corrensponds to the
If column resizing is enabled (as determined by the
Specifies whether to make use of IDataErrorInfo interface implemented on the underlying row objects to display error info in rows and cells.
The DataErrorRowAppearance will only be applied if
This property is used to set the border appearance of cells in filter row. You can choose from several line styles. Note that not all styles are available on all operating systems. If the version of the OS that is running your program does not support a particular line style, borders formatted with that style will be drawn using solid lines.
This property is used to set the border appearance of operator ui elements in filter row. You can choose from several line styles. Note that not all styles are available on all operating systems. If the version of the OS that is running your program does not support a particular line style, borders formatted with that style will be drawn using solid lines.
This property is used to set the border appearance of filter rows. You can choose from several line styles. Note that not all styles are available on all operating systems. If the version of the OS that is running your program does not support a particular line style, borders formatted with that style will be drawn using solid lines.
This property is used to set the border appearance of filter rows. You can choose from several line styles. Note that not all styles are available on all operating systems. If the version of the OS that is running your program does not support a particular line style, borders formatted with that style will be drawn using solid lines.
Specifies if and where clear filter buttons are displayed in the filter rows. Options are to display in the filter row selecotor, filter cells or both. A filter clear button is used to clear the filter in the cell or the entire row.
You can control the visibility of the filter clear button on an individual column by setting the
By default the UltraGrid performs filtering using case-sensitive string comparison. You can set the FilterComparisonType property to CaseSensitive to perform filtering using case sensitve string comparisons.
You can set this property to change the default behavior of when the UltraGrid applies the filter that the user types into the cells of a filter row. Default behavior is to apply as soon as the user changes the value of a filter cell.
Specifies the style of operand input in the filter row cells. Default will be resolved to Combo. This can be overridden on each column using the
Filter rows by default display user interface for selecting filter operators in addition to the filter operands.
Filter rows by default display user interface for selecting filter operators in addition to the filter operands. FilterOperatorLocation property can be used to hide this user interface so the user can't change the filter operator. You can specify what items are available in the filter operators drop down list using the
Filter rows by default display user interface for selecting filter operators in addition to the filter operands.
FilterOperatorDropDownItems property can be used to specify which operators to include in the operator drop down list.
Specifies the prompt text to display in the filter row. Once the filter row is activated the prompt disappears (and reappears when it’s deactivated). The text will span multiple cells.
You can use the FilterRowSpacingAfter property to specify the space that follows a filter row in the band or the grid controlled by the specified override. The space allows the background area of the grid to show through, and can be useful when you have specified a picture or a texture for the background. To control the space that precedes a filter row, use the
You can use the FilterRowSpacingBefore property to specify the space that follows a filter row in the band or the grid controlled by the specified override. The space allows the background area of the grid to show through, and can be useful when you have specified a picture or a texture for the background. To control the space that precedes a filter row, use the
Specifies the type of user interface for filtering rows. Options are to display filter icons in headers or to display a filter row.
Specifies if and how the user is allowed to fix rows. Setting this to Button shows state buttons in the row selectors for fixing and unfixing rows. Also the default row selector width is increased to accommodate the buttons. Setting this to None shows no indicator. Default is resolved to None.
Note that fixed rows are not supported in child row collections. Setting this property on a child row will not have any effect. Also note that fixed rows are not supported in card-view.
Also note that when a fixed row is expanded, any sibling fixed rows occuring after it will not be fixed. They will remain non-fixed until the expanded fixed row is collapsed. They will however remain in the FixedRows collection and keep their fixed row appearances.
You can limit the number of rows that can be fixed at a time in a row collection using the FixedRowsLimit property. Default value of FixedRowsLimit property is -1 which is resolved to 0. 0 specifies that there is no limit to the number of rows that can be fixed. When it’s set to a number greater than 0, the number of fixed rows is restricted to that number. Note that the limit applies to individual row collections. Importantly the a RowsCollection's FixedRowsCollection never contains more than this many rows. Adding more rows to it removes the earliest added rows, ensuring that it contains no more than the limit. Also if the FixedRowsLimit setting is changed, all the affected FixedRowsCollection instances adjust themselves to ensure they contain no more than the limit by removing the earliest added rows. The process of fixing rows via the user interface works sligltly differently. When the row collection has reached it’s fixed rows limit the user interface for fixing rows is disabled. The row selectors stop displaying the fixed row indicator buttons of the non-fixed rows and thus the user can not fix any more rows.
You can enable or disable user interface for fixing and unfixing rows by setting the
FixedRowSortOrder specifies whether the UltraGrid sorts the fixed rows. If set to Sorted then the fixed rows will be sorted according to the same sort criteria as non-fixed rows. If set to FixOrder then the fixed rows remain in the order they are added to the fixed rows collection. The RefreshSort method of the FixedRowsCollection can be called to explicitly sort the fixed rows this mode. Default is resolved to Sorted.
Specifies whether the fixed rows are display at the top or the bottom of the row collection.
You can use the row collection's
Node that the fixed rows are not supported in certain view styles. Please see
Specifies how summaries in group-by rows are displayed.
A special row separator is a horizontal ui element that separates filter row, fixed add-row, summary row and fixed rows from each other. This ui element is 6 pixels high by default however the height can be controlled by setting the
Default is resolved to TemplateAddRow if the
A special row separator is a horizontal ui element that separates filter row, fixed add-row, summary row and fixed rows from each other. This ui element is 6 pixels high by default however the height can be controlled by setting the SpecialRowSeparatorHeight property. You can hide the special row separator elements by setting the
Specifies if and which area(s) the summaries will be displayed. This property is exposed off the
You can use the SummaryFooterSpacingAfter property to specify the space that follows a summary footer in the band or the grid controlled by the specified override. The space allows the background area of the grid to show through, and can be useful when you have specified a picture or a texture for the background. To control the space that precedes a summary footer, use the
You can use the SummaryFooterSpacingBefore property to specify the space that precedes a summary footer in the band or the grid controlled by the specified override.
Specifies the prompt text to display in the add row. Once the add row is activated the prompt disappears (and reappears when it’s deactivated). The text will span multiple cells unless
You can use the
A special row separator is a horizontal ui element that separates filter row, fixed add-row, summary row and fixed rows from each other. This ui element is 6 pixels high by default however the height can be controlled by setting the
The row numbers are 1 based. In other words the numbers displayed in the row selectors are not the actual index values but one plus the index value.
You can use the RowSelectorNumberStyle property to display
row numbers in the row selectors. If this property is set to a value for displaying
row numbers then the default widths of the row selectors is automatically enlarged
to accomodate row numbers. You can explicitly specify the width of the row selectors
using
This property determines whether the user can click and drag a column header to reposition it at run-time in a RowLayout.
The Default setting for this property will resolve based on the AllowColMoving property.
Columns without visible headers cannot be repositioned in this way and only a single column can be dragged at a time. If multiple columns are selected, no drag will occur.
This property applies to the UltraGrid only. It is not support for UltraCombo or UltraDropDown.
This property determines whether the user can ctrl+click and drag a cell to change it's span at run-time.
Span resizing changes the SpanX or SpanY of the cell and may also change the LabelSpan.
This property applies to the UltraGrid only. It is not supported for UltraCombo or UltraDropDown.
This property determines whether the user can ctrl+click and drag a label to change it's span at run-time.
Span resizing changes the SpanX or SpanY of the cell and may also change the LabelSpan.
This property applies to the UltraGrid only. It is not supported for UltraCombo or UltraDropDown.
By default the UltraGrid repeats headers whenever there is a break in the band. In other words a visible row displays column headers if the previous visible row is from a different band. For example in a multi band hiearchy if you expand a row, it's sibling row from the same band also displays headers. This repeating of headers can lead to waste of screen space. This feature lets you specify different header placement styles that minimize and even eliminate repeating of the column headers.
Note that this property has no effect when the
Also note that header placement will take effect when printing however it will not have any effect when exporting to excel.
InvalidValueBehavior property is used to specify what actions are taken
by the UltraGrid when the user attempts to leave a cell after entering an invalid
value. This property provides the default values for the properties on
AllowMultiCellOperations specifies if and which multi-cell operation the user
is allowed to perform. See
To perform any of these operations in code, use the control's PerformAction method.
MultiCellSelectionMode property specifies how multiple cells are range selected.
Note: The Errors and NonErrors options will only be shown in the list if the
Note: If the row selectors are being drawn with themes, such as if the
Note: If the column headers are being drawn with themes, such as if the
This property determines whether the grid will look for the
Note that not all styles are available on all operating systems. If the version of the OS that your program is running on does not support a particular border style, borders formatted with that style will be drawn using solid lines.
Note that not all styles are available on all operating systems. If the version of the OS that your program is running on does not support a particular border style, borders formatted with that style will be drawn using solid lines.
The Row property of an object refers to a specific row in the grid as defined by an UltraGridRow object. You use the Row property to access the properties of a specified UltraGridRow object, or to return a reference to the UltraGridRow object that is associated with the current object.
An UltraGridRow object represents a single row in the grid that displays the data from a single record in the underlying data source. The UltraGridRow object is one mechanism used to manage the updating of data records either singly or in batches (the other is the UltraGridCell object). When the user is interacting with the grid, one UltraGridRow object is always the active row, and determines both the input focus of the grid and the position context of the data source to which the grid is bound.
Note that not all styles are available on all operating systems. If the version of the OS that your program is running on does not support a particular border style, borders formatted with that style will be drawn using solid lines.
The Zoom property specifies the level of zoom that will be in effect when the Print Preview dialog is first displayed. Once the print preview is displayed, the user can change the zoom level by using the controls available in the dialog.
A value of 1.0 dispalys a full-size apge (100%). The default value is -1, which automatically sizes the page so that the full page is visible in the dialog.
Note that not all styles are available on all operating systems. If the version of the OS that your program is running on does not support a particular border style, borders formatted with that style will be drawn using solid lines.
The Row property of an object refers to a specific row in the grid as defined by an UltraGridRow object. You use the Row property to access the properties of a specified UltraGridRow object, or to return a reference to the UltraGridRow object that is associated with the current object.
An UltraGridRow object represents a single row in the grid that displays the data from a single record in the underlying data source. The UltraGridRow object is one mechanism used to manage the updating of data records either singly or in batches (the other is the UltraGridCell object). When the user is interacting with the grid, one UltraGridRow object is always the active row, and determines both the input focus of the grid and the position context of the data source to which the grid is bound.
This property returns a reference to a ColScrollRegion object that can be used to set properties of, and invoke methods on, the column scrolling region to which the UIElement belongs. You can use this reference to access any of the returned column scrolling region's properties or methods.
If the UIElement does not belong to a column scrolling region, Nothing is returned.
The RowScrollRegion property can be used to return a reference to an RowScrollRegion object to which a UIElement belongs.
This property returns a reference to an RowScrollRegion object that can be used to set properties of, and invoke methods on, the row scrolling region to which the UIElement belongs. You can use this reference to access any of the returned row scrolling region's properties or methods.
If the UIElement does not belong to a row scrolling region, Nothing is returned.
The ColScrollRegion property can be used to return a reference to an ColScrollRegion object to which a UIElement belongs.
The Key property is a unique, user-defined object identification string that can be used interchangeably with the Index of an object when accessing it through code. If you attempt to assign a value to the Key property is not unique in the collection, an error will occur.
The value of the Index property of an object can change when objects in the collection are reordered, such as when you add or remove objects. If you expect the Index property to change dynamically, refer to objects in a collection using the Key property. In addition, you can use the Key property to make your program "self-documenting" by assigning meaningful names to the objects in a collection.
You can set the Key property when you use the Add method to add an object to a collection. In some instances, the Key property of an object may be blank if that object does not appear in a collection.
Also, note that the uniqueness of keys is only enforced when the Key property is set to a value. If a collection supports objects with blank keys, that collection may contain multiple objects that whose Key property is empty. In that case, you must use Index property to differentiate between the objects that have blank keys.
Label position indicates where to position the column label in relation to the associated cell in row layout mode.
Generally, painting a control is handled automatically while no events are occurring. However, there may be situations where you want the form or control updated immediately, for example, after some external event has caused a change to the form. In such a case, you would use the Refresh method.
The Refresh method can also be used to ensure that the user is viewing the latest copy of the data from the record source.
Use the overload of Refresh method that takes in recursive parameter to recursively perform this operation on descendant rows as well.
Generally, painting a control is handled automatically while no events are occurring. However, there may be situations where you want the form or control updated immediately, for example, after some external event has caused a change to the form. In such a case, you would use the Refresh method.
The Refresh method can also be used to ensure that the user is viewing the latest copy of the data from the record source.
Generally, painting a control is handled automatically while no events are occurring. However, there may be situations where you want the form or control updated immediately, for example, after some external event has caused a change to the form. In such a case, you would use the Refresh method.
The Refresh method can also be used to ensure that the user is viewing the latest copy of the data from the record source.
The following sample code collapses all the rows in ultraGrid1.
C#:
private void button1_Click(object sender, System.EventArgs e)
{
// Collapse all the rows recursively.
//
this.ultraGrid1.Rows.CollapseAll( true );
}
This method is useful in group-by mode where rows are grouped by columns and you want to get
all the non-group-by rows. In group-by mode the root row collection contains the group-by rows.
To access the actual non-group-by rows one has to recursively traverse the child rows (by
using the
Gets all the filtered in rows (rows that are not filtered out). As the name suggests this method does not return group-by rows even when this collection is a collection of group-by rows. It always returns an array of actual (non-group-by) rows that are filtered in. In the case where this collection contains group-by rows it returns the descendant filtered in non-group-by rows.
Gets all the filtered out rows (rows that do not match the filtering criteria). As the name suggests this method does not return group-by rows even when this collection is a collection of group-by rows. It always returns an array of actual (non-group-by) rows that are filtered out. In the case where this collection contains group-by rows it returns the descendant filtered out non-group-by rows.
Cells are lazily allocated. They are allocated as they are accessed. However once a cell is allocated, it remains referenced until the row is removed. You can use this method to release references to the cells that have been allocated. Note that they will be re-allocated when they are accessed next time.
One use for this method is to reset all the cells to their default settings. For example,
if you have set some settings on the cells of a row and you want to clear all those settings
then you can use this method to simply clear the cell collection. This will have the same
effect as having reset all the cells of the row with one added benefit that the references
to the cells will have been released and thus may result in improved memory usage. Note
that the cells will be re-allocated when they are accessed the next time. This method is
exposed on the
Note: If one of the cells of this row is the current active cell or is selected then it will not be cleared from the collection as the ActiveCell property of the grid (or the SelectedCellsCollection in the case of selected cells) is holding reference to the cell. Such cells will not be cleared. They will remain part of the cell collection. However their settings will be reset. In other words, the end result will be the same.
Note that any references to the cells from this row after ClearCells call should be considered invalid (except for the active cell and selected cells as noted above). Also the cell collection itself is released, which is also lazily allocated.
Returns the template add-row associated with this rows-collection.
Add-row functionality can be enabled using the Override's
Rows in this RowsCollection are from the same band as this band.
Adding a row to this collection will make the row fixed. You can also fix
a row by setting its
Note that fixed rows are not supported in child row collections. Adding rows to the FixedRows collection of a child row collection will however move the added rows to the top or the bottom of the row collection. It will also apply the fixed row related appearances to the rows in this collection. Note that fixed rows are not supported in card-view.
Also note that when a fixed row is expanded, any sibling fixed rows occuring after it will not be fixed. They will remain non-fixed until the expanded fixed row is collapsed. They will however remain in the FixedRows collection and keep their fixed row appearances.
Invoke this method to scroll a scrolling region.
When a rowscrollregion is scrolled, the BeforeRowRegionScroll event is generated.
The ScrollCellIntoView, ScrollColumnIntoView, ScrollGroupIntoView, and ScrollRowIntoView methods can be invoked to scroll an object into a scrolling region's viewable area.
Invoke this method to ensure that a cell is viewable in a column or row scrolling region.
If this method is invoked for a colscrollregion and the column is already in the viewable area of the region, this method does not perform any scrolling.
If the colscrollregion is scrolled as a result of invoking this method, the value of the column scrolling region's Position property changes and the BeforeColRegionScroll event is generated. If the rowscrollregion is scrolled as a result of invoking this method, the BeforeRowRegionScroll event is generated.
The Scroll, ScrollColumnIntoView, ScrollGroupIntoView, and ScrollRowIntoView methods can also be invoked to scroll an object into a scrolling region's viewable area.
Invoke this method to split one scrolling region into two scrolling regions. This method returns a ColScrollRegion object or a RowScrollRegion object that corresponds to the new scrolling region that is created by the split.
ColScrollRegions are split from right to left, with the new region created by the split appearing to the left of the existing region. RowScrollRegions are split from bottom to top, with the new region created by the split appearing above the existing region.
Specifying width when splitting a ColScrollRegion will set the width of the new region (leftmost of the two resulting ColScrollRegions.) Specifying height when splitting a RowScrollRegion will set the height of the new region (topmost of the two resulting RowScrollRegions.)
When a ColScrollRegion is split, the BeforeColRegionSplit and the AfterColRegionSplit events are generated. When a RowsScrollRegion is split, the BeforeRowRegionSplit and the AfterRowRegionSplit events are generated.
This property returns a reference to a VisibleRows collection that can be used to retrieve references to the Row objects that are currently displayed in a rowscrollregion. You can use this reference to access any of the returned collection's properties or methods, as well as the properties or methods of the objects within the collection.
As rows in the rowscrollregion are scrolled into and out of view, their corresponding Row objects are added to and removed from the VisibleRows collection returned by this property.
Rows that have their Hidden property set to True, and therefore are not displayed, are not included in the collection.
The Count property of the returned VisibleRows collection can be used to determine the number of rows currently displayed in the rowscrollregion.
NOTE: The visible rows collection will always contain an extra row scrolled out of view at the bottom. This is helpful in determining the next row that will come into view when the row scroll region is scrolled down by one row. See example section to find out the dimensions of visible rows and if they are actually visible on the screen.
FirstRow property can be used to access the first visible row. It can also be used to set the first visible row.
The Height property is used to determine the vertical dimension of an object. It is generally expressed in the scale mode of the object's container, but can also be specified in pixels.
For the RowScrollRegion object, this property always includes the horizontal scrollbar's Height for the ColScrollRegion.
The Width property is used to determine the horizontal dimension of an object. It is generally expressed in the scale mode of the object's container, but can also be specified in pixels.
For the ColScrollRegion object, this property always includes the vertical scrollbar's Width for the RowScrollRegion.
Note that not all styles are available on all operating systems. If the version of the OS that your program is running on does not support a particular border style, borders formatted with that style will be drawn using solid lines.
The RowsCollection property of an object refers to a collection of Infragistics.Win.UltraWinGrid.UltraGridRow objects.
The UltraGridRow objects in a Rows Collection make up a data island. The top-level Rows of a grid are all part of a single data island.
If the grid is hierarchical, then one or more top-level UltraGridRow objects will have its own Rows Collection, which contains one or more Row objects.
This creates a tree structure of parent and child rows that is used to display hierarchical data.
Note that not all styles are available on all operating systems. If the version of the OS that your program is running on does not support a particular border style, borders formatted with that style will be drawn using solid lines.
The Selected property of the UltraWinGrid is used to work with any of the currently selected items in the grid. It provides access to the Selected object, which contains three collection sub-objects. Each collection holds one type of selected object; there are collections for rows, columns and cells. Whenever an UltraGridRow, UltraGridColumn or UltraGridCell object in the grid is selected, it is added to the corresponding collection of the Selected object. Deselecting an object removes it from the collection.
You can use the Selected property to iterate through the selected items of any type, or to examine or change the properties of any selected item.
This property returns a reference to a collection of UltraGridCell objects that can be used to retrieve references to the UltraGridCell objects that are currently selected. You can use this reference to access any of the returned collection's properties or methods, as well as the properties or methods of the objects within the collection.
As cells are selected and deselected, their corresponding UltraGridCell objects are added to and removed from the SelectedCells collection returned by this property. When a cell is selected or deselected, the BeforeSelectChange event is generated.
The Count property of the returned SelectedCells collection can be used to determine the number of cells that either belong to a row or are currently selected.
This property returns a reference to a collection of UltraGridRow objects that can be used to retrieve references to the UltraGridRow objects that are currently selected. You can use this reference to access any of the returned collection's properties or methods, as well as the properties or methods of the objects within the collection.
As rows are selected and deselected, their corresponding UltraGridRow objects are added to and removed from the SelectedRows collection returned by this property.
When a row is selected or deselected, the BeforeSelectChange event is generated.
The Countproperty of the returned SelectedRows collection can be used to determine the number of rows currently selected.
This property returns a reference to a collection of UltraGridColumn objects that can be used to retrieve references to the UltraGridColumn objects that are currently selected. You can use this reference to access any of the returned collection's properties or methods, as well as the properties or methods of the objects within the collection.
As columns are selected and deselected, their corresponding UltraGridColumn objects are added to and removed from the SelectedCols collection returned by this property.
When a column is selected or deselected, the BeforeSelectChange event is generated.
The Countproperty of the returned SelectedCols collection can be used to determine the number of columns currently selected.
This method can be used to select a range of cells. It will keep the existing selected cells and select the passed in cells.
You can use UltraGridCell.Selected property to select or unselect individual cells.
This method can be used to select a range of column headers. It will keep the existing selected column headers and select the passed in column headers.
You can use HeaderBase.Selected property to select or unselect individual column headers.
This method can be used to select a range of rows. It will keep the existing selected rows and select the passed in rows.
You can use UltraGridRow.Selected property to select or unselect individual rows.
This method can be used to select a range of rows. It will keep the existing selected rows and select the passed in rows.
You can use UltraGridRow.Selected property to select or unselect individual rows.
Columns are matched by their
Note: If this operand is used for filtering on a layout that needs to be serialized,
then the derived operand needs to implement the
Note that not all styles are available on all operating systems. If the version of the OS that your program is running on does not support a particular border style, borders formatted with that style will be drawn using solid lines.
A SummarySettings instance contains information on what formula to
use for summary calculation. A
You can perform custom summary calculations by implementing
The format of the string is the same as string.Format method's format argument. As a matter of fact, the calculated summary value will be formatted by calling string.Format method and passing the value of this property and the calculated summary figure. In case an invalid format is specified, a default format will be used.
If the
You can set Hidden to true to hide the summary. This can be useful if you just want the calculated summary value but not have it show up it in the grid.
NOTE: Summaries with
Font settings off the
Note: This appearance is not applied to summaries displayed in group by rows. For that use the
Font settings off the
FormulaValueConverter allows you to write custom logic for converting cell values to values that the formulas will use for calculations. It also allows you to write custom logic for converting results of formula calculations to cell values.
You can use ShowCalculatingText property to explicitly turn on or turn off the display of the text during calculations.
Note that this applies to formula summaries only; ones that are calculating using UltraCalcManager.
The Override's
Specifies the tooltip to display when the user hovers the mouse over the header. No tooltip is displayed if this property is set to null or empty string.
Use the
Provides a dropdown list of items.
Creates a new SummarySettings object based on the passed in arguments and adds it to the collection.
If summaryType is SummaryType.Custom, then this overload will throw an exception. Use an overload that takes in an ICustomSummaryCalculator argument for specifying custom summaries.
SourceColumn is the column whose data is being summarized. The sourceColumn must be from the band associated with this SummarySettingsCollection or from one of the descendant bands.
If summaryPosition is SummaryPosition.UseSummaryPositionColumn, then it will be displayed under the source column.
Creates a new SummarySettings object based on the passed in arguments and adds it to the collection.
If summaryType is SummaryType.Custom, then this overload will throw an exception. Use an overload that takes in an ICustomSummaryCalculator argument for specifying custom summaries.
SourceColumn is the column whose data is being summarized. The sourceColumn must be from the band associated with this SummarySettingsCollection or from one of the descendant bands.
If summaryPosition is SummaryPosition.UseSummaryPositionColumn, then it will be displayed under the source column.
Creates a new SummarySettings object based on the passed in arguments and adds it to the collection.
If summaryType is SummaryType.Custom, then this overload will throw an exception. Use an overload that takes in an ICustomSummaryCalculator argument for specifying custom summaries.
Summary will be positioned under the sourceColumn.
Creates a new SummarySettings object based on the passed in arguments and adds it to the collection.
If summaryType is SummaryType.Custom, then this overload will throw an exception. Use an overload that takes in an ICustomSummaryCalculator argument for specifying custom summaries.
Summary will be positioned under the sourceColumn.
Creates a new SummarySettings object based on the passed in arguments and adds it to the collection.
If summaryType is SummaryType.Custom, then you must also pass in a valid instance of ICustomSummaryCalculator for customSummaryCalculator argument. If SummaryType is something other than Custom, then this parameter is not required and can be null.
If summaryPosition is SummaryPosition.UseSummaryPositionColumn, then it will be displayed under summaryPositionColumn column. If summaryPositionColumn is not specified, then it will be displayed under the source column. This column must be from the same band this SummaryCollection is asscocited with. If summaryPosition is something other than UseSummaryPositionColumn, then summaryPositionColumn parameter is not required and can be null.
SourceColumn is the column whose data is being summarized. The sourceColumn must be the band associated with this SummarySettingsCollection or from one of the descendant bands.
Creates a new SummarySettings object based on the passed in arguments and adds it to the collection.
If summaryType is SummaryType.Custom, then you must also pass in a valid instance of ICustomSummaryCalculator for customSummaryCalculator argument. If SummaryType is something other than Custom, then this parameter is not required and can be null.
If summaryPosition is SummaryPosition.UseSummaryPositionColumn, then it will be displayed under summaryPositionColumn column. If summaryPositionColumn is not specified, then it will be displayed under the source column. This column must be from the same band this SummaryCollection is asscocited with. If summaryPosition is something other than UseSummaryPositionColumn, then summaryPositionColumn parameter is not required and can be null.
SourceColumn is the column whose data is being summarized. The sourceColumn must be the band associated with this SummarySettingsCollection or from one of the descendant bands.
In order for formula summaries to work, you must assign an valid instance of UltraCalcManager to the
In order for formula summaries to work, you must assign an valid instance of UltraCalcManager to the
In order for formula summaries to work, you must assign an valid instance of UltraCalcManager to the
In order for formula summaries to work, you must assign an valid instance of UltraCalcManager to the
A SummaryValue instance contains the result of a summary calculation.
This object is associated with the summary value ui element that's displayed
for each summary calculation. You can access summary values of a row collection
using the RowsCollection's
A
This property controls the appearance of this summary value instance. To set the
appearance of all the summaries in the grid or a band, use the Override's
Note: The font settings of the
Font settings off the
Value property returns the calculated summary value for this summary. The type of object returned depends on the type of calculations performed. For example, Minimum or Maximum summary calculations simply return the smallest or the largest cell value, without performing any conversion on the value. For Sum or Average summary type it will be a decimal instance and for Count summary type it will be an integer.
You can use the SummaryText property to retrive the text as it's displayed in summary.
SummaryText property returns the text that will be displayed in this summary. You can
change the format of the text using the
Key returned is the key of the SummarySettings object this SummaryValue object is associated with.
Specifies the tooltip to display when the user hovers the mouse over the header. No tooltip is displayed if this property is set to null or empty string.
You can use this property to specify the summary footer caption for
individual summary footers. A good place to initialize this property is in
This property specifies a substitution string where certain tokens get replaced by the associated values. See
Summary captions can be hidden using the
The UltraCombo control can be used as the
The UltraCombo is populated by binding it to a data source, just like the
Be sure to set the
Optionally, you may also want to set the
Note that the UltraCombo control requires a container (such as a Form or UserControl) in order to function properly. Placing the control on a form (or UserControl) at design-time is sufficient for this, but if the control is created at run-time in code, be sure to add the UltraCombo to the form's (or UserControl's) Controls collection.
This property is used for sub-object event notification. You can take advantage of this feature to have your own code invoked when one or more properties of a sub-object are changed.
Use this method to reset the properties of the DisplayLayout object to their default values. The appearance of any object associated with the DisplayLayout object will change accordingly.
DataBind method reloads the data. Reloading the data source will cause the InitializeLayout event to be fired. To bind to a data source, simply setting the DataSource property is sufficient. This method is used for forcing the UltraGrid to reload the data.
Note: Setting the DataSource property and calling the DataBind after it will cause the UltraGrid to load the data twice, and cause the InitializeLayout event to be fired twice as well.
See
See
See
The GetRow method is one of the mechanisms you can use to navigate through the hierarchical structure of the grid. You can use this method to return either the first or last raow in the topmost band, then walk through the rows in that band (using the
Use the GetActiveColScrollRegion method to determine which ColScrollRegion object is currently active.
Only one column scrolling region at a time may be the active ColScrollRegion. The active ColScrollRegion is the one that receives keyboard navigation focus. For example, if you use the left and right arrow keys to scroll columns, the columns in the column scrolling region returned by GetActiveColScrollRegion are the ones that will move.
SuspendRowSynchronization and ResumeRowSynchronization methods can be used to temporarily suspend UltraGrid from responding to data source change notifications. When row syncrhonization is suspended, the UltraGrid will still mark the rows dirty so it will re-create the rows next time it gets painted.
SuspendRowSynchronization and ResumeRowSynchronization methods can be used to temporarily suspend UltraGrid from responding to data source change notifications. When row syncrhonization is suspended, the UltraGrid will still mark the rows dirty so it will re-create the rows next time it gets painted.
SuspendSummaryUpdates and ResumeSummaryUpdates methods can be used to temporarily prevent the UltraGrid from responding to cell change notifications and marking the summaries dirty. Summaries are re-calculated lazily however this method is useful when you are modifying a lots of cells and for efficiency reaons what to prevent UltraGrid from responding to every cell change notification. In that case you can call SuspendSummaryUpdates and change the cell values and call ResumeSummaryUpdates. ResumeSummaryUpdates method takes in recalculateSummaries parameter that you can use to specify whether the UltraGrid should recalculate all the summaries or not. You would specify that parameter as false if you know that none of the changes you made would affect the summaries. Otherwise you would specifiy that parameter as true.
SuspendSummaryUpdates and ResumeSummaryUpdates methods can be used to temporarily prevent the UltraGrid from responding to cell change notifications and marking the summaries dirty. Summaries are re-calculated lazily however this method is useful when you are modifying a lots of cells and for efficiency reasons you want to prevent UltraGrid from responding to every cell change notification. In that case you can call SuspendSummaryUpdates and change the cell values and call ResumeSummaryUpdates. ResumeSummaryUpdates method takes in recalculateSummaries parameter that you can use to specify whether the UltraGrid should recalculate all the summaries or not. You would specify that parameter as false if you know that none of the changes you made affected the summaries. Otherwise you would specifiy that parameter as true.
This method must be called after
Note: Calling this method passing in false should only be done when it is known that the changes made between
the
Refresh method re-draws the control. Typically calling this method is not necessary since UltraGrid will redraw itself automatically whenever data or settings change that affect the UltraGrid display. This is useful when for example the data source doesn't support change notifications and as a result when the data changes the UltraGrid doesn't redraw the display. In such a scenario this method can be called to redraw the UltraGrid.
The UpdateData method updates any modified information in the grid, sending it to the data provider. When the update is complete, any rows that were marked as having modified data will have that mark cleared. The DataChanged property will be set to False.
Normally, the grid handles the updating of data automatically based on the UpdateMode property, so there will be few situations in which you will need to invoke this method. The major exception is when you want to update the data in response to an event that does not cause the grid to lose focus. For example, clicking on a toolbar button. Since toolbars do not typically take focus, the grid will not send any data to the data provider until you invoke the UpdateData method.
Note that if a cell in the grid is currently in edit mode, this method will not commit the changes to that cell. To handle this, you may want to call the PerformAction method and specify the ExitEditMode action. This allows you to attempt to take the cell out of edit mode and check to make sure this process is successful before calling UpdateData.
ForeColor and BackColor control properties are not supported by
the UltraGrid. Use DisplayLayout's
ForeColor and BackColor control properties are not supported by
the UltraGrid. Use DisplayLayout's
BackgroundImage control property are not supported by the UltraGrid.
Use DisplayLayout's
Use the ActiveColScrollRegion property to determine which ColScrollRegion object is currently active. If you assign a ColScrollRegion object to the ActiveColScrollRegion property, it will become the active column scrolling region.
Only one column scrolling region at a time may be the active ColScrollRegion. The active ColScrollRegion is the one that receives keyboard navigation focus. For example, if you use the left and right arrow keys to scroll columns, the columns in the column scrolling region specified by ActiveColScrollRegion are the ones that will move.
Use the ActiveRowScrollRegion property to determine which RowScrollRegion object is currently active. If you assign an RowScrollRegion object to the ActiveRowScrollRegion property, it will become the active row scrolling region.
Only one row scrolling region at a time may be the active RowScrollRegion. The active RowScrollRegion is the one that contains the active row (as specified by the ActiveRow property). It is also the row scroll region that receives keyboard navigation focus. For example, if you use the up and down arrow keys to scroll rows, the rows in the row scrolling region specified by ActiveRowScrollRegion are the ones that will move.
Use the ActiveRow property to determine which row is currently active, or change which row is currently active. If you assign an UltraGridRow object to the ActiveRow property, the specified row will become active.
Only one row at a time may be the active row. The active row is formatted using a special Appearance object, as specified by the ActiveRowAppearance property. The active row contains the active cell, which is the cell that will receive input focus when the Grid goes into edit mode. You can determine which cell is the active cell using the ActiveCell property.
If no row is active, this property will return Nothing. To deactivate the active row, set this property to Nothing.
One way to persist UltraGridLayout objects and apply them to different objects is to save them out to storage using the SaveLayout and LoadLayout methods. If you wish to persist a UltraGridLayout object without using these methods, you can also add it to the Layouts collection for later retrieval and use.
For the control to use the ImageList property, you must put an ImageList component on the form. Then, at design time, you can set the ImageList property in the associated control's property page from the drop down box containing the names of all the ImageList controls currently on the form. To associate an ImageList with a control at run time, set the control's ImageList property to the ImageList component you want to use, as in this example:
Set UltraWinGrid1.ImageList = ImageList1
The DisplayLayout property of an object is used to access the DisplayLayout object that determines the settings of various properties related to the appearance and behavior of the object. The DisplayLayout object provides a simple way to maintain multiple layouts for the grid and apply them as needed. You can also save grid layouts to disk, the registry or a storage stream and restore them later.
The DisplayLayout object has properties such as Appearance and Override, so the DisplayLayout object has sub-objects of these types, and their settings are included as part of the layout. However, the information that is actually persisted depends on how the settings of these properties were assigned. If the properties were set using the DisplayLayout object's intrinsic objects, the property settings will be included as part of the layout. However, if a named object was assigned to the property from a collection, the layout will only include the reference into the collection, not the actual settings of the named object.
For example, if the DisplayLayout object's Appearance property is used to set values for the intrinsic Appearance object like this:
UltraWinGrid1.Layout.Appearance.ForeColor = vbBlue
Then the setting (in this case, ForeColor) will be included as part of the layout, and will be saved, loaded and applied along with the other layout data. However, suppose you apply the settings of a named object to the DisplayLayout's Appearance property in this manner:
UltraWinGrid1.Appearances.Add "New1"
UltraWinGrid1.Appearances("New1").ForeColor = vbBlue
UltraWinGrid1.DisplayLayout.Appearance = UltraWinGrid1.Appearances("New1")
In this case, the ForeColor setting will not be persisted as part of the layout. Instead, the layout will include a reference to the "New1" Appearance object and use whatever setting is present in that object when the layout is applied.
By default, the layout includes a copy of the entire Appearances collection, so if the layout is saved and restored using the default settings, the object should always be present in the collection when it is referred to. However, it is possible to use the Load and Save methods of the DisplayLayout object in such a way that the collection will not be re-created when the layout is applied. If this is the case, and the layout contains a reference to a nonexistent object, the default settings for that object's properties will be used.
The Rows collection provides a easy way to navigate through row hierarchy of the grid, determine whether the grid contains data, and determine how rows are being displayed in GroupBy mode. When displaying data in a standard hierarchical view, the Rows collection contains an UltraGridRow object for every top-level (Band 0) row in the grid. The UltraGridRow objects in the collection expose a ChildBands property, which returns a collection of Rows collections representing the rows of the bands which are children of the current row.
The Rows colelction is also useful in GroupBy mode, when the top-level band or bands of the grid may consist of virtual "group by" rows. In this case, you use the Rows collection to obtain all the GroupBy rows that are being displayed, and the ChildBand properties of those rows provide a way to drill down to the actual data.
Note: Setting the DataSource or the DataMember property causes
the UltraGrid to load the data. Therefore to avoid loading data twice it's recommended
that you set the DataMember before setting the DataSource or as a convenience use the
Setting the DataSource and then setting the DataMember will cause the UltraGrid to load data twice; once when the DataSource is set and again when the DataMember is set. Setting the DataMember while the DataSource is null (Nothing in Visual Basic) does not cause the UltraGrid to load the data since there is no data source to load the data from. Also note that there is no need to call DataBind method after setting the DataSource and DataMember.
See
The DataSource property is used to specify the object from which the UltraWinGrid
should retrieve and display data. Possible data sources include:
Note: For creating custom data sources you can implement the .NET IList interface on your custom object. However, the IList interface doesn't support notifications for changes in data such as changes in cell values, adding or removing of rows, etc. Therefore if you want to support these operations in your data source then it is recommended that you implement the .NET IBindingList interface, instead, which has support for notifying the bound controls of such changes. Other interfaces that may be of interest are the .NET ITypedList and IEditableObject interfaces. Please consult the .NET Framework help for more information on these interfaces.
Setting DataSource or DataMember will cause the control to synchronously
load the data source. Therefore if you need to set both of these at run-time, to prevent binding
twice, use the
If you set up your grid at design time with bands and columns and then bind at run-time to the actual data source, make sure that band and column keys match the names of the corresponding bands (relations) and columns in the actual data source. Otherwise settings on the bands and columns will not be carried over from design time. UltraGrid uses the keys (Key property) of the bands and columns to find matching bands and columns at run-time to copy over the settings from design-time. Therefore it's important to have the design-time band and column keys match the band (relation) and column names in the actual data source.
The same matching process is applied when changing the data source at run-time.
The data structure of the control must match the data structure of the newly set
data source. The control will automatically create all bands and columns exposed
by the new data source. The control will try to maintain the settings on the
existing columns and bands assuming that the Key of the Band is the same and that
the Key of the column is the same. Columns or bands that do not exist in the new
data structure will be destroyed and any new columns or bands in the new data source
will be created. There is no way to prevent the the control from automatically picking
up the new data structure - it must synchronize it's structure with that of the data
source. However, you can make use of the
The InitializeLayout event is raised when the control binds to a DataSource. The InitializeRow event is raied for each row as it's created.
SuspendRowSynchronization and ResumeRowSynchronization methods can be used to temporarily suspend UltraGrid from responding to data source change notifications. When row syncrhonization is suspended, the UltraGrid will still mark the rows dirty so it will re-create the rows next time it gets painted.
SuspendSummaryUpdates and ResumeSummaryUpdates methods can be used to temporarily prevent the UltraGrid from responding to cell change notifications and marking the summaries dirty. Summaries are re-calculated lazily however this method is useful when you are modifying a lots of cells and for efficiency reaons what to prevent UltraGrid from responding to every cell change notification. In that case you can call SuspendSummaryUpdates and change the cell values and call ResumeSummaryUpdates. ResumeSummaryUpdates method takes in recalculateSummaries parameter that you can use to specify whether the UltraGrid should recalculate all the summaries or not. You would specify that parameter as false if you know that none of the changes you made would affect the summaries. Otherwise you would specifiy that parameter as true.
The FilterRow event occurs when a row filters are evaluated on a row. Hidden property of the row will be set to appropriate value according to the results of the evaluation.
You can use the FilteRow event to do a custom filter evaluation on the row and set it's Hidden property to appropriate value.
UltraGrid requires an instance of UltraCalcManager to perform formula calculations. You can assign this property at run time or at design time. At design-time all you have to do is add an instance of UltraCalcManager component on the form containing the UltraGrid. The UltraCalcManager component will automatically search the form for instances of UltraGrid's and assign their CalcManager properties to itself. UltraCalcManager is defined in Infragistics.Win.UltraWinCalcManager assembly and in Infragistics.Win.CalcEngine namespace.
The band argument returns a reference to an UltraGridBand object that can be used to set properties of, and invoke methods on, the band that will be sorted. You can use this reference to access any of the returned band's properties or methods.
The UltraGrid can automatically sort the contents of columns without the addition of any code, provided the control is able to preload the rows in the band. Preloading is enabled by default if the recordset bound to the band contains less than 1000 rows. If you do not want to preload rows, but you still want to provide column sorting in the control, you must implement column sorting yourself using the BeforeSortChange and AfterSortChange events.
The newsortedcols argument returns a reference to a SortedCols collection that can be used to retrieve references to the UltraGridColumn object or objects being sorted. You can use this reference to access any of the returned collection's properties or methods, as well as the properties or methods of the objects within the collection.
The cancel argument enables you to programmatically prevent the columns from being sorted. This argument can be used to prevent the user from sorting columns unless a certain condition is met.
The AfterSortChange event, which occurs after a sort action is completed, is generated after this event, provided cancel is not set to True.
The bandargument returns a reference to an UltraGridBand object that can be used to set properties of, and invoke methods on, the band that was sorted. You can use this reference to access any of the returned band's properties or methods.
The UltraWinGrid can automatically sort the contents of columns without the addition of any code, provided the control is able to preload the rows in the band. Preloading is enabled by default if the recordset bound to the band contains less than 1000 rows. If you do not want to preload rows, but you still want to provide column sorting in the control, you must implement column sorting yourself using the BeforeSortChange and AfterSortChange events.
The BeforeSortChange event, which occurs before a sort action is completed, is generated before this event.
The action argument indicates which action will occur to the column or columns: moving, swapping, or sizing.
The columns argument returns a reference to a SelectedCols collection that can be used to retrieve references to the UltraGridColumn object or objects that will be moved, swapped, or sized. You can use this reference to access any of the returned collection's properties or methods, as well as the properties or methods of the objects within the collection. However, all properties of the affected columns are read-only in this event procedure.
The cancel argument enables you to programmatically prevent the column or columns from being moved, swapped, or sized. This argument can be used to prevent the user from moving, swapping, or sizing columns unless a certain condition is met. To prevent the user from attempting to move, swap, or size a column, set the AllowColMoving, AllowColSwapping, AllowColSizing properties, respectively.
This event is generated before one or more columns are moved, swapped, or sized, either
programmatically, or by user interaction.
Use UltraGridColumn's
The VisiblePosition property can be used to determine both the current and new positions of the column or columns that will be moved or swapped. New positions can be determined by reading the property off of the header of the column or columns in columns, while current positions can be determined by reading the property off of the header of the column or columns in the appropriate band.
The BeforeGroupPosChanged event is generated before one or more groups are moved, swapped, or sized.
The AfterColPosChanged event, which occurs after one or more columns are moved, swapped, or sized, is generated after this event, provided cancel is not set to True.
The action argument indicates which action occurred to the column or columns: moving, swapping, or sizing.
The columns argument returns a reference to a SelectedCols collection that can be used to retrieve references to the UltraGridColumn object or objects that were moved, swapped, or sized. You can use this reference to access any of the returned collection's properties or methods, as well as the properties or methods of the objects within the collection.
This event is generated after one or more columns are moved, swapped, or sized, either programmatically, or by user interaction. A column can be sized programmatically by setting its Width property and can be moved programmatically by setting its header's VisiblePosition property.
The VisiblePosition property of a column's header can be used to determine the new position of a column that was moved or swapped.
To prevent the user from attempting to move, swap, or size a column, set the AllowColMoving, AllowColSwapping, or AllowColSizing properties, respectively.
The AfterGroupPosChanged event is generated after one or more groups are moved, swapped, or sized.
The BeforeColPosChanged event, which occurs before one or more columns are moved, swapped, or sized, is generated before this event.
You can use the BeforeRowFilterDropDownPopulate event to prevent the UltraGrid from populating the filter value list and instead populate it yourself. In
You can use the BeforeRowFilterDropDown event to cancel the drop down.
You can use the BeforeRowFilterDropDown event to cancel the drop down.
FilterCellValueChanged event gets fired when the user modifies a cell in a filter row.
BeforeColumnChooserDisplayed event is fired before the column chooser dialog is displayed by the user.
BeforeBandHiddenChanged event is fired when the user hides a band, typically via the column chooser dialog.
AfterBandHiddenChanged event is fired after the user hides a band, typically via the column chooser dialog.
The DisplayMember determines which column in the dropdown is used for display purposes. If this property is not set, the
For example, if you have a column in an
This customer ID field would be used as the
The
DisplayMember should only be set when you want to translate data values into more user-friendly display text. If you want the value stored and the value displayed on-screen to be the same, there is no need to set DisplayMember. Setting
This proeprty will return the actual resolved key of the column that is being used for the display of the selected item. If the
The default value is -1. This means that the dropdown will automatically size based on the widths of the columns it contains. It will limit itself to the size of the screen.
A setting of 0 will cause the dropdown to auto-size itself to the width of the edit portion. In the case of the
A value greater than 0 will force the dropdown to be that number of pixels wide.
MaxDropDownItems determines the maximum number of items that will display on the list at one time. If there are more items on the list than can be shown, then the scrollbar will be shown. If there are less items on the list, then the dropdown will size to the exact number of items or the
Attempting to set MaxDropDownItems to a value less than 0 or
MinDropDownItems determines the minimum height of the dropdown based on a number of items that would fit in the dropdown area. If there are fewer items in the list than this property setting, the dropdown will appear with extra space enough to fit the specified number of items.
Attempting to set MinDropDownItems to a value less than 0 or greater than
In an
Since an
The SelectedRow,
Use this property if you need to determine the current state of the dropdown.
To drop down an
To drop down an
The ValueMember determines which column in the dropdown is used for the value. If this property is not set, the first column will be used. To determine the column that is being used as the ValueMember, you can use the
For example, if you have a column in an
This ID value would not be very useful to the users of the application. So you would set the
The
If the
This property determines whether the control displays only the DisplayMember of the selected row or if it also displays the image of that cell.
With the 2008 Volume 2 release of NetAdvantage, the AutoEdit property has been deprecated, and replaced by the
With the 2008 Volume 2 release of NetAdvantage, the AutoEdit property has been deprecated, and replaced by the
Indicates whether the
You can use this method to switch the combo between its dropped down and closed up states. If the combo is closed up, it will drop down when you invoke this method. If the combo is dropped down, it will close up when you invoke this method.
To determine the current state of the control, use the
Invoke this method to simulate an action the user can perform.
Many actions are only appropriate in certain situations; if an action is inappropriate, it will not be performed. For example, attempting to delete rows by performing the DeleteRows action (37 - KeyActionDeleteRows) will have no effect if no rows are selected. Similarly, an attempt to toggle a cell's dropdown list by performing a droptown toggle action (14 - KeyActionToggleDropdown) will also be ignored if the column does not have a dropdown list associated with it.
You can use the
Invoke this method to simulate an action the user can perform.
Many actions are only appropriate in certain situations; if an action is inappropriate, it will not be performed. For example, attempting to delete rows by performing the DeleteRows action (37 - KeyActionDeleteRows) will have no effect if no rows are selected. Similarly, an attempt to toggle a cell's dropdown list by performing a droptown toggle action (14 - KeyActionToggleDropdown) will also be ignored if the column does not have a dropdown list associated with it.
You can use the
The ResolveAppearance method will resolve all appearance properties of the combo control and set those properties on the
The requestedProps parameter is a flags enumeration that allows you to specify which proeprties are returned. It is recommended that you only get the properties you need to acomplish what you want for maximum efficiency.
This method searches a column in the list (determined by the
This method searches a column in the list (determined by the
By default the datasource is loaded as soon as the control initialization process finishes. You can delay loading the datasource by calling this method and specifying non-null data value and display text (they can be empty strings). However note that you must set the data source after calling this method. Otherwise the datasource will be loaded syncrhonously when it's set or when the control initialization process finishes.
Here is a typical way to use this method. At design time either leave the UltraCombo's DataSource null or bind it to a dummy datasource for the purposes of designing columns. At runtime in the form's load event handler (or some other appropriate place) call this method specifying the initial data value and display text. Then bind the UltraCombo to the actual data source. This will cause the UltraCombo to not load the data source until it's dropped down or its Value property is set to a value that's not the initial data value specified in this method.
This method must be called after
Note: Calling this method passing in false should only be done when it is known that the changes made between
the
Invoke this method to reset the
Once this method is invoked, the
Returns a Boolean value that determines whether the
Returns True if the
Invoke the
When the user selects an item from the list, the Text property is set based on the
In the UltraCombo, the control-level Appearance property controls the appearance fo the edit portion of the combo. The drop-down (grid) portion of the control is formatted by using the
With the 2008 Volume 2 release of NetAdvantage, the AutoEdit property has been deprecated, and replaced by the
Note: This property replaces the
Prior to the addition of the AutoCompleteMode property, automatic value completion was supported in the form of the now obsolete AutoComplete property, which, when enabled, modified the control's text by appending characters to the string typed by the end user so as to match the text of the first item found in the list whose text begins with the typed characters. For example, given a list which contains an item whose text is "Apple", when the end user types the string "Ap", the edit portion would then be updated to include the remaining characters, "ple", so that the text of the first item that matches the typed string, "Apple", becomes selected. That same functionality is now enabled by setting AutoCompleteMode to 'Append'. The appended characters are selected so that continuing to type causes these characters to be removed.
The AutoCompleteMode property extends two additional modes for value completion, 'Suggest' and 'SuggestAppend'. When the property is set to 'Suggest', no characters are appended to the edit portion, but rather the dropdown is automatically displayed, showing only the items whose text begins with the string that was typed by the end user. For example, given a list containing the items, "Apple", "Application", and "Apprehend", upon typing the "A" character, the dropdown list will appear, displaying all of those items. The list is continually filtered as more characters are typed, eliminating the entries whose text no longer matches the typed string. For example, if the continues typing until the edit portion contains "Appl", the "Apprehend" item would be removed from the list, since the presence of the character "l" in the typed string now precludes that item.
The 'SuggestAppend' setting essentially combines the funtionality extended by the 'Append' and 'Suggest' settings. The dropdown list is automatically displayed and filtered as needed, and text is appended to the edit portion to complete the typed text to match the first item with matching text.
In the absence of an explicit setting, the AutoCompleteMode property resolves to 'Append'.
The ButtonAppearance effects the default appearance of the dropdown button as well as any buttons in the
You can choose from a number of different display style that emulate the common applications like several versions of Microsoft Office and Microsoft Visual Studio.
You can choose between dropdown and dropdown list styles for the UltraCombo. The default is to use the dropdown style, where the text portion of the control is editable. You can also choose a dropdown list style, where the text portion of the control is not editable and the user must choose an item from the list.
The EventManager gives you a high degree of control over how the component invokes event procedures. You can use it to selectively enable and disable event procedures depending on the context of your application. You can also use the event manager to return information about the state of the component's events.
The event manager's methods are used to determine the enabled state of an event (
The KeyActionMappings property provides access to the control's mechanism for handling keyboard input from users. All keystrokes for actions such as selection, navigation and editing are stored in a table-based system that you can examine and modify using this property. Through the KeyActionsMappings property, you can customize the keyboard layout of the control to match your own standards for application interactivity.
For example, if you wanted users to be able to navigate between cells by pressing the F8 key, you could add this behavior. You can specify the key code and any special modifier keys associated with an action, as well as determine whether a key mapping applies in a given context.
The following table lists the default key mappings for the UltraCombo control:
| KeyCode | ActionCode | StateRequired | StateDisallowed | SpecialKeysRequired | SpecialKeysDisallowed |
|---|---|---|---|---|---|
| Up | PrevRow | Row | Alt | ||
| Down | NextRow | Row | Alt | ||
| Up | FirstRow | Row | Alt | ||
| Down | FirstRow | Row | Alt | ||
| Right | FirstRow | Row, HasEdit | Alt | ||
| Left | FirstRow | Row, HasEdit | Alt | ||
| Home | FirstRow | IsDroppedDown | AltCtrl | ||
| End | LastRow | IsDroppedDown | AltCtrl | ||
| Right | NextRow | Row | HasEdit | Alt | |
| Left | PrevRow | Row | HasEdit | Alt | |
| Prior | PageUp | Row | Alt | ||
| Next | PageDown | Row | Alt | ||
| Escape | CloseDropdown | IsDroppedDown | Alt | ||
| Enter | CloseDropdown | IsDroppedDown | Alt | ||
| F4 | ToggleDropdown | Alt | |||
| Up | ToggleDropdown | Alt | |||
| Down | ToggleDropdown | Alt |
When this property is set to True the user won't be allowed to change the value of the combo.
When the user selects an item from, the value is set based on the
When the user enters text into the combo, the list is searched based on the
A DataFilter allows you to intercept the value of the control as it passes between different states, such as the text displayed on screen, the editor, and the owner. This is similar to the Parse and Format events of a binding, in that you can manipulate the display without altering the underlying data.
CharacterCasing is similar to the Case property on a TextBox control. Case allows you to specificy that all text in the Combo will be converted to upper or lower case automatically.
You can use the
You can use the
By default, the
An ItemNotInList event will fire before the Validating event of the control whenever the text value entered into the editor portion of the control is not a value in the control’s valuelist. If true The LimitToList property will cancel the validating event and return focus whenever the entered value is not in the list.
The
Like a form's Load event, this event provides an opportunity to configure the control before it is displayed. It is in this event procedure that actions such as creating appearances, valuelists, and unbound columns should take place.
This event is generated when the control is first preparing to display data from the data source. This may occur when the data source changes.
The
The
This event is generated once for each row being displayed or printed and provides an opportunity to perform actions on the row before it is rendered, such as populating an unbound cell or changing a cell's color based on its value.
The
Note that this event does not fire for editor button (buttons in the
Note that this event does not fire for editor button (buttons in the
You can use this event to examine or change attributes of the list before it is displayed to the user. You can also use this event to cancel the dropdown of the list before it occurs.
Note that this event does not fire for editor button (buttons in the
This event fires any time the selected row of the Combo changes. This will also change the
It is generally undesirable to do anything in this event that will cause the Combo to lose focus, such as displaying a MessageBox. This is because the event will often fire when the user is in the process of (but has not yet completed) making a change, such as when the user is pressing the arrow keys to navigate through the list, or typing into the edit portion of the combo and using AutoEdit to find a particular item.
This event fires any time the
It is generally undesirable to do anything in this event that will cause the Combo to lose focus, such as displaying a MessageBox. This is because the event will often fire when the user is in the process of (but has not yet completed) making a change, such as when the user is pressing the arrow keys to navigate through the list, or typing into the edit portion of the combo and using AutoEdit to find a particular item.
This event fires any time the control is validated (such as when it loses focus) and the text in the edit portion of the Combo does not match a value on the list. The column of the list that is searched for a matching value is determined by the
The
Editor button events such as this one will fire any time the editor button is affected. This means that the event will fire, not only for the specific instance of the
Editor button events such as this one will fire any time the editor button is affected. This means that the event will fire, not only for the specific instance of the
Editor button events such as this one will fire any time the editor button is affected. This means that the event will fire, not only for the specific instance of the
Note that this event does not apply to the DropDown button that is normally present in the combo. This event only fires for editor buttons in the
Editor button events such as this one will fire any time the editor button is affected. This means that the event will fire, not only for the specific instance of the
Note that this event does not apply to the DropDown button that is normally present in the combo. This event only fires for editor buttons in the
Editor button events such as this one will fire any time the editor button is affected. This means that the event will fire, not only for the specific instance of the
Editor button events such as this one will fire any time the editor button is affected. This means that the event will fire, not only for the specific instance of the
Editor button events such as this one will fire any time the editor button is affected. This means that the event will fire, not only for the specific instance of the
The About property is a design-time only property which exists to provide a way to show the About dialog.. The property has no real value, but it will display in the property grid in Visual Studio and show an ellipsis button which will show the About dialog when clicked.
When AllowNull is True, the control will allow the user to clear out the text of the control and interpret this as a null value. The null value will be considered acceptable for the purposes of validation. IsItemInList will return true for a value of null or DBNull, even if no such item exists on the list. LimitToList will permit the control to lose focus when the value is null, even when no null item exists on the list. The control will display the as empty; it will not attempt to look for a null item on the list in order to determine the display text.
When this property is Default, the control will have the same behavior as when the property is False.
When the control's value is null (Nothing in VB), the control displays an empty string by default. The NullText property enables the end developer to change the text that is displayed for null values (for example, '(NULL)' or '(none)').
To attach an UltraDropDown to a grid, use the
The UltraDropDown is populated by binding it to a data source, just like the
Be sure to set the
Optionally, you may also want to set the
Note that the UltraDropDown control requires a container (such as a Form or UserControl) in order to function properly. Placing the control on a form (or UserControl) at design-time is sufficient for this, but if the control is created at run-time in code, be sure to add the UltraDropDown to the form's (or UserControl's) Controls collection.
The
Like a form's Load event, this event provides an opportunity to configure the control before it is displayed. It is in this event procedure that actions such as creating appearances, valuelists, and unbound columns should take place.
This event is generated when the control is first preparing to display data from the data source. This may occur when the data source changes.
The
The
This event is generated once for each row being displayed or printed and provides an opportunity to perform actions on the row before it is rendered, such as populating an unbound cell or changing a cell's color based on its value.
The
This event is for internal infrastructure use.
To trap when a an
This event should not be used. To trap when a an
This event should not be used. To trap when a an
This event should not be used. To trap when a a new row in the
The About property is a design-time only property which exists to provide a way to show the About dialog.. The property has no real value, but it will display in the property grid in Visual Studio and show an ellipsis button which will show the About dialog when clicked.
The EventManager gives you a high degree of control over how the component invokes event procedures. You can use it to selectively enable and disable event procedures depending on the context of your application. You can also use the event manager to return information about the state of the component's events.
The event manager's methods are used to determine the enabled state of an event (
Most of the settings that apply to the control are set off the
The following code snippet illustrates.
private void button5_Click(object sender, System.EventArgs e)
{
this.ultraGrid1.DisplayLayout.AutoFitStyle = AutoFitStyle.ResizeAllColumns;
this.ultraGrid1.DisplayLayout.Bands[0].Columns[1].Hidden = true;
}
The UltraGrid object represents the UltraWinGrid control itself. It occupies the top-most level of all control hierarchies. In the data hierarchy used by the control, bands, rows and cells are all child objects of the grid. Many of the properties that apply to an UltraGridBand object also apply to the grid. In addition, there are properties unique to the UltraGrid object, such as MaxColScrollRegions and MaxRowScrollRegions, which limit the number of column and row scrolling regions and affect all bands.
Invoke this method to simulate an action the user can perform.
Many actions are only appropriate in certain situations; if an action is inappropriate, it will not be performed. For example, attempting to delete rows by performing the DeleteRows action (37 - KeyActionDeleteRows) will have no effect if no rows are selected. Similarly, an attempt to toggle a cell's dropdown list by performing a droptown toggle action (14 - KeyActionToggleDropdown) will also be ignored if the column does not have a dropdown list associated with it.
You can use the
See the
Invoke this method to delete all selected rows. A particular row, regardless of whether it is selected, can be deleted by invoking its Delete method.
When one or more selected rows are deleted, the BeforeRowsDeleted event is generated, which provides an opportunity to prevent a specific row from being deleted.
When a row is deleted, it is removed from the control and its corresponding record is deleted from the data source. If the record cannot be removed from the data source, the Error event is generated.
Selected UltraGridRow objects are contained in a SelectedRows collection, which can be accessed via the Rows property of the Selected property of the control.
Invoke this method to delete all selected rows. A particular row, regardless of whether it is selected, can be deleted by invoking its Delete method.
When one or more selected rows are deleted, the BeforeRowsDeleted event is generated, which provides an opportunity to prevent a specific row from being deleted.
When a row is deleted, it is removed from the control and its corresponding record is deleted from the data source. If the record cannot be removed from the data source, the Error event is generated.
Selected UltraGridRow objects are contained in a SelectedRows collection, which can be accessed via the Rows property of the Selected property of the control.
The Print method initiates a print job. Invoking this method triggers the process of preparing a printed report based on the data in the grid and sending it to the printer. This process has several steps and involves interaction between print-specific objects and events within the control.
When the print job begins, the
The Print method initiates a print job. Invoking this method triggers the process of preparing a printed report based on the data in the grid and sending it to the printer. This process has several steps and involves interaction between print-specific objects and events within the control.
When you invoke this method, you specify a Layout object that controls the formatting of the grid data when printed. The Layout object gives you the opportunity to create a custom-formated report based on the data in teh grid, applying different attributes such as fonts, colors and arrangement of data specifically for the printed page.
When the print job begins, the
The Print method initiates a print job. Invoking this method triggers the process of preparing a printed report based on the data in the grid and sending it to the printer. This process has several steps and involves interaction between print-specific objects and events within the control.
When the print job begins, the
The Print method initiates a print job. Invoking this method triggers the process of preparing a printed report based on the data in the grid and sending it to the printer. This process has several steps and involves interaction between print-specific objects and events within the control.
When you invoke this method, you specify a Layout object that controls the formatting of the grid data when printed. The Layout object gives you the opportunity to create a custom-formated report based on the data in teh grid, applying different attributes such as fonts, colors and arrangement of data specifically for the printed page.
When the print job begins, the
The Print method initiates a print job. Invoking this method triggers the process of preparing a printed report based on the data in the grid and sending it to the printer. This process has several steps and involves interaction between print-specific objects and events within the control.
When you invoke this method, you specify a Layout object that controls the formatting of the grid data when printed. The Layout object gives you the opportunity to create a custom-formated report based on the data in teh grid, applying different attributes such as fonts, colors and arrangement of data specifically for the printed page.
When the print job begins, the
The Print method initiates a print job. Invoking this method triggers the process of preparing a printed report based on the data in the grid and sending it to the printer. This process has several steps and involves interaction between print-specific objects and events within the control.
When you invoke this method, you specify a Layout object that controls the formatting of the grid data when printed. The Layout object gives you the opportunity to create a custom-formated report based on the data in teh grid, applying different attributes such as fonts, colors and arrangement of data specifically for the printed page.
When the print job begins, the
The PrintPreview method initiates a print preview. Invoking this method triggers the process of preparing a printed report based on the data in the grid and displaying the results in a print preview window. This process has several steps and involves interaction between print-preview-specific objects and events within the control.
When the print preview begins, the
The PrintPreview method initiates a print preview. Invoking this method triggers the process of preparing a printed report based on the data in the grid and displaying the results in a print preview window. This process has several steps and involves interaction between print-preview-specific objects and events within the control.
When the print preview begins, the
The PrintPreview method initiates a print preview. Invoking this method triggers the process of preparing a printed report based on the data in the grid and displaying the results in a print preview window. This process has several steps and involves interaction between print-preview-specific objects and events within the control.
When you invoke this method, you specify a Layout object that controls the formatting of how the grid data will look when printed, and also while being previewed. The Layout object gives you the opportunity to create a custom-formated report based on the data in teh grid, applying different attributes such as fonts, colors and arrangement of data specifically for the printed page.
When the print preview begins, the
The PrintPreview method initiates a print preview. Invoking this method triggers the process of preparing a printed report based on the data in the grid and displaying the results in a print preview window. This process has several steps and involves interaction between print-preview-specific objects and events within the control.
When you invoke this method, you specify a Layout object that controls the formatting of how the grid data will look when printed, and also while being previewed. The Layout object gives you the opportunity to create a custom-formated report based on the data in teh grid, applying different attributes such as fonts, colors and arrangement of data specifically for the printed page.
When the print preview begins, the
The PrintPreview method initiates a print preview. Invoking this method triggers the process of preparing a printed report based on the data in the grid and displaying the results in a print preview window. This process has several steps and involves interaction between print-preview-specific objects and events within the control.
When you invoke this method, you specify a Layout object that controls the formatting of how the grid data will look when printed, and also while being previewed. The Layout object gives you the opportunity to create a custom-formated report based on the data in teh grid, applying different attributes such as fonts, colors and arrangement of data specifically for the printed page.
When the print preview begins, the
The PrintPreview method initiates a print preview. Invoking this method triggers the process of preparing a printed report based on the data in the grid and displaying the results in a print preview window. This process has several steps and involves interaction between print-preview-specific objects and events within the control.
When you invoke this method, you specify a Layout object that controls the formatting of how the grid data will look when printed, and also while being previewed. The Layout object gives you the opportunity to create a custom-formated report based on the data in teh grid, applying different attributes such as fonts, colors and arrangement of data specifically for the printed page.
When the print preview begins, the
When printing, print-previewing or excel-exporting, the UltraGrid makes clone of the
When printing, print-previewing or excel-exporting, the UltraGrid makes clone of the
When printing, print-previewing or excel-exporting, the UltraGrid makes clone of the
When printing, print-previewing or excel-exporting, the UltraGrid makes clone of the
When printing, print-previewing or excel-exporting, the UltraGrid makes clone of the
When printing, print-previewing or excel-exporting, the UltraGrid makes clone of the
When printing, print-previewing or excel-exporting, the UltraGrid makes clone of the
When printing, print-previewing or excel-exporting, the UltraGrid makes clone of the
The UltraGridExcelExporter component makes use of this method. Typically there is no need to call this method directly. You typically use the UltraGridExcelExporter compoenent to export an UltraGrid to an Excel file.
There are a couple requirements imposed on the XSD schema passed to this method.
There are a couple requirements imposed on the XSD schema passed to this method.
There are a couple requirements imposed on the XSD schema passed to this method.
There are a couple requirements imposed on the XSD schema passed to this method.
Undo/redo can be enabled using the
When printing, print-previewing or excel-exporting, the UltraGrid makes clone of the
When printing, print-previewing or excel-exporting, the UltraGrid makes clone of the
This event is generated after a cell is activated, which means it has been given focus.
The ActiveCell property can be used to determine which cell was activated.
The BeforeCellActivate event, which occurs before a cell is activated, is generated before this event.
The cell argument returns a reference to an UltraGridCell object that can be used to set properties of, and invoke methods on, the cell whose value has been modified. You can use this reference to access any of the returned cell's properties or methods.
This event is generated when a cell's value has been changed. Note that the cell's new value is not necessarily committed to the data source at this time, since various factors such as the type of record locking employed by the data source, as well as the value of the UpdateMode property, can affect when the update occurs. The BeforeRowUpdate event is generated when the new value is to be committed to the data source.
The BeforeCellUpdate event, which is generated before this event, provides an opportunity to prevent the change from occurring.
The
Like a form's Load event, this event provides an opportunity to configure the control before it is displayed. It is in this event procedure that actions such as creating appearances, valuelists, and unbound columns should take place.
This event is generated when the control is first preparing to display data from the data source. This may occur when the data source changes.
The
The
This event is generated once for each row being displayed or printed and provides an opportunity to perform actions on the row before it is rendered, such as populating an unbound cell or changing a cell's color based on its value.
The
When a band is in GroupBy mode, the user sees rows of data grouped together under GroupBy rows, which serve as temporary headers for the group of rows. GroupBy rows have their own attributes which can be manipulated through code using the
This event is generated after a cell enters edit mode, meaning that the cell is prepared to accept input from the user. This is different from cell activation, which occurs when the cell receives focus. The BeforeCellActivate event is generated before a cell is activated.
When a cell is in edit mode, the control's IsInEditMode property is set to True.
The BeforeEnterEditMode event, which occurs before a cell enters edit mode, is generated before this event.
The BeforeExitEditMode event is generated before a cell exits edit mode.
When a cell is not in edit mode, the control's IsInEditMode property is set to False.
The BeforeExitEditMode event, which occurs before a cell exits edit mode, is generated before this event.
The BeforeEnterEditMode event is generated before a cell enters edit mode.
This event is generated after a row is activated, which means it has been given focus.
The ActiveRow property can be used to determine which row was activated.
Once a row has been activated, its Selected property is set to True.
The BeforeRowActivate event, which occurs before a row is activated, is generated before this event.
This event is generated after one or more rows have been deleted, either programmatically, or by user interaction. To prevent the user from deleting rows, set the AllowDelete property to False. Rows can be deleted programmatically by invoking either the Delete method or the DeleteSelectedRows method.
The BeforeRowsDeleted event is generated before this event.
The colscrollregion argument returns a reference to a ColScrollRegion object that can be used to set properties of, and invoke methods on, the colscrollregion that was scrolled. You can use this reference to access any of the returned colscrollregion's properties or methods.
This event is generated after a colscrollregion is scrolled, either programmatically, or by user interaction. A colscrollregion can be scrolled programmatically by invoking its Scroll method.
The ScrollBar property of a scrolling region determines whether a scroll bar is displayed for that scrolling region.
The BeforeColRegionScroll event, which occurs before a column scrolling region is scrolled, is generated before this event.
The colscrollregion argument returns a reference to a ColScrollRegion object that can be used to set properties of, and invoke methods on, the colscrollregion that was sized. You can use this reference to access any of the returned colscrollregion's properties or methods.
This event is generated once for every colscrollregion affected by the sizing, meaning that this event is typically generated twice, as each sizing generally affects two adjacent colscrollregions.
This event is generated after a colscrollregion is sized, either programmatically, or by user interaction. A colscrollregion can be sized programmatically by setting its Width property.
The BeforeColRegionSplit event is generated before a colscrollregion is split into two colscrollregions.
The BeforeColRegionSize event, which occurs before a colscrollregion is sized, is generated before this event.
The rowscrollregion argument returns a reference to a RowScrollRegion object that can be used to set properties of, and invoke methods on, the rowscrollregion that was scrolled. You can use this reference to access any of the returned rowscrollregion's properties or methods.
This event is generated after a rowscrollregion is scrolled, either programmatically, or by user interaction. A rowscrollregion can be scrolled programmatically by invoking its Scroll method.
The ScrollBar property of a scrolling region determines whether a scroll bar is displayed for that scrolling region.
The BeforeRowRegionScroll event, which occurs before a rowscrollregion is scrolled, is generated before this event.
Therowscrollregionargument returns a reference to a RowScrollRegion object that can be used to set properties of, and invoke methods on, the rowscrollregion that was sized. You can use this reference to access any of the returned rowscrollregion's properties or methods.
This event is generated once for every rowscrollregion affected by the sizing, meaning that this event is typically generated twice, as each sizing generally affects two adjacent rowscrollregions.
This event is generated after a rowscrollregion is sized, either programmatically, or by user interaction. A rowscrollregion can be sized programmatically by setting its Height property.
The BeforeRowRegionSplit event is generated before a rowscrollregion is split into two rowscrollregions.
The BeforeRowRegionSize event, which occurs before a rowscrollregion is sized, is generated before this event.
The row argument returns a reference to an UltraGridRow object that can be used to set properties of, and invoke methods on, the row that was collapsed. You can use this reference to access any of the returned row's properties or methods.
This event is generated after a row has been collapsed, either programmatically, or by user interaction. A row can be collapsed programmatically by setting its Expanded property to False.
The expansion (plus/minus) indicators can be hidden for a row to prevent the user from expanding or collapsing it by setting the ExpansionIndicator property.
The BeforeRowExpanded and AfterRowExpanded events are generated before and after, respectively, a collapsed row has been expanded.
The BeforeRowCollapsed event, which occurs before a row has been collapsed, is generated before this event.
The row argument returns a reference to an UltraGridRow object that can be used to set properties of, and invoke methods on, the row that was expanded. You can use this reference to access any of the returned row's properties or methods.
This event is generated after a row has been expanded, either programmatically, or by user interaction. A row can be expanded programmatically by setting its Expanded property to True.
The expansion (plus/minus) indicators can be hidden for a row to prevent the user from expanding or collapsing it by setting the ExpansionIndicator property.
The BeforeRowCollapsed and AfterRowCollapsed events are generated before and after, respectively, an expanded row has been collapsed.
The BeforeRowExpanded event, which occurs before a row has been expanded, is generated before this event.
Therowargument returns a reference to an UltraGridRow object that can be used to set properties of, and invoke methods on, the row that was inserted. You can use this reference to access any of the returned row's properties or methods.
This event is generated after a new row has been inserted, either programmatically, or by user interaction. A new row can be inserted programmatically by invoking theAddNewmethod.
Note that the new row is not necessarily committed to the data source at the time of insert, however, since various factors such as the type of record locking employed by the data source, as well as the value of theUpdateModeproperty, can affect when the actual update occurs.
TheBeforeRowInsertevent, which occurs before a row is inserted, is generated before this event.
Therowargument returns a reference to an UltraGridRow object that can be used to set properties of, and invoke methods on, the row that was resized. You can use this reference to access any of the returned row's properties or methods.
Depending on the value of theRowSizingproperty, more than one row can be affected by the resize. In this case,rowrefers to the original row being resized.
TheBeforeRowResizeevent, which occurs before a row has been resized, is generated before this event.
Therowargument returns a reference to an UltraGridRow object that can be used to set properties of, and invoke methods on, the row that was updated. You can use this reference to access any of the returned row's properties or methods.
This event is generated when a row is updated, meaning changes made to its cells are actually committed to the data source. Note that this is not necessarily when the row loses focus, since various factors such as the type of record locking employed by the data source, as well as the value of theUpdateModeproperty, can affect when the update occurs. TheBeforeCellUpdateevent is generated when a cell is accepting a new value.
To prevent the user from making changes to a cell, set theAllowUpdateproperty to 2 (AllowUpdateNo). A cell's value can be changed programmatically by setting itsValueproperty.
A row can be updated programmatically by invoking itsUpdatemethod.
TheBeforeRowUpdateevent, which occurs before a row is updated, is generated before this event.
If an error occurs while attempting to commit the changes to the data source, theErrorevent is generated.
The row argument returns a reference to an UltraGridRow object that can be used to set properties of, and invoke methods on, the row that will be updated. You can use this reference to access any of the returned row's properties or methods.
This event is generated after the user presses the ESC key to cancel changes made to a cells in a row. It is not generated when the CancelUpdate method is invoked.
The BeforeRowCancelUpdate event, which occurs before the row's update is canceled, is generated before this event.
The row argument returns a reference to an UltraGridRow object that can be used to set properties of, and invoke methods on, the row that will be activated. You can use this reference to access any of the returned row's properties or methods.
This event is generated before a row is activated, which means it has been given focus.
The BeforeRowDeactivate event is generated before a row is deactivated, meaning it will lose focus.
The AfterRowActivate event, which occurs after a row is activated, is generated after this event.
The row argument returns a reference to an UltraGridRow object that can be used to set properties of, and invoke methods on, the row that will collapse. You can use this reference to access any of the returned row's properties or methods.
The cancel argument enables you to programmatically prevent the row from collapsing. This argument can be used to prevent the user from collapsing a row unless a certain condition is met.
This event is generated before a row has been collapsed, ither programmatically, or by user interaction. A row can be collapsed programmatically by setting its Expanded property to False.
The expansion (plus/minus) indicators can be hidden for a row to prevent the user from expanding or collapsing it by setting the ExpansionIndicator property.
The BeforeRowExpanded and AfterRowExpanded events are generated before and after, respectively, a collapsed row has been expanded.
The AfterRowCollapsed event, which occurs after a row has been collapsed, is generated after this event, provided cancel is not set to True.
The row argument returns a reference to an UltraGridRow object that can be used to set properties of, and invoke methods on, the row that will expand. You can use this reference to access any of the returned row's properties or methods.
The cancel argument enables you to programmatically prevent the row from expanding. This argument can be used to prevent the user from expanding a row unless a certain condition is met.
This event is generated before a row has been expanded, either programmatically, or by user interaction. A row can be expanded programmatically by setting its Expanded property to True.
The expansion (plus/minus) indicators can be hidden for a row to preventthe user from expanding or collapsing it by setting the ExpansionIndicator property.
The BeforeRowCollapsed and AfterRowCollapsed events are generated before and after, respectively, an expanded row has been collapsed.
The AfterRowExpanded event, which occurs after a row has been expanded, is generated after this event, provided cancel is not set to True.
The row argument returns a reference to an UltraGridRow object that can be used to set properties of, and invoke methods on, the row that will be updated. You can use this reference to access any of the returned row's properties or methods.
The cancel argument enables you to programmatically prevent the row from being updated and from committing changes to the data source. This argument can be used to prevent the row from being updated unless a certain condition is met.
This event is generated when a row is updated, meaning changes made to its cells are actually committed to the data source. Note that this is not necessarily when the row loses focus, since various factors such as the type of record locking employed by the data source, as well as the value of the UpdateMode property, can affect when the update occurs. The BeforeCellUpdate event is generated when a cell is accepting a new value.
To prevent the user from making changes to a cell, set the AllowUpdate property to 2 (AllowUpdateNo). A cell's value can be changed programmatically by setting its Value property.
A row can be updated programmatically by invoking its Update method.
The AfterRowUpdate event, which occurs after a row is updated, is generated after this event, provided cancel is not set to True.
The row argument returns a reference to an UltraGridRow object that can be used to set properties of, and invoke methods on, the row whose update will be canceled. You can use this reference to access any of the returned row's properties or methods.
The cancel argument enables you to programmatically prevent the row's update from being canceled. This argument can be used to prevent the user from canceling an update unless a certain condition is met.
This event is generated when the user presses the ESC key to cancel changes made to cells in a row. It is also generated when the CancelUpdate method is invoked.
The AfterRowCancelUpdate event, which occurs after a row's update has been canceled, is generated after this event, provided cancel is not set to True.
The cell argument returns a reference to an UltraGridCell object that can be used to set properties of, and invoke methods on, the cell whose update was canceled. You can use this reference to access any of the returned cell's properties or methods.
This event is generated after the user presses the ESC key to cancel changes made to a cell's value. It is not generated when the CancelUpdate method is invoked.
The BeforeCellCancelUpdate event, which occurs before a cell's update is canceled, is generated before this event.
The cell argument returns a reference to an UltraGridCell object that can be used to set properties of, and invoke methods on, the cell whose value is being modified. You can use this reference to access any of the returned cell's properties or methods.
This event is generated when the user is modifying the value of a cell in edit mode. Note that this does not necessarily mean that the changes will be committed to the data source, only that the user is editing the value of the cell.
The cell argument returns a reference to an UltraGridCell object that can be used to set properties of, and invoke methods on, the cell that had an item selected. You can use this reference to access any of the returned cell's properties or methods.
This event is generated when an item is selected from the cell's dropdown list. A dropdown list item is considered selected when the user clicks it or highlights it when navigating the list using navigation keys.
This event is only generated for a cell whose column's Style property is set to 4 (StyleDropDown), 5 (StyleDropDownList), 6 (StyleDropDownValidate), or 8 (StyleDropDownCalendar).
The cell argument returns a reference to an UltraGridCell object that can be used to set properties of, and invoke methods on, the cell whose button was clicked. You can use this reference to access any of the returned cell's properties or methods.
This event is generated when the user clicks a cell's button. A cell may be represented by a button or contain a button, based on its style.
This event is only generated for a cell whose column's Style property is set to 2 (StyleEditButton) or 7 (StyleButton).
The cell argument returns a reference to an UltraGridCell object that can be used to set properties of, and invoke methods on, the cell that had its dropdown list closed. You can use this reference to access any of the returned cell's properties or methods.
This event is generated when a cell's dropdown list has been closed, either programmatically, or by user interaction. A cell's dropdown list can be closed programmatically by setting the cell's DroppedDown property to False.
This event is only generated for a cell whose column's Style property is set to 4 (StyleDropDown), 5 (StyleDropDownList), 6 (StyleDropDownValidate), or 8 (StyleDropDownCalendar).
Set the column's ValueList property in order to populate the dropdown list.
The BeforeCellListDropDown event is generated when a cell's dropdown list is dropped down.
The selectchange argument indicates what type of object or objects involved in the selection: rows, cells, or columns. When a row or column is selected, the cells contained in it are not considered selected.
This event is generated before one or more objects have been selected or deselected, either programmatically, or by user interaction.
The control's Selected property can be used to determine what object or objects are currently selected.
The BeforeSelectChange event, which occurs before one or more row, cell, or column objects have been selected or deselected, is generated before this event.
The selectchange argument indicates what type of object or objects were involved in the selection: rows, cells, or columns. When a row or column is selected, the cells contained in it are not considered selected.
The newselections argument returns a reference to a Selected collection that can be used to retrieve references to the rows, cells, or columns that will be selected. You can use this reference to access any of the returned collection's properties or methods, as well as the properties or methods of the objects within the collection.
The cancel argument enables you to programmatically prevent the object or objects from being selected. This argument can be used to prevent the user from changing the selection unless a certain condition is met.
This event is generated before one or more objects have been selected or deselected, either programmatically, or by user interaction.
The control's Selected property can be used to determine what object or objects were previously selected.
The AfterSelectChange event, which occurs after one or more row, cell, or column objects have been selected or deselected, is generated after this event.
Note: This event will fire when one or more rows are deleted through the grid, but this cannot be cancelled. If the action needs to be cancelled, the
The action argument indicates which action occurred to the group or groups: moving, swapping, or sizing.
The groups argument returns a reference to a Groups collection that can be used to retrieve references to the UltraGridGroup object or objects that were moved, swapped, or sized. You can use this reference to access any of the returned collection's properties or methods, as well as the properties or methods of the objects within the collection.
This event is generated after one or more groups are moved, swapped, or sized, either programmatically, or by user interaction. A group can be sized programmatically by setting its Width property and can be moved programmatically by setting its header's VisiblePosition property.
The VisiblePosition property of a group's header can be used to determine the new position of a group that was moved or swapped.
To prevent the user from attempting to move or swap a group, set the AllowGroupMoving or AllowGroupSwapping properties, respectively.
The AfterColPosChanged event is generated after one or more columns are moved, swapped, or sized.
The BeforeGroupPosChanged event, which occurs before one or more groups are moved, swapped, or sized, is generated before this event.
This event can be used to adjust the size of the multiple-line edit window or prevent it from being displayed at all.
This event is passed a
You can also cancel the display of the edit window. The cancel property of the object enables you to programmatically prevent the multiple-line edit window from being displayed. You can use this ability to make the display of the multi-line edit window conditional.
Thecellargument returns a reference to an UltraGridCell object that can be used to set properties of, and invoke methods on, the cell that will be activated. You can use this reference to access any of the returned cell's properties or methods.
Thecancelargument enables you to programmatically prevent the cell from being activated. This argument can be used to prevent the cell from activating unless a certain condition is met.
This event is generated before a cell is activated, which means it has been given focus.
TheBeforeCellDeactivateevent is generated before a cell is deactivated, meaning it will lose focus.
TheAfterCellActivateevent, which occurs after a cell is activated, is generated after this event, providedcancelis not set to True.
The cell argument returns a reference to an UltraGridCell object that can be used to set properties of, and invoke methods on, the cell that will have its dropdown list dropped down. You can use this reference to access any of the returned cell's properties or methods.
The cancel argument enables you to programmatically prevent the cell's dropdown list from being dropped down. This argument can be used to prevent the dropdown list from dropping down unless a certain condition is met.
This event is generated when a cell's dropdown list is about to be dropped down, either programmatically, or by user interaction. A cell's dropdown list can be dropped down programmatically by setting the cell's DroppedDown property to True.
This event is only generated for a cell whose column's Style property is set to 4 (StyleDropDown), 5 (StyleDropDownList), 6 (StyleDropDownValidate), or 8 (StyleDropDownCalendar).
Set the column's ValueList property to a ValueList object to populate the dropdown list.
The AfterCellListCloseUp event is generated when a cell's dropdown list is closed.
The cell argument returns a reference to an UltraGridCell object that can be used to set properties of, and invoke methods on, the cell whose update is about to be canceled. You can use this reference to access any of the returned cell's properties or methods.
The cancel argument enables you to programmatically prevent the cell's update from being canceled. This argument can be used to prevent the user from canceling an update unless a certain condition is met.
This event is generated when the user presses the ESC key to cancel changes made to a cell's value. It is not generated when the CancelUpdate method is invoked.
The AfterCellCancelUpdate event, which occurs after a cell's update has been canceled, is generated after this event, provided cancel is not set to True.
Thecancelargument enables you to programmatically prevent the the cell from deactivating, meaning it will not lose focus. This argument can be used to prevent the user from leaving the cell unless a certain condition is met.
This event is generated when the user attempts to move to a different cell, deactivating the original cell.
TheBeforeCellActivateevent is generated before a cell is activated, which means it will get focus.
TheActiveCellproperty can be used to determine which cell is currently active.
Thecancelargument enables you to programmatically prevent the cell from entering edit mode, meaning that the cell is prepared to accept input from the user. This argument can be used to prevent the cell from entering edit mode unless a certain condition is met.
This event is generated before a cell enters edit mode. This is different from cell activation, which occurs when the cell receives focus. TheBeforeCellActivateevent is generated before a cell is activated.
When a cell is in edit mode, the control'sIsInEditModeproperty is set to True.
TheAfterEnterEditModeevent, which occurs after a cell enters edit mode, is generated after this event, providedcancelis not set to True.
TheBeforeExitEditModeevent is generated before a cell exits edit mode.
The cancel argument enables you to programmatically prevent the cell from exiting edit mode. This argument can be used to prevent the cell from leaving edit mode unless a certain condition is met.
When a cell is not in edit mode, the control's IsInEditMode property is set to False.
The AfterExitEditMode event, which occurs after a cell exits edit mode, is generated after this event, provided cancel is not set to True.
The BeforeEnterEditMode event is generated before a cell enters edit mode.
Thecancelargument enables you to programmatically prevent the the row from deactivating, meaning it does not lose focus. This argument can be used to prevent the user from leaving the row unless a certain condition is met.
This event is generated when the user attempts to move to a different row, deactivating the original row.
TheBeforeRowActivateevent is generated before a row is activated, which means it will get focus.
TheActiveRowproperty can be used to determine which row is currently active.
Since creating a new selection (of rows, columns, cells, etc.) and initiating a drag and drop operation can both be triggered by the same action (the user holding down the primarily mouse button and moving the mouse pointer), this event serves to differentiate between the two.
This event is generated when the user holds the primary mouse button down over a selected object for a short duration before actually moving the mouse pointer. If the mouse pointer is not moved before the duration expires, this event is generated; otherwise, a new selection is created and this event is not generated.
The cancel argument enables you to programmatically restore the selection process, allowing the user to continue the selection action.
The programmer should use this event to implement drag and drop operations.
The action argument indicates which action will occur to the group or groups: moving, swapping, or sizing.
The groups argument returns a reference to a Groups collection that can be used to retrieve references to the UltraGridGroup object or objects that will be moved, swapped, or sized. You can use this reference to access any of the returned collection's properties or methods, as well as the properties or methods of the objects within the collection. However, all properties of the affected groups are read-only in this event procedure.
The cancel argument enables you to programmatically prevent the group or groups from being moved, swapped, or sized. This argument can be used to prevent the user from moving, swapping, or sizing groups unless a certain condition is met. To prevent the user from attempting to move or swap a group, set the AllowGroupMoving or AllowGroupSwapping properties, respectively.
This event is generated before one or more groups are moved, swapped, or sized, either programmatically, or by user interaction. A group can be sized programmatically by setting its Width property and can be moved programmatically by setting its header's VisiblePosition property.
The VisiblePosition property can be used to determine both the current and new positions of the group or groups that will be moved or swapped. New positions can be determined by reading the property off of the header of the group or groups in groups, while current positions can be determined by reading the property off of the header of the group or group in the appropriate band.
The BeforeColPosChanged event is generated before one or more columns are moved, swapped, or sized.
The AfterGroupPosChanged event, which occurs after one or more groups are moved, swapped, or sized, is generated after this event, provided cancel is not set to True.
The colscrollregion argument returns a reference to a ColScrollRegion object that can be used to set properties of, and invoke methods on, the colscrollregion that was removed. You can use this reference to access any of the returned colscrollregion's properties or methods.
The cancel argument enables you to programmatically prevent the colscrollregion from being removed. This argument can be used to prevent the user from removing the colscrollregion unless a certain condition is met.
This event is generated before a colscrollregion is removed, either programmatically, or by user interaction. A colscrollregion can be removed programmatically by invoking the Remove method of the ColScrollRegions collection.
The BeforeColRegionSplit event is generated before a colscrollregion is split in two.
The BeforeRowRegionSplit event is generated before a rowscrollregion is split in two.
Theoriginalcolscrollregionargument returns a reference to a ColScrollRegion object that can be used to set properties of, and invoke methods on, the colscrollregion as it exists before the split. You can use this reference to access any of the returned colscrollregion's properties or methods. However, the Position and Width properties of this colscrollregion are read-only in this event procedure.
The newcolscrollregion argument returns a reference to a ColScrollRegion object that can be used to set properties of, and invoke methods on, the colscrollregion as it will exist after the split. You can use this reference to access any of the returned colscrollregion's properties or methods.
The cancel argument enables you to programmatically prevent the colscrollregion from being split. This argument can be used to prevent the user from splitting the colscrollregion unless a certain condition is met.
This event is generated before a colscrollregion is split, either programmatically, or by user interaction. A colscrollregion can be split programmatically by invoking its Split method.
The BeforeColRegionRemoved event is generated before a colscrollregion is removed.
The BeforeColRegionSize event is generated before a colscrollregion is sized.
The BeforeRowRegionSplit event is generated before a rowscrollregion is split.
The newstate argument returns a reference to a ColScrollRegion object that can be used to set properties of, and invoke methods on, the colscrollregion as it exists before the scroll. You can use this reference to access any of the returned colscrollregion's properties or methods.
The oldstate argument returns a reference to a ColScrollRegion object that can be used to set properties of, and invoke methods on, the colscrollregion as it will exist after the scroll. You can use this reference to access any of the returned colscrollregion's properties or methods. However, the Position and Width properties of this colscrollregion are read-only in this event procedure.
The cancel argument enables you to programmatically prevent the colscrollregion from scrolling. This argument can be used to prevent the user from scrolling unless a certain condition is met.
This event is generated before a colscrollregion is scrolled, either programmatically, or by user interaction. A colscrollregion can be scrolled programmatically by invoking its Scroll method.
The ScrollBar property of a scrolling region determines whether a scroll bar is displayed for that scrolling region.
The AfterColRegionScroll event, which occurs after a colscrollregion was scrolled, is generated after this event, provided cancel is not set to True.
The BeforeRowRegionScroll event is generated before a rowscrollregion is scrolled.
The region1 argument returns a reference to a ColScrollRegion object that can be used to set properties of, and invoke methods on, the leftmost colscrollregion that will be sized. You can use this reference to access any of the returned colscrollregion's properties or methods. However, the Width property of this rowscrollregion is read-only in this event procedure.
The region2 argument returns a reference to a ColScrollRegion object that can be used to set properties of, and invoke methods on, the rightmost colscrollregion that will be sized. You can use this reference to access any of the returned colscrollregion's properties or methods. However, the Width property of this rowscrollregion is read-only in this event procedure.
The cancel argument enables you to programmatically prevent the colscrollregions from sizing. This argument can be used to prevent the user from resizing the colscrollregions unless a certain condition is met. To prevent users from actually moving the colscrollregion's splitter bar, set its SizingMode property to 0 (SizingModeFixed).
This event is generated before a colscrollregion is sized, either programmatically, or by user interaction. A colscrollregion can be sized programmatically by setting its Width property. Because colscrollregions are vertical scrolling regions, the height of all colscrollregions will always be identical. Attempting to set the Width property of a rowscrollregion being sized in this event procedure, however, will generate an error.
The BeforeColRegionSplit event is generated before a colscrollregion is split into two colscrollregions.
The AfterColRegionSize event, which occurs after a colscrollregion was sized, is generated after this event, provided cancel is not set to True.
The rowscrollregion argument returns a reference to a RowScrollRegion object that can be used to set properties of, and invoke methods on, the rowscrollregion that was removed. You can use this reference to access any of the returned rowscrollregion's properties or methods.
The cancel argument enables you to programmatically prevent the colscrollregion from being removed. This argument can be used to prevent the user from removing the rowscrollregion unless a certain condition is met.
This event is generated before a rowscrollregion is removed, either programmatically, or by user interaction. A rowscrollregion can be removed programmatically by invoking the Remove method of the RowScrollRegions collection.
The BeforeRowRegionSplit event is generated before a rowscrollregion is split in two.
The BeforeColRegionSplit event is generated before a colscrollregion is split in two.
The band argument returns a reference to an UltraGridBand object that can be used to set properties of, and invoke methods on, the band into which the new row will be inserted. You can use this reference to access any of the returned band's properties or methods.
The parentrow argument returns a reference to an UltraGridRow object that can be used to set properties of, and invoke methods on, the row that will be the parent of the row to be inserted. You can use this reference to access any of the returned row's properties or methods. If the row being inserted is not a child, parentrow will be set to Nothing.
The cancel argument enables you to programmatically prevent the row from being inserted. This argument can be used to prevent the user from inserting a new row unless a certain condition is met.
This event is generated after a new row has been inserted, either programmatically, or by user interaction. A new row can be inserted programmatically by invoking the AddNew method.
The AfterRowInsert event, which occurs after a row is inserted, is generated after this event, provided cancel is not set to True.
The cell argument returns a reference to an UltraGridCell object that can be used to set properties of, and invoke methods on, the cell whose value will be modified. You can use this reference to access any of the returned cell's properties or methods. However, the Value property of this cell is read-only.
The newvalue argument indicates what the new value of the cell will be. The Value property of the UltraGridCell object returned by cell can be used to determine the existing value of the cell.
The cancel argument enables you to programmatically prevent the cell from accepting the new value. This argument can be used to prevent the cell from accepting the new value unless a certain condition is met.
This event is generated when a cell's value has been changed, either programmatically, or by user interaction. Note that the cell's new value is not necessarily committed to the data source at this time, since various factors such as the type of record locking employed by the data source, as well as the value of the UpdateMode property, can affect when the update occurs. The BeforeRowUpdate event is generated when the new value is to be committed to the data source.
A cell's value can be changed programmatically by setting its Value property. Attempting to set the Value property of the cell whose value will be modified in this event procedure, however, will generate an error.
The AfterCellUpdate event, which occurs after a cell accepts a new value, is generated after this event, provided cancel is not set to True.
The row argument returns a reference to an UltraGridRow object that can be used to set properties of, and invoke methods on, the row that will be resized. You can use this reference to access any of the returned row's properties or methods.
The rowheight argument indicates the new height of the row. The current height is indicated by the Height property of the UltraGridRow object returned by row.
The cancel argument enables you to programmatically prevent the row from being resized. This argument can be used to prevent the row from resizing unless a certain condition is met.
Depending on the value of the RowSizing property, more than one row can be affected by the resize. In this case, row refers to the original row being resized.
The AfterRowResize event, which occurs after a row has been resized, is generated after this event, provided cancel is not set to True.
The rows argument returns a reference to a Rows collection that can be used to retrieve references to the UltraGridRow object or objects being deleted. You can use this reference to access any of the returned collection's properties or methods, as well as the properties or methods of the objects within the collection.
The displaypromptmsg argument enables you to hide the default confirmation message. This argument can be used to display your own dialog.
The cancel argument enables you to programmatically prevent the rows from being deleted. This argument can be used to prevent the user from deleting rows unless a certain condition is met.
This event is generated when rows are to be deleted, either programmatically, or by user interaction. To prevent the user from deleting rows, set the Override's
The text displayed in the default confirmation dialog can be modified by setting the DialogStrings property.
The AfterRowsDeleted event, which occurs after rows are deleted, is generated after this event, provided cancel is not set to True.
The newstate argument returns a reference to a RowScrollRegion object that can be used to set properties of, and invoke methods on, the rowscrollregion as it exists after the scroll. You can use this reference to access any of the returned rowscrollregion's properties or methods.
The oldstate argument returns a reference to a RowScrollRegion object that can be used to set properties of, and invoke methods on, the rowscrollregion as it will exist after the scroll. You can use this reference to access any of the returned rowscrollregion's properties or methods.
The cancel argument enables you to programmatically prevent the rowscrollregion from scrolling. This argument can be used to prevent the user from scrolling unless a certain condition is met.
This event is generated before a rowscrollregion is scrolled, either programmatically, or by user interaction. A rowscrollregion can be scrolled programmatically by invoking its Scroll method.
The ScrollBar property of a scrolling region determines whether a scroll bar is displayed for that scrolling region.
The AfterRowRegionScroll event, which occurs after a rowscrollregion was scrolled, is generated after this event, provided cancel is not set to True.
The BeforeColRegionScroll event is generated before a colscrollregion is scrolled.
The region1 argument returns a reference to a RowScrollRegion object that can be used to set properties of, and invoke methods on, the top rowscrollregion that will be sized. You can use this reference to access any of the returned rowscrollregion's properties or methods. However, the Height property of this rowscrollregion is read-only in this event procedure.
The region2 argument returns a reference to a RowScrollRegion object that can be used to set properties of, and invoke methods on, the bottom rowscrollregion that will be sized. You can use this reference to access any of the returned rowscrollregion's properties or methods. However, the Height property of this rowscrollregion is read-only in this event procedure.
The cancel argument enables you to programmatically prevent the rowscrollregions from sizing. This argument can be used to prevent the user from resizing the rowscrollregions unless a certain condition is met. To prevent users from actually moving the rowscrollregion's splitter bar, set its SizingMode property to 0 (SizingModeFixed).
This event is generated before a rowscrollregion is sized, either programmatically, or by user interaction. A rowscrollregion can be sized programmatically by setting its Height property. Because rowscrollregions are vertical scrolling regions, the width of all rowscrollregions will always be identical. Attempting to set the Height property of a rowscrollregion being sized in this event procedure, however, will generate an error.
The BeforeRowRegionSplit event is generated before a rowscrollregion is split into two rowscrollregions.
The AfterRowRegionSize event, which occurs after a rowscrollregion was sized, is generated after this event, provided cancel is not set to True.
The originalrowscrollregion argument returns a reference to a RowScrollRegion object that can be used to set properties of, and invoke methods on, the rowscrollregion as it exists before the split. You can use this reference to access any of the returned rowscrollregion's properties or methods. However, the Height property of this rowscrollregion is read-only in this event procedure.
The newrowscrollregion argument returns a reference to a RowScrollRegion object that can be used to set properties of, and invoke methods on, the rowscrollregion as it will exist after the split. You can use this reference to access any of the returned rowscrollregion's properties or methods. However, the Height property of this rowscrollregion is read-only in this event procedure.
The cancel argument enables you to programmatically prevent the rowscrollregion from being split. This argument can be used to prevent the user from splitting the rowscrollregion unless a certain condition is met.
This event is generated before a rowscrollregion is split, either programmatically, or by user interaction. A rowscrollregion can be split programmatically by invoking its Split method.
The BeforeRowRegionRemoved event is generated before a rowscrollregion is removed.
The BeforeRowRegionSize event is generated before a rowscrollregion is sized.
The BeforeColRegionSplit event is generated before a colscrollregion is split.
The errorinfo argument returns a reference to an Error object that can be used to set properties of, and invoke methods on, the error that generated this event. You can use this reference to access any of the returned error's properties or methods.
The Code and Description properties of errorinfo can be used to determine the number and description, respectively, of the error that generated this event.
When the error is related to the data source, the DataError property is set and can be used to further analyze what occurred.
Conversely, when the error is related to input validation, the MaskError property is set. The control can distinguish between numeric and alphabetic characters for input validation, but cannot validate for valid content, such as the correct month or time of day. In these cases, this event is not generated.
This event can be generated any time the control encounters an unexpected situation, such as if an update is attempted and the data source is not updateable.
CellDataError is fired when the user tries to update the cell with an invalid value. It gets fired after BeforeExitEditMode is fired. If BeforeExitEditMode is cancalled, then this event and successive events related to exiting the edit mode are not fired.
Thie event gets fired either because the value in the editor is invalid, or when setting the value to bound datasource does not succed. If the grid fails to validate the value, then it will fire this event and will not attempt to update the cell with the value. If validations succeds, then the grid will attempt to update the cell, and if that fails, then it will fire this event.
The InitializePrintPreview event occurs when the print job is first initiated via the PrintPreview method. It gives you the opportunity to set the default parameters for the print preview (level of zoom, preview window title and icon) and to apply default print job settings (such as page header and footer, margins, etc.) to the data being previewed. You use the PrintInfo object passed to the event via the printinfo parameter to apply these settings.
After you have set up the default print settings in the InitializePrintPreview event, the Print Preview screen will be displayed to the end user, previewing what the print job will look like using the settings you have specified. The user can view different parts of the report or change the settings of the print job by interacting directly with the provided interface. They can also choose to print directly from the preview screen, which will trigger the InitializePrint event. depending on how the PrintPreview method was invoked, the Print dialog may also be displayed.
The PrintInfo object is only accessible during this event, the BeforePrint event, the InitializePrint event and the InitializeLogicalPrintPage event.
When you print a report using UltraWinGrid, you may find that the data from the grid does not easily fit onto a single sheet of paper. Although this is usually because there are too many rows to fit vertically, it is also possible that your data consists of too many columns to fit horizonatally. For this reason, the control must sometimes make a distinction between a single "logical" page and the "physical" page (or sheets of paper) that may be required to print it. Essentially, logical pages break only on row boundaries. If you print a report with enough columns to fill the widths of three sheets of paper, the first logical page will comprise three physical pages.
The InitializeLogicalPrintPage event occurs whenever the formatting of a new logical page is being calculated in preparation for printing or previewing. You can use the event to make changes to the logical page, such as changing the text of the page header or footer. You can access the settings of the print job (such as the text of the header and footer) by using the properties of LogicalPageLayoutInfo object that is passed into the event via the LogicalPageLayoutInfo parameter.
A common use of this event would be to increment the page number for each page of the report. The LogicalPageNumber parameter passed to the event makes this easy by providing you with the number of the current logical page. Automatic page numbering can be accomplished by setting the PageHeader or PageFooter to a string containing the token <#>. This token will be replaced by the page number.
If you wish to make changes to a print job based on the physical page of a report, you must use the DrawFilter interface.
The LogicalPageLayoutInfo object is only accessible during this event, the BeforePrint event, the IntitializePrint event and the IntitializePrintPreview event. Note that changes made to the print job in the BeforePrint event will cause the InitializeLogicalPrintPage event to occur again.
The InitializePrint event occurs when the print job is first initiated via the Print method. It gives you the opportunity to set the default parameters for the print job (number of copies, page orientation, header and footer text, etc.) After you have set up the default print settings in the InitializePrint event, the Page Setup and Print dialogs may be displayed to the end user, depending on the parameters passed to the Print method. The user can change the defaults you have specified through these dialogs. Once the user has completed their changes, the BeforePrint event occurs, giving you the chance to examine the user's settings, change them if necessary or store them for future use.
The PrintInfo object is only accessible during this event, the BeforePrint event, the IntitializePrintPreview event and the InitializeLogicalPrintPage event.
The BeforePrint event occurs before the report is sent to the printer, but after the user has had the opportunity to configure the print job using the Print and Page Setup dialogs. The Print and Page Setup dialogs can be made available to the user when invoking the Print method, and will contain any default settings you have specified for the print job in the InitializePrint event. The BeforePrint event is the last opportunity you have to change the parameters of a print job before it is committed to the print queue.
You can use the BeforePrint event to programmatically examine any changes to the PrintInfo object resulting from the user's actions. You can then choose to modify the user's settings where appropriate, or store them for later use.
The PrintInfo object is only accessible during this event, the InitializeLogicalPrintPage event, the InitializePrint event and the InitializePrintPreview event.
You can use the BeforeSummaryDialog event to cancel the drop down.
You can use the SummaryValueChanged event to apply any appearance settings to passed in SummaryValue object.
BeforeRowLayoutItemResized is fired when the user resizes a column header or a cell in the row-layout mode. It fires the event before applying the new width or the height to the item that's being resized. This event gives you an opportunity to prevent the user from resizing an item or change the new resized size.
AfterRowLayoutItemResized is fired after the user has resized a column header or a cell in the row-layout mode.
BeforePerformAction event gets fired before an action associated with a key action mapping is about to be performed. It is a cancelable event. When it's cancled, the UltraGrid will not perform the action for which this event was fired.
You can enable multi-cell operations using the Override's
This event provides the ability to take the
Note: If this event is handled and the RowEditTemplate is reparented and manually shown, the grid no longer has control over when to close the template; as such, it is the responsibility of the developer to determine under which conditions the template should be closed.
You can use this property to prevent the grid from exiting the edit mode when focus leaves the grid. By default grid exits the edit mode when OnLeave gets called. However you can set this property to false to prevent the grid from doing that. Note: If this is set to false, the update modes of OnRowChangeOrLostFocus and OnCellChangeOrLostFocus will act like OnRowChange and OnCellChange respectively.
The Selected property of the UltraWinGrid is used to work with any of the currently selected items in the grid. It provides access to the Selected object, which contains three collection sub-objects. Each collection holds one type of selected object; there are collections for rows, columns and cells. Whenever an UltraGridRow, UltraGridColumn or UltraGridCell object in the grid is selected, it is added to the corresponding collection of the Selected object. Deselecting an object removes it from the collection.
You can use the Selected property to iterate through the selected items of any type, or to examine or change the properties of any selected item.
The following sample code copies CustomerID and ContactName fields of all the selected rows to the clipboard as text. It assumes that these fields exist in the table that the selected rows are from and that the rows are not UltraGridGroupByRows.
C#:
private void button1_Click(object sender, System.EventArgs e)
{
Infragistics.Win.UltraWinGrid.SelectedRowsCollection selectedRows;
// Get the selected rows.
//
selectedRows = this.ultraGrid1.Selected.Rows;
// If there are no selected rows, return
//
if ( selectedRows.Count < 1 )
return;
System.Text.StringBuilder sb = new System.Text.StringBuilder( );
// Loop through all the selected rows
//
for ( int i = 0; i < selectedRows.Count; i++ )
{
Infragistics.Win.UltraWinGrid.UltraGridRow row;
row = selectedRows[i];
// Use Cells collection to get the values for
// CustomerID and ContactName columns.
//
sb.Append( row.Cells[ "CustomerID" ].Text );
sb.Append( "," );
sb.Append( row.Cells["ContactName"].Text );
sb.Append( "\r\n" );
}
// Copy the text to the clipboard.
//
System.Windows.Forms.Clipboard.SetDataObject( sb.ToString( ) );
}
The UltraWinGrid event manager gives you a high degree of control over how the control invokes event procedures. You can use it to selectively enable and disable event procedures depending on the context of your application. You can also use the event manager to return information about the state of the control's events.
The event manager's methods are used to determine the enabled state of an event (
You can specify what type of selection is allowed for various types of objects by using the properties of the UltraGridOverride object. The properties
UltraWinGrid uses selection strategies to control the types of selection the user can perform in the control. A selection strategy is an extended set of attributes covering options such as multiple vs. single selection, range vs. discrete selection, non-contiguous selection, what types of objects may be selected and how selection is initiated and completed using the keyboard and mouse. Selection strategies are implemented using the SelectionManager object and the ISelectionFilter interface. Selection strategies are defined in the Infragistics.Win assembly.
UltraWinGrid includes pre-defined strategies for the most common types of selection that are performed in a grid. You can also create your own selection strategies by deriving your own selection filter classes from those supplied and overriding selected virtual methods.
Since selection is primarily a function of the user interface, selection logic is based off of the UIElement for an object. The Selectable property of the UIElement determines whether the object can be selected.
The following table lists the default key mappings for the
| KeyCode | ActionCode | StateRequired | StateDisallowed | SpecialKeysRequired | SpecialKeysDisallowed |
|---|---|---|---|---|---|
| Right | NextCell | Cell | InEdit | None | AltCtrl |
| Tab | NextCellByTab | Cell | None | None | All |
| Left | PrevCell | Cell | InEdit | None | AltCtrl |
| Tab | PrevCellByTab | Cell | None | Shift | AltCtrl |
| Up | AboveCell | Cell | InEdit | None | Alt |
| Down | BelowCell | Cell | InEdit | None | Alt |
| Home | FirstRowInBand | Row | Cell | None | AltCtrl |
| End | LastRowInBand | Row | Cell | None | AltCtrl |
| Right | FirstRowInGrid | None | Row | None | Alt |
| Down | FirstRowInGrid | None | Row | None | Alt |
| Home | FirstRowInGrid | Row | Cell | Ctrl | Alt |
| End | LastRowInGrid | Row | Cell | Ctrl | Alt |
| Right | ExpandRow | RowExpandable | Cell, RowExpanded | None | Alt |
| Left | CollapseRow | RowExpanded | Cell | None | Alt |
| Right | NextRow | Row | Cell, RowExpandable | None | Alt |
| Right | NextRow | Row, RowExpanded | Cell | None | Alt |
| Tab | NextRowByTab | Row | Cell | None | All |
| Left | PrevRow | Row | Cell, RowExpanded | None | Alt |
| Tab | PrevRowByTab | Row | Cell | Shift | AltCtrl |
| Up | AboveRow | Row | Cell | None | Alt |
| Down | BelowRow | Row | Cell | None | Alt |
| Space | ToggleCheckbox | InEdit, IsCheckbox | None | None | All |
| Space | ToggleCellSel | Cell | InEdit | None | All |
| Space | ToggleRowSel | Row | Cell | None | All |
| Space | DeactivateCell | Cell | None | Ctrl | AltShift |
| Space | ActivateCell | Row | Cell | Ctrl | AltShift |
| Right | NextCellInBand | Cell | InEdit | Ctrl | Alt |
| Left | PrevCellInBand | Cell | InEdit | Ctrl | Alt |
| Home | FirstCellInRow | Cell | CellFirst, InEdit | None | AltCtrl |
| End | LastCellInRow | Cell | CellLast, InEdit | None | AltCtrl |
| Home | FirstCellInBand | CellFirst | InEdit | None | AltCtrl |
| End | LastCellInBand | CellLast | InEdit | None | AltCtrl |
| Home | FirstCellInGrid | Cell | InEdit | Ctrl | Alt |
| End | LastCellInGrid | Cell | InEdit | Ctrl | Alt |
| Prior | PageUpCell | Cell | InEdit | None | Alt |
| Next | PageDownCell | Cell | InEdit | None | Alt |
| Prior | PageUpRow | Row | Cell | None | Alt |
| Next | PageDownRow | Row | Cell | None | Alt |
| Escape | UndoCell | InEdit | IsDroppedDown | None | Alt |
| Escape | UndoRow | Row | InEdit | None | Alt |
| Escape | CloseDropdown | IsDroppedDown | None | None | Alt |
| Enter | CloseDropdown | IsDroppedDown | None | None | Alt |
| Enter | ExpandRow | GroupByRow | IsDroppedDown, RowExpanded | None | Alt |
| Enter | CollapseRow | RowExpanded, GroupByRow | IsDroppedDown | None | Alt |
| F4 | ToggleDropdown | HasDropdown, InEdit | None | None | Alt |
| Up | ToggleDropdown | HasDropdown, InEdit | None | Alt | None |
| Down | ToggleDropdown | HasDropdown, InEdit | None | Alt | None |
| F2 | ToggleEditMode | Cell | None | None | Alt |
| F4 | EnterEditModeAndDropdown | HasDropdown | InEdit | None | Alt |
| Up | EnterEditModeAndDropdown | HasDropdown | InEdit | Alt | None |
| Down | EnterEditModeAndDropdown | HasDropdown | InEdit | Alt | None |
| F6 | NextRegion | None | InEdit | None | All |
| F6 | PrevRegion | None | InEdit | Shift | AltCtrl |
| Delete | DeleteRows | Row | InEdit | None | All |
| F2 | EnterEditMode | Cell | InEdit | None | Alt |
| F2 | ExitEditMode | InEdit | None | None | Alt |
The KeyActionMappings property provides access to the control's mechanism for handling keyboard input from users. All keystrokes for actions such as selection, navigation and editing are stored in a table-based system that you can examine and modify using this property. Through the KeyActionsMappings property, you can customize the keyboard layout of the control to match your own standards for application interactivity.
For example, if you wanted users to be able to navigate between cells by pressing the F8 key, you could add this behavior. You can specify the key code and any special modifier keys associated with an action, as well as determine whether a key mapping applies in a given context.
The following table lists the default key mappings for the
| KeyCode | ActionCode | StateRequired | StateDisallowed | SpecialKeysRequired | SpecialKeysDisallowed |
|---|---|---|---|---|---|
| Right | NextCell | Cell | InEdit | AltCtrl | |
| Tab | NextCellByTab | Cell | All | ||
| Left | PrevCell | Cell | InEdit | AltCtrl | |
| Tab | PrevCellByTab | Cell | Shift | AltCtrl | |
| Up | AboveCell | Cell | InEdit | Alt | |
| Down | BelowCell | Cell | InEdit | Alt | |
| Home | FirstRowInBand | Row | Cell | AltCtrl | |
| End | LastRowInBand | Row | Cell | AltCtrl | |
| Right | FirstRowInGrid | Row | Alt | ||
| Down | FirstRowInGrid | Row | Alt | ||
| Home | FirstRowInGrid | Row | Cell | Ctrl | Alt |
| End | LastRowInGrid | Row | Cell | Ctrl | Alt |
| Right | ExpandRow | RowExpandable | Cell, RowExpanded | Alt | |
| Left | CollapseRow | RowExpanded | Cell | Alt | |
| Right | NextRow | Row | Cell, RowExpandable | Alt | |
| Right | NextRow | Row, RowExpanded | Cell | Alt | |
| Tab | NextRowByTab | Row | Cell, LastRowInGrid | All | |
| Left | PrevRow | Row | Cell, RowExpanded | Alt | |
| Tab | PrevRowByTab | Row | Cell, FirstRowInGrid | Shift | AltCtrl |
| Up | AboveRow | Row | Cell | Alt | |
| Down | BelowRow | Row | Cell | Alt | |
| Space | ToggleCheckbox | InEdit, IsCheckbox | All | ||
| Space | ToggleCellSel | Cell | InEdit | All | |
| Space | ToggleRowSel | Row | Cell | All | |
| Space | DeactivateCell | Cell | Ctrl | AltShift | |
| Space | ActivateCell | Row | Cell | Ctrl | AltShift |
| Right | NextCellInBand | Cell | InEdit | Ctrl | Alt |
| Left | PrevCellInBand | Cell | InEdit | Ctrl | Alt |
| Home | FirstCellInRow | Cell | CellFirst, InEdit | AltCtrl | |
| End | LastCellInRow | Cell | CellLast, InEdit | AltCtrl | |
| Home | FirstCellInBand | CellFirst | InEdit | AltCtrl | |
| End | LastCellInBand | CellLast | InEdit | AltCtrl | |
| Home | FirstCellInGrid | Cell | InEdit | Ctrl | Alt |
| End | LastCellInGrid | Cell | InEdit | Ctrl | Alt |
| Prior | PageUpCell | Cell | InEdit | Alt | |
| Next | PageDownCell | Cell | InEdit | Alt | |
| Prior | PageUpRow | Row | Cell | Alt | |
| Next | PageDownRow | Row | Cell | Alt | |
| Escape | UndoCell | InEdit | IsDroppedDown | Alt | |
| Escape | UndoRow | Row, RowDirty | InEdit | Alt | |
| Enter | ExpandRow | GroupByRow | IsDroppedDown, RowExpanded | Alt | |
| Enter | CollapseRow | RowExpanded, GroupByRow | IsDroppedDown | Alt | |
| F4 | ToggleDropdown | HasDropdown, InEdit | Alt | ||
| Up | ToggleDropdown | HasDropdown, InEdit | Alt | ||
| Down | ToggleDropdown | HasDropdown, InEdit | Alt | ||
| F2 | ToggleEditMode | Cell | SwapDroppedDown | Alt | |
| F4 | EnterEditModeAndDropdown | HasDropdown | InEdit | Alt | |
| Up | EnterEditModeAndDropdown | HasDropdown | InEdit | Alt | |
| Down | EnterEditModeAndDropdown | HasDropdown | InEdit | Alt | |
| F6 | NextRegion | InEdit | All | ||
| F6 | PrevRegion | InEdit | Shift | AltCtrl | |
| Delete | DeleteRows | Row | InEdit | All | |
| Right | NextCellInBand | Cell, InEdit, IsCheckbox | |||
| Left | PrevCellInBand | Cell, InEdit, IsCheckbox | |||
| Up | AboveCell | Cell, InEdit, IsCheckbox | |||
| Down | BelowCell | Cell, InEdit, IsCheckbox |
Use this property to specify when updates are committed back to the data source, either based on user interaction, upon row or cell change, or programmatically, when the UpdateData method is invoked.
When this property is set to OnRowChange or OnCellChange, updates are committed to the data source when the user leaves a row or cell, respectively, that has been modified. When a cell that has been modified loses focus, its DataChanged property is set to True and the BeforeCellUpdate event is generated. Similarly, when a row that has been modified loses focus, its DataChanged property is set to True and the BeforeRowUpdate event is generated.
When this property is set to OnUpdate, no updates are actually committed to the data source until the UpdateData method is invoked or until EndEdit is received from the binding manager. Note that there are circumstances where the binding manager will invoke EndEdit whenever the Position is changed, which obviates the use of the OnUpdate setting. This behavior is due to the implementation of the binding manager and is outside the control of the component.
If an attempt is made to update a data source that cannot be updated, the Error event is generated.
This property returns a Cell object that corrresponds to the active cell in the grid. You can set this property to an existing Cell object to have that cell become the active one.
Note:This property is obsoleted. It will always return null. Use
If the cell is not in edit mode, this property returns Null. The control returned by this property will either be a text box or an UltraMaskedEdit control.
Note: Use UltraGridColumn.Editor property instead to access the editor being used for rendering as well editing cells in that column.
Indicates whether the control can utilize an
You can set the SyncWithCurrencyManager property to False to prevent the UltraGrid from synchronizing the active row with the associated currency manager's position.
This is useful if you have a lot of deeply nested bands and navigating rows is very slow.
Indicates whether the control can utilize an
A proxy functions by hosting the editor that the associated
Note: The proxy will only function when placed on a RowEditTemplate or within a child control of a RowEditTemplate.
Note: These settings take precedence over appearances provided by the grid.
Note: If the specified column does not exist in the band associated with the RowEditTemplate, or the template is not currently associated with a band, the proxy will be disabled, showing a message as its value at design-time.
Note: These settings take precedence over appearances provided by the grid.
Note: These settings take precedence over appearances provided by the grid.
Note: the
Note: This property will not change the appearance of the control at design-time.
Note: If the proxy is unable to access an underlying row, such as if the template isn't shown or the RowEditTemplate isn't associated with a band, a default editor will be returned to display the disabled control and to show a message at design-time.
UltraGridColumnChooser allows the user to select which columns to display in an UltraGrid. It displays the list of columns that the user can hide or unhide from the UltraGrid.
To associate an UltraGrid with a UltraGridColumnChooser set its
UltraGridColumnChooser has two main modes of operation.
HiddenColumnsOnly mode displays the columns that are currently hidden in the UltraGrid. In this mode the user can drag the columns between the UltraGrid and the Column Chooser to hide or unhide them.
AllColumnsWithCheckBoxes mode displays all the columns, hidden or otherwise, in the column chooser. There is a checkbox next to each column which the user can use to hide or unhide columns. This mode also offers the same drag and drop capability as the HiddenColumnsOnly option.
AllColumnsAndChildBandsWithCheckBoxes mode behaves the same as AllColumnsWithCheckBoxes except that it also lets the user hide or unhide child bands. Each child band displays a check box next to it, just like the columns that the user can use to hide or unhide the child band. AllColumnsAndChildBandsWithCheckBoxes is the default column chooser style.
Various appearance related aspects can be controlled by the
Internally the column chooser control uses an UltraGrid to display the list of columns.
This UltraGrid is different from the grid for which the column chooser control is being
displayed. Use the
See
Specifies the style of the column chooser. Default is AllColumnsAndChildBandsWithCheckBoxes.
See
When SyncLookWithSourceGrid is set to True the source grid's appearance
will be applied to the column chooser so they look similar. If this property is left
to True the appearance set on the column chooser's
Note that not all appearances are copied from the source grid to the column chooser's display layout. If you find that some appearance is left uncopied then set this property to False and manually set the appearance on the DisplayLayout of the column chooser.
CurrentSelectedItem property can be used to find out which column or band has been selected by the user. The return value can be an instace of UltraGridColumn or UltraGridBand or null in case no item is currently selected.
UI element class for the column chooser button element. This
element is displayed in the column headers area above the row selectors when
the
GetEditorContext and
Implementing owner will return the object that was last cached using SetEditorContext method.
Implementing owner will return the object that was last cached using SetEditorContext method.
The
Note: When the
Raising an event invokes the event handler through a delegate.
The OnPagePrinted method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.
Notes to Inheritors: When overriding OnPagePrinted in a derived class, be sure to call the base class's OnPagePrinted method so that registered delegates receive the event.
Note: The Tag property is not saved with the settings information.
Note: A single instance of a RowEditTemplate cannot be associated with multiple
Note: The associated
Note: If the changes cannot be committed, the template will still try to close itself.
If you do not want to close the template if the changes cannot be committed, manually call
Note: If the changes cannot be committed, the template will still try to close itself.
If you do not want to close the template if the changes cannot be committed, manually call
Note: Cancelling the changes will not show on the grid unless the underlying object that the row is bound to implements the IEditableObject interface. If this is not the case, then cancelling change will need to be performed manually.
In design mode notifies the
At runtime this method does nothing.
Note: Though the grid can be navigated while the template is shown modelessly, it is not possible to simultaneously edit a cell directly on the grid.
Note: If the template has been reparented and manually shown through the
By default, this property defaults to an empty string and as such will obtain
its style information from the default style library that is loaded into memory using the
Note: If this property is set and the name does not match up with the name of a loaded style library, the control/component will not have any style information.
UltraGrid1.DisplayLayout.Appearance.ForeColor = System.Drawing.Color.BlueUltraGrid1.Appearances.Add "New1"
UltraGrid1.Appearances("New1").ForeColor = System.Drawing.Color.Blue
UltraGrid1.Layout.Appearance = UltraGrid1.Appearances("New1")
A Header object represents a column or group header that specifies information about the column or group, and can also serve as the interface for functionality such as moving, swapping or sorting the column or group. Group headers have the added functionality of serving to aggregate multiple columns under a single heading.
The Header property provides access to the header that is associated with an object. The Header property provides access to the header that is associated with an object. In some instances, the type of header may be ambiguous, such as when accessing the Header property of a UIElement object. You can use the Type property of the Header object returned by the Header property to determine whether the header belongs to a column or a group.
This property returns a reference to a RowScrollRegion object that can be used to set properties of, and invoke methods on, the rowscrollregion to which the row belongs. You can use this reference to access any of the returned rowscrollregion's properties or methods.
The Row property of an object refers to a specific row in the grid as defined by an UltraGridRow object. You use the Row property to access the properties of a specified UltraGridRow object, or to return a reference to the UltraGridRow object that is associated with the current object.
An UltraGridRow object represents a single row in the grid that displays the data from a single record in the underlying data source. The UltraGridRow object is one mechanism used to manage the updating of data records either singly or in batches (the other is the UltraGridCell object). When the user is interacting with the grid, one UltraGridRow object is always the active row, and determines both the input focus of the grid and the position context of the data source to which the grid is bound.
Note that not all styles are available on all operating systems. If the version of the OS that your program is running on does not support a particular border style, borders formatted with that style will be drawn using solid lines.