diff --git a/PROMS/WORD ADD-INs/C1.Win.C1FlexGrid.2.dll b/PROMS/WORD ADD-INs/C1.Win.C1FlexGrid.2.dll new file mode 100644 index 00000000..5283754f Binary files /dev/null and b/PROMS/WORD ADD-INs/C1.Win.C1FlexGrid.2.dll differ diff --git a/PROMS/WORD ADD-INs/C1.Win.C1FlexGrid.2.xml b/PROMS/WORD ADD-INs/C1.Win.C1FlexGrid.2.xml new file mode 100644 index 00000000..34100237 --- /dev/null +++ b/PROMS/WORD ADD-INs/C1.Win.C1FlexGrid.2.xml @@ -0,0 +1,12769 @@ + + + + C1.Win.C1FlexGrid.2 + + + + + Static class containing UI strings used by the designer. + + + + + Represents a filter that contains a and a + . + + + + + Gets the contained in this . + + + + + Gets the contained in this . + + + + + Gets or sets a value that determines whether the filter is active. + + + + + Resets the filter making it inactive. + + + + + Applies the filter to a value. + + Value to be filtered. + True if the satisfies the filter; False otherwise. + + + + Gets the editor used to modify the filter at run time. + + A that is used to edit the filter + at run time. + + + + Interface implemented by column filter objects. + + + + + Gets a value that determines whether the filter is active. + + + + + Resets the filter making it inactive. + + + + + Applies the filter to a value. + + Value to be filtered. + True if the satisfies the filter; + False otherwise. + + + + Gets the editor used to modify the filter at run time. + + A to be used to modify the filter at + run time. + The control returned must implement the + interface. + + + + Interface implemented by column filter editor controls. + + + + + Initializes the editor with parameters from a filter to be edited. + + + that contains the column to be filtered. + Index of the column that contains the values to be filtered. + + being edited. + + + + Applies changes to the filter being edited. + + + + + Gets a value that determines whether the containing form should remain + open even when it is deactivated. + + + This property allows custom editors to display modal dialogs. + + + + + Represents a filter based on a set of values. + + + + + Gets or sets an array with the values that should be included in the output. + + + Setting this property to null causes the filter to include all values in the output. + + + + + Gets or sets the limit count of displayed values in value filter. + + + + + Gets or sets a value that determines whether the filter is active. + + + + + Resets the filter making it inactive. + + + + + Applies the filter to a value. + + Value to be filtered. + True if the satisfies the filter; False otherwise. + + + + Gets the editor used to modify the filter at run time. + + A that is used to edit the filter at run time. + + + + Static class containing UI strings used by the designer. + + + + + Summary description for GridDesigner. + + + + + Gets the design time action lists supported by the component associated + with this designer. + + + + + Initializes the designer with the specified component. + + Component associated with the designer. + + + + Releases the resources associated with the designer. + + True to release all resources, false to release unmanaged resources only. + + + + Indicates whether a mouse click at the specified point should be handled by the control. + + Point indicating the mouse position, in screen coordinates. + True if the control should handle the click, false otherwise. + + + + Helper class that provides information about a currently active ComboBox editor. + + + + + Gets or sets the selected index in the currently active ComboBox editor. + + + If there's no active editor, or if the editor is not a ComboBox, + the value returned is -1. + + + + + Gets or sets the selected item in the currently active ComboBox editor. + + + If there's no active editor, or if the editor is not a ComboBox, + the value returned is null. + + + + + Gets the key that corresponds to the selected item in the currently + active ComboBox editor. + + + If there's no active editor, if the editor is not a , or if the cell + being edited does not have an associated DataMap, the value returned is null. + + + + + Gets the collection of items in the currently active ComboBox editor. + + + If there's no active editor, or if the editor is not a ComboBox, + the value returned is null. + + + + + Interface implemented by editors and used by the grid to host edit controls + on cells. + + + All built-in grid editors implement this interface, as do the controls in the + ComponentOne C1Input library. + If you want to use a third-party editor with the , consider + creating a derived class and implementing this interface. + Note that the methods in IC1EmbeddedEditor are called using reflection. + Controls do not need to implement the entire interface. Any public methods with matching + signatures (names, parameters, and return values) will be invoked by the grid. + The grid supplies default handlers for any methods not implemented by the control. + + + + + Called to initialize the editor content and styles. + + Contains the grid data that should be displayed in the editor. + Contains a dictionary with keys that correspond to style element names and values for the cell being edited. + + The dictionary contains the following keys: + + BackColor: Cell background color. + + ForeColor: Cell foreground color. + + Font: Cell font. + + Format: Cell format string (e.g. "#,##0.##"). + + ContentAlignment: Cell text alignment. + + Margins: Extra margins around the cell content (in pixels). + + Wrap: Whether word wrapping is enabled. + + + + + Gets the current value of the editor. + + The current value of the editor (any data type). + + + + Gets a value that determines if the editor's current contents are valid. + + True if the editor currently has valid content (e.g it contains + an EditMask and all required positions have been filled). + + + + + Called to update the editor's size and position. + + The bounds of the cell being edited, in client coordinates. + + This method is called during initialization and also when the grid scrolls. + + + + + Gets a value that determines whether a given key should finalize editing. + + Key to be tested. + True if the key should finish the edits and close the editor. + + If this method returns true, the grid copies the editor value to the cell and + exits edit mode. The key is then processed by the grid (unless the e.Handled + parameter is set to true). + For example, pressing the down arrow typically causes the grid to exit edit + mode and move the cursor to the next row. + The default handler returns true for the TAB, ENTER, and ESC keys. + It also handles the arrow keys for editors based on TextBox, ComboBox, + and DateTimePicker controls. + + + + + Formats a given value using a specified mask. + + Value to be formatted. + Formatting mask. + A string containing the formatted value. + The default implementation ignores the mask and returns value.ToString(). + + + + Gets the editor style, which determines the type of button that is displayed in + the cell before and during editing (DropDown, Modal, or None). + + + The default handler returns DropDown for ComboBoxes, DateTimePickers, and + UpDown controls. It returns None for other control types. + The UITypeEditorEditStyle enumeration is defined in the System.Drawing.Design + namespace. The available settings are DropDown, Modal, and None. + + + + + Interface that extends and can be used to implement multi-column data maps. + + + + + Gets the string that should be displayed in the grid while not in edit mode. + + Value to look up in the dictionary. + The string that should be displayed in the grid while not in edit mode. + + When the is used to populate a , + all columns are displayed when the combo is dropped down. When the combo is closed, only one + column can be displayed. This method returns that value. + + + + + Interface that extends and can be used to implement multi-column data maps. + + + + + Gets the string which is in given column of the dictionary. + + Value to look up in the dictionary. + >Column index in the dictionary. + The string that should be displayed in the grid while not in edit mode. + + + + Class that implements the and can be used as + a column DataMap to create multi-column combo editors. + + + The class can be used to implement simple string-based + data maps or bound data maps that get the data from a data source object. + + + The code below creates an unbound two-column data map and assigns it to a grid column: + + // create string-based MultiColumnDictionary and assign it to column + // note: this will automatically generate keys of type 'int' for each item, + // the key values will be stored in the grid. + string text = "Row1, Col1\tRow1, Col2|Row2, Col1\tRow2, Col3|Row2, Col1\tRow3, Col2"; + MultiColumnDictionary map = new MultiColumnDictionary(text, 0, true); + _flex.Cols[1].DataMap = map; + + The map consists of three items, each with two columns. Because the autoKeys + parameter was set to true in the map's constructor, the map will have unique integer keys for + each value,and those integers will be stored in the grid cells. If autoKeys + had been set to false, the strings themselves would be used as keys and stored in the grid + cells. + The code below creates a bound data map and assigns it to a grid column: + + // create data-based MultiColumnDictionary and assign it to column + // notes: the list will automatically be updated is the data source changes. + DataTable dt = GetDataTable("employees"); + string[] columnNames = new string[] { "FirstName", "LastName", "Country" }; + MultiColumnDictionary map = new MultiColumnDictionary(dt, "EmployeeID", columnNames, 1); + _flex.Cols[2].DataMap = map; + + This map is bound to an Employees DataTable. The keyColumn parameter is set + to "EmployeeID", causing this field to be used as a key. When the grid is edited, the values + stored in the cells will be the employee's ID. However, this value is never displayed be the grid. + The drop-down list will show the employee's first name, last name, and country, as specified by the + columnNames parameter. + When the list is closed, the grid will display the employee's last name, as specified + by the displayColumn parameter. + Note that this map is dynamically bound to the data source, so if the employees table is + modified, the editor list will reflect the changes automatically. + Note also that the usual combo editing features such as auto-search and double-click cycling + still work. + + + + + Initializes a new instance of an unbound class. + + String that contains the items, delimited by pipe characters ("|"). + Each item may contain multiple columns, delimited by tabs (vbTab or '\t'). + + This constructor causes the map to show all columns when the editor is dropped down and only the + first column when the editor is closed or inactive. + + + + + Initializes a new instance of an unbound class. + + String that contains the items. Items are delimited by pipe characters ("|"). + Each item may contain multiple columns, delimited by tabs (vbTab or '\t'). + Index of the column that is displayed in the grid. + True if keys are to be automatically generated, false if the items themselves are + to be used as keys. Note that in the latter case, duplicate items are not allowed. + + + + Initializes a new instance of a bound class. + + Data source object. + Name of the data source column that contains unique keys. + Array with the names of the columns that are included in the map. + Name of the column that is displayed in the grid. + + + + Initializes a new instance of a bound class. + + Data source object. + Name of the data source column that contains unique keys. + + This constructor causes the map to show all columns when the editor is dropped down and only the + first column when the editor is closed or inactive. + + + + + Initializes a new instance of a bound class. + + Data source object. + Name of the data source column that contains unique keys. + Array with the names of the columns that are included in the map. + Name of the column that is displayed in the grid. + + + + Initializes a new instance of a bound class. + + Data source object. + Name of the data source column that contains unique keys. + + + + Removes all entries from the . + + + + + Adds an entry with the specified key and value into the . + + + + + Gets or sets the value associated with the specified key + + The key of the value to get or set. + + + + Gets the string which is in given column of the dictionary. + + Value to look up in the dictionary. + >Column index in the dictionary. + The string that should be displayed in the grid while not in edit mode. + + + + Specifies how adjacent cells are merged for display. + + + + + Do not merge any cells. + + + + + Merge any adjacent cells with same contents. + + + + + Merge rows only if cells above are also merged. + + + + + Merge columns only if cells to the left are also merged. + + + + + Merge cells only if cells above or to the left are also merged. + + + + + Merge only fixed cells. This setting is useful for setting up complex + headers for the data and preventing the data itself from being merged. + + + + + Allow long entries to spill into empty adjacent cells. + + + + + Allow long entries in node rows to spill into empty adjacent cells. + + + + + Use collection to determine which cells are merged. + + + + + Use the setting specified for the property. + + + + + The C1FlexGrid control is a powerful, full-featured grid. + C1FlexGrid provides advanced features such as outline trees, cell merging, + masked editing, translated combo and image lists, owner-draw cells, and automatic + data aggregation. + + + C1FlexGrid can be used in bound mode, where it displays data from .NET + data sources, or in unbound mode, where the grid itself manages the data. + You can use C1FlexGrid to read and write Excel files (.Xls), or read and write + grid contents to and from Xml files. + Classes derived from should have a LicenseProvider + attribute so Visual Studio will embed the appropriate licensing information into + projects that use the derived control. + For example: + + [LicenseProvider(typeof(LicenseProvider))] + public class MyGrid : C1FlexGrid + { + // implementation + } + + + + + + Creates a new instance of the control. + + + + + Gets or sets how cells should be merged. + + + Merging cells allows you to display data in a clear, appealing way, + because it highlights groups of identical information. It also gives you + flexibility to build tables similar to the ones you can create in HTML or + using Microsoft Word, both of which support merged cells. + To create tables with merged cells, set the + property to a value other than , and + set the property of individual rows and + columns true for the rows and columns you wish to merge. After these + properties are set, the grid will automatically merge adjacent cells + that have the same contents. + Whenever the cell contents change, the grid updates the merging state. + + + The code below causes the grid to merge cells with the same data in column 1: + + flex.AllowMerging = AllowMergingEnum.Free; + flex.Cols[1].AllowMerging = true; // merge values in column 1 + + + + + Gets or sets how non-scrollable cells should be merged. + + + By default, this property is set to , which + causes fixed cells to be merged with the same setting as scrollable cells. + If you specify a different value for this property, you can use different merging + modes for fixed cells such as column headers than the setting used for scrollable cells. + + + + + Returns the merged range of cells that includes a given cell. + + Row index. + Column index. + Whether the range should be clipped to the visible area of the grid. + A object that contains the given cell. + + Cell merging is controlled by the property. + The method allows you to determine whether a cell is + merged with adjacent cells. + You can override the method to implement custom merging + logic. If you do this, make sure the merging method is consistent and efficient, since + it gets called frequently and affects the grid's appearance and behavior. + + + The code below checks the current cell after a selection to see if it is part + of a merged range: + + private void _flex_SelChange(object sender, System.EventArgs e) + { + CellRange rg = this._flex.GetMergedRange(_flex.Row, _flex.Col, false); + if (!rg.IsSingleCell) + { + Console.WriteLine("selection is merged: {0},{1}-{2},{3}", + rg.TopRow, rg.LeftCol, rg.BottomRow, rg.RightCol); + } + } + + The code below shows how you can override the method + to provide custom merging: + + public class CustomMerge : C1FlexGrid + { + public CustomMerge() + { + // allow free merging by default + AllowMerging = AllowMergingEnum.Free; + for (int r = 0; r < Rows.Count; r++) Rows[r].AllowMerging = true; + for (int c = 0; c < Cols.Count; c++) Cols[c].AllowMerging = true; + } + override public CellRange GetMergedRange(int row, int col, bool clip) + { + // merge cells in range (1,1)-(3,3) + if (row >= 1 && row <= 3 && col >= 1 && col <= 3) + return GetCellRange(1, 1, 3, 3); + + // don't merge anything else + return GetCellRange(row, col); + } + } + + + + + Returns the merged range of cells that includes a given cell. + + Row index. + Column index. + A object that contains the given cell. + + This method returns the entire range, including invisible cells. + + + + + Gets the that determines which grid + cells are merged when the property is set to + . + + + + + Reflects grid over its main diagonal. + + + The Transpose method also removes sorting and filtering for every columns. + + + + + Overridden to clear merged ranges. + + + + + Gets the state for a Windows XP theme while the mouse moves over a cell. + + + This method is for internal use. It allows inherited classes to customize the hot-tracking behavior. + + Row under the mouse. + Column under the mouse. + An integer representing the item state (2 for hot-tracking, 1 for normal). + + + + Gets a cell glyph to show in a cell. + + + This method is for internal use. It allows inherited classes to customize the display of the sorting glyphs. + + Row index. + Column index. + Cell rectangle + Glyph to display above the cell content. + Glyphs to display on the left of the cell. + Glyphs to display on the right of the cell. + True if any glyphs were assigned to the cell, false otherwise. + + + + Applies a value to a cell or cell range. + + + This method is for internal use. It allows inherited classes to customize the way data + coming from cell editors is applied to the cells. + + Row index. + Column index. + Data to be applied to the cell. + Whether the data should be coerced into the cell's data type. + + + + + + Applies a value to a cell or cell range. + + + This method is for internal use. It allows inherited classes to customize the way checkbox + data is applied to the cells. + + Row index. + Column index. + Value to apply to the cell. + + + + Invalidates a cell range, causing it to be repainted. + + Range to be invalidated. + + This method is rarely used by the programmer, since the grid automatically + performs invalidation as needed. + + + + + Gets a rectangle representing the coordinates of a cell, row, or column. + + + This method is for internal use. It allows inherited classes to customize the way cell geometry + is calculated. + + Row index (or -1 to get column bounds). + Column index (or -1 to get row bounds). + Whether the rectangle should be horizontally clipped to the grid's client area. + Whether the rectangle should be vertically clipped to the grid's client area. + A containing the display area for the row, column, or cell, in client + coordinates and accounting for scroll position. + + + + Gets a rectangle representing the coordinates of a cell editor. + + + This method is for internal use. It allows inherited classes to customize the way cell geometry + is calculated. + + Row index. + Column index. + Rectangle used to position the cell editor. + + + + Starts editing a cell in response to a key press. + + + This method is for internal use. It allows inherited classes to customize the editing process. + + Row index. + Column index. + Key that initiated the edit process. + Whether editing should start even in non-editable cells (e.g. fixed cells). + True if the editing process was started successfully, false otherwise. + + + + Starts editing a cell in response to a mouse action. + + + This method is for internal use. It allows inherited classes to customize the editing process. + + Row index. + Column index. + Mouse position in client coordinates. + Whether the action was a double-click. + True if the editing process was started successfully, false otherwise. + + + + Gets a value that determines if a cell contains the grid cursor. + + Row index. + Column index. + True if the cell contains the cursor, false otherwise. + + + + Gets a value that determines if a cell is part of the selection and should be highlighted. + + Row index. + Column index. + True if the cell should be highlighted, false otherwise. + + + + Gets a value that indicates what types of child nodes a row has. + + + This method is for internal use. It allows inherited classes to customize outline trees. + + Row index. + Column index. + Outline level. + Zero if the row has no children, 1 if it has regular data rows only, + 2 if it has child nodes, and 3 if it has data and child nodes. + + + + + Draws a grid row. + + A that contains a + object where the row will be drawn. + Index of the row to draw. + + This method is for internal use. It allows inherited classes to customize the grid appearance. + + + + + Draws a grid cell. + + A that contains a + object where the cell will be drawn. + Index of the cell's row. + Index of the cell's column. + The index of the last column painted (may be greater than + if columns are merged). + + This method is for internal use. It allows inherited classes to customize the grid appearance. + + + + + Draws a grid cell. + + + object where the cell will be drawn. + Index of the cell's row. + Index of the cell's column. + + that defines the cell position. + + This method is for internal use. It allows inherited classes to customize the grid appearance. + + + + + Moves or extends the current selection. + + + value that specifies the type of cursor movement. + Whether to extend the current selection. + + This method is for internal use. It allows inherited classes to customize the grid appearance. + + + + + Automatically size grid columns to fit the largest entry. + + + object used to measure the cell contents. + Index of the first row to be measured. + Index of the first column to be measured. + Index of the last row to be measured. + Index of the first column to be measured. + Extra space, in twips, to add to the largest entry. + + value that specifies auto sizing behavior. + + This method is for internal use. It allows inherited classes to customize the grid appearance. + + + + + Automatically size grid columns to fit the largest entry. + + + object used to measure the cell contents. + Index of the first row to be measured. + Index of the first column to be measured. + Index of the last row to be measured. + Index of the first column to be measured. + Extra space, in twips, to add to the largest entry. + + value that specifies auto-sizing behavior. + + This method is for internal use. It allows inherited classes to customize the grid appearance. + + + + + Raises the event. + + Object raising the event. + A that contains event data. + + + + Called when the grid contents scroll. + + + value that specifies the scroll direction. + + This method is for internal use. It allows inherited classes to customize the grid scrolling behavior. + + + + + Specifies whether the user should be able to resize rows and columns with the mouse. + + + + + The user may not resize rows or columns. + + + + + The user may resize columns with the mouse by dragging the edge of the column headers. + Double-clicking the edge of a column header automatically sizes the column to fit the widest entry. + + + + + The user may resize rows with the mouse by dragging the edge of the row headers. + Double-clicking the edge of a row header automatically sizes the row to fit the tallest entry. + + + + + The user may resize rows and columns with the mouse. + + + + + The user may change the default column width with the mouse. + Resizing any column will resize all columns that don't have a specific width assigned to them. + + + + + The user may change the default row height with the mouse. + Resizing any row will resize all rows that don't have a specific height assigned to them. + + + + + The user may change the default column width or row height with the mouse. + + + + + Specifies whether the user should be able to freeze rows and columns with the mouse. + + + + + The user may not freeze rows or columns. + + + + + The user may freeze columns by dragging the frozen region vertical boundary with the mouse. + + + + + The user may freeze rows by dragging the frozen region horizontal boundary with the mouse. + + + + + The user may freeze rows and columns by dragging the frozen region boundaries with the mouse. + + + + + Specifies whether the user should be able to drag rows and columns with the mouse. + + + + + The user may not drag rows or columns. + + + + + The user may drag columns with the mouse. + + + + + The user may drag rows with the mouse. + + + + + The user may drag rows and columns with the mouse. + + + + + Specifies whether the user should be able to sort columns with the mouse. + + + + + The user may not sort columns with the mouse. + + + + + The user may sort single columns by clicking on its header cell. + + + + + The user may sort a range of columns by clicking on the header cell + of the rightmost column in the range. + + + + + Specifies whether the grid should highlight the selected range. + + + + + Never highlight the selected range. + + + + + Always highlight the selected range. + + + + + Highlight the selected range when the control has focus. + + + + + Specifies the appearance of the focus rectangle. + + + + + No focus rectangle. + + + + + Show a light focus rectangle (dotted, 1-pixel wide). This is the default setting. + + + + + Show a heavy focus rectangle (dotted, 2-pixel wide). + + + + + Show a solid focus rectangle. The color of the rectangle is determined by the + BackColor property of the style. + + + + + Show a raised focus rectangle. + + + + + Show an inset focus rectangle. + + + + + Specifies options that control auto-sizing. + + + + + Default behavior. + + + + + All rows (or columns) in the range are set to the same size. + + + + + Ignore invisible rows (or columns) when auto-sizing. + + + + + Ignore merged cells when auto-sizing. + + + + + Specifies whether cells should be drawn entirely by the grid or with + help from custom drawing code. + + + + + Grid cells are drawn by the grid. + + + + + The grid fires the event to allow custom + cell drawing. + + + + + Specifies which elements of the cell should be drawn by the grid. + + + This enumeration is used when rendering owner-drawn cells. + If you set the property to , + the grid will fire the event to allow custom cell drawing. + The parameter passed to the event handler has a + method that allows you to use the standard + drawing routines for rendering parts of the cell. For example, you can paint a custom background + and use the standard drawing routines for the cell borders and content. + See the event for an example. + + + + + Draw the cell background. + + + + + Draw the cell border. + + + + + Draw the cell content (text, images, check boxes, etc). + + + + + Draw all cell elements (background, border, and contents). + + + + + Specifies when the grid should display combo buttons in cells. + + + + + Show buttons only while editing the cell. + + + + + Show buttons when the cell has the focus. This is the default setting for grid. + + + + + Always show buttons. + + + + + Never show buttons. + + + + + ShowButtons property of the column is inherited from the grid. This is default setting for column. Cannot be used with ShowButtons property of the grid. + + + + + Specifies options that customize the grid's editing behavior. + + + + + No special behavior. + + + + + Search for entries in lists as the user types. + + + + + Cycle to the next item on the list when the user double-clicks a cell. + + + + + Check and uncheck all check boxes in a selection simultaneously. + + + + + Use built-in numeric editor when editing numeric types. + + + + + Commit changes to data source only when changing rows or moving focus. + + + + + Exit editor if user presses the right arrow key at the end of the content + or the left arrow key at the start of the content. + + + + + Enter edit mode only in response to mouse or keyboard events. Setting this + flag to false causes the grid to enter edit mode when the control gets the + focus or when the user moves the cursor. + + + + + All of the above. + + + + + Specifies whether the control should use themes for displaying row or column headers. + + + + + Use themed headers when the property is set to XpThemes. + + + + + Do not use themed headers. + + + + + Use themed headers for row headers. + + + + + Use themed headers for column headers. + + + + + Use themed headers for row and column headers. + + + + + Use themed headers to indicate selected rows and columns when VisualStyle + is set to one of the Office styles. + + + + + Specifies options that customize scrollbar behavior. + + + + + Use the default scrolling behavior. + + + + + Keep scrollbars visible even when they are disabled. + + + + + Scroll by rows and columns (instead of by pixel). + + + + + Do not scroll the control contents until the user releases the scrollbar thumb. + + + + + Fire the event and display a tooltip next to + the vertical scrollbar while scrolling vertically. + + + + + Do not scroll the control to the first cell of merged range. + + + + + Specifies what parts of the grid should be copied to the clipboard when the + property is set to true. + + + + + Only the selected data is copied. + + + + + Copy the selected data and include the column headers. + + + + + Copy the selected data and include the row headers. + + + + + Copy the selected data and include row and column headers. + + + + + Do not copy any data to the clipboard. + + + + + Specifies the position of the sort glyphs within the column header cells. + + + + + Do not show sort glyphs. + + + + + Show sort glyphs on the right of the column header cells. + + + + + Show sort glyphs on the top of the column header cells. + + + + + Show sort glyphs on the top of the column header cells if filtering + is enabled, and on the right otherwise. + + + + + Base class for the control. + + + + + Releases all resources used by the . + + True to release both managed and unmanaged resources; + False to release only unmanaged resources. + + + + Signals the object that initialization is starting. + + + + + Signals the object that initialization is complete. + + + + + Occurs when the filter localizes a string in the user interface. + + + The control automatically localizes the + column filter based on the system's current culture and in the setting + of the property. + This event allows you to customize the filter strings or to + implement localization to languages that are not supported by the grid's + built-in localization mechanism. + To modify the content of any of the filter's UI elements, handle + this event and set the e.Value parameter to the text you would + like to display. + + + The example below shows how you can change the strings in the filter + UI based on the string value and on the name of the controls being + localized: + + void Initialize() + { + // enable filtering + _flex.AllowFiltering = true; + + // set GetLocalizedString handler + _flex.GetLocalizedString += _flex_GetLocalizedString; + } + void _flex_GetLocalizedString(object sender, C1.Win.C1FlexGrid.GetLocalizedStringEventArgs e) + { + // customize item based on text value + if (e.Value == "(Select All)") + { + e.Value = "(Select Everything)"; + } + + // customize item based on component name + switch (e.ComponentName) + { + case "_btnApplyFilter": + e.Value = "OK"; + break; + case "_btnClearFilter": + e.Value = "Reset"; + break; + case "_btnCancel": + e.Value = "Close"; + break; + } + } + + + + + Raises the event. + + + that contains the event data. + + + + Creates a new accessibility object for the control. + + A new for the control. + + + + Retrieves the specified . + + Row index of the accessibility object to return. + The for the specified row. + + + + Raises the event. + + An that contains the event data. + + + + Gets the default size of the control. + + + + + Fires when the grid or its contents change. + + + This is a general event that fires before more specific events. + For example, if the user drags a column with the mouse, the control fires the + , , and + events. + The GridChanged event allows you to create a centralized handler + for all types of grid events. It does not provide detailed arguments for + every event, nor the option of canceling user actions. + + + + + Raises the event. + + + + + Fires before the event is handled by the grid. + + + This event fires before the grid processes the event, and + gives the program a chance to customize the behavior of the control and optionally + cancel the default handling of the mouse. + + + The code below handles the event to detect clicks + on row headers and provide OLE drag and drop functionality. + + void _flex_BeforeMouseDown(object sender, C1.Win.C1FlexGrid.BeforeMouseDownEventArgs e) + { + // start dragging when the user clicks the row headers + HitTestInfo hti = _flex.HitTest(e.X, e.Y); + if (hti.Type == HitTestTypeEnum.RowHeader) + { + e.Cancel = true; // cancel default handling + HandleRowDragDrop(hti.Row); // handle row drag/drop + } + } + + + + + Raises the event. + + + + + Fires before the DoubleClick event is handled by the grid. + + + This event fires before the grid processes the event, and + gives the program a chance to customize the behavior of the control and optionally + cancel the default handling of the mouse. + + + The code below handles the event to detect double-clicks + on cells in a specific column and provide a custom edit dialog instead of using the + built-in editor. + + void _flex_BeforeDoubleClick(object sender, C1.Win.C1FlexGrid.BeforeMouseDownEventArgs e) + { + // detect double-clicks on column "Customer" + HitTestInfo hti = _flex.HitTest(e.X, e.Y); + if (hti.Type == HitTestTypeEnum.Cell && _flex[hti.Column].Name == "Customer") + { + e.Cancel = true; // cancel default handling + ShowCustomEditDialog(hti.Row, hti.Column); // handle row drag/drop + } + } + + + + + Fires when the user starts dragging a row. + + + This event only fires when the user drags a row using the mouse. + It does not fire when a row is moved using the method. + You can prevent specific rows from being dragged by the user by setting their + property to false. + + + + + Raises the event. + + A that contains the event data. + + + + Fires as the user drags a row to a new position. + + + This event only fires when the user drags a row using the mouse. + It does not fire when a row is moved using the method. + You can prevent specific rows from being dragged by the user by setting their + property to false. + + + + + Raises the event. + + A that contains the event data. + + + + Fires after the user finishes dragging a row. + + + This event only fires when the user drags a row using the mouse. + It does not fire when a row is moved using the method. + You can prevent specific rows from being dragged by the user by setting their + property to false. + + + + + Raises the event. + + A that contains event data. + + + + Fires when the user starts dragging a column. + + + This event only fires when the user drags a column using the mouse. + It is does not fire when a column is moved using the method. + You can prevent specific columns from being dragged by the user by setting their + property to false. + + + + + Raises the event. + + A that contains event data. + + + + Fires as the user drags a column to a new position. + + + This event only fires when the user drags a column using the mouse. + It does not fire when a row is moved using the method. + You can prevent specific columns from being dragged by the user by setting their + property to false. + + + + + Raises the event. + + A that contains the event data. + + + + Fires after the user finishes dragging a column. + + + This event only fires when the user drags a column using the mouse. + It does not fire when a column is moved using the method. + You can prevent specific columns from being dragged by the user by setting their + property to false. + + + + + Raises the event. + + A that contains event data. + + + + Fires before a column is sorted by a click on a column header. + + + This event only fires if the sorting was caused by a click on a column header. It does not fire + before sorting with the method. + This event is useful when you want to prevent the user from sorting certain columns or to specify + custom sorting orders for specific columns. You may do so by modifying the value of the + parameter. + + + + + Raises the event. + + A that contains event data. + + + + Fires after a column is sorted by a click on a column header. + + + This event only fires if the sorting was caused by a click on a column header cell (see the + property). It does not fire after sorting with the method. + This event is useful if you want to update user interface elements to reflect the new sorting. + To prevent certain columns from being sorted, or to alter their default sorting order, use the + or handle the event. + + + + + Raises the event. + + A that contains event data. + + + + Fires before a row is automatically resized by a double-click on a row header. + + + + + Raises the event. + + A that contains event data. + + + + Fires before a column is automatically resized by a double-click on a column header. + + + + + Raises the event. + + A that contains event data. + + + + Fires before a row is resized by dragging the row header. + + + Use the grid's property to determine whether users + are allowed to resize rows, columns, or both. + and + objects also have an property + that allows you to prevent specific rows and columns from being resized. + + + + Raises the event. + + A that contains event data. + + + + Fires after a row is resized by dragging the row header. + + + This event is fired after a row is resized by the user, by dragging the edge + of the row header cell with the mouse (see the property). + It is not fired when a row is resized by assigning a new value to the + property. + + + + + Raises the event. + + A that contains event data. + + + + Fires before a column is resized by dragging the column header. + + + + + Raises the event. + + A that contains event data. + + + + Fires after a column is resized by dragging the column header. + + + This event is fired after a column is resized by the user, by dragging the edge + of the column header cell with the mouse (see the property). + It is not fired when a column is resized by assigning a new value to the + property. + + + + + Raises the event. + + A that contains event data. + + + + Fires before rows are frozen by dragging the frozen row divider. + + + Use the property to enable or disable row and column freezing. + + + + + Raises the event. + + A that contains event data. + + + + Fires after rows are frozen by dragging the frozen row divider. + + + Use the property to enable or disable row and column freezing. + + + + + Raises the event. + + A that contains event data. + + + + Fires before columns are frozen by dragging the frozen column divider. + + + Use the property to enable or disable row and column freezing. + + + + + Raises the event. + + A that contains event data. + + + + Fires after columns are frozen by dragging the frozen column divider. + + + Use the property to enable or disable row and column freezing. + + + + + Raises the event. + + A that contains event data. + + + + Fires when the mouse enters a cell. + + + Many applications track mouse movement and react to the cell that is currently + under the mouse. This can be done using the event, but that + is not very efficient since the event fires many times while the mouse is over the + same cell. + The MouseEnterCell event allows you to implement cell tracking + efficiently, since it only fires once until the mouse leaves the cell. + + + The code below tracks mouse movement and highlights the cell under the mouse: + + void Form1_Load(object sender, EventArgs e) + { + // create style for tracking cell under the mouse + CellStyle cs = _flex.Styles.Add("track"); + cs.BackColor = Color.Gold; + } + void _flex_MouseEnterCell(object sender, RowColEventArgs e) + { + // apply tracking style when mouse enters the cell + _flex.SetCellStyle(e.Row, e.Col, _flex.Styles["track"]); + } + void _flex_MouseLeaveCell(object sender, RowColEventArgs e) + { + // remove tracking style when mouse leaves the cell + _flex.SetCellStyle(e.Row, e.Col, (CellStyle)null); + } + + + + + Raises the event. + + + that contains the event data. + + + + Fires when the mouse leaves a cell. + + + + + Raises the event. + + + that contains the event data. + + + + Fires before the grid scrolls. + + + + + Raises the event. + + A that contains event data. + + + + Fires after the grid scrolls. + + + This event allows you to prevent the user from scrolling the grid while an operation + is being performed on the current selection. + + + The code below prevents the grid from scrolling while the grid is in edit mode. + + void _flex_BeforeScroll(object sender, C1.Win.C1FlexGrid.RangeEventArgs e) + { + if (_flex.Editor != null) + e.Cancel = true; + } + + + + + Raises the event. + + A object that contains event data. + + + + Fires before the vertical ScrollTip is displayed. + + + This event fires only if the ShowScrollTips flag is set in the property. + It allows you to specify the text that will be displayed in the scroll tip. + + + The code below uses the event to display a scroll tip showing the value of the + first cell that will become visible when the user stops scrolling. + + _flex.ScrollOptions = ScrollFlags.DelayedScroll | ScrollFlags.ShowScrollTips; + void _flex_ShowScrollTip(object sender, ToolTipEventArgs e) + { + e.ToolTipText = string.Format("row {0}", e.Row); + } + + + + + Raises the event. + + A object that contains event data. + + + + Fires before the current cell changes ( and properties). + + + This event fires before the or properties change, either as a + result of user actions or through code. It allows you to prevent the selection of certain cells, + thus creating "protected" ranges on a grid. + + fires only when the or + properties are about to change. To detect extended selections, you also need to handle the + event. + + + + + Raises the event. + + A that contains event data. + + + + Fires after the current cell changes ( and properties). + + + This event fires before the or properties change, either as a + result of user actions (mouse or keyboard) or through code. It allows you to display additional information + about the currently selected row, column, or cell. + To perform validation or prevent certain cells from being selected, use the + and events instead. + + + + + Raises the event. + + A that contains event data. + + + + Fires before the selection changes (, , , properties). + + + This event fires before the and properties change, either as a result + of user actions or through code. It allows you to prevent the selection of certain cells, thus creating + "protected" ranges on a grid. + To prevent the selection of a range, you also need to handle the event, which + is fired before the Row and Col properties change. + + + + + Raises the event. + + A that contains event data. + + + + Fires after the selection changes (, , , + properties). + + + This event is fired after the or properties change, either as + a result of user actions (mouse or keyboard) or through code. + This event is useful if you want to display additional information about the current selection. To + perform validation or prevent certain cells from being selected, use the and + events instead. + + + + + Raises the event. + + A that contains event data. + + + + Fires after the current cell changes ( and properties). + + + + fires when the or properties change, either + as a result of user actions (mouse or keyboard) or through code. + This event does not fire when the selection changes ( or properties) + but the active cell (, ) remains the same. In this case, the + event fires instead. + + + + + Raises the event. + + A that contains event data. + + + + Fires after the selection changes (, , , + properties). + + + + fires after the , , , + or properties change, either as a result of user actions (mouse or keyboard) + or through code. + This event also fires while the user extends the selection with the mouse. + + + + + Raises the event. + + An that contains event data. + + + + Fires before the current cell changes ( and properties). + + + This event fires before the cursor leaves the current cell, either as a result of user actions + (mouse or keyboard), or through code. + + + + + Raises the event. + + An that contains event data. + + + + Fires after the current cell changes ( and properties). + + + This event fires after the cursor enters a cell, either as a result of user actions (mouse or keyboard), + or through code. + + + + + Raises the event. + + An that contains event data. + + + + Fires before the grid enters edit mode, and also when the cell that has the + focus needs to be painted. + + + This event doesn't fire only when the grid is about to enter edit mode. + It also fires while painting cells, in order to support drawing the editor's + drop-down buttons. + The event fires only when the grid is about to enter + edit mode. + + + + + Raises the event. + + A that contains event data. + + + + Fires before the control enters edit mode. + + + This event fires before the control enters edit mode. It allows you to prevent + editing by setting the Cancel parameter to true, or to supply a list of choices + for a combo list using the property, or an edit mask using the + property. + If the choices or the mask are the same for a whole column, you may set them more + efficiently using the and + properties for the object. In this case, there's no need to handle + the StartEdit event at all. + The grid also exposes a event. The difference between + the two is that BeforeEdit fires when the grid paints the cell that has the focus + (so it can determine whether the cell has a drop-down button). BeforeEdit fires + more often than StartEdit, and does not always indicate that the grid is actually + entering edit mode. + + + + + Raises the event. + + A that contains event data. + + + + Fires after a cell has been edited. + + + This event does not fire if the user cancels the edits by pressing the ESC key. + The event fires whenever the grid leaves edit mode, + even if the edits were canceled. + + + + + Raises the event. + + A that contains event data. + + + + Fires after the control leaves edit mode. + + + + + Raises the event. + + A that contains event data. + + + + Fires after the user clicks a cell button. + + + This event fires when the user clicks an edit button on a cell. Typically, + this event is used to pop up a custom editor for the cell (for example, dialogs for + selecting colors, dates, files, pictures, and so on). + By default, cell edit buttons are displayed on the right side of a cell, + with an ellipsis caption ("..."). They are similar to the buttons displayed in the + PropertyGrid control, next to Image properties. You may customize + the button's appearance by assigning a picture to the property. + To create an edit button on a cell, you must set the + property to true and set the property (on the grid or on specific + columns) to an ellipsis ("..."). + + + + + Raises the event. + + A that contains event data. + + + + Fires after a cell editor has been initialized by the grid, to allow additional custom initialization. + + + This event can be used to customize the behavior of the cell editor by setting properties + on the editor control. + For example, the code below checks to see if the editor being used is a TextBox, and then + sets the editor's CharacterCasing and MaxLength properties. + + void _flex_SetupEditor(object sender, RowColEventArgs e) + { + TextBox tb = _flex.Editor as TextBox; + if (tb != null) + { + if (_flex.Cols[e.Col].Name == "ID") + tb.MaxLength = 4; + else + tb.MaxLength = 32000; + } + } + + + + + + Raises the event. + + A that contains event data. + + + + Fires before the control exits cell edit mode, while the editor is still active. + + + When this event fires, the contents of the editor have not been applied to the + grid. You can validate the editor contents and cancel the edits if necessary. + To validate the editor contents, check the value contained in the Editor.Text + property. If the value is invalid for the cell, set the Cancel parameter to true + and the grid will remain in edit mode until the user types a valid entry. + + For example, the code below checks to make sure the value entered is an integer + between 0 and 100: + + void _flex_ValidateEdit(object sender, ValidateEditEventArgs e) + { + if (_flex.Cols[e.Col].Name = "Score") + { + try + { + int value = int.Parse(_flex.Editor.Text); + if (value >= 0 && value <= 50) + return; // accept edits + } + catch {} + + // error or invalid range, refuse edits + e.Cancel = true; + } + } + + + + + + Raises the event. + + A that contains event data. + + + + Fires after a checkbox in a cell is checked or unchecked by the user. + + + + + Raises the event. + + A that contains event data. + + + + Fires in edit mode, after the contents of the editor change. + + + This event fires while the grid is in edit mode and the contents of the editor change. + This may be caused by the user typing into the editor or selecting a new item in a + drop down list. + When this event fires, the new editor content has not been applied to the grid cell yet. + You may check the new content using the property. + + + The code below shows a message when the text being edited contains more than 10 characters: + + void _flex_ChangeEdit(object sender, EventArgs e) + { + // get text in editor + string text = _flex.Editor.Text; + + // show message if it's too long + statusStrip1.Text = text.Length > 10 + ? "This text seems too long..." + : "This text looks OK..."; + } + + + + + Raises the event. + + An that contains event data. + + + + Fires in edit mode, when the dropdown portion of an editor opens. + + + + + Raises the event. + + A that contains event data. + + + + Fires in edit mode, when the dropdown portion of an editor closes. + + + + + Raises the event. + + A that contains event data. + + + + Fires in edit mode, when the user presses a key. + + + The KeyDownEdit event corresponds to the event, + except it fires when the grid is in edit mode (in this case, the control that received the + key is the editor, not the grid itself). + The editor has three modes: text, drop-down combo, or drop-down list. The mode used is + determined by the properties in the grid and column objects. + While editing with the text editor or with a drop-down combo, you may set or retrieve + the contents of the editor by retrieving the editor control with the + property and casting it to the proper type. + + + + + Raises the event. + + A that contains event data. + + + + Fires in edit mode, when the user releases a key. + + + The event corresponds to the + event, except it fires when the grid is in edit mode (in this case, the control that + receives the key is the editor, not the grid itself). + The editor has three modes: text, drop-down combo, or drop-down list. The mode + used is determined by the properties in the grid and column objects. + While editing with the text editor or with a drop-down combo, you may set or retrieve + the contents of the editor by retrieving the editor control with the + property and casting it to the proper type. + + + + + Raises the event. + + A that contains event data. + + + + Fires in edit mode, when the user presses a character key. + + + The event corresponds to the + event, except it fires when the + grid is in edit mode (in this case, the control that receives the + key is the editor, not the grid itself). + The editor has three modes: text, drop-down combo, or drop-down list. + The mode used is determined by the properties in the + grid and column objects. + While editing with the text editor or with a drop-down combo, you may set + or retrieve the contents of the editor by retrieving the editor control with the + property and casting it to the proper type. + + + + + Raises the event. + + A that contains event data. + + + + Fires after the contents of a cell have changed. + + + This event allows you to perform processing whenever the contents of a cell + change, regardless of how they were changed (for example, a user typed data into + the cell, data got loaded from a database, or data was assigned to the grid through code). + This event can be used to provide conditional formatting and dynamic data summaries, + which get updated automatically whenever the data changes. + This event fires in bound and unbound modes. In some bound more scenarios, the + data source object may inform the grid that some data in the current row changed, without + specifying which column changed. In this case, the Col parameter will be set to -1. + Event handlers should be prepared to handle this situation without throwing exceptions. + + + + + Raises the event. + + A that contains event data. + + + + Fires after any data source change notifications. + + + When the grid is used in bound mode, any changes to the data source cause the + grid to fire the event. This event is the ideal place + to put code that updates the grid with data-dependent elements such as subtotals and + outline trees. + + Note: The delegate is defined in + the System.ComponentModel namespace. + + + + + Raises the event. + + A that contains event data. + + + + Fires after the data source reports an error condition. + + + + + Raises the event. + + A that contains event data. + + + + Fires when the grid needs to retrieve data for an unbound cell. + + + This event fires in bound mode when the grid contains unbound columns. + Unbound columns are columns that have the Name property set to values + that do not map to columns in the data source. The information in unbound columns + must be provided by the application, by setting the Value property of the + parameter. + The class supports calculated columns that in many + situations can be used instead of unbound columns. + + + + + Raises the event. + + An that contains event data. + + + + Fires when the grid needs to store data in an unbound cell. + + + This event fires in bound mode when the grid contains unbound columns. + Unbound columns are columns that have the Name property set to values + that do not map to columns in the data source. The information in unbound columns + must be provided by the application using the event. + In most cases, unbound columns are read-only, and you don't need to handle this event. + However, if a value is assigned to an unbound cell, either through editing or programmatically, + the grid fires this event to allow the application to store the value using whatever mechanism + is appropriate. + + + + + Raises the event. + + An that contains event data. + + + + Fires after a data-binding operation has finished. + + + + + Raises the event. + + + that contains the event data. + + + + Fires when the value of the property changes. + + + + + Raises the event. + + + that contains the event data. + + + + Fires when the value of the property changes. + + + + + Raises the event. + + + that contains the event data. + + + + Fires before a node row is collapsed or expanded. + + + + + Raises the event. + + A that contains event data. + + + + Fires after a node row is collapsed or expanded. + + + The and events + fire before and after node rows are expanded or collapsed. You can determine + whether the node is being collapsed or expanded by checking the value of the + node's its property. + These events allow you to populate outlines on demand, so you only need + to create the rows that will actually be shown to the user. For example, if + you are using the grid to display a directory tree, it would take a long time + to read each directory on the disk in order to populate the tree. + + + + + Raises the event. + + A that contains event data. + + + + Fires before the grid draws a cell, when the property is set to . + + + The OwnerDrawCell event only fires when the property is + set to . + You can use this event to customize the appearance of any cell in the grid. + The event allows three main types of customization: + + + + + + Change the value of the Text and Image parameters to modify the values displayed + by the grid. You can use this type of customization to replace password strings with asterisks, + for example. + + + + + + Change the Style property to display the cell using a different style than the one + selected by the grid by default. You can use this type of customization to provide conditional + formatting, for example. + + + + + + Use the Graphics and Bounds parameters and draw the cell yourself. When drawing + cells this way, you may call the member to force + the grid to draw specific parts of the cell, while your code draws other parts. For example, + you could paint a custom background and then call DrawCell to have the grid paint the cell + border and contents. + + + + The OwnerDrawCell event also fires when the grid auto sizes rows or columns (see the + and methods). This is done because the + grid needs to measure the cell using the same text, image, and style parameters that are used to + render it. In these cases, the Measuring parameter is set to true and the Bounds + rectangle is empty. + + + + + Raises the event. + + An that contains event data. + + + + Fires while the control is being printed to provide control over page breaks. + + + This event is fired while the control is being printed with the + method to provide control over page breaks. + Set the Cancel parameter to true to indicate that the given Row should + not be printed at the top of a page. In this case, the control will move the break point up + and fire the event again until it finds a valid break point. Note that you can only prevent + page breaks, not force them. + + + + + Raises the event. + + A that contains event data. + + + + Fires before the grid starts printing. + + + + + Raises the event. + + A that contains event data. + + + + Fires after the grid finishes printing. + + + This event is typically used to update the user interface and provide + feedback while printing the grid. + Use the method to print the grid and specify the document + name, common printing options, headers and footers. + Use the property to specify less common printing + options such as header and footer fonts, page margins, orientation, and so on. + + + + + Raises the event. + + A that contains event data. + + + + Fires after the grid finishes printing a page. + + + This event is typically used to provide feedback while printing the grid, + and to offer the user a cancel button that can be used to stop the printing process. + You can also use this event to add custom elements to the printed pages. + Use the method to print the grid and specify the document name, + common printing options, headers and footers. + Use the property to specify less common printing options + such as header and footer fonts, page margins, orientation, and so on. + + + + + Raises the event. + + A that contains event data. + + + + Fires before the grid starts an automatic OLE drag operation. + + + + + Raises the event. + + A that contains event data. + + + + Fires before a new row is added by the user. + + + This event only fires when is set to true and + the user creates a new empty row by moving the cursor into the last row on the grid. + It does not fire when a new row is added to the grid programmatically or when a + row is added to the grid's data source. + You can use this event to cancel the creation of new rows by setting the + Cancel parameter to true. In this case, the cursor does not move into + the new row. + + + + + Raises the event. + + A that contains event data. + + + + Fires after a new row is added by the user. + + + This event only fires when property is set to true + and the user creates a new empty row by moving the cursor into the last row on the + grid. + It does not fire when a new row is added to the grid programmatically or + through the grid's data source. + You can use this event to initialize the new rows. + When a new row is created this way, it is initially empty, and the user may + cancel the row by moving the cursor out of the new row before making any edits. + In this case, the grid fires the event and the new + (empty) row is removed. + + + + + Raises the event. + + A that contains event data. + + + + Fires when the cursor leaves the new row without making any changes to it. + + + For details, see the event. + + + + + Raises the event. + + A that contains event data. + + + + Fires before a row is deleted by the user. + + + This event only fires when is set to true and the + user deletes one or more rows by selecting them and pressing the DEL key. + It does not fire when rows are removed from the grid programmatically or through + the grid's data source. + You can use this event to cancel the deletion of the rows by setting the + Cancel parameter to true. + + + + + Raises the event. + + A that contains event data. + + + + Fires after one or more rows are deleted by the user. + + + This event only fires when property is set to True + and the user deletes one or more rows by pressing the DEL key. It does not fire + when rows are removed from the grid programmatically or through the grid's data source. + When this event fires, the rows have already been removed from the grid, so the + Row parameter is always set to E. + + + + + Raises the event. + + A that contains event data. + + + + Fires when is set to true and the control needs error information for a cell. + + + + + Raises the event. + + A that contains event data. + + + + Fires when is set to true and the control needs error information for a row. + + + + + Raises the event. + + A that contains event data. + + + + Fires before each subtotal row is added to the grid. + + + Subtotal rows are added when the method is invoked. + The event handler may prevent the grid from adding a particular row, or it + may customize the caption, style, and aggregate value used in the new subtotal row. + + + + + Raises the event. + + + that contains the event data. + + + + Fires after each subtotal row has been added to the grid. + + + Subtotal rows are added when the method is invoked. + + + + + Raises the event. + + + that contains the event data. + + + + Fires before the column filters are applied to the grid. + + + + + Raises the event. + + + that contains the event data. + + + + Fires after the column filters have been applied to the grid. + + + + + Raises the event. + + + that contains the event data. + + + + Gets or sets the data in a grid cell. + + + This is one of the indexers you can use to get or set the data stored in grid cells. + You can index cells using the row and column indices or using the row + index and column name. + Using integer indices is more efficient, because the grid doesn't have to + look up the column. Using column names is more flexible, because references + remain valid even if the user moves columns to a new position. + When assigning a value to a cell, the grid tries to convert it into the type + specified for the column (see the property). If the + grid can't convert the value, it fires the event and the + cell retains its original value. + + + The example below creates a column and assigns it a name, then sets the value of + a cell using the column index and retrieves the value using the column name: + + // create a column, assign it a name and get the new index + Column myCol = flex.Cols.Add(); + myCol.Name = "address"; + myCol.DataType = typeof(string); + int colIndex = myCol.Index; + + // assign a value to a cell using cell coordinates: + flex[1, colIndex] = "555, Broadway"; + + // get the value using the column name + string address = (string)flex[1, "address"]; + MessageBox.Show("The address is " + address); + + + + + Gets or sets the data in a grid cell. + + + This is one of the indexers you can use to get or set the data stored in grid cells. + You can index cells using the row and column indices or using the row index and column name. + + + + + Gets a custom associated with a cell. + + Row index. + Column name. + + object associated with the cell, + or null if the cell doesn't have a custom style. + + If the cell doesn't have a custom style, the grid paints it using one of the + built-in styles. The built-in style is selected based on the cell position + and state (fixed, scrollable, highlighted, etc). To retrieve the style that + will be used to paint the cell (custom or built-in) use the method. + + + + + Gets a custom associated with a cell. + + Row index. + Column index. + + object associated with the cell, + or null if the cell doesn't have a custom style. + + If the cell doesn't have a custom style, the grid paints it using one of the + built-in styles. The built-in style is selected based on the cell position + and state (fixed, scrollable, highlighted, etc). To retrieve the style that + will be used to paint the cell (custom or built-in) use the method. + + + + + Assigns a custom to a cell. + + Row index. + Column name. + The to associate with the cell. + + The method is useful if you want to assign a new style + to a single cell. You can also reset the cell style by setting it to null (Nothing, in VB). + To apply a custom cell style to an entire row or column, set the row or column's + properties. + To apply a custom style to a range cells, use a object. + For example: + + CellRange rg = _flex.GetCellRange(3, 3, 10, 10); + rg.Style = _flex.Styles["MyRangeStyle"]; + + + + + + Assigns a custom to a cell. + + Row index. + Column index + The to associate with the cell. + + The method is useful if you want to assign a new style + to a single cell. You can also reset the cell style by setting it to null (Nothing, in VB). + To apply a custom cell style to an entire row or column, set the row or column's + properties. + To apply a custom style to a range cells, use a object. + For example: + + CellRange rg = _flex.GetCellRange(3, 3, 10, 10); + rg.Style = _flex.Styles["MyRangeStyle"]; + + + + + + Assigns a custom to a cell. + + Row index. + Column index + Name of the new style. + + + + Gets the style used to render a cell. + + Row index. + Column index + + object used to display the cell. + + The object returned may be a composite with elements from several + styles. For example, a cell with the focus is painted with a style that contains elements + from the , a custom style associated with the cell, + row, and column (if available), and the style. + + + + + Gets the image displayed in a grid cell. + + Row index. + Column name. + An object previously assigned to the cell using the + method. + + + + Gets the image displayed in a grid cell. + + Row index. + Column index. + An object previously assigned to the cell using the + method. + + + + Sets the image displayed in a grid cell. + + Row index. + Column name. + An object containing an image to display in the cell. + + In addition to the usual cell contents, you can display images in cells. + There are two methods for showing images in cells: + 1. You can use the and methods to + assign images directly to the cells. In this case, the cell contents and the image are + independent. To update the image, you need to call again. + 2. You can use the property to associate images with + specific cell values. In this case, images are updated automatically whenever the cell + contents change. The property allows you to specify whether + the control should display the images in addition to or instead of the cell text. + + + + + Sets the image displayed in a grid cell. + + Row index. + Column index. + An object containing an image to display in the cell. + + In addition to the usual cell contents, you can display images in cells. + There are two methods for showing images in cells: + 1. You can use the and methods to + assign images directly to the cells. In this case, the cell contents and the image are + independent. To update the image, you need to call again. + 2. You can use the property to associate images with + specific cell values. In this case, images are updated automatically whenever the cell + contents change. The property allows you to specify whether + the control should display the images in addition to or instead of the cell text. + + + + + Gets or sets whether the user is allowed to resize rows and columns with the mouse. + + + To resize rows or columns, the mouse must be over the fixed area of the grid, and + close to a border between rows or columns. The mouse pointer will change into a sizing + pointer and the user can drag the row or column to change the row height or column width. + If a group of columns is selected (from first to last row) and the user resizes one + of them, all selected columns are resized. The same applies to rows. + If column sizing is allowed, users may double-click the resizing area to resize a + column so it will automatically fit the longest entry. + Rows with zero height and columns with zero width can't be resized by the user. + If you want to make them very small but still resizable, set their height or width to + one pixel, not to zero. + The and events fire + before resizing starts, and may be used to prevent resizing of specific rows and columns. + The and events fire after + resizing, and may be used to validate the user's action and to update the display. + + + + + Gets or sets whether the user is allowed to freeze rows and columns with the mouse. + + + Frozen cells remain on the screen when the user scrolls the control + (like fixed cells), but they are selectable and editable (like scrollable cells). + They are painted using the style. + To freeze rows or columns at runtime, the mouse must be near the edge of the + frozen area. The mouse pointer will then change into a 'freeze' pointer (looks like + a padlock) and the user can drag the frozen boundary to a new row or column. + + + + + Gets or sets whether the user is allowed to drag rows and columns with the mouse. + + + Row dragging may not work in bound mode. This is because some data sources + do not allow absolute positioning of rows. + ADO.NET DataTable object in particular do not support this. + Column dragging is supported for any data source, and row dragging is always + supported in unbound mode. + You can prevent specific rows and columns from being dragged by setting + their property to false. + + + + + Gets or sets when to highlight selected cells. + + + You can customize the appearance of highlighted cells by modifying the + property. + + + + + Gets or sets the type of focus rectangle to display. + + + If the focus rectangle is drawn, then the current cell is painted using + the style, which by default looks like a regular + scrollable cell (as in most spreadsheets and grids). + If the focus rectangle is hidden (using the setting), + the current cell is painted using the style. + + + + + Gets or sets whether the user is allowed to edit grid contents. + + + If you set to false, editing is disabled for the + entire grid. + To enable editing on some rows and columns, set to true + for the grid and set the or + properties to false for the rows and columns that should not be editable. + You can also disable editing of specific cells by handling the + event and setting the Cancel event parameter to true. + + + + + Gets or sets when to display combo buttons in cells. + + + By default, the grid will show editing buttons in cells only when they + have the focus. This is the same behavior used by the + control. + If you set to , + the grid will display buttons on any cells that have associated lists, even if they + don't have the focus. + For details on how to associate lists with cells, see the , + , and properties. + + + + + Gets or sets whether the grid displays a record selector image on the first fixed column. + + + + The record selector is a small triangle similar to the one used in Access and most data grids. + + + + + + Gets or sets whether the grid should display sorting glyphs (a triangle) on the headers of sorted columns. + + + + + Gets or sets a value that determines the position of the sort glyphs within column header cells. + + + + + Gets or sets whether the grid should display error information in cells and rows. + + + Setting this property to true causes the grid to display error information in cells and + rows. Error information is displayed as error icons in the cells or row headers. Moving the + mouse over the error icons show tooltips containing an error description. + The error information may be supplied directly by data sources that implement the + interface (for example, the DataTable class implements this + interface). + If the grid is bound to a data source that doesn't support , + you can provide error information using the and + events. + + + + + Gets or sets whether the grid should display labels over cells whose contents are partially hidden. + + + + + Gets or sets whether the user is allowed to sort columns using the mouse. + + + When the grid is used in bound mode, the sorting is performed by the + object. If the data source object does not support sorting, + this property has no effect. + In unbound mode, you can also sort data using the method. + + + + + Gets or sets whether the last column should be extended to fill the control. + + + This property only affects painting. It does not modify the + property of the last column. + + + + + Gets or sets the row that contains the cursor. + + + Use the and properties to make a cell current or to find + out which row or column contains the current cell. Columns and rows are + numbered from zero, beginning at the top for rows and at the left for columns. + The property may be set to -1 to hide the selection, to a value + between zero and Rows.Fixed-1 to select a cell in a fixed row, or to a value between + Rows.Fixed and Rows.Count-1 to select a cell in a scrollable row. + Setting the Row and Col properties automatically collapses the selection to a + single cell, resetting the and properties. + To specify a block selection, you must set Row and Col, then RowSel and ColSel. Alternatively, + you can use the method to select an arbitrary range with a single statement. + Setting the Row and Col properties does not ensure that the current cell is visible. + To do that, use the method. + + + + + Gets or sets the column that contains the cursor. + + + Use the and properties to make a cell current or to find + out which row or column contains the current cell. Columns and rows are + numbered from zero, beginning at the top for rows and at the left for columns. + The property may be set to -1 to hide the selection, to a value + between zero and Cols.Fixed-1 to select a cell in a fixed column, or to a value between + Cols.Fixed and Cols.Count-1 to select a cell in a scrollable column. + Setting the Row and Col properties automatically collapses the selection to a + single cell, resetting the and properties. + To specify a block selection, you must set Row and Col, then RowSel and ColSel. Alternatively, + you can use the method to select an arbitrary range with a single statement. + Setting the Row and Col properties does not ensure that the current cell is visible. + To do that, use the method. + + + + + Gets or sets the last row in the current selection. + + + Use the and properties to modify a + selection or to determine which cells are currently selected. Columns and rows are + numbered from zero, beginning at the top for rows and at the left for columns. + Setting the and properties automatically + collapses the selection to a single cell, resetting the RowSel and ColSel properties. + Therefore, to specify a block selection, you must Row and Col, then RowSel and ColSel. + Alternatively, you may use the method to select a range with a + single statement. + If the property is set to , + you should use the property on individual row objects to + select and deselect rows. + When a range is selected, the value of may be greater than or + less than , and may be greater than or less than . + This is inconvenient when you need to set up bounds for loops. In these cases, you can + use the property to retrieve a normalized + object, where r1 <= r2 and c1 <= c2. + See the property for an example. + + + + + Gets or sets the last column in the current selection. + + + Use the and properties to modify a + selection or to determine which cells are currently selected. Columns and rows are + numbered from zero, beginning at the top for rows and at the left for columns. + Setting the and properties automatically + collapses the selection to a single cell, resetting the RowSel and ColSel properties. + Therefore, to specify a block selection, you must Row and Col, then RowSel and ColSel. + Alternatively, you may use the method to select a range with a + single statement. + When a range is selected, the value of may be greater than or + less than , and may be greater than or less than . + This is inconvenient when you need to set up bounds for loops. In these cases, you can + use the property to retrieve a normalized + object, where r1 <= r2 and c1 <= c2. + + + The code below loops though the cells in the current selection: + + CellRange rg = flex.Selection; + for (int r = rg.r1; r <= rg.r2; r++) + for (int c = rg.c1; c <= rg.c2; c++) + Console.WriteLine("the value at {0} {1} is {2}", r, c, flex[r, c]); + + + + + Gets the collection of objects in the grid. + + + The property returns a reference to the list of rows + that make up the grid. With this reference, you can add, remove, move, + and count the rows. For more information on the tasks that can be performed + with this collection, see the object. + This property is read-only. The grid creates and manages the row collection for you. + Upgrade Note: In the VSFlexGrid ActiveX control, the Rows and FixedRows properties + corresponded to the number of rows and fixed rows on the grid. In C1FlexGrid, use Rows.Count + and Rows.Fixed. + + + + + Gets the collection of objects in the grid. + + + The property returns a reference to the list of columns + that make up the grid. With this reference, you can add, remove, move, + and count the columns. For more information on the tasks that can be performed + with this collection, see the object. + This property is read-only. The grid creates and manages the column collection for you. + Upgrade Note: In the VSFlexGrid ActiveX control, the Cols and FixedCols properties + corresponded to the number of columns and fixed columns on the grid. In C1FlexGrid, use + Cols.Count and Cols.Fixed instead. + + + + + Gets or sets the first visible column in the scrollable area. + + + Setting the property causes the grid to scroll horizontally + so that the given column becomes the leftmost visible column. This is often useful when + you want to synchronize two or more grids so that when one of them scrolls, the other + scrolls as well. To scroll vertically, use the property. + When setting this property, the largest possible column number is the total + number of columns minus the number of columns that will fit the display. Attempting + to set to a greater value will cause the grid to set it to the + largest possible value (no error will occur). + The value returned by the and properties + may correspond to partially visible rows or columns. + Use the and properties to scroll using + cells as units. Use the property to scroll the grid using + pixel units. + To ensure that a given cell is visible, use the method. + + + + + Gets or sets the first visible row in the scrollable area. + + + Setting the property causes the grid to scroll vertically + so that the given row becomes the topmost visible row. This is often useful when + you want to synchronize two or more grids so that when one of them scrolls, the other + scrolls as well. To scroll horizontally, use the property. + When setting this property, the largest possible row number is the total + number of rows minus the number of rows that will fit the display. Attempting + to set to a greater value will cause the grid to set it to the + largest possible value (no error will occur). + The value returned by the and properties + may correspond to partially visible rows or columns. + Use the and properties to scroll using + cells as units. Use the property to scroll the grid using + pixel units. + To ensure that a given cell is visible, use the method. + + + + + Gets the last visible column in the scrollable area. + + + The index returned may correspond to a column that is only partially visible. + This property is read-only. To scroll the contents of the grid, see the + , , and properties. + To ensure that a cell is visible, use the method. + + + + + Gets the last visible row in the scrollable area. + + + The index returned may correspond to a row that is only partially visible. + This property is read-only. To scroll the contents of the grid, see the + , , and properties. + To ensure that a cell is visible, use the method. + + + + + Assigns a value to a grid cell. + + Row index. + Column index. + Value to assign to the cell. + Whether the value should be converted to the column's data type. + True if the value was assigned to the cell. + + If is set to true and the value can't be converted into + the proper data type, the grid will fire the event and the + cell will retain its original value. + Using with set to true is equivalent + to setting the grid's indexer. For example, the following lines of code are equivalent: + + flex.SetData(1, 1, "Hello", true); + flex[1, 1] = "Hello"; // same thing + + + + + + Assigns a value to a range of cells. + + + that specifies the cells that will be assigned a new value. + Value that will be assigned to all cells in the range. + Whether the value should be converted to the column's data type. + True if the value was assigned to all cells in the destination range. + + + + Assigns a value to a grid cell, coercing the value into the cell's specified DataType. + + Row index. + Column index. + Value to assign to the cell. + True if the value was assigned to the cell, false if the value could not be + assigned (usually because it could not be converted to the appropriate type). + + + + Assigns a value to a range of cells, coercing the value into each cell's specified DataType. + + + that specifies the cells that will be assigned a new value. + Value that will be assigned to all cells in the range. + True if the value was assigned to all cells in the destination range, false if + the value could not be assigned to all cells in the range (usually because it could not be + converted to the appropriate type). + + + + Assigns a value to a grid cell. + + Row index. + Column name. + Value to assign to the cell. + Whether the value should be converted to the column's data type. + True if the value was assigned to the cell, False otherwise. + + If is set to true and the value can't be converted into + the proper data type, the grid will fire the event and the + cell will retain its original value. + Using with set to true is equivalent + to setting the grid's indexer. For example, the following lines of code are equivalent: + + flex.SetData(1, "ColName", "Hello", true); + flex[1, "ColName"] = "Hello"; // same thing + + + + + + Assigns a value to a grid cell, coercing the value into the cell's specified data type. + + Row index. + Column name. + Value to assign to the cell. + True if the value was assigned to the cell, False otherwise. + + + + Assigns a value to a grid cell, optionally coercing the value into the cell's specified data type. + + Row index. + Column index. + Data to be applied to the cell. + Whether to coerce the value into the cell's specified data type. + True if the value was assigned to the cell, False otherwise. + + + + Gets the value of a grid cell. + + Row index. + Column index. + The value of the cell. + + The method returns the raw data stored in a specific grid cell. + It is equivalent to using the grid's indexer. For example: + + object foo = flex.GetData(1, 1); + object bar = flex[1, 1]; // same thing + + The data displayed on the grid might be different from the raw data, depending on + the setting of the and properties. + To obtain the display value (which is always a string), use the + method instead. + + + + + Gets the value of a grid cell, taking into account the value returned by the method. + + Row index. + Column index. + Whether to take into account the value of the method. + + + + + + Gets the value of a grid cell. + + Row index. + Column name. + The value of the cell. + + + + Gets user data associated with a cell. + + Row index. + Column index. + Object associated with the cell. + + The user data is not used internally by the grid. It is reserved for additional data that you may want to + associate with a cell. + + + + + Gets user data associated with a cell. + + Row index. + Column name. + Object associated with the cell. + + The user data is not used internally by the grid. It is reserved for additional data that you may want to + associate with a cell. + + + + + Assigns user data to a cell. + + Row index. + Column index. + User data to assign to the cell. + + The user data is not used internally by the grid. It is reserved for + additional data that you may want to associate with a cell. + + + + + Assigns user data to a cell. + + Row index. + Column name. + User data to assign to the cell. + + The user data is not used internally by the grid. It is reserved for additional data that you may want to + associate with a cell. + + + + + Gets the value in a grid cell, formatted as a string. + + Row index. + Column index. + A string containing the data displayed in the given grid cell. + + + + Gets the value in a grid cell, formatted as a string. + + Row index. + Column name. + A string containing the data displayed in the given grid cell. + + + + Gets the value in a grid cell, formatted as a string, and the image or checkbox in the cell. + + Row index. + Column index. + Returns the image in the cell. + Returns the checkbox value in the cell. + A string containing the data displayed in the given grid cell. + + This method provides a way to retrieve all the data that is displayed in a cell with a single call. + The image returned in the parameter may be an image assigned to the + cell using the method, a mapped value obtained through an , + or an image stored as cell data (when the cell's is set to Image). + The value returned in the parameter is the value + returned by the method. + + + + + Gets the value in a grid cell, formatted as a string, and the image or checkbox in the cell. + + Row index. + Column name. + Returns the image in the cell. + Returns the checkbox value in the cell. + A string containing the data displayed in the given grid cell. + + This method provides a way to retrieve all the data that is displayed in a cell with a single call. + The image returned in the parameter may be an image assigned to the + cell using the method, a mapped value obtained through an , + or an image stored as cell data (when the cell's is set to Image). + The value returned in the parameter is the value + returned by the method. + + + + + Gets or sets the grid's selection behavior. + + + In most selection modes, you can obtain the current selection using the + property. + When is set to , + however, the selection may consist of a non-continuous range of rows. In this case, + you can check the selection state of individual rows using the + property or obtain a collection of selected rows using the property. + + + + + Selects a range of cells. + + + that specifies the cells that will be selected. + Whether to scroll the new selection into view. + + + + Selects a range of cells and scrolls it into view. + + + that specifies the cells that will be selected. + + + + Selects a range of cells. + + New value for the property. + New value for the property. + New value for the property. + New value for the property. + Whether to scroll the new selection into view. + + Using the method is equivalent to setting the , + , , and properties. + + + + + Selects a range of cells and scrolls it into view. + + New value for the property. + New value for the property. + New value for the property. + New value for the property. + + Using the method is equivalent to setting the , + , , and properties. + + + + + Selects a cell. + + New value for the property. + New value for the property. + Whether to scroll the new selection into view. + + Using the method is equivalent to setting the and properties. + + + + + Selects a cell and scrolls it into view. + + New value for the property. + New value for the property. + + Using the method is equivalent to setting the and properties. + + + + + Sorts the grid contents based on a column. + + + value that specifies the sort direction and options. + Column to sort on. + + Sorting works differently depending on whether the grid is bound to a data source or not. + In bound mode, the grid passes the sort request to the underlying data source object. In this case, + the sort settings remain in effect as the grid data changes. Editing values in the sort column will cause + the data source to re-sort the data, and grid will show the changes automatically. This is equivalent to + setting the property on a object for example. + In unbound mode, the Sort method sorts the data that is currently stored in the grid. Changing + the data after it has been sorted will not automatically update the sort. + When the grid is bound to a new data source, it inherits the sort settings currently applied to the + new data source object. Because of this, calling Sort immediately before setting the + property has no effect on the grid. + In unbound mode, the grid uses a stable sorting algorithm. This means that the sorting keeps the + relative order of records when the sorting key is the same. For example, if you sort a list of files by + name, then by extension, the list will still be sorted by name within each extension group. + The grid recognizes two types of row: regular rows which contain data, and node rows which are used + to group data. The Sort method only sorts regular rows; it does not affect node rows at all. + To sort nodes, use the method in the property or the + method in the class. + + + + + Sorts the grid contents based on a column range. + + + value that specifies the sort direction and options. + First column in the range. + Last column in the range. + + When you sort multiple columns, the same sorting options are applied to each column, + starting from the leftmost column in the range and proceeding to the right. + To sort multiple columns using a different sorting order for each, you can either + call the method multiple times or set each column's + property and call the method including the + flag in the parameter. + + + + + Sorts a range of cells in the grid. + + + value that specifies the sort direction and options. + + object that specifies the range of cells to sort. + + When you sort multiple columns, the same sorting options are applied to each column, + starting from the leftmost column in the range and proceeding to the right. + To sort multiple columns using a different sorting order for each, you can either + call the method multiple times or set each column's + property and call the method including the + flag in the flags parameter. + + + + + Sorts a group of rows using the specified comparer. + + First row in the sort range. + Number of rows in the sort range. + An object that compares objects. + + The interface has a single method called that + takes two objects as arguments (in this case, they will be objects) and + returns -1, 0, or +1. For more details, see the documentation for . + Custom sorting can only be used when the grid is in unbound mode. + + + + + Sorts the grid using the specified comparer. + + An object that compares objects. + + The interface has a single method called that + takes two objects as arguments (in this case, they will be objects) and + returns -1, 0, or +1. For more details, see the documentation for . + Custom sorting can only be used when the grid is in unbound mode. + + + + + Shows the sorting glyph on a column header. + + + value that specifies the glyph to display. + Column index. + + This method is useful if you want to perform custom sorting and need control over the appearance + and position of the sorting glyph (the little triangle that appears on the header of sorted columns). + + + + + Gets the selected range in normalized form. + + + The range returned corresponds to the current selection, defined by the , , + , and properties. + The range is normalized, so range.r1 <= range.r2 and range.c1 <= range.c2. This makes + it easy to loop through the selection. For example: + + int total = 0; + CellRange rg = flex.Selection; + for (int r = rg.r1; r <= rg.r2; r++) + for (int c = rg.c1; c <= rg.c2; c++) + total += (int)flex[r,c]; + Console.WriteLine("The total is: {0}", total); + + + + + Gets a object that contains the cell at coordinates , . + + + To get a object that spans the entire selection, use the property. + + + + + Scrolls a cell into view. + + Row index. + Column index. + + This method does not affect the current selection. To move the cursor to a specific cell + and optionally bring it into view, use the method. + + + + + Invalidates the control. + + + + + Invalidates a cell, causing it to be repainted. + + Row index. + Column index. + + This method is rarely used by the programmer, since the grid automatically performs invalidation as needed. + + + + + Invalidates a cell range, causing it to be repainted. + + Top row in the range. + Left column in the range. + Bottom row in the range. + Right column in the range. + + + + Invalidates a cell range, causing it to be repainted. + + + that will be invalidated. + + This method is rarely used by the programmer, since the grid automatically + performs invalidation as needed. + + + + + Gets the collection of cell styles defined in the grid. + + + The property enables you to obtain a reference to the list of + styles that are currently defined in the grid. With this reference, you can add, remove, + and count the styles. For more information on the tasks that can be performed with this + collection, see the class reference topics. For information + on cell formatting, see the reference topics. + This property is read-only. The grid creates and manages the collection for you. + Upgrade Note: The VSFlexGrid ActiveX control had many properties that affected the way + the grid was displayed (e.g. BackColor, BackColorAlternate, BackColorBkg, BackColorFixed, + BackColorFrozen, BackColorSel, and so on). The C1FlexGrid control replaces all these + properties with a collection of objects. This makes the object + model simpler, more consistent, and more powerful. You can change the built-in styles or + define your own, and assign them to rows, columns, or arbitrary cell ranges. + + + + + Gets or sets whether the grid should move the cursor searching for entries as the user types. + + + If is on, the grid will search the current column as the user + types, automatically moving the cursor and highlighting matches using the style. + The search is case-insensitive. The search is canceled when the user presses the ESC key or + moves the selection with the mouse or cursor keys. + When the user stops typing for about a second, the search buffer is reset. This amount of + time can be changed by setting the property. + If is on and is set to true, the user + will need to hit ENTER, or F2 to start editing cells. Other keys are used for searching. + + + + + Gets or sets the delay (in seconds) before the buffer is reset. + + + See the property for details. + + + + + Gets or sets the action to be performed when the user presses the ENTER key. + + + By default, the grid will move the selection down to the next visible row when the + user presses the ENTER key. If the grid is editable, pressing ENTER will cause the grid + to enter edit mode, and pressing ENTER while in edit mode will cause the cursor to move down. + This property allows you to modify this behavior and disable cell navigation with the + ENTER key, or cause it to move the selection to the next column instead of row. + Note that the and as + settings have the same effect when applied to this property. Pressing the ENTER key will + move the selection within the grid, but will not move the focus to the next control on the form. + + + + + Gets or sets the action to be performed when the user presses the TAB key. + + + By default, the grid will ignore the TAB key and it will be handled by the form, moving the focus to + the next control in the tab order. If you set the property to a value + other than , the grid will trap the TAB key and use it for navigating cells. + + + + + Gets or sets the image to be used in cell buttons. + + + This property allows you to customize the appearance of cell buttons. For details on how to + create and handle cell buttons, see the event. + If you want to use a single picture for all cell buttons on the grid, assign the picture to the + property at design time. To change pictures depending on the row, column, or cell + being edited, set the picture in response to the event. + The pictures used for cell buttons should fit within the button (larger pictures are truncated). + They should also be transparent, so the button face can be seen through the empty parts of the picture. + For best results, use small icons (16 x 16 pixels) and draw the picture in the upper left 12 x 12 + rectangle within the icon. + + + + + Gets the index of the row under the cursor. + + + The and properties are often useful when + handling the event, to provide custom mouse handling. + They are also useful when handling mouse events that do not change the selection and for + detecting clicks on the fixed areas of the grid. + Typical uses for these properties include displaying help information or tooltips when + the user moves the mouse over a selection, and the implementation of manual drag-and-drop + manipulation of OLE objects. + + and return -1 if the mouse is not over + any rows or columns. + To obtain more detailed hit-testing information, use the method. + + + + + Gets the index of the column under the cursor. + + + The and properties are often useful when + handling the event, to provide custom mouse handling. + They are also useful when handling mouse events that do not change the selection and for + detecting clicks on the fixed areas of the grid. + Typical uses for these properties include displaying help information or tooltips when + the user moves the mouse over a selection, and the implementation of manual drag-and-drop + manipulation of OLE objects. + + and return -1 if the mouse is not over + any rows or columns. + To obtain more detailed hit-testing information, use the method. + + + + + Returns information about the control at a specified point on the control surface. + + The horizontal position of the client coordinate. + The vertical position of the client coordinate. + A object that contains information about the point. + + This method is especially useful when handling the event. + It allows you to determine whether the mouse is over a specific cell, grid buttons, + resizing elements, etc. + + + The code below shows hit test information whenever the user clicks the mouse: + + void _flex_BeforeMouseDown(object sender, BeforeMouseDownEventArgs e) + { + HitTestInfo hti = _flex.HitTest(e.X, e.Y); + Console.WriteLine("at {0},{1}: row {2} col {3} type {4}", + hti.X, hti.Y, hti.Row, hti.Column, hti.Type); + } + + + + + Returns information about the control at a specified point on the control surface. + + + in client coordinates. + A object that contains information about the point. + + This method is especially useful when handling the event. + It allows you to determine whether the mouse is over a specific cell, grid buttons, + resizing elements, etc. + + + + + Returns information about the control at the current mouse position. + + A object that contains information about the point. + + + + Gets a object with the coordinates of the cell within the control. + + Row index. + Column index. + Whether to scroll the cell into view before calculating the rectangle. + A object with the coordinates of the cell, in pixels and + relative to the control's client area. + + This property is useful if you need to implement custom editors or other elements that need + to be positioned over cells. + + + + + Gets a object with the coordinates of the cell within the control. + + Row index. + Column index. + + This property is useful if you need to implement custom editors or other elements that need + to be positioned over cells. + This method does not ensure the cell is visible. + + + + + Finds a row that contains a specified string. + + String to look for. + Index of the row where the search should start. + Column that contains the data to be searched. + Whether the search should be case-sensitive. + Whether a full match is required. If this parameter is set to false, searching for "John" may return a row that contains "Johnson". + Whether the search should stop at the bottom of the grid or wrap around and restart from the first scrollable row. + The index of the row that contains the string, or -1 if the string is not found. + + To allow users to search for data as they type, use the property. + + + + + Finds a row that contains a specified value in a given column. + + Object to look for. + Index of the row where the search should start. + Column to be searched. + Whether the search should stop at the bottom of the grid or wrap around and restart from the first scrollable row. + The index of the row that contains the data, or -1 if the object is not found. + + + + Finds a row that contains a specified value in a given column using a RegularExpression. + + The regular expression pattern to match. + Index of the row where the search should start. + Column that contains the data to be searched. + Whether the search should stop at the bottom of the grid or wrap around and restart from the first scrollable row. + The index of the row that matches the pattern, or -1 if no matches were found. + + The parameter specifies a regular expression pattern + expressed in the usual syntax. + The regular expression syntax supports character classes, ranges, repeat counts, + alternate matches, and more. Please refer to the .NET documentation for details and examples. + + + + + Gets or sets whether the grid should paint its contents. + + + This property is deprecated. Use the and + methods instead. + + + + + Maintains performance by preventing the control from updating itself until + the method is called. + + + The and methods are used to + optimize the performance of the grid. Call before making + extensive changes, and call when done to suspend repainting. + This will reduce flicker and increase performance. This optimization is especially + effective when adding large numbers of rows to the grid, because it needs to + recalculate ranges and update scrollbars each time a row is added. + + + The code below shows how to add a large number of rows to the grid efficiently. + Note how the method is called inside a 'finally' block + to ensure repainting is properly restored. + + void UpdateGrid(C1FlexGrid flex) + { + try + { + flex.BeginUpdate(); // suspend painting to avoid flicker + flex.Rows.Count = 1; + for (int i = 1; i < 10000; i++) + flex.AddItem("Row " + i.ToString()); + } + finally + { + flex.EndUpdate(); // always restore painting + } + } + + + + + Resumes updating the control after calls to the method. + + + + + Gets or sets whether the control should fire the event. + + + If you set this property to , the grid will + fire the event whenever a cell needs to be painted. + You can handle the event and customize the way each cell is painted, either by changing + the cell contents and style, or by taking over the painting and doing it yourself. + For more details and examples, see the event. + + + + + Gets or sets whether the control should use an off-screen buffer when painting to reduce flicker. + + + This property is set to true by default, and rarely needs to be changed. + Setting to false may increase performance of applications + running under terminal server software. + + + + + Gets or sets the characters used as row and column separators in clip strings. + + For details and an example, see the property. + + + + Gets or sets the contents of the selected range. + + + The string assigned to (or returned by) the property may contain + multiple cells. By default, tab characters (\t) indicate column breaks, and carriage return + characters (\n) indicate row breaks. + The default row and column delimiters may be changed using the property. + When a string is assigned to the property, only the selected + cells are affected. If there are more cells in the selected region than are described in the + clip string, the remaining cells are ignored. If there are more cells described in the clip + string than in the selected region, the extra portion of the clip string is ignored. Empty + entries in the string will clear existing cell contents. + To get or set a clip string for an arbitrary range, use a object. + The value returned is affected by the setting of the + property. + + + The code below puts text into a selected area two rows high and two columns wide. + + // build clip string + string s = "r1 c1\tr1 c2\nr2 c1\tr2 c2"; + + // select a 2 x 2 range and apply clip string to selection + flex.Select(2, 2, 4, 4); + flex.Clip = s; + + + + + Clears a range. + + + value that specifies the elements to clear. + Range to clear. + + + + Clears a range. + + + value that specifies the elements to clear. + Top row in the range. + Left column in the range. + Bottom row in the range. + Right column in the range. + + + + Clears a cell. + + + value that specifies the elements to clear. + Row index. + Column index. + + + + Clears the grid. + + + value that specifies the elements to clear. + + The method does not affect the number of rows and columns on the grid, + and can't be used to clear data when the grid is bound to a data source. + + + + + Clears the grid. + + + This method removes all data, styles, and user data from all cells, rows, and columns on the grid. + The method does not affect the number of rows and columns on the grid, + and can't be used to clear data when the grid is bound to a data source. + + + + + Gets a object that can be used to format and manipulate a cell. + + Row index. + Column index. + A object that can be used to format and manipulate the cell. + + + + Gets a object that can be used to format and manipulate a range. + + Top row in the range. + Left column in the range. + Bottom row in the range. + Right column in the range. + A object that can be used to format and manipulate the range. + + The object provides access to properties of the cells in the range. + For example, the code below sets the style of a range: + + CellRange rg = flex.GetCellRange(5, 5, 20, 8); + rg.Style = flex.Styles["MyStyle"]; + + Note: is a class, not a struct. Because of this, you have to + assign the value to a variable and then use the variable. For example, the following code + will not compile: + + // this does not compile + flex.GetCellRange(5, 5, 20, 8).Style = flex.Styles["MyStyle"]; + + + + + + Creates an image of the entire grid. + + An object containing a metafile image of the grid. + + Use this method to copy grid images to the clipboard so you can paste them into + documents or other applications. + + + The code below creates an image of a grid range and saves it to a PNG file that can be + included in other documents such as web pages: + + Image img = flex.CreateImage(0,0,10,5); + img.Save(@"c:\temp\grid.png", System.Drawing.Imaging.ImageFormat.Png); + + + + + Creates an image of a portion of the grid. + + Top row in the range. + Left column in the range. + Bottom row in the range. + Right column in the range. + An object containing a metafile image of the grid. + + The image returned includes any fixed and frozen cells in addition to the specified range. + + + + + Creates an image of a portion of the grid. + + + that specifies which cells should be included in the image. + An object containing a metafile image of the grid. + + The image returned includes any fixed and frozen cells in addition to the specified range. + + + + + Creates an image of a portion of the grid. + + Top row in the range. + Left column in the range. + Bottom row in the range. + Right column in the range. + + value that determines the type of metafile to create. + An object containing a metafile image of the grid. + + The image returned includes any fixed and frozen cells in addition to the specified range. + + + + + Creates an image of a portion of the grid. + + + that specifies which cells should be included in the image. + + value that determines the type of metafile to create. + An object containing a metafile image of the grid. + + The image returned includes any fixed and frozen cells in addition to the specified range. + + + + + Draws a grid cell. + + + object where the cell will be drawn. + Index of the cell's row. + Index of the cell's column. + + that defines the cell position. + + This method is for internal use. It allows inherited classes to customize the grid appearance. + + + + + Gets or sets a reference to the cell editor that is currently active. + + + The property returns a reference to the cell editor that is + currently active. This may be one of the built-in editors (a TextBox, a ComboBox, or a + DateTimePicker control), a custom editor, or null (if the grid is not in edit mode). + You can use this property to programmatically access the editor, or to find out + if the grid is in edit mode. + If you don't want to use the grid's built-in editors, you can use any other control + instead. To do this, either associate the external editor with a specific grid row, column, + or using the property, which you can + get and set at any time. + Alternatively, you can handle the event and assign any control + directly to the property. (Note that the grid's Editor property can only + be assigned while handling the event, and is automatically reset to + null when the grid exits edit mode.) + Any control can be used as an external editor, but to achieve complete integration with + the grid, the external editor should implement the IC1EmbeddedEditor interface. Some controls + implement this interface natively and don't require any extra code to be used as grid editors + (like the ones in the C1Input library). Most, however, will require you to implement at least + a few of the methods in IC1EmbeddedEditor. + For examples of custom editors, please see Using Custom Editors and Creating Custom Editors + in this documentation, or visit our on-line sample library at https://www.grapecity.com/en/samples + and download the "CustomEditors" sample. + + + The code below uses the event to customize the current editor + by setting two properties. + + void _flex_SetupEditor(object sender, C1.Win.C1FlexGrid.RowColEventArgs e) + { + TextBox tb = _flex.Editor as TextBox; + if (tb != null) + { + tb.CharacterCasing = CharacterCasing.Upper; + tb.MaxLength = 12; + } + } + + + + + If True then empty strings from editor are interpreted as null values. + + + + + Gets or sets the list of items to be used by the drop-down editor. + + + The property specifies the type of editor to be used when + editing a cell. You may use a text box, drop-down list, drop-down combo, or an edit button + to pop up custom editor forms. + To use the property, set the property + to true and respond to the event by setting the + property to a string that describes the type of editing you want to use for that cell. + The options are described below: + 1. To edit the cell using a regular text box, set the property to an empty string. + For example: + flex.ComboList = string.Empty; + 2. To edit the cell using a drop-down list, set the property to a string containing the + available options, separated by pipe characters. For example: + flex.ComboList = "Item 1|Item 2|Item 3"; + 3. To edit the cell using a drop-down combo, set the property to a string containing the + available options, separated by pipe characters ("|") and starting with a pipe character. For example: + flex.ComboList = "|Item 1|Item 2|Item 3"; + 4. To display an edit button, set the property to a string containing an ellipsis ("..."). + Edit buttons look like regular push buttons, aligned to the right of the cell, with an ellipsis as a caption. + When the user clicks on the edit button, the grid fires the CellButtonClick event. In this case, the user can't + edit the cell contents directly. For example: + flex.ComboList = "..."; + 5. To display an edit button next to an editable cell, set the property to a string + containing a pipe and an ellipsis ("|..."). In this case, you get a regular edit button but the user can also edit the + cell contents directly. For example: + flex.ComboList = "|..."; + The property is especially useful in cases where different rows in + the same column may contain different types of data (for example a control such as the PropertyGrid). + In this case, the property allows you to adjust the type of editing you + want to provide depending on the current row. + If all rows in the column contain the same type of data, use the Column's + property instead. This way, the grid will automatically select the list depending on the column + being edited and you don't need to handle any events. + Note that the ComboList allows you to specify lists of strings only. Cells will store and display + these strings. If you want to store a certain type of data and display values associated with that data, see + the property. The DataMap property allows you to store values in the cells + (for example a CustomerID) and display strings associated with that data (for example the customer name). + + + The code below handles the event and assigns a value to the + property so that the grid displays buttons on every other row. + + void _flex_BeforeEdit(object sender, RowColEventArgs e) + { + _flex.ComboList = string.Empty; + if (e.Row % 2 == 0) _flex.ComboList = "..."; + } + + + + + Gets or sets the input mask to use when editing cells. + + + The specifies an input mask for automatic input formatting and + validation. The mask syntax is similar to the one used by the Microsoft MaskedEdit ActiveX + control and by Microsoft Access and is described below. + Set the property in response to the event, + in the same way you would set the property. + If the same mask is used to edit all values in a column, use the column's + property. This simplifies your code because you don't need to handle the event. + When the user is done editing a cell with a mask, the event fires. + The event parameter will be set to true if the mask was not filled + out properly, so in most cases you don't have to implement the handler. The default behavior ensures that + only valid data will be entered. + The string is composed of the following symbols: + + + 1) Wildcards + 0 digit + 9 digit or space + # digit, space, or sign + L letter + ? letter or space + A letter or digit + a letter, digit, or space + & any character + + + 2) Localized characters + . localized decimal separator + , localized thousand separator + : localized time separator + / localized date separator + + + 3) Command characters + \ next character is taken as a literal + > translate letters to uppercase + < translate letters to lowercase + + + 4) Placeholder specification + ; next character is used as a placeholder (the default is an underscore) + + + The code below sets the edit mask so the user can enter a phone number, with optional + area code, and a state in uppercase letters. The space-holder used is an asterisk ("*"). + + flex.EditMask = "(###) 000-0000 St\ate\: >LL;*"; + + + + + Puts the grid in edit mode and starts editing a cell. + + Row index. + Column index. + Initial character to be sent to the editor. + True if the grid entered edit mode successfully, false otherwise. + + + + Puts the grid in edit mode and starts editing a cell. + + Row index. + Column index. + True if the grid entered edit mode successfully, false otherwise. + + + + Puts the grid in edit mode and starts editing the current cell. + + True if the grid entered edit mode successfully, false otherwise. + + If the property is set to true, the control goes into + edit mode automatically when the user presses the edit key (F2), the space bar, or + any printable character. You may use the method to force + the control into cell-editing mode. + The method forces the control into editing mode even + if is set to False. You may also use it to allow editing of + fixed cells. + + + The code below uses the method to keep the grid in edit mode + while the user moves the selection (like the .NET DataGrid control): + + void _flex_RowColChange(object sender, System.EventArgs e) + { + _flex.StartEditing(); + } + + + + + Finishes editing the current cell and takes the grid out of edit mode. + + True if the grid left edit mode successfully, false otherwise. + + + + Finishes editing the current cell and takes the grid out of edit mode, + optionally canceling the edits. + + Whether to cancel the current edits and revert the cell to its original value. + True if the grid left edit mode successfully, false otherwise. + + If the cancel parameter is set to false, the grid tries to apply the edits, + and fires the , , and events as usual. + If validation fails, the grid stays in edit mode (and returns false). + If the cancel parameter is set to true, the original cell value is restored and the + grid is guaranteed to leave the edit mode. In this case, only the event fires. + To determine whether the grid is in edit mode, check whether the property is null. + + + + + Starts editing a cell in response to a key press. + + + This method is for internal use. It allows inherited classes to customize the editing process. + + Row index. + Column index. + Key that initiated the edit process. + Whether editing should start even in non-editable cells (e.g. fixed cells). + True if the editing process was started successfully, false otherwise. + + + + Starts editing a cell in response to a mouse action. + + + This method is for internal use. It allows inherited classes to customize the editing process. + + Row index. + Column index. + Mouse position in client coordinates. + Whether the action was a double-click. + True if the editing process was started successfully, false otherwise. + + + + Gets a reference to the object that controls the appearance + of the outline tree in the grid. + + + The can group data hierarchically and display it with a + collapsible tree similar to the one in the Microsoft TreeView control. + The object is used to specify the position and appearance + of the outline tree. + For details on create outlines, see the method and + the property. + + + + + Gets an array containing all zero-level + rows on the grid. + + + + + Gets or sets the specific list in a object that the grid should display. + + + If a contains multiple sources of data, you should set the + property to one of the sources. + For example, if the DataSource is a contains three tables named Customers, + Orders, and OrderDetails, you must specify one of the tables to bind to. + If the contains only one , you may set the + DataMember property to an empty string. + You can use the method to set the + and properties at the same time. + + + + + Gets or sets the data source for the grid. + + + Any object that implements the or + interfaces can be used as a data source. + Specifically, the following ADO.NET data sources are valid: DataTable, DataView, + DataSet, and DataViewManager. + The following ComponentOne DataObjects components are also valid data sources: + C1ExpressTable, C1ExpressVew, C1ExpressConnection, C1DataView, C1DataTableSource, and C1DataSet. + If the reference contains more than one table, you must + also set the property a string that specifies the table to bind to. + For example, if the DataSource is a DataSet or DataViewManager that contains three tables named + Customers, Orders, and OrderDetails, you must specify one of the tables to bind to. + You can use the method to set the + and properties simultaneously. + You can also assign another object to the + property. In this case, the controls will share the same grid model, including the data, display styles, + selection, etc. This can be used to implement split views, where different controls display different + parts of the same data. + + + + + Sets the and properties. + + The new data source object. + The table to bind to within the data source object. + + + + Sets the and properties, + optionally keeping the current column layout. + + The new data source object. + The table to bind to within the data source object. + Whether the current column layout should be preserved or re-generated + automatically based on the data source schema. + + + + Gets or sets whether column widths are automatically adjusted when data is loaded. + + + This property works when the control is bound to a . + If is set to true, the control automatically resizes its + columns to fit the widest entry every time new data is read from the data source. + If the data source contains a large number of rows and columns, the automatic + resizing may take a relatively long time. In these cases, you should consider setting + to false and setting the column widths directly in code. + You may also use the method to adjust the column widths + automatically. + + + + + Gets or sets whether columns are automatically created when the grid is bound to a data source. + + + By default, assigning a new to the grid resets the column collection + to reflect the data source schema. If you set to false, the + existing column layout will be preserved. + + + + + Calculates aggregate statistics for a range. + + + value that specifies the type of aggregate to calculate. + + object that contains the values to be aggregated. + + value that specifies aggregation options. + A that represents the aggregate value. + + + + Calculates aggregate statistics for a range. + + + value that specifies the type of aggregate to calculate. + Top row in the range. + Left column in the range. + Bottom row in the range. + Right column in the range. + + value that specifies aggregation options. + A that represents the aggregate value. + + + + Calculates aggregate statistics for the current selection. + + + value that specifies the type of aggregate to calculate. + + value that specifies aggregation options. + A that represents the aggregate value. + + + + Calculates aggregate statistics for the current selection. + + + value that specifies the type of aggregate to calculate. + A that represents the aggregate value. + + The code below method to calculate aggregate statistics + for the current selection. Whenever the selection changes, new aggregates are + calculated and written to the console. + + void flex_SelChange(object sender, System.EventArgs e) + { + string fmt = "Count {0:0}, Sum {1:#,##0.00}, " + + "Avg {2:#,##0.00}, Stdev {3:#,##0.00}"; + Console.WriteLine(fmt, + flex.Aggregate(AggregateEnum.Count), + flex.Aggregate(AggregateEnum.Sum), + flex.Aggregate(AggregateEnum.Average), + flex.Aggregate(AggregateEnum.Std)); + } + + + + + Calculates aggregate statistics for a range. + + + value that specifies the type of aggregate to calculate. + + object that contains the values to be aggregated. + A that represents the aggregate value. + + + + Calculates aggregate statistics for a range. + + + value that specifies the type of aggregate to calculate. + Top row in the range. + Left column in the range. + Bottom row in the range. + Right column in the range. + A that represents the aggregate value. + + + + Groups rows based on cell contents and calculates aggregate values. + + + value that specifies the type of aggregate to calculate. + Outline level to assign to the new subtotal rows. This parameter allows the creation of multi-level subtotals and affects the display of the outline tree. + First column in the range used to detect group breaks. + Last column in the range used to detect group breaks. + Column that contains values to be aggregated (usually numeric). + Text to insert in the subtotal rows. + + The method inserts rows containing aggregate values. These new rows are set + to behave as tree nodes so they can be collapsed and expanded to display a dynamic hierarchical + outline. + You can control the appearance and behavior of the outline tree using the property. + The node rows added by the method have their property + automatically set to one of the Styles.Subtotal* styles. You can use the + collection to modify the appearance of all subtotal rows on the grid. + To create an outline tree manually, insert node rows using the method, + or convert regular rows into nodes by setting the property to true for the + node rows. Then use the property to set the outline level for the new + nodes. + + + The code below assumes a grid with four columns: "Product", "Region", "Employee", and "Sales". + The code groups on the first two columns, calculating total sales for each product and for + each region within each product. + If the user drags a column to a new position, the tree is automatically rebuilt to show + the new grouping (by Employee, Region, etc). + + void UpdateTotals() + { + // no repainting until we're done + _flex.Redraw = false; + + // clear old subtotals, if any + _flex.Subtotal(AggregateEnum.Clear); + + // sort the grid on the columns that will be grouped + _flex.Sort(SortFlags.Ascending, 0, 3); + + // show outline tree on column 0 + _flex.Tree.Column = 0; + + // get a grand total (use -1 instead of column index) + _flex.Subtotal(AggregateEnum.Sum, -1, -1, 3, "Grand Total"); + + // total on column 0 (initially Product) + _flex.Subtotal(AggregateEnum.Sum, 0, 0, 3); + + // total on column 1 (initially Region) + _flex.Subtotal(AggregateEnum.Sum, 1, 1, 3); + + // show outline level 1 + _flex.Tree.Show(1); + + // restore painting + _flex.Redraw = true; + } + void _flex_AfterDragColumn(object sender, C1.Win.C1FlexGrid.DragRowColEventArgs e) + { + UpdateTotals(); // user moved a column, update totals + } + + + + + + Groups rows based on cell contents and calculates aggregate values. + + + value that specifies the type of aggregate to calculate. + Outline level to assign to the new subtotal rows. This parameter allows the creation of multi-level subtotals and affects the display of the outline tree. + Column used to detect group breaks. + Column that contains values to be aggregated (usually numeric). + Text to insert in the subtotal rows. + + + + Groups rows based on cell contents and calculates aggregate values. + + + value that specifies the type of aggregate to calculate. + Outline level to assign to the new subtotal rows. This parameter allows the creation of multi-level subtotals and affects the display of the outline tree. + Column used to detect group breaks. + Column that contains values to be aggregated (usually numeric). + + + + Groups rows based on cell contents and calculates aggregate values. + + + value that specifies the type of aggregate to calculate. + + This version of the method does not take any column parameters, + and is useful only for clearing the subtotals. For example: + + flex.Subtotal(AggregateEnum.Clear); // clear all subtotals + + + + + Groups rows based on cell contents and calculates aggregate values. + + + value that specifies the type of aggregate to calculate. + Outline level to assign to the new subtotal rows. This parameter allows the creation of multi-level subtotals and affects the display of the outline tree. + Name of the first column in the range used to detect group breaks. + Name of the last column in the range used to detect group breaks. + Name of the column that contains values to be aggregated (usually numeric). + Text to insert in the subtotal rows. + + This is a variant of the method + that takes column names instead of indices. + + + + + Groups rows based on cell contents and calculates aggregate values. + + + value that specifies the type of aggregate to calculate. + Outline level to assign to the new subtotal rows. This parameter allows the creation of multi-level subtotals and affects the display of the outline tree. + Name column used to detect group breaks. + Name of the column that contains values to be aggregated (usually numeric). + Text to insert in the subtotal rows. + + This is a variant of the method + that takes column names instead of indices. + + + + + Groups rows based on cell contents and calculates aggregate values. + + + value that specifies the type of aggregate to calculate. + Outline level to assign to the new subtotal rows. This parameter allows the creation of multi-level subtotals and affects the display of the outline tree. + Name column used to detect group breaks. + Name of the column that contains values to be aggregated (usually numeric). + + This is a variant of the method + that takes column names instead of indices. + + + + + Gets or sets whether node rows appear above or below the data. + + + This property determines how the outline tree is drawn, and it also determines + whether the method should add subtotal rows (which are node rows) + above or below the data being summarized. + Changing this property clears any existing nodes. + + + + + Adds a row to the grid and populates the new row with data. + + String containing the data for the new row. Items are separated by tab characters + by default. You can change the separator character using the property. + A reference to the new row. + + You can also add and remove rows using the collection. The + method provides a concise syntax for creating the row, populating it with data, and then adding it to the grid. + Before using to add a large number of rows to the grid, remember to set the + property to false. When finished adding the rows, set back to + its original value. This will significantly improve performance. + + + The code below adds 300 rows to the grid. + + // suspend painting to improve performance + bool redraw = flex.Redraw; + flex.Redraw = false; + + // append 100 rows, using tabs as separators + flex.ClipSeparators = "\t\n"; + for (int i = 0; i < 100; i++) + flex.AddItem("\tcol1\tcol2\tcol3"); + + // add 100 rows at the top, using pipes as separators + flex.ClipSeparators = "|;"; + for (int i = 0; i < 100; i++) + flex.AddItem("|col1|col2|col3", 0); + + // append 100 rows at the bottom, using an object array + object[] items = { "col1", "col2", "col3" }; + for (int i = 0; i < 100; i++) + flex.AddItem(items, flex.Rows.Count, flex.Cols.Fixed); + + // restore painting + flex.Redraw = redraw; + + + + + Adds a row to the grid and populates the new row with data. + + Array of objects that will be assigned to the new row. + A reference to the new row. + + + + Adds a row to the grid at a specified position and populates the new row with data. + + String containing the data for the new row. Items are separated by tab characters + by default. You can change the separator character using the property. + Position where the new row will be inserted. + A reference to the new row. + + + + Adds a row to the grid at a specified position and populates the new row with data. + + Array of objects that will be assigned to the new row. + Position where the new row will be inserted. + First column to populate with the items in the + array. This parameter is usually set to the index of the first scrollable column. + A reference to the new row. + + + + Removes the last row from the grid. + + + You can also add and remove rows using the collection. + The method is provided for consistency, since the grid + also has an method. + + + + + Removes a row at a specified position from the grid. + + Index of the row to be removed. + + + + Prints the grid, optionally showing a page setup or print preview dialog. + + The document name, which appears on the progress dialogs and on the print job windows. + Flags that select printing options. + True if the grid was printed, false if the user canceled the operation before printing started. + + Use the property to set up options such as page orientation + and margins, header and footer fonts, etc. + The method returns true if the user started the printing process. If the user clicks cancel while + the grid is printing, the method returns true (some pages may be printed anyway depending on the + printer settings). To detect canceled jobs, handle the event and check the + value of the e.Cancel parameter. + + + + + Prints the grid, optionally showing a page setup or print preview dialog. + + The document name, which appears on the progress dialogs and on the print job windows. + Flags that select printing options. + String that appears on the top of every page. + String that appears on the bottom of every page. + True if the grid was printed, false if the user canceled the operation. + + The header and footer strings may contain up to three tab-delimited sections, which are + aligned to the left, center, and right of the page. The strings may also contain placeholders + that are replaced with the current page number and total number of pages ("{0}" and "{1}"). + Use the property to set up options such as page orientation + and margins, header and footer fonts, etc. + + + + + Prints the grid, optionally showing a page setup or print preview dialog. + + The document name, which appears on the progress dialogs and on the print job windows. + True if the grid was printed, false if the user canceled the operation. + + Use the property to set up options such as page orientation + and margins, header and footer fonts, etc. + + + + + Gets a object that specifies printing parameters for the grid. + + + Use the method to print the grid and specify the document name, + common printing options, headers and footers. + Use the property to specify less common printing options + such as header and footer fonts, page margins, and page orientation. + + + + + Gets or sets a value that determines if the control can accept data that the user drags onto it. + + + This property allows you to use the control as a target for OLE drag-drop operations. + If set to (the default value), the control does not act as a drop target. + If set to , the control fires the standard drag-drop events + and the programmer is responsible for handling them. The main events involved are and + . These events are provided by the standard System.Windows.Forms.Control object. + If set to , the control handles the and + events automatically by performing the following actions: + 1) Query the data object for data in text or filename formats. + 2) Scroll if the user drags an object near the edges of the control. + 3) Paste the contents of the data object when the user drops valid data on the control. + Note: This property replaces and extends the property provided by the + base object. + + + + + Gets or sets a value that determines if the user can drag data from the control. + + + This property allows you to use the control as a source for OLE drag-drop operations. If + set to any of the automatic settings, the control provides the following services: + 1) Detect when the mouse is near the edge of a selected cell or range and display the + OLE drag cursor. + 2) If the user clicks the mouse while the OLE drag cursor is displayed, initiate a + drag operation with a data object containing the current selection. + In manual mode, the programmer is responsible for starting drag-drop operations using + the method. + + + + + Saves the grid contents to a file. + + Name of the file to save, including the path. + File format to use. + Options to use when saving the file. + + to use when saving the file. + + Grids saved to CSV and other text files include data only (no formatting information is saved). + Grids saved to Excel files include data and formatting information. Images are not saved. + Grids can also be persisted to Xml format using the and methods. + + + + + Saves the grid contents to a file. + + Name of the file to save, including the path. + File format to use. + Options to use when saving the file. + + + + Saves the grid contents to a file. + + Name of the file to save, including the path. + File format to use. + + + + Loads the grid from a file. + + Name of the file to load, including the path. + File format to use. + Options to use when loading the file. + + to use when saving the file. + + This method loads grid from a file previously saved with the method. + Formats supported include comma-delimited text files (CSV format), tab-delimited + text files, and Microsoft Excel files (.XLS). + When loading text files, rows and columns are added to the grid if needed to + accommodate the file contents. Text files contain only data and no formatting information. + When loading Excel files, the grid retrieves the first worksheet from the specified + workbook file. The method allows you to specify which worksheet should be loaded. + You can use the + method allows you to retrieve a list of the worksheets stored in an XLS file. + The grid can save and load data and formatting information from XLS files. + Grids can also be persisted to Xml format using the and methods. + + + + + Loads the grid from a file. + + Name of the file to load, including the path. + File format to use. + Options to use when loading the file. + + + + Loads the grid from a file. + + Name of the file to load, including the path. + File format to use. + + + + Saves the grid contents to a Microsoft Excel (.XLS) file. + + Name of the file to save, including the path. + Name of the sheet to add to the Excel workbook. + Options to use when saving the file. + + to use when saving the file. + + If the specified file exists, the control will add or replace a single worksheet in it. + Existing sheets will be preserved if possible. + The worksheet to add or replace is identified by the parameter. + If the specified file is in use by another application (usually Excel), the method will fail. + This method does not require Microsoft Excel to be installed on the machine. + + + + + Saves the grid contents to a Microsoft Excel (.XLS) file. + + Name of the file to save, including the path. + Name of the sheet to add to the Excel workbook. + Options to use when saving the file. + + If the specified file exists, the control will add or replace a single worksheet in it. + Existing sheets will be preserved if possible. + The worksheet to add or replace is identified by the parameter. + If the specified file is in use by another application (usually Excel), the method will fail. + This method does not require Microsoft Excel to be installed on the machine. + + + + + Saves the grid contents to a Microsoft Excel (.XLS) file. + + Name of the file to save, including the path. + Name of the sheet to add to the Excel workbook. + + + + Saves the grid contents to a Microsoft Excel (.XLS) file. + + Name of the file to save, including the path. + + + + + + Saves the grid contents to a Microsoft Excel (.XLS) file. + + Name of the file to save, including the path. + + + + Loads the grid from a Microsoft Excel (.XLS) file. + + Name of the file to load, including the path. + Name of the worksheet to load. + Options to use when loading the file. + + Use the method to obtain a list of the worksheets + in an XLS file. + + + + + Loads the grid from a Microsoft Excel (.XLS) file. + + Name of the file to load, including the path. + Name of the worksheet to load. + + Use the method to obtain a list of the worksheets + in an XLS file. + + + + + Loads the grid from the first worksheet in a Microsoft Excel (.XLS) file. + + Name of the file to load, including the path. + Options to use when loading the file. + + + + Loads the grid from the first worksheet in a Microsoft Excel (.XLS) file. + + Name of the file to load, including the path. + + + + Gets a list with the names of the worksheets in a Microsoft Excel (.XLS) file. + + Name of the Excel file, including the path. + An array containing the names of the worksheets defined in the file. + + This method is used to obtain a list of sheet names that can later be used to load and + save specific sheets using the and methods. + + + The code below loads all sheets in an Excel workbook into a collection of grids in a + TabControl: + + // clear tabControl + tabControl.TabPages.Clear(); + + // load sheet names + string fileName = "c:\book1.xls"; + string[] sheets = _flexGrid.LoadExcelSheetNames(fileName); + + // load each sheet + foreach (string sheetName in sheets) + { + // create a new grid for this sheet + C1FlexGrid flex = new C1FlexGrid(); + flex.Dock = DockStyle.Fill; + + // load sheet into new grid + flex.LoadExcel(fileName, sheetName); + + // add grid to the tabControl + TabPage page = new TabPage(); + page.Controls.Add(flex); + page.Text = sheetName; + tabControl.TabPages.Add(page); + } + + + + + Gets or sets whether the grid should display a new row template after the last data row. + + + If the user enters data into the new row template, a new row is automatically added to the grid. + This property works in bound mode (if the data source supports adding new rows) and also in + unbound mode. + Note that if this property is set to true, the Rows.Count property will return a value + that includes the new row template. If you set the Rows.Count property, the grid will set the + number of data rows and will automatically add the new row template. For example: + + flex.AllowAddNew = true; + flex.Rows.Count = 10; + Console.WriteLine("Row count is {0}.", _flex.Rows.Count); + Row count is 11. + + + + + + Gets or sets whether the grid should monitor the keyboard and handle the DEL key. + + + If this property is set to true, the user can delete rows by selecting them and then pressing + the DEL key. + This property works in bound mode (if the data source supports deleting rows) and in unbound mode. + + + + + Gets the collection of control glyphs (images used to show sorting, check boxes, etc). + + + The property returns a collection with an indexer + of type . This collection allows you to get or set the images used to + indicate column sorting, collapsed and expanded outline groups, check boxes, cursors, + error information, etc. + Note: Setting a glyph to null restores the default (built-in) image. If you want to make a glyph + invisible, set it to a small blank image instead. + + + For example, the code below causes the grid to use custom images to display the column sorting order + (instead of the built-in hollow triangles): + + flex.Glyphs[GlyphEnum.Ascending] = imgAscending; + flex.Glyphs[GlyphEnum.Descending] = imgDescending; + + + + + Gets or sets whether the grid should handle the clipboard keys and automatically + perform cut, copy, paste, and delete operations. + + + Setting this property to true causes the grid to monitor the keyboard for the + following clipboard keys: + Copy: CTRL-INS, CTRL-C + Cut: CTRL-X, SHIFT-DEL + Paste: CTRL-V, SHIFT-INS + Delete: DEL + Cut, paste, and delete actions are performed only if the + property is set to true. + If you want to handle only a subset of the supported keys, add a handler to the + event and set the Handled parameter to true to disable some of the keys. + Automatic clipboard operations only affect the grid data. Styles and images are + not copied, pasted, or deleted. + Values copied to the clipboard are affected by the setting of the + property. + + + + + Gets or sets a custom comparer object used by the grid to perform grouping, + merging, and searching operations. + + + The grid has a default implementation that is used to compare + cells and determine if their contents are equivalent. This implementation is used when merging, + grouping, or searching for values (see the property and the + and methods). + The default implementation is case-sensitive and takes leading and trailing blanks into account. + If you want to merge cells using a case-insensitive comparison or trimming blanks, + write a custom class that implements the interface and assign an + instance of it to the grid's property. + Setting this property to null (Nothing in Visual Basic) restores the default behavior. + + + The code below replaces the built-in comparer with a . + This causes the method to group items that differ only in case into the + same groups: + + // use case-insensitive comparer + flex.CustomComparer = new CaseInsensitiveComparer(); + + // add groups ignoring case + flex.Subtotal(AggregateEnum.Sum, 0, groupOn, totalOn); + + // restore default (case-sensitive) comparer + flex.CustomComparer = null; + + + + + Gets or sets an flags that affect the grid's editing behavior. + + + The default value for this property is , which enables + all editing options. See the enumeration for a list of + options available. + + + + + Gets a value that determines if a cell contains the grid cursor. + + Row index. + Column index. + True if the cell contains the cursor, false otherwise. + + + + Gets a value that determines if a cell belongs to a fixed row or column. + + Row index. + Column index. + True if the cell is fixed, false otherwise. + + + + Gets a value that determines if a cell is selected. + + Row index. + Column index. + True if the cell is selected, false otherwise. + + + + Gets a value that determines if a pair of cell coordinates are valid. + + Row index. + Column index. + True if the cell coordinates are valid, false otherwise. + + + + Gets a value that determines if a cell is part of the selection and should be highlighted. + + Row index. + Column index. + True if the cell should be highlighted, false otherwise. + + + + Gets a value that determines whether the cell contents are displayed as a checkbox. + + Row index. + Column index. + True if the cell contents should be displayed as a checkbox, false otherwise. + + Boolean values are displayed as check boxes unless one of the following conditions is true: + 1) The cell has an associated . In this case the values specified + in the DataMap are displayed instead of check boxes. + 2) The cell has a multi-part string (such as "yes;no"). In this case + the Format is used instead of check boxes. + 3) The cell belongs to a subtotal row and does not contain a Boolean value. + + + + + Specifies whether text rendering should be compatible with previous releases of WinForms. + + + This property determines whether the control should render text using the + class (compatible with previous versions), or the new class + (available in .NET 2.0 and later). + The class supports complex scripts and Uniscribe APIs, making + it better suited for some international applications. + However, the class seems to render about 25% slower than the + traditional method. + You may want to try both modes and select the one that matches the appearance of other + controls and forms in your application. + + + + + Gets a object that provides easy access to properties of the currently + active ComboBox editor. + + + The object can be used to get and set properties on the currently + active ComboBox editor without casting the property. + If no editor is active, or if the editor is not a , these properties + return null or -1, and cannot be set. + + + The code below shows two equivalent ways of accessing the selected index of the currently active ComboBox editor: + + // with the ComboBoxEditor property: + Console.WriteLine("The current combo index is {0}", + _flex.ComboBoxEditor.SelectedIndex); + + // without the ComboBoxEditor property: + ComboBox cb = _flex.Editor as ComboBox; + int index = (cb != null) ? cb.SelectedIndex : -1; + Console.WriteLine("The current combo index is {0}", + index); + + + + + Gets or sets a value that specifies the grid scrolling behavior. + + + + + Gets or sets flag that specify entering edit mode of cell after exiting from previous cell with arrow keys or tab key. + + + + + Gets or sets an C1SuperErrorProvider object used to indicate error state of the control. + + + + + Saves the grid contents to an Xml document. + + Name of the file to save, including the path. + + The grid serializes all its contents into the Xml document, including the + data stored in the cells, row and column properties, styles, images, etc. + Objects of custom types stored in the grid are also serialized as long as + they have an associated that provides conversions to + and from string. + The method has several overloads that allow you to + save several grids into a single Xml document, along with other information stored + in the Xml document. + + + The code below saves a grid into an Xml file: + + // save a grid into am Xml file + flex.WriteXml(fileName); + + The code below saves two grids into an Xml file, then reads them back in reverse order: + + // prepare XmlTextWriter + XmlTextWriter w = new XmlTextWriter(fileName, new UTF8Encoding(false)); + w.Formatting = Formatting.Indented; + w.WriteStartDocument(); + w.WriteStartElement("Grids"); + + // save first grid + w.WriteStartElement(c1FlexGrid1.Name); + c1FlexGrid1.WriteXml(w); + w.WriteEndElement(); + + // save second grid + w.WriteStartElement(c1FlexGrid2.Name); + c1FlexGrid2.WriteXml(w); + w.WriteEndElement(); + + // close document + w.WriteEndElement(); + w.Close(); + + // load document from file + XmlDocument doc = new XmlDocument(); + doc.Load(fileName); + XmlNode n = doc.SelectSingleNode("Grids"); + + // load grids in reverse order + c1FlexGrid2.ReadXml(n.ChildNodes[0]); + c1FlexGrid1.ReadXml(n.ChildNodes[1]); + + + + + Saves the grid contents to an Xml document. + + The where the document is saved. + + + + Saves the grid contents to an Xml document. + + The where the document is saved. + + + + Saves the grid contents to an Xml document. + + The where the document is saved. + + + + Loads the grid from an Xml document. + + Name of the file to load, including the path. + + + + Loads the grid from an Xml document. + + + object to use for loading the grid. + + + + Loads the grid from an Xml document. + + + object to use for loading the grid. + + + + Loads the grid from an Xml document. + + + object to use for loading the grid. + + + + Loads the grid from an Xml document. + + + object to use for loading the grid. + + + + Loads the grid from an Xml document. + + + object to use for loading the grid. + + + + Raises the event. + + Object raising the event. + A that contains event data. + + + + Gets a rectangle that defines the scrollable portion of the control. + + + The value returned corresponds to the control's client area minus any fixed + and frozen rows and columns. + + + + + Builds a rectangle that defines the scrollable portion of the control for a given pair of scroll offsets. + + Horizontal scroll offset. + Vertical scroll offset. + A that defines the scrollable portion of the control. + + This method is for internal use. It allows derived classes to customize the control scrolling behavior. + + + + + Raises the event. + + An that contains the event data. + + + + Raises the event. + + An that contains the event data. + + + + Raises the event. + + An that contains the event data. + + + + Raises the event. + + A that contains the event data. + + + + Paints the control background. + + A that contains information about the control to paint. + + + + Called when the control receives a WM_THEMECHANGED message. + + + The WM_THEMECHANGED message is broadcast to every window following a + theme change event. Examples of theme change events are the activation of a + theme, the deactivation of a theme, or a transition from one theme to another. + + + + + Gets or sets the background color for the control. + + + This is the color used to paint the background of the scrollable cells, also defined by the + cell style. + + + + + Gets or sets the foreground color for the control. + + + This is the color used to paint the text in scrollable cells, also defined by the + cell style. + + + + + Raises the event. + + An that contains the event data. + + + + Raises the event. + + An that contains the event data. + + + + Raises the event. + + An that contains the event data. + + + + Calculates the new position of a scrollbar in response to a user command. + + Scroll command (SB_LINEUP, etc). + True for the vertical scrollbar, false for the horizontal scrollbar. + Current scrollbar position. + Scrollbar thumb position. + The new position for the scrollbar. + + Derived classes may override this method to customize the scrolling behavior. + + + + + Raises the event. + + A that contains the event data. + + + + Raises the event. + + + that contains the event data. + + + + Fires when a row is losing focus and needs to be validated. + + + This event is analogous to the event. + Use this event to perform validation on all the values of a row. + If the row does not pass validation, set the property to true. + Canceling this event prevents the event from occurring, + and also prevents the user from leaving the invalid row. + + + + + Raises the event. + + A that contains the event data. + + + + Fires after a row lost focus and has been validated. + + + This event is analogous to the event. + Use this event to perform post-processing on a row of values. + + + + + Raises the event. + + A that contains the event data. + + + + Moves or extends the current selection. + + + value that specifies the type of cursor movement. + Whether to extend the current selection. + + This method is for internal use. It allows inherited classes to customize the grid appearance. + + + + + Moves or extends the selection from a given cell. + + + value that specifies the type of cursor movement. + Whether to extend the current selection. + Row index for the initial selection. + Column index for the initial selection. + + This method is for internal use. It allows inherited classes to customize the grid appearance. + + + + + Gets a value that indicates what types of child nodes a row has. + + + This method is for internal use. It allows inherited classes to customize outline trees. + + Row index. + Column index. + Outline level. + Zero if the row has no children, 1 if it has regular data rows only, + 2 if it has child nodes, and 3 if it has data and child nodes. + + + + + Gets a rectangle representing the coordinates of a cell, row, or column. + + + This method is for internal use. It allows inherited classes to customize the way cell geometry + is calculated. + + Row index (or -1 to get column bounds). + Column index (or -1 to get row bounds). + Whether the rectangle should be horizontally clipped to the grid's client area. + Whether the rectangle should be vertically clipped to the grid's client area. + A containing the display area for the row, column, or cell, + in client coordinates and accounting for scroll position. + + + + Gets a rectangle representing the coordinates of a cell, row, or column. + + + This method is for internal use. It allows inherited classes to customize the way cell geometry + is calculated. + + Row index (or -1 to get column bounds). + Column index (or -1 to get row bounds). + A containing the display area for the row, column, or cell, + in client coordinates and accounting for scroll position. + + + + Gets a rectangle representing the coordinates of a cell editor. + + + This method is for internal use. It allows inherited classes to customize the way cell geometry + is calculated. + + Row index. + Column index. + Rectangle used to position the cell editor. + + + + Draws a grid row. + + A that contains a + object where the row will be drawn. + Index of the row to draw. + + This method is for internal use. It allows inherited classes to customize the grid appearance. + + + + + Draws a grid cell. + + A that contains a + object where the cell will be drawn. + Index of the cell's row. + Index of the cell's column. + The index of the last column painted (may be greater than + if columns are merged). + + This method is for internal use. It allows inherited classes to customize the grid appearance. + + + + + Gets the state for a Windows Xp theme while the mouse moves over a cell. + + + This method is for internal use. It allows inherited classes to customize the + hot-tracking behavior. + + Row under the mouse. + Column under the mouse. + An integer representing the item state (2 for hot-tracking, 1 for normal). + + + + Gets a cell glyph to show in a cell. + + + This method is for internal use. It allows inherited classes to customize the display of the sorting glyphs. + + Row index. + Column index. + Cell rectangle + Glyph to display above the cell content. + Glyphs to display on the left of the cell. + Glyphs to display on the right of the cell. + True if any glyphs were assigned to the cell, false otherwise. + + + + Gets the state of the checkbox in a grid cell. + + Row index. + Column index. + One of the values in the enumeration. + + By default, the grid displays values in Boolean columns as check boxes (the column's + data type determined by the property). If you don't want Boolean + values displayed as check boxes, set the column's property to a + string containing the values that should be displayed for True and False values, separated by + a semi-colon. For example: + + flex.Cols["CheckBoxes"].DataType = typeof(bool); + flex.Cols["yesNo"].DataType = typeof(bool); + flex.Cols["yesNo"].Format := "Yes;No"; + + In unbound mode, you can use the and + methods to add check boxes to any cells. The check boxes will be displayed along with any text in + the cell, and you can set their position using the column's property. + There are two types of check boxes: Boolean and tri-state. Boolean check boxes toggle between + the and states. Tri-state check + boxes cycle through the settings , , + and . + For example, the code below creates a Boolean checkbox in cell (3,3) and a tri-state checkbox + in cell (4,3): + + flex.SetCellCheck(3, 3, CheckEnum.Unchecked) // Boolean; + flex.SetCellCheck(4, 3, CheckEnum.TSUnchecked) // tri-state; + + + + + + Sets the state of the checkbox in a grid cell. + + Row index. + Column index. + + value to assign to the cell. + + For details and examples, see the method. + + + + + Applies a value to a cell or cell range. + + + This method is for internal use. It allows inherited classes to customize the way checkbox + data is applied to the cells when cells are edited. + + Row index. + Column index. + Value to apply to the cell. + + + + Adjusts the width of a column range to fit the data in a cell range. + + Top row in the range. + Left column in the range. + Bottom row in the range. + Right column in the range. + Amount of extra space, in pixels, to add to the column widths. + Flags that control auto-sizing options. + + By default, the method measures every cell in each column, + taking into account the cell contents and style. + If the grid has a large number of rows, you can improve performance by using the + and parameters to specify a row range. + You can include only a few hundred rows in the process, and add some extra spacing for safety. + + + + + Adjusts the width of all columns to fit the data. + + + + + Adjusts the width of columns in a range to fit the data. + + Left column in the range. + Right column in the range. + Amount of extra space, in pixels, to add to the column widths. + + + + Adjusts the width of all columns fit the data. + + Amount of extra space, in pixels, to add to the column widths. + + + + Adjusts the width of a column to fit the data. + + Column index. + + This method measures every cell in the column, taking into account the cell contents and style. + If the grid has a large number of rows, consider using the + method instead, because it allows you to specify a smaller set of rows and columns to measure. + + + + + Adjusts the width of a column to fit the data. + + Column index. + Amount of extra space, in pixels, to add to the column widths. + + This method measures every cell in the column, taking into account the cell contents and style. + If the grid has a large number of rows, consider using the + method instead, because it allows you to specify a smaller set of rows and columns to measure. + + + + + Adjusts the height of a row range to fit the data in a cell range. + + Top row in the range. + Left column in the range. + Bottom row in the range. + Right column in the range. + Amount of extra space, in pixels, to add to the column widths. + Flags that control auto-sizing options. + + + + Adjusts the height of all rows to fit the data. + + + + + Adjusts the height of a row to fit the data. + + Row index. + + + + Automatically size grid columns to fit the largest entry. + + + object used to measure the cell contents. + Index of the first row to be measured. + Index of the first column to be measured. + Index of the last row to be measured. + Index of the first column to be measured. + Extra space, in twips, to add to the largest entry. + + value that specifies auto-sizing behavior. + + This method is for internal use. It allows inherited classes to customize the grid appearance. + + + + + Automatically size grid columns to fit the largest entry. + + + object used to measure the cell contents. + Index of the first row to be measured. + Index of the first column to be measured. + Index of the last row to be measured. + Index of the first column to be measured. + Extra space, in twips, to add to the largest entry. + + value that specifies auto-sizing behavior. + + This method is for internal use. It allows inherited classes to customize the grid appearance. + + + + + Gets a reference to the column that defines the current sort applied to the grid. + + + The grid may be sorted by a call to the method, by a user clicking + a column header, or as a result of sorting applied directly to the object that is being + used as the grid's . + To determine the current sort direction, use the sorted column's + property. + If the grid is not currently sorted, this property returns null. + + + + + Gets or sets whether the control should use Xp themes for displaying row or column headers. + + + This property only has an effect if the application is themed. To enable themes for + an application, you can either call the Application.EnableVisualStyles method or use + a manifest file. Please refer to MSDN for details. + Setting the property to BorderStyleEnum.XpThemes + automatically sets this property to ShowThemedHeadersEnum.Both. + + + + + Raises the event. + + An that contains the event data. + + + + Raises the event. + + An that contains the event data. + + + + Raises the event. + + An that contains the event data. + + + + Raises the event. + + An that contains the event data. + + + + Determines whether the specified key is a regular input key or a special + key that requires preprocessing. + + One of the values. + True if the specified key is a regular input key, False otherwise. + + + + Determines if a character is an input character that the control recognizes. + + The character to test. + True if the character should be sent directly to the control and not preprocessed, False otherwise. + + + + Raises the event. + + A that contains the event data. + + + + Raises the event. + + A that contains the event data. + + + + Raises the event. + + An that contains the event data. + + + + Raises the event. + + A that contains the event data. + + + + Raises the event. + + A that contains the event data. + + + + Raises the event. + + A that contains the event data. + + + + Raises the event. + + An that contains the event data. + + + + Called when the grid contents scroll. + + + value that specifies the scroll direction. + + This method is for internal use. It allows inherited classes to customize the grid scrolling behavior. + + + + + Called when the grid contents scroll vertically, to update the value of the scroll tip. + + New value for the vertical scroll bar. + + This method processes the new scroll position and calls . + + + + + Raises the event. + + A that contains event data. + + + + Raises the event. + + A that contains event data. + + + + Raises the event. + + A that contains event data. + + + + Gets or sets a value that determines the overall appearance of the control. + + + This property allows you to quickly customize the appearance of the grid so + it matches the appearance of your application. + The settings available include System, various Microsoft Office color + schemes, and Custom, which relies on the control's standard styles and + appearance properties. + + + + + Gets a value that determines whether the + property is set explicitly and should be persisted. + + True if the property was explicitly set by the user. + + + + Resets the value of the ambient property. + + + + + Method invoked when the property changes. + + + + + Gets or sets a used to customize the look and + feel of the control. + + + + + Gets the current . + + + + + + + Gets or sets a string that is displayed over the new row template + when the property is set to true. + + + + + Gets or sets what parts of the grid are copied to the clipboard when the + property is set to true. + + + + + Copies the current selection to the clipboard. + + + + + Cuts the content of the current selection to the clipboard. + + + This command copies the current selection to the clipboard, then deletes + the editable content within the selection. + + + + + Pastes the content of the clipboard onto the current selection. + + + + + Gets or sets whether the user is allowed to filter the data. + + + When this property is set to true, the grid displays filter icons + on the column headers. Users may click the icons to define filters to be + applied to the data. + When a filter is applied, the grid hides rows that don't match the + filter by setting their property to false. The + filter is not applied to the data source. + You may specify the type of filter to use for each individual column + by setting the columns property. + You may also create custom filters by creating classes the implement + the interface and assigning instances of that + class to the column's property. + + + + + Gets or sets a value that determines whether the filter should ignore diacritics + (accents) when comparing values. + + + By default, the filter compares values as they appear in the data source. + For example, if you are looking for values that contain the string "fac", you + will find "factory" but not "façade". + If you set this property to true, the filter will remove any diacritics + before performing the comparisons. In this case, looking for the string "fac" + will return both "factory" and "façade". + This property is especially useful in applications localized for languages + that contain many accents, such as French, Spanish, Portuguese, etc. + + + + + Gets or sets an XML string containing the current filter state. + + + + + Applies all column filters to the data on the grid. + + + + + Edits the filter associated with a given column. + + Index of the column whose filter should be edited. + + + + Edits the filter associated with a given column. + + + whose filter should be edited. + + + + Clears the filter associated with a given column. + + Index of the column whose filter should be cleared. + + + + Clears the filter associated with a given column. + + + whose filter should be cleared. + + + + Clears all column filters. + + + + + Applies search to the data on the grid. + + Words which will be searched. + Defines will search results be highlighted or not. + Defines will search results be filtered or not. + Defines will perform search through only visible columns or not. + + + + Applies search to the data on the grid. + + Words which will be searched. + Defines will search results be highlighted or not. + Defines will search results be filtered or not. + + + + Applies search to the data on the grid. + + Words which will be searched. + + + + Gets or sets the language to use when localizing the column filters. + + + + + Specifies how grid columns should be sorted. + + + This enumeration contains flags that can be combined to customize the sorting process. + + + For example, the code below sorts two grid columns ignoring case. + + // C# + SortFlags order = SortFlags.Ascending | SortFlags.IgnoreCase; + _flex.Sort(order, col1, col2); + + ' VB + Dim order As SortFlags = SortFlags.Ascending Or SortFlags.IgnoreCase + _flex.Sort(order, col1, col2) + + + + + Do not sort. This setting is useful for skipping certain columns when sorting column ranges. + + + + + Sort in ascending order. + + + + + Sort in descending order. + + + + + Sort using the string representation of the data. In this mode, "100" appears before "2". + + + + + Ignore case when sorting strings. + + + + + Use the flags stored in the property of individual objects. + + + + + Specifies which elements of the grid should be cleared by the method. + + + This enumeration contains flags that can be combined to customize the sorting process. + + + + + Clear cell content, including data, images, and check boxes if any. + + + + + Clear custom styles assigned to cells. + + + + + Clear user data associated with cells. + + + + + All of the above. + + + + + Specifies the type of checkbox to draw in a cell. + + + There are two types of check boxes: regular and tri-state. + Regular check boxes are used to display simple Boolean values. + They cycle through settings Checked and Unchecked when clicked with the mouse. + Tri-state check boxes are used to display values that may be true, false, or + indeterminate (grayed). They cycle through settings TSChecked, TSGrayed, and + TSUnchecked when clicked with the mouse. + Visually, Checked and Unchecked look the same as TSChecked and TSUnchecked. + + + + + No check box. + + + + + Check box with a check mark in it. + + + + + Empty check box. + + + + + Check box in undefined state. + + + + + Tri-state check box with a check mark in it. + + + + + Tri-state empty check box. + + + + + Tri-state check box in undefined state. + + + + + Specifies the type of aggregate function to calculate with the and + methods. + + + + + No aggregate. This setting is used with the method to create an + outline tree without any numerical aggregates. + + + + + Clear existing aggregates. This setting is used with the method + to clear any existing subtotals, usually before calculating new subtotals. + + + + + Returns the sum of all values in the range. + + + + + Percent of grand total. This setting is used with the method to + calculate the percentage of the grand total represented by each sub group. (This setting can't + be used with the method). + + + + + Returns the count of non-empty cells in a range. + + + + + Returns the average value of the non-empty cells in a range. + + + + + Returns the maximum value in a range. + + + + + Returns the minimum value in a range. + + + + + Returns the sample standard deviation of the values in a range (uses the formula based on n-1). + + + + + Returns the sample variance of the values in a range (uses the formula based on n-1). + + + + + Returns the population standard deviation of the values in a range (uses the formula based on n). + + + + + Returns the population variance of the values in a range (uses the formula based on n). + + + + + Specifies options to use when calculating aggregates with the method. + + + + + Default setting. Include all rows and use numerical values only. + + + + + Exclude node rows from aggregate. This option is useful when the grid contains subtotal rows, + which are marked as nodes and contain values that are subtotals and should thus be excluded + from aggregates. + + + + + Calculate aggregates for dates instead of numerical values. Only a few aggregate functions + are meaningful for dates: count, maximum, and minimum. + + + + + Calculate aggregates for Boolean values. This flag causes the value True to be interpreted as one, + and False as zero. This option is useful for counting the number of checked check boxes in a range. + + + + + Exclude hidden rows and columns from the aggregate. + + + + + Exclude collapsed rows from the aggregate. + + + + + Exclude hidden rows from the aggregate. + + + + + Specifies whether subtotals rows created with the method should be + inserted above or below the data they refer to. + + + + + Subtotal rows are inserted above the data (tree-style). + + + + + Subtotal rows are inserted below the data (spreadsheet-style). + + + + + Specifies the type of change that occurred when the controls fires the + event. + + + + + No action. + + + + + The number of grid rows or columns has changed. + + + + + The number of fixed grid rows or columns has changed. + + + + + A style definition has changed. + + + + + A style has been applied to a range. + + + + + The grid has been invalidated and will be repainted. + + + + + The value in a cell has changed. + + + + + A range has been invalidated and will be repainted. + + + + + The grid will be repainted. + + + + + A tree node is about to be collapsed or expanded. + + + + + A tree node has just been collapsed or expanded. + + + + + A tree node will be scrolled into view. + + + + + A tree node will be selected. + + + + + A row has been moved into a new position. + + + + + A row has been added to the grid. + + + + + A row has been removed from the grid. + + + + + A row has been selected or de-selected. + + + + + A column has been moved into a new position. + + + + + A column has been added to the grid. + + + + + A column has been removed from the grid. + + + + + A column has been selected or de-selected. + + + + + The selection is about to change. + + + + + The selection has just changed. + + + + + Represents the method that will handle the event. + + + + + Provides data for the event handler. + + + + + The type of action that caused the event to fire. + + + + + Range of cells affected by the event. + + + + + Range of cells affected by the event. + + + + + Range of cells affected by the event. + + + + + Range of cells affected by the event. + + + + + Represents cell ranges, allowing the caller to set properties for multiple cells + with a single statement. + + + The structure does not have a public constructor. To create a + object, use the method. + Note that is a structure, not a class. This means the object is used as a value, + not as a reference. If you pass a to a method and change the object within that method, + the original value is not modified. + Ranges are defined by two rows and two columns (, , , and + ). These values do not have to be in order ( may be smaller or greater than + ). To obtain the values in order, use the method or the , + , , and properties. + + + + + Gets or sets the range's first row index. + + + + + Gets or sets the range's first column index. + + + + + Gets or sets the range's last row index. + + + + + Gets or sets the range's last column index. + + + + + Gets a value that indicates if the range contains a single cell. + + + + + Gets a value that indicates if the range contains valid row and column indices. + + + This property returns true if the range coordinates are valid. The range is valid + if both r1 and r2 are between 0 Rows.Count-1, both c1 and c2 are between 0 and + Cols.Count-1. + + + + + Determines whether the range contains a given row. + + Index of the row to check. + True if the range contains the row, False otherwise. + + + + Determines whether the range contains a given column. + + Index of the column to check. + True if the range contains the column, False otherwise. + + + + Determines whether the range contains a given cell. + + Index of the row to check. + Index of the column to check. + True if the range contains the cell, False otherwise. + + + + Gets the index of the top row in the range. + + + + + Gets the index of the bottom row in the range. + + + + + Gets the index of the left column in the range. + + + + + Gets the index of the right column in the range. + + + + + Normalizes the range so that is the , + is the , + is the , + and is the . + + + + + Gets or sets the data stored in the range. + + + When getting, this property returns the value in the first cell of + the range (r1, c1). When setting, it stores the given value in every + cell within the range. + + + + + Gets the value in cell (, ), formatted as a string. + + + This property is similar to the property, except Clip + returns a tab-delimited string containing data in the entire range, and DataDisplay + returns the contents of the first cell only (r1, c1). + + + + + Gets or sets the style used to display every cell in the range. + + + Getting or setting the range style ensures that every cell in the range has + the same style. If the range does not contain any cells with custom styles, + this property returns null. + + + The code below creates a structure and uses it to + apply a custom style to the entire range. + + // create a style + CellStyle cs = _flex.Styles.Add("red"); + cs.BackColor = Color.Red; + + // create a cell range and assign it a style + CellRange rg = _flex.GetCellRange(1, 1, 5, 5); + rg.Style = cs; + + + + + Gets or sets the style used to display every cell in the range, creating a new style if necessary. + + + This property never returns null. If the range does not have a style assigned to it, a new style + will be created automatically. + + + The code below creates a structure and uses it to apply a custom style to + the entire range. + + // create a cell range + CellRange rg = _flex.GetCellRange(1, 1, 5, 5); + + // make sure range is red + rg.StyleNew.BackColor = Color.Red; + + + + + Gets the style used to render cell (, ). + + + This property never returns null. It will return the custom style assigned to the + first cell in the range, to the cell's row, column, or a built-in style. + + + + + Gets or sets the state of the checkbox in the range. + + + When getting, this property returns the checkbox value that corresponds to cell + (, ). When setting, it applies the new value to all + cells in the range. + + + + + Gets or sets the assigned to cells in the range. + + + When getting, this property returns the assigned to cell + (, ). When setting, it applies the new value to all + cells in the range. + + + + + Gets or sets arbitrary used data assigned to cells in the range. + + + When getting, this property returns the user data assigned to cell + (, ). When setting, it applies the new value to all + cells in the range. + + + + + Gets or sets a string containing the values of all cells in the range. + + + The cell values are delimited by characters specified by the + property. + By default, columns are separated by tabs (\t or vbTab) and rows by line breaks (\n or vbCr). + + + + + Clears selected elements from the range. + + + value that specifies which elements + should be cleared. + + + + Gets a string representation for this object. + + A string representation for this object. + + + + Collection of objects. + + + + + Initializes a new instance of a . + + Grid that owns the collection. + + + + Gets or sets the object at a specified index. + + + + + Gets the number of objects in the collection. + + + + + Adds a new object to the collection. + + Top row in the range. + Left column in the range. + Bottom row in the range. + Right column in the range. + The index of the object in the collection. + + + + Adds a new object to the collection. + + Object to add to the collection. + The index of the object in the collection. + + + + Adds a new object to the collection, optionally + removing other overlapping ranges from the collection. + + Top row in the range. + Left column in the range. + Bottom row in the range. + Right column in the range. + Whether to remove overlapping + ranges from the collection before adding the new range. + The index of the object in the collection. + + + + Adds a new object to the collection, optionally + removing other overlapping ranges from the collection. + + Object to add to the collection. + Whether to remove overlapping + ranges from the collection before adding the new range. + The index of the object in the collection. + + + + Removes all objects from the collection. + + + + + Determines whether a object is a member of the collection. + + Object to locate in the collection. + True if the object is a member of the collection, false otherwise. + + + + Gets the index of a object in the collection. + + Object to locate in the collection. + The index of the object in the collection, or -1 if the object is not a member of the collection. + + + + Gets the index of the first object in the collection that contains the specified row and column. + + Index of the row contained in the range. + Index of the column contained in the range. + The index of the object in the collection, or -1 if no range could be found containing the specified row and column. + + + + Inserts a object in the collection at a specified index. + + + + + + + + + Removes a object from the collection. + + Object to remove from the collection. + + + + Removed the object at a specified index from the collection. + + Index of the object to remove from the collection. + + + + Represents a filter based on one or two logical conditions. + + + + + Initializes a new instance of a . + + + + + Gets the first filter condition. + + + + + Gets the second filter condition. + + + + + Gets or sets whether the filter conditions should be combined + with an 'And' or with an 'Or' operator. + + + + + Creates a clone of this . + + A clone of this . + + + + Gets or sets a value that determines whether the filter is active. + + + + + Resets the filter making it inactive. + + + + + Applies the filter to a value. + + Value to be filtered. + True if the satisfies the filter; + False otherwise. + + + + Gets the editor used to modify the filter at run time. + + A that is used to modify the filter at run time. + + + + Represents operators used in filter conditions. + + + + + Disables the operator. + + + + + Return true if the value equals the operator parameter. + + + + + Return true if the value does not equal the operator parameter. + + + + + Return true if the value is greater than the operator parameter. + + + + + Return true if the value is less than the operator parameter. + + + + + Return true if the value is greater than or equal to the operator parameter. + + + + + Return true if the value is less than or equal to the operator parameter. + + + + + Return true if the string representation of the value contains the operator parameter. + + + + + Return true if the string representation of the value does not contain the operator parameter. + + + + + Return true if the string representation of the value begins with the operator parameter. + + + + + Return true if the string representation of the value ends with the operator parameter. + + + + + Represents a condition within a . + + + Each contains up to two conditions that + can be combined with 'And' or 'Or' operators. + + + + + Gets a value that indicates whether the condition is active. + + + + + Gets or sets the operator used by this condition. + + + + + Gets or sets the parameter used by this condition. + + + + + Clears this condition by setting the to 'None' + and the to null. + + + + + Applies the condition to a given value. + + Value to test. + True if the value satisfies the condition, false otherwise. + + + + Specifies the behavior of the control as an OLE drag-drop target. + + + + + The control can't be used as a drop target. + + + + + The control fires drag-drop events that can be handled to provide drop target functionality. + + + + + The control automatically handles dropping of text or filename data. + + + + + Specifies the behavior of the control as an OLE drag-drop source. + + + + + The control does not provide any drag support. The caller can still initiate drag-drop operations + using the method. + + + + + The control provides automatic dragging of data. If the mouse hovers near the edges of the selected range, + the cursor will change and allow the user to move or copy data (pressing the CTRL key to copy). + + + + + Same as Automatic, except the data is always copied (never moved). + + + + + Same as Automatic, except the data is always moved (never copied). + + + + + Represents the method that will handle the event. + + Object that fired the event. + + object that contains the event data. + + + + Provides data for the event. + + + + + Gets which mouse button was pressed. + + + + + Gets the number of times the mouse button was pressed and released. + + + + + Gets the x-coordinate of a mouse click. + + + + + Gets the y-coordinate of a mouse click. + + + + + Gets a signed count of the number of detents the mouse wheel has rotated. A detent is one notch of the mouse wheel. + + + + + Gets or sets a value indicating whether the event should be canceled. + + + + + Initializes a new instance of the BeforeMouseDownEventArgs class. + + + with mouse event information. + + + + Initializes a new instance of the BeforeMouseDownEventArgs class. + + Control that will fire the event. + + value that indicates which button was pressed. + Number of times the button was pressed and released. + + + + Represents the method that will handle the , , and events. + + Object that fired the event. + + object that contains the event data. + + + + Provides data for the , , + , and events. + + + + + Gets the original index of the row that was dragged by the user. + + + + + Gets the original index of the column that was dragged by the user. + + + + + Gets the new index of the column or row that was dragged by the user. + + + + + Gets or sets a value indicating whether the drag operation should be canceled. + + + + + Initializes a new instance of the DragRowColEventArgs class. + + The original index of the row that was dragged by the user. + The original index of the column that was dragged by the user. + The new index of the column or row. + + + + Represents the method that will handle the and + events. + + Object that fired the event. + + object that contains the event data. + + + + Provides data for the and events. + + + + + Gets the column that is being sorted. + + + + + Gets or sets a value that determines the sorting order. + + + + + Gets or sets a value indicating whether the drag operation should be canceled. + + + Setting this parameter to true cancels the built-in sort operation and leaves the sorting glyph unchanged. + + + + + Gets or sets a value indicating whether the drag operation has been handled by the event handler. + + + Setting this parameter to true cancels the built-in sort but updates the sorting glyph as if the + sort had been performed. This is useful when the event handler performs custom sorting. + + + + + Initializes a new instance of the SortColEventArgs class. + + The column that is being sorted. + + value that determines the sorting order. + + + + Represents the method that will handle the , + , , + , , + , , + , , + , , + , and events. + + Object that fired the event. + + object that contains the event data. + + + + Provides data for the , , + , , + , , + , , + , , + , , and + events. + + + + + Gets the index of the row that caused the event. + + + This value may be set to -1 if the event was caused by a column. + + + + + Gets the index of the column that caused the event. + + + This value may be set to -1 if the event was caused by a row. + + + + + Gets or sets a value indicating whether the operation should be canceled. + + + + + Initializes a new instance of the RowColEventArgs class. + + Index of the row that caused the event. + Index of the column that caused the event. + + + + Represents the method that will handle the , + , , + , , and + events. + + Object that fired the event. + + object that contains the event data. + + + + Provides data for the , , + , , + , and events. + + + + + Gets the range selected before the event. + + + + + Gets the range that will be selected after the event. + + + + + Gets or sets a value indicating whether the new selection should be canceled. + + + + + Initializes a new instance of the RangeEventArgs class. + + The range selected before the event. + The range that will be selected after the event. + + + + Represents the method that will handle the event. + + Object that fired the event. + + object that contains the event data. + + + + Provides data for the event. + + + + + Gets or sets the text to be displayed in the tooltip. + + + + + Initializes a new instance of the ToolTipEventArgs class. + + Index of the row that caused the event. + Index of the column that caused the event. + Text to display in the ToolTip + + + + Represents the method that will handle the and + events. + + + + + Provides data for the and events. + + + + + Gets the row index of the cell being edited when the key was pressed. + + + + + Gets the column index of the cell being edited when the key was pressed. + + + + + Gets the integer representation of the property. + + + + + Gets the key code for the event, which will be one of the values. + + + + + Gets the key code for the key that was pressed, combined with modifier flags that indicate which + combination of CTRL, SHIFT, and ALT keys were pressed at the same time. + + + + + Gets the modifier flags, as defined in Keys. This indicates which combination of modifier keys + (CTRL, SHIFT, and ALT) were pressed. + + + + + Gets a value indicating whether the ALT key was pressed. + + + + + Gets a value indicating whether the CTRL key was pressed. + + + + + Gets a value indicating whether the SHIFT key was pressed. + + + + + Gets or sets a value indicating whether the event was handled and should be ignored by the control. + + + + + Initializes a new instance of the KeyEditEventArgs class. + + The row index of the cell being edited when the key was pressed. + The column index of the cell being edited when the key was pressed. + A object containing the keyboard data. + + + + Represents the method that will handle the event. + + + + + Provides data for the event. + + + + + Gets the row index of the cell being edited when the key was pressed. + + + + + Gets the column index of the cell being edited when the key was pressed. + + + + + Gets the character corresponding to the key pressed. + + + + + Gets or sets a value indicating whether the event was handled and should be ignored by the control. + + + + + Initializes a new instance of the KeyPressEditEventArgs class. + + The row index of the cell being edited when the key was pressed. + The column index of the cell being edited when the key was pressed. + The character corresponding to the key pressed. + + + + Represents the method that will handle the event. + + + + + Provides data for the event. + + + + + Gets the row index of the cell being edited. + + + + + Gets the column index of the cell being edited. + + + + + If the cell contains a checkbox, the new checkbox state about to be applied to the cell. + + + + + Gets or sets a value indicating whether the edit operation should be canceled. + + + If this parameter is set to true, the edits are considered invalid. The editor will remain open + and the current cell selected until the user provides a valid entry or cancels the edit operation + by pressing the ESC key. + + + + + Initializes a new instance of the ValidateEditEventArgs class. + + The row index of the cell being edited. + The column index of the cell being edited. + The new checkbox state about to be applied to the cell, if any. + + + + Represents the method that will handle the event. + + + + + Provides data for the event. + + + + + Gets the row index of the cell where the error was detected. + + + + + Gets the column index of the cell where the error was detected. + + + + + Gets the object that contains information about the error. + + + + + Gets or sets a value indicating whether the error situation has been handled by the control. + + + If this value is set to False, the grid will throw the exception. + + + + + Initializes a new instance of the GridErrorEventArgs class. + + The row index of the cell where the error was detected. + The column index of the cell where the error was detected. + The object that contains information about the error. + Whether the error was handled internally and no exception should be thrown. + + + + Represents the method that will handle the and + events. + + + + + Provides data for the and + events. + + + + + Gets the index of the row that may contain errors. + + + + + Gets the index of the column that may contain errors (or -1 if checking for row errors). + + + + + Gets or sets a message that describes the error. + + + + + Initializes a new instance of the class. + + The row index when error information is needed for a cell or row. + The column index when error information is needed for a cell or row. + + + + Represents the method that will handle the event. + + + + + Provides data for the event. + + + + + Initializes a new instance of the OwnerDrawCellEventArgs class. + + The control that contains the cell being painted. + The object where the cell will be painted. + The row index of the cell being painted. + The column index of the cell being painted. + The that will be used to paint the cell. + The bounds of the cell being painted. + The text that will be displayed in the cell. + The image that will be displayed in the cell. + + + + Gets the object used to draw the cell. Use this object to draw custom elements in the cell. + + + + + Get the row index of the cell being painted. + + + + + Get the column index of the cell being painted. + + + + + Sets or sets the object used to paint the cell. + + + This parameter is often used to provide dynamic formatting based on cell contents. For example, + if the cell contains a value outside a given range, the event handler may assign a new style to + this parameter. + Although it is legal to modify the members of the parameter in this + event, this is not recommended, since the change will affect other cells that may be using this style. + + + The code below uses the event to highlight cells that + indicate low stock levels. + + // create style used to display low-stock items + CellStyle cs = _flex.Styles.Add("Critical"); + cs.BackColor = Color.Red; + + private void _flex_OwnerDrawCell(object sender, C1.Win.C1FlexGrid.OwnerDrawCellEventArgs e) + { + // ignore fixed cells + if (e.Row < _flex.Rows.Fixed || e.Col < _flex.Cols.Fixed) + return; + + // apply custom style if reorder level is critical + if (_flex.Cols[e.Col].Name == "UnitsInStock") + { + // change the style by applying the "Critical" style to the Style parameter + // (do not change the e.Style.BackColor property directly since that would + // affect other cells that use this style) + if ((short)_flex[e.Row, "UnitsInStock"] < (short)_flex[e.Row, "ReorderLevel"]) + e.Style = _flex.Styles["Critical"]; + } + } + + + + + Get the rectangle where the cell will be painted (in client coordinates). + + + + + Gets or sets the text that will be displayed in the cell. + + + Changing this value is an easy way to modify the text displayed in a cell without any custom drawing code. + + + + + Gets or sets the image that will be displayed in the cell. + + + Changing this value is an easy way to modify the image displayed in a cell without any custom drawing code. + + + + + Gets a value that determines if the event was fired only to measure the cell. + + + This occurs while auto-sizing rows and columns, since the event handler may change the + value displayed in the cell while handling this event. + + + + + Gets or sets whether the event has finished drawing the cell. + + + If this parameter is set to true, the grid assumes the call has been painted by the event handler. If it + is set to false, the grid will paint the cell when the event returns. + Note that calling the method automatically sets this parameter to true. + + + + + Causes the grid to paint parts of the cell (background, foreground, border, etc.) + + + that specifies the parts of the cell. + + This method is typically called in handlers when the code + intends to draw some elements of the cell but not everything. + For example, the code may want to draw a custom border only. In this case, it could call + e.DrawCell(DrawCellFlags.Background | DrawCellFlags.Content) to draw the cell background and content, + and later draw the custom border. + Or the code could want to draw a custom marker in a cell (like a note indicator in Excel). In this case, it + should call e.DrawCell() to draw the entire cell, and later add the note marker (little red triangle + on the top right corner of the cell). + If the owner-draw code draws the entire cell (including the background), then there's no need to call + e.DrawCell at all. + + + + + Causes the grid to paint the whole cell. + + + + + Represents the method that will handle the and + events. + + + object that raised the event. + + that contains the event data. + + + + Provides data for the and + events. + + + + + Gets the row index for the cell that has an unbound value. + + + + + Gets the column index for the cell that has an unbound value. + + + + + Gets or sets the unbound value that should be displayed in the cell. + + + + + Initializes a new instance of the UnboundValueEventArgs class. + + Row index for the cell that has an unbound value. + Column index for the cell that has an unbound value. + Unbound value that should be displayed in the cell. + + + + Represents the method that will handle the and + events. + + + object that raised the event. + + that contains the event data. + + + + Provides data for the and events. + + + + + Gets the value that specifies the type of aggregate to calculate.. + + + + + Outline level to assign to the new subtotal rows. + + + + + Gets the index of the first column in the range used to detect group breaks. + + + + + Gets the index of the last column in the range used to detect group breaks. + + + + + Gets the index of the column that contains values being aggregated. + + + + + Gets or sets the text to insert in the new subtotal row. + + + + + Gets the index of the new subtotal row. + + + + + Gets a value that determines whether the subtotal row is a new row or the + subtotal is being added to an existing subtotal row. + + + + + Gets the index of the top row in the group. + + + + + Gets the index of the bottom row in the group. + + + + + Gets or sets the calculated aggregate value for the group. + + + + + Gets or sets the to be applied to the new subotal row. + + + + + Whether to cancel the creation of the new subtotal row. + + + + + Initializes a new instance of a object. + + + value that specifies the type of aggregate to calculate. + Outline level to assign to the new subtotal rows. This parameter allows the creation of multi-level subtotals and affects the display of the outline tree. + First column in the range used to detect group breaks. + Last column in the range used to detect group breaks. + Column that contains values being aggregated. + Text to insert in the new subtotal row. + Index of the new subtotal row. + Whether the subtotal row is a new row or the subtotal is being added to an existing subtotal row. + Index of the top row in the group. + Index of the bottom row in the group. + Calculated aggregate value for the group. + + to be applied to the new subotal row. + + + + Represents the method that will handle the event. + + + object that raised the event. + + that contains the event data. + + + + Provides data for the event. + + + + + Gets or sets the value of the localized string. + + + + + Gets the name of the component being localized. + + + + + Parent of the component being localized. + + + + + Component being localized. + + + + + Initializes a new instance of a . + + Value to be localized. + Name of the component being localized. + Parent of the component being localized. + Component being localized. + + + + Specifies the type of filter to be used for a . + + + + + Filter column using a . + + + + + Filter column by values using a . + + + + + Filter column by conditions using a . + + + + + Filter column using a filter specified by the caller. + + + + + Do not provide a filter for this column. + + + + + Specifies a type of glyph (image) used by the grid to convey information about a row, column, or cell. + + + + + Indicates column sorted in ascending order (default is hollow triangle pointing up). + + + + + Indicates column sorted in descending order (default is hollow triangle pointing down). + + + + + Checkbox in checked state. + + + + + Checkbox in unchecked state. + + + + + Checkbox in gray (undefined) state. + + + + + Collapsed tree node (default is plus sign). + + + + + Expanded tree node (default is minus sign). + + + + + Indicates current record (default is black triangle pointing right). + + + + + Indicates row being added to data source (default is asterisk). + + + + + Indicates row or cell error (default is red exclamation sign). + + + + + Indicates that a column has a drop-down filter editor. + + + + + Indicates that a column has a filter currently active. + + + + + Represents a collection of glyphs (images) indexed by glyph type ( type). + + + The collection contains the images used by the grid to indicate column + sorting direction, collapsed and expanded outline groups, check boxes, cursors, error information, etc. + You can use the property get or set these images. + + + + + Gets or sets the glyph for a particular value. + + + Setting a glyph to null causes the grid to use the default image for the glyph. To suppress + a glyph, assign it a small transparent image. + + + + Specifies where the grid should start searching for cells when using the + property. + + + + + No auto-searching. + + + + + Search from the first scrollable row. + + + + + Search from the current row. + + + + + Specifies the action to perform when the ENTER and TAB keys are pressed. + + + + + No special action (allow system to handle the key). For example, the TAB key is normally + used to cycle through the controls on a form. + + + + + Move to the next row. + + + + + Move to the next column. At the end of the row, wrap to the start of the next row. + + + + + Same as MoveAcross, but move the focus to the next control in the tab order when + the last cell in the grid is reached. + This setting applies only to the property; + when used with it behaves like MoveAcross. + + + + + Type of grid element at a specific point on the control. + + + + + The point is in the grid's empty area. + + + + + The point is on a grid cell. (The cell coordinates are stored in the + and properties). + + + + + The point is on a fixed row, over a column. + + + + + The point is near the right edge of a fixed cell, in the column resizing area. + + + + + The point is near the right edge of the last frozen column, in the column freezing area. + + + + + The point is on a fixed column, next to a row. + + + + + The point is near the bottom edge of a fixed cell, in the row resizing area. + + + + + The point is near the bottom edge of the last frozen row, in the row freezing area. + + + + + The point is on a check box. + + + + + The point is on an edit button (drop down, popup editors). + + + + + The point is on the outline bar (visible when the grid's property + has a that contains the flag). + + + + + The point is on the collapse/expand button on an outline tree (visible when the grid's + property contains the flag). + + + + + The point is on the filter icon on a column header cell. + + + + + Contains information, such as the row and column indexes, about a specific coordinate pair + in the control. + + + Use the method to obtain a value. + + + + + Get the index of the row at the point being tested (if the point does not correspond to a cell, it returns -1). + + + + + Get the index of the column at the point being tested (if the point does not correspond to a cell, it returns -1). + + + + + The point on the control surface, in pixels. + + + + + The X coordinate of a point on the control surface, in pixels. + + + + + The Y coordinate of a point on the control surface, in pixels. + + + + + Gets a that describes the type of element described by a . + + + This property allows you to determine whether the point corresponds to a grid cell or + to special elements such as row and column headers, resizing areas, and so on. + + + + Specifies a node with respect to another given node. + + + This enumeration is used with the method. + + + + + The node's top-level parent. + + + + + The node's immediate parent. + + + + + The node's first child. + + + + + The node's last child. + + + + + The node's first sibling (node with same level and same parent). + + + + + The node's last sibling. + + + + + The node's next sibling. + + + + + The node's previous sibling. + + + + + The node's first visible sibling. + + + + + The node's last visible sibling. + + + + + The node's next visible sibling. + + + + + The node's previous visible sibling. + + + + + The node's first visible child. + + + + + Specifies the destination of nodes when they are moved with the method. + + + + + Move the node one level in, deeper into the outline. + + + + + Move the node one level out, towards the root. + + + + + Move the node to the position before its previous sibling. + + + + + Move the node to the position after its next sibling. + + + + + Move the node to the position before its first sibling. + + + + + Move the node to the position after its last sibling. + + + + + Make the node a child of the specified node. + + + + + The class encapsulates properties and methods used for manipulating node rows + (collapsing, expanding, moving, and sorting them). + + + You can create node rows using the method or by setting the + property to true. + + + + + Gets or sets the outline level for this node. + + + Higher levels mean deeper nesting. Set the level to zero to create root nodes, + or set the level to negative values to create nodes that do not appear on the outline tree. + + + + + Gets or sets whether this node is collapsed. + + + + + Gets or sets whether this node is expanded. + + + + + Gets the number of child nodes under this node. + + + Only immediate children are included in the count. Grand-children are not included. + + + + + Gets or sets the image on this node row at the column that contains the outline tree. + + + + + Gets or sets the associated with this node row. + + + + + Gets or sets the data on this node row at the column that contains the outline tree. + + + + + Gets or sets the checkbox value associated with this node. + + + + + Returns a reference to the object that corresponds to this node. + + + + + Returns a CellRange object containing this row and all its child rows. + + A CellRange object containing this row and all its child rows. + + The object returned includes all columns. + + + + + Returns a reference to a node located at a given position relative to this node. + + A value from the enumeration that specifies + the position relative to this node. + A node object. + + If the node requested does not exist, returns null (for example, + the root node does not have a previous sibling). + + + + + Gets the parent node of this node. + + + + + Gets the previous sibling node. + + + + + Gets the previous visible sibling node. + + + + + Gets the next sibling node. + + + + + Gets the next visible sibling node. + + + + + Gets the first child node. + + + + + Gets the first visible child node. + + + + + Gets the last child node. + + + + + Gets the first sibling node. + + + + + Gets the last sibling node. + + + + + Gets the index of this node in the collection. + + + + + Gets an array containing the children of this node. + + + + + Gets whether any child of node is visible. + + + + + Creates a node row at a specified position relative to this node. + + A value from the enumeration that specifies + where the new node will be added with respect to this node (e.g. Child, Sibling). + Value of the property for the new node. + Value of the property for the new node. + Value of the property for the new node. + A reference to the new added to the grid. + + + + Creates a node row at a specified position relative to this node. + + A value from the enumeration that specifies + where the new node will be added with respect to this node (e.g. Child, Sibling). + Value of the property for the new node. + A reference to the new added to the grid. + + + + Removes this node row and all its child rows (nodes and data) from the grid. + + + + + Moves a node to a new position. + + A value from the enumeration that specifies + where the node will be moved with respect to its current position. + + object to use as a target when the + parameter is set to . + Returns true if the method was successful, false otherwise. + + + + Moves a node to a new position. + + A value from the enumeration that specifies where + the node will be moved with respect to its current position. + Returns true if the method was successful, false otherwise. + + + + Ensures that this node is visible, expanding its parent nodes and scrolling it into view if necessary. + + + + + Selects the node. + + + This method sets the control's property. + + + + + Sorts this node's child nodes in the specified order. + + One or more values from the enumeration that specify + the type of sorting to be applied (e.g. ascending, descending, case-sensitive, etc). + Start of a range of columns to sort. + End of a range of columns to sort. + + The grid recognizes two types of row: regular rows which contain data, and node rows which are used + to group data. This method only sorts the row nodes; it does not reorder the data rows within each node. + To sort the data rows, use the grid's method instead. + + + + + Sorts this node's child nodes in the specified order. + + One or more values from the enumeration that specify + the type of sorting to be applied (e.g. ascending, descending, case-sensitive, etc). + + The grid recognizes two types of row: regular rows which contain data, and node rows which are used + to group data. This method only sorts the row nodes; it does not reorder the data rows within each node. + To sort the data rows, use the grid's method instead. + + + + + Sorts this node's child nodes using a given object to determine the node order. + + An object that implements the interface used + to compare objects. This can be used to provide custom sorting. + + The grid recognizes two types of row: regular rows which contain data, and node rows which are used + to group data. This method only sorts the row nodes; it does not reorder the data rows within each node. + To sort the data rows, use the grid's method instead. + + + + + Contains flags that specify printing options to use with the method. + + + + + Print the grid in actual (screen size). If the grid is too wide to fit on a page, columns spill onto + separate pages. If the grid is too tall to fit on a page, rows spill onto additional pages. + + + + + Scale the grid so its width will fit on a single page. If the grid is too tall to fit on a page, + rows spill onto additional pages. + + + + + Scale the grid so it will fit on a single page (rows and columns). + + + + + Show a page setup dialog before printing so the user can select paper size, orientation, and margins. + + + + + Show a print setup dialog before printing so the user can select the printer to use. + + + + + Show a print preview dialog before printing so the user can inspect the document before printing it. + + + + + Show highlighted selection while printing. + + + + + Extend the last column on each printed page. + + + + + Represents a class that encapsulates the control printing functionality, including page and printer + settings, headers, and footers. + + + See also the method. + + + + + Gets the object that specifies page and printer settings. + + + The class is part of the .NET framework, defined in the + System.Drawing.Printing namespace. It contains properties that specify printer and page settings for the document. + + + + + Specifies the font to use for rendering page headers. + + + See also the property. + + + + + Specifies the font to use for rendering page footers. + + + See also the property. + + + + + Gets the number of the page being printed (the first page is numbered one). + + + Applications typically use this property to provide user feedback while printing grids. + + + + + Gets the total number of the pages in the print document. + + + The value returned is accurate only while the document is printing. Before or after + a document is done printing, this property returns zero. + + + + + Gets a reference to the used to display the grid's print preview. + + + Use this property to customize the size and position of the preview dialog when printing the grid + with the option. + + + The code below uses the PrintPreviewDialog property to display the preview dialog with a + custom caption and in a maximized state: + + Form dlg = _flex.PrintParameters.PrintPreviewDialog as Form; + dlg.Text = "Custom Caption"; + dlg.StartPosition = FormStartPosition.Manual; + dlg.WindowState = FormWindowState.Maximized; + _flex.PrintGrid("test", PrintGridFlags.ShowPreviewDialog); + + + + + Gets or sets the flags that specify printing options to use with the + method. See the enumeration for details. + + + + + Gets or sets a string that contains the page headers. + + + The string may be divided by tab characters into up to three sections. The sections are then + left, center, and right-aligned at the top of each page. + The string may contain placeholders "{0}" and "{1}" which are replaced with the current + page number and total page count. + Use the property to select the font used to render the header. + + + The code below specifies a right-aligned header with a "Page n of m" display using a 10-point Tahoma font. + + _flex.Header = "\t\tPage {0} of {1}"; + _flex.HeaderFont = new Font("Tahoma", 10); + _flex.PrintGrid("Header"); + + + + + Gets or sets a string that contains the page footers. + + + The string may be divided by tab characters into up to three sections. The sections are then + left, center, and right-aligned at the top of each page. + The string may contain placeholders "{0}" and "{1}" which are replaced with the current + page number and total page count. + Use the property to select the font used to render the footer. + + + + + Represents an object that renders a into a + paged . + + + This class may be used to print multiple grids, along with other + custom content, into an existing object. + To use it, create one PrintDocumentGridRenderer for each + grid you want to print. Then handle the document events and call the + event for the renderers until the value of the + property equals . + + The code below renders two grids into a : + + // print two grids into an existing PrintDocument + private void button1_Click(object sender, EventArgs e) + { + using (var dlg = new PrintPreviewDialog()) + { + dlg.Document = this.printDocument1; + dlg.ShowDialog(this); + } + } + + // event handlers for the PrintDocument object on the form + PrintDocumentGridRenderer _g1, _g2; + void printDocument1_BeginPrint(object sender, System.Drawing.Printing.PrintEventArgs e) + { + // create and configure grid renderer for the first grid + _g1 = new PrintDocumentGridRenderer(c1FlexGrid1); + _g1.Options = PrintGridFlags.FitToPageWidth | PrintGridFlags.ExtendLastCol; + + // create and configure grid renderer for the second grid + _g2 = new PrintDocumentGridRenderer(c1FlexGrid2); + _g2.Options = PrintGridFlags.FitToPageWidth | PrintGridFlags.ExtendLastCol; + } + void printDocument1_PrintPage(object sender, System.Drawing.Printing.PrintPageEventArgs e) + { + // render first grid + if (_g1.CurrentPage < _g1.PageCount) + { + _g1.PrintPage(e); + e.HasMorePages = true; + } + + // render second grid + else if (_g2.CurrentPage < _g2.PageCount) + { + _g2.PrintPage(e); + e.HasMorePages = _g2.CurrentPage < _g2.PageCount; + } + } + + + + + + Initializes a new instance of a . + + + that will be painted by + this renderer. + + + + Gets or sets the flags that specify printing options to use with the + method. See the enumeration for details. + + + + + Gets the index of the page being rendered. + + + + + Gets the total number of pages in the document. + + + + + Gets or sets the Y coordinate of the first block of cells rendered on + the document. + + + + + Renders the current page into the document. + + + that provides parameters for rendering the page. + + + + Renders a specific page into the document. + + + that provides parameters for rendering the page. + Index of the page to print. + + This method is used to render specific ranges of pages within the document. + + + + + Calculates the zoom factor and page breaks in the document. + + + that contains the page information. + + + + Base class for grid rows and columns ( and classes). + + + + + Initializes a new instance of the class. + + + + + Gets or sets whether a Row or Column is visible. + + + This property returns true even if the row or column has been scrolled out of view. + To determine whether a row is currently within view, check the + and properties. + To determine whether a column is currently within view, check the + and properties. + + + + + Gets whether this row is collapsed. + + + Rows are collapsed when one of their parent nodes is collapsed. + Collapsed rows are not visible to the user even if their + property is set to true. + + + + + Gets whether this row is currently visible to the user. + + + This property returns true if the property + is set to true and the row is collapsed ( + property returns false). + + + + + Gets or sets whether this row or column is selected. + + + Use this property to get or set the selection state for individual rows when the grid's + property is set to . + + + + + Gets or sets user data associated with this row or column. + + + The UserData value is not used internally by the grid. It is reserved for additional data that + the application may associate with rows or columns. + + + + + Gets or sets whether the user can drag this row or column with the mouse. + + + The grid object also has an property. + If dragging is disabled at the grid level, the user will not be able to drag any rows or columns. + If dragging is allowed by the grid's property, then + dragging of individual rows and columns can still be disabled by setting this property to false. + + + + + Gets or sets whether the user can resize this row or column with the mouse. + + + To resize rows or columns, the mouse must be over the fixed area of the grid, and close to a border + between rows or columns. The mouse pointer will then change into a sizing pointer and the user can drag + the row or column to change the row height or column width. + If a group of columns is selected (from first to last row) and the user resizes one of them, all + selected columns are resized. The same applies to rows. + If column sizing is allowed, users may double-click the resizing area to resize a column so it will + automatically fit the longest entry. + Rows with zero height and columns with zero width can't be resized by the user. If you want to make + them very small but still resizable, set their height or width to one pixel, not to zero. + The and + events fire before resizing starts, and may be used to prevent resizing of specific rows and columns. + The and + fire after resizing, and may be used to validate the user's action and to update the display. + + + + + Specifies whether adjacent cells with similar contents will be merged. + + + Merging cells allows you to display data in a clear, appealing way because it highlights groups of identical + information. It also gives you flexibility to build tables similar to the ones you can create in HTML or using + Microsoft Word, both of which support merged cells. + To create tables with merged cells, you must set the property to a value other + than , and then set the property of individual + rows and columns true for the rows and columns you wish to merge. + After these properties are set, the grid will automatically merge adjacent cells that have the same + contents. Whenever the cell contents change, the grid updates the merging state. + + + + + Gets or sets whether cells on this row or column can be edited by the user. + + + The grid object also has an property. + If editing is disabled at the grid level, the user will not be able to edit any cells. + If editing is allowed by the grid's property, then + editing of individual rows and columns can still be disabled by setting this property to false. + + + + + Gets or sets the type of object stored in this row or column. + + + By default, the column's DataType property is set to , which allows you to store + any data values in the column. + If you set a row or column's DataType to a specific type, the grid will try to convert any values assigned + to cells in that column to the specified data type. If the conversion fails, the grid will fire a + event and the cell value will not be changed. + + The DataType property affects how values are stored internally in the grid, how they are sorted, and the + type of control that is used to edit the values in the column. For example, a + control is used to edit values in columns, and check boxes are used to display and edit + values in Boolean columns. + If you want to store times (not dates) in a column, you can still use the DateTime type, but you should + use a that displays only the time, not the date. + + + + + + Gets or sets a string that specifies how to format the data on this column. + + + The Format property affects how values are formatted for display, not the values stored internally. + To retrieve the formatted value of a cell, use the property. + The Format string has the same semantics as the format argument in the .NET + method. For details and a complete set of examples, see the .NET documentation. + + + + + Gets or sets the input mask to use when editing cells on this column. + + + The grid also has an property that applies to the entire grid. + For details and mask syntax, refer to that property. + + + + + Gets the index of this row or column in its parent collection. + + + This property returns -1 if the row or column is not a member of the collection. + + + + + Gets or sets a custom associated with this row or column. + + + If the row or column does not have a custom style, this property returns null. + + + + + Gets or sets a custom associated with this row or column, creating a new + style if necessary. + + + This property never returns null. If this element does not have a custom style, a new one will be + created automatically and returned. + + + The code below sets a column's background color to red. + + // get the style associated with column 1 (create a new one if necessary) + CellStyle cs = _flex.Cols[1].StyleNew.BackColor; + + // set the new style's back color to red + cs.BackColor = Color.Red; + + + + + Gets the style used to display this row or column. + + + This property never returns null. If the row or column has a custom style, this property returns that style. + Otherwise, it returns the stock style used to display the row (e.g., Normal, Alternate, Fixed, Frozen). + + + + + Gets the stock used to paint fixed cells in this row or column. + + + + + Gets the custom style associated with fixed cells on this row or column, creating a new one of necessary. + + + If the row or column has a custom style associated with its fixed cells, this property returns that style. + Otherwise, it creates a new , assigns it to the row or column, and returns a reference + to the new style. + + + + + Gets the style used to display fixed cells on this row or column. + + + If the row or column has a custom style associated with its fixed cells, this property returns that style. + Otherwise, it returns the stock style used to display the column (e.g., Normal, Fixed). + + + + + Gets or sets a value that determines how text is aligned in + scrollable cells on this row or column. + + + This property gets or sets the alignment value specified by the + object associated with the column. + + + + + Gets or sets a value that determines how text is aligned in + fixed cells on this row or column. + + + This property gets or sets the alignment value specified by the + object associated with the fixed cells in the row or column. + + + + + Gets or sets an value that determines how images are aligned in + scrollable cells on this row or column. + + + This property gets or sets the alignment value specified by the + object associated with the column. + + + + + Gets or sets an value that determines how images are aligned in + fixed cells on this row or column. + + + + + Gets or sets an object used to translate data values into images for this row or column. + + + Use this property to associate data values in this row or column with images. For example, if a column contains + country names, you can use this property to display the corresponding flags. + Use the property to determine whether the image is displayed instead of or in + addition to the cell text. + + + + + Gets or sets a value that determines whether images found in this row or column's should + be displayed instead of or in addition to the cell text. + + + + + Gets or sets an object used to translate data values into display values + for this row or column. + + + The DataMap property allows you to implement "translated" rows or columns. In translated rows or columns, + the grid does not display the values stored in the cells. Instead, it looks up those values in the column's + DataMap and displays the mapped value. + The grid also uses the DataMap value to populate drop-down lists when the column is editable. + Note that the DataMap property has no effect when the property is also + set. Using both properties on a single row or column is legal, but it effectively disables the DataMap. + + + + + Gets or sets a list of items to be used by the drop-down editor. + + + The ComboList property specifies the type of editor to be used when editing a cell. You may use a text box, + drop-down list, drop-down combo, or an edit button to pop up custom editor forms. + To use the ComboList property, set the property to True, and + set the ComboList property to a string that describes the type of editing you want to use for that cell. + The options are described below: + 1. To edit the cell using a regular text box, set the ComboList property to an empty string (""). + 2. To edit the cell using a drop-down list, set the ComboList property to a string containing the available + options, separated by pipe characters (for example "option 1| option 2"). + 3. To edit the cell using a drop-down combo, set the ComboList property to a string containing the + available options, separated by pipe characters and starting with a pipe character (for example "|option 1|option 2"). + 4. To display an edit button, set the ComboList property to a string containing an ellipsis ("..."). + Edit buttons look like regular push buttons, aligned to the right of the cell, with an ellipsis as a caption. + When the user clicks on the edit button, the grid fires the event. + In this case, the user can't edit the cell contents directly. + 5. To display an edit button next to an editable cell, set the ComboList property to a string containing a + pipe and an ellipsis ("|..."). In this case, you get a regular edit button but the user can also edit the cell + contents directly. + Note that the ComboList property has precedence over the property. + Using both properties on a single row or column is legal, but it effectively disables the DataMap. + + + + + Gets or sets the custom editor used to edit cells in this column. + + + The grid provides several built-in editors that are automatically selected based on the properties of the + cell being edited. + This property allows you to use external editors when editing values in a given column. Any control + can be used as an external editor, but to achieve complete integration with the grid, the external editor should + implement the interface. + You can associate external editors with columns at design time (using the grid's Column Editor) or at run + time, by setting this property. + + + The code below creates a C1DateEdit control and assigns it to the property of a grid + column. The control will be used to edit cells on this column instead of the default + control. + All controls in the C1Input library implement the interface and can be + used as grid editors without any extra code. + + // create C1DateEdit control (included with C1Input) + C1DateEdit dateEdit = new C1DateEdit(); + + // use the new control as an editor for a grid column + _flex.Cols[1].DataType = typeof(DateTime); + _flex.Cols[1].Editor = c1DateEdit; + + + + + + Clears the contents of the row or column. + + + value specifying which elements of the row or + column should be cleared. + + Use this method to reset column properties to their default values (width, visibility, style, + user data, and so on). This method only clears the column object itself, it does not clear + the contents of the cells in the column. + + + + + Moves this row or column to a new position in the collection. + + An integer specifying the new position. + + + + Gets a reference to the control that owns this row or column. + + + + + Invalidates an individual row or column, causing it to be repainted. + + + + + Class that represents a grid row. + + + This class does not have a public constructor. You can add and remove rows using methods + in the grid's property, which exposes the row collection. + + + + + Gets or sets the cell value specified by the column index in this row. + + + + + Gets or sets the cell value specified by the column name in this row. + + + + + Gets the position of the top of this row, in pixels, relative to the grid. + + + The value returned is the sum of row heights from the top of the grid until this row, and + does not account for the scroll position. To account for the scroll position, this value should + be adjusted using the grid's + property. + To retrieve the size and position of a cell, use the method. + + + + + Gets the position of the bottom of this row, in pixels, relative to the grid. + + + The value returned corresponds to the sum of the and properties. + + + + + Gets or sets the height of this row, in pixels (the value -1 represents the default row height). + + + Setting this property to -1 causes the grid to use the default row height for this row + (see the property). + Height returns the height assigned to the row even if the row is invisible, and returns -1 + if the row has the default height. To obtain the actual display height of a row, use the + property. + + + + + Gets or sets the display height for this row, in pixels. + + + HeightDisplay returns zero if the row is invisible, and returns the actual display height + even if the property is set to -1 (which stands for default row height). + + + + + Gets the index of this row in the collection. + + + This property returns -1 if the is not a member of the collection. + See also the and properties. + + + + + Gets the index of this row in the collection. + + + This property is similar to the property, except it throws an exception + if the is not a member of the collection. + + + + + Gets the index of this row in the collection, excluding fixed and node rows. + + + This property returns -1 if the row is a fixed or node row. + If the grid is bound to a data source, the return value can be used as an indexer into the grid's data + source to obtain a reference to the item bound to the row. + You can also obtain the underlying data object directly using the row's property. + + + + + Gets or sets the text of the first fixed cell in the row. + + + + + Indicates the row is a placeholder for adding new rows to the grid. + + + This property returns true for the last row on the grid when the + property is set to true. This is the row that has an asterisk glyph on the first fixed column. + + + + + Gets the object that provides data for this row. + + + The type of object returned depends on the type of DataSource assigned to the grid. For example, + if the grid is bound to a object, then this property will return the + specific object that is bound to this row. + This property returns null if the grid is unbound, or if the row is a fixed or node row that doesn't + correspond to any objects in the grid's data source. + For an example, see the event. + + + + + Clears this row. + + + value specifying which elements of the row should be cleared. + + Use this method to reset row properties to their default values (height, visibility, style, user data, etc.). + + + + + Moves a row to a new position in the collection. + + An integer specifying the row's new position. + + + + Gets or sets whether this row is a node row in an outline. + + + This property determines whether the row behaves as a node in an outline tree. + You can use to create custom outline trees, or use the grid's + method to create outline trees automatically. + + + + + Gets the object associated with this row. + + + If the row is a node (see the property), this property returns a + object that can be used to collapse or expand the node, set its level within + the outline tree, etc. + If the row is not a node, this property gets the row's parent node. + + + + + Gets or sets whether this row is selected. + + + Use this property to get or set the selection status for individual rows when the grid's + property is set to . + + + + + Invalidates this row, causing it to be repainted. + + + + + Class that represents a grid column. + + + This class does not have a public constructor. You can add and remove + columns using methods in the grid's + property, which exposes the column collection. + + + + + Gets or sets the cell value specified by the row index in this column. + + + + + Gets the position of the left of this column, in pixels, relative to the grid. + + + The value returned is the sum of column widths from the left of the grid until this column, and + does not account for the scroll position. To account for the scroll position, this value should + be adjusted using the grid's + property. + To retrieve the size and position of a cell, use the method. + + + + + Gets the position of the right of this column, in pixels, relative to the grid. + + + The value returned corresponds to the sum of the and properties. + + + + + Gets or sets the width of this column, in pixels (the value -1 represents the default column width). + + + Setting this property to -1 causes the grid to use the default column width for this column + (see the property). + + Width returns the width assigned to the column even if the row is invisible, and + returns -1 if the row has the default height. To obtain the actual display width of a column, + use the property. + + + + + Gets or sets the display width for this column, in pixels. + + + WidthDisplay returns zero if the column is invisible, and returns the actual display width + even if the property is set to -1 (which stands for default column width). + + + + + Gets the index of this column in the collection. + + + This property is similar to the property, except it throws an exception + if the is not a member of the collection. + + + + + Gets the position of the column in the data source object. + + + This property returns -1 for fixed and unbound columns. + + + + + Gets or sets that cells in the will accept null value or null will be replaced by default value in unbound mode. + + + This property works only if IsValueType member of property + equals to True and for type . + If value was changed to False then all null values in the will be + replaced by defaults of current . + + + + + Gets or sets whether this column can be sorted by clicking on the column header. + + + The grid has an property that determines whether columns can be + sorted with the mouse. The AllowSorting property of the objects can be used to prevent + the user from sorting specific columns. + + + + + Gets or sets this type of filter to use for this column. + + + The grid has an property that determines whether + columns can be filtered by the user. If that property is set to true, then filters are created + automatically for each column based on the setting of the column's + property. + The grid provides condition and value filters. Condition filters allow users to specify + conditions such as 'value > 10'. Value filters allow users to select values that should be displayed + from a list of values present in the data source. All filters can be customized in code as shown + in the examples below. + + + The code below customizes the filters for two columns. The "ShipRegion" column is initialized to + show only two states, AK and CA. The "UnitPrice" column is initialized to show only items with + unit price greater than $30. After the column filters have been initialized, the code calls the + method to apply the filters. + + // initialize "ShipRegion" column filter to show only two values: "AK" and "CA" + var col = _flex.Cols["ShipRegion"]; + col.AllowFiltering = AllowFiltering.ByValue; + var vf = col.Filter as ValueFilter; + vf.ShowValues = new object[] { "AK", "CA" }; + + // initialize "UnitPrice" column filter to show only values greater than $30 + col = _flex.Cols["UnitPrice"]; + col.AllowFiltering = AllowFiltering.ByCondition; + var cf = col.Filter as ConditionFilter; + cf.Condition1.Operator = ConditionOperator.GreaterThan; + cf.Condition1.Parameter = 30; + + // apply both column filters to the data + _flex.ApplyFilters(); + + + + + Gets or sets the responsible for filtering this column. + + + + + Gets the that is currently filtering this column. + + + + + Gets or sets the name of this column. + + + The name can be used as an index in the property indexer. + When the grid is bound to a DataSource, the column names are set automatically to the names + of columns in the data source, and are used for binding. + + + + + Specifies how this column should be sorted when the method is called + with a flag. + + + Use this property when you want to sort multiple columns in different orders. For example, you could + set the Sort property to for columns 1, 2, and 3, and to + for columns 4, 5, and 6. + You would then call the grid's method with the sort parameter + set to to perform the sort using the order specified for each column. + + + + + Gets the index of this column in the collection. + + Returns -1 if the column is not a member of the collection. + + + + Gets or sets whether this column is selected. + + + + + Invalidates this column, causing it to be repainted. + + + + + Gets or sets the text of the column's header cell. + + + + + Clears this . + + + value specifying which elements of the + should be cleared. + + + + Moves a to a new position in the collection. + + An integer specifying the column's new position. + + + + Gets or sets when to display combo buttons in cells. + + + By default, the column will show editing buttons in cells only when they + have the focus. This is the same behavior used by the + control. + If you set to , + the column will display buttons on any cells that have associated lists, even if they + don't have the focus. + For details on how to associate lists with cells, see the , + , and properties. + + + + + Base class for grid row and column collections ( + and classes). + + + + + Gets or sets the number of rows or columns in the collection. + + + + + Gets or sets the number of fixed rows or columns in the collection. + + + + + Gets or sets the number of frozen rows or columns in the collection. + + + Use the property to determine whether + the user can freeze rows or columns with the mouse. + + + + + Moves a row or column to a new position in the collection. + + Index of row or column to be moved. + New position. + + + + Moves a range of rows or columns to a new position in the collection. + + The index of the first row or column in the range to be moved. + The number of rows or columns that will be moved. + New position. + + + + Determines whether the collection contains a given row or column. + + Row or column items to be detected. + True if the row or column is a member of the collection, False otherwise. + + + + Gets or sets the minimum size for rows and columns in the collection. + + + The MinSize property limits the minimum size of rows or columns when they are resized by the user or + adjusted to fit the contents with the or + method. + + + + + Gets or sets the maximum size for rows and columns in the collection. + + + The MaxSize property limits the maximum size of rows or columns when they are resized by the user or + adjusted to fit the contents with the or + method. + Setting this property to zero disables it. + + + + + Gets or sets the default size of the rows or columns in the collection (in pixels). + + + This value is set automatically when the grid's property changes. + The default size is used when the row's Height property or columns Width property is set to -1. + + + + + Gets a reference to the control that owns this collection. + + + + + Gets the index of the previous visible row or column. + + Index of the original row or column. + Index of the previous visible row or column. + + + + Gets the index of the next visible row or column. + + Index of the original row or column. + Index of the next visible row or column. + + + + Updates the position of rows or columns. + + + + + Collection of grid objects. + + + + + Gets the at the specified index. + + + Use the object returned by this method to set attributes such as row + height, visibility, style, selected state, and so on. + + + + + Gets or sets the number of rows in the collection. + + + You can add or remove rows by assigning a new value to this property, or you can use the + , , , and methods. + + + + + Gets or sets the index of the row used to display the sorting and filtering glyphs. + + + The default value is -1, which causes the sorting and filtering glyphs to be shown + on the last fixed row. If you set this property to a value larger than the number + of fixed rows, then the glyphs will not be displayed. + + + + + Gets or sets the number of fixed rows in the collection. + + + + + Gets a collection of objects that are currently selected. + + + This property is especially useful when the grid's property + is set to . + + + The code below removes all selected rows from the grid. + Note that foreach loops can't be used to modify the collections being iterated over. This example + works because the collection is being enumerated while the + collection is being modified. + + // delete all selected rows + foreach (Row r in _flex.Rows.Selected) + { + _flex.Rows.Remove(r); + } + + + + + + Appends a new object to the collection. + + + The Add method appends a new row to the collection. To insert a row at a specific position, + use the method. + + A reference to the that was added to the collection. + + + + Appends a given number of objects to the collection. + + Number of rows to add to the collection. + + + + Adds a new object to the collection at a specified position. + + The position where the new row will be inserted. + A reference to the that was added to the collection. + + + + Adds a new row to the row collection at a specified position. + + The position where the new node row will be inserted. + Outline level for the new node row. + A reference to the that was added to the collection. + + This method is especially useful when the grid is bound to a data source, because in this + case you can't change the value of the property. When the grid + is unbound, you can add rows and turn them into nodes later using the property. + + + + + Appends a new row to the row collection. + + Outline level for the new node row. + A reference to the that was added to the collection. + + + + Adds a range of rows to the collection at a specified position. + + The position where the new range will be inserted. + The number of rows to add. + + + + Removes a object from the collection. + + The index of the row to remove from the collection. + A reference to the that was removed from the collection. + + + + Removes a object from the collection. + + The row to be removed. + A reference to the that was removed from the collection. + + + + Removes a range of rows from the collection. + + The index of the first row to remove from the collection. + The number of rows to remove from the collection. + + + + Move a object to a new position in the collection. + + Index of row to be moved. + New position for the row. + + + + Moves a range of rows to a new position in the collection. + + The index of the first row in the range that will be moved. + The number of rows that will be moved. + New position for the first row in the range. + + + + Updates the position and data index of each row in this collection. + + + + + Collection of grid objects. + + + + + Gets the at the specified index. + + + + + Gets the that has the specified column name. + + + You can use the object returned by this method to set + attributes such as column height, visibility, style, selected state, and so on. + This indexer looks for a column with the specified . + The column name is set automatically for you when the grid is bound to a database, + or it may be set using code. + + + + + Gets a value that determines whether the collection contains a with the given name. + + Column name to look for (case-insensitive). + True if the collection contains a column with the given name, False otherwise. + + + + Gets the index of the with the specified name. + + Column name to look for (case-insensitive). + Index of the column that has the given name in this collection, or -1 if the collection + does not contain a column with the given name. + + + + Gets the index of the with the specified name. The search starts at a specified index. + + Column name to look for (case-insensitive). + The search starting index. + Index of the column that has the given name in this collection, or -1 if the collection + does not contain a column with the given name. + + + + Gets the index of the with the specified name, optionally + throwing an exception if the column is not found. + + Column name to look for (case-insensitive). + Whether to throw and exception if the column cannot be found. + Index of the column that has the given name in this collection, or -1 if the collection + does not contain a column with the given name. + If the parameter is set to true and + a column named cannot be found, the control throws + an . This makes it easier to write + compact code that relies on column names. + + The example below uses the IndexOf method to convert column names into + indices. Note that if the column names are invalid, the exception will be thrown + by the IndexOf method (column not found) rather than in the following + method, where it would not be as clear (invalid index). + + int columnIndex = _flex.Cols.IndexOf("total"); + _flex.AutoSizeCol(columnIndex); + + + + + Gets the index of the with the specified name, optionally + throwing an exception if the column is not found. The search starts at a specified index. + + Column name to look for (case-insensitive). + Whether to throw and exception if the column cannot be found. + The search starting index. + Index of the column that has the given name in this collection, or -1 if the collection + does not contain a column with the given name. + If the parameter is set to true and + a column named cannot be found, the control throws + an . This makes it easier to write + compact code that relies on column names. + + The example below uses the IndexOf method to convert column names into + indices. Note that if the column names are invalid, the exception will be thrown + by the IndexOf method (column not found) rather than in the following + method, where it would not be as clear (invalid index). + + int columnIndex = _flex.Cols.IndexOf("total"); + _flex.AutoSizeCol(columnIndex); + + + + + Gets or sets the number of objects in this collection. + + + You can add or remove columns by assigning a new value to this property, or you can use the + , , , and methods. + + + + + Gets or sets the number of fixed columns in this collection. + + + + + Appends a new object to this collection. + + A reference to the that was added to the collection. + + + + Appends a given number of objects to the collection. + + Number of columns to add to the collection. + + This method adds the new columns to the end of the collection. To insert columns at specific + positions, use the or methods. + + + + + Adds a new object to this collection at a specified position. + + The position where the new column will be inserted. + A reference to the that was inserted to the collection. + + + + Adds a range of objects to the collection at a specified position. + + The position where the new range will be inserted. + The number of columns to add. + + + + Removes a object from the collection. + + The index of the column to remove from the collection. + A reference to the that was removed from the collection. + + + + Removes a object from the collection. + + The column to remove. + A reference to the that was removed from the collection. + + + + Removes a object from the collection. + + Name of the column to remove. + A reference to the that was removed from the collection. + + + + Removes a range of objects from the collection. + + The index of the first column to remove from the collection. + The number of columns to remove from the collection. + + + + Moves a object to a new position in the collection. + + Index of the column to be moved. + New position for the column. + + + + Moves a range of objects to a new position in the collection. + + The index of the first column in the range that will be moved. + The number of columns that will be moved. + New position for the first column in the range. + + + + Gets a collection of objects that are currently selected. + + + + + Gets a string build a string that contains a complete description of + the column collection, suitable for persisting the control state. + + Whether to include default values in the description. + A string that describes the column collection. + + + + Parses a string containg a description of the column collection (usually obtained + by calling the method) and applies it to a grid. + + Grid that receives the column collection. + String that contains the column collection definition. + True if the column definition was applied successfully. + + + + Specifies the type of file to save or load with the + and methods. + + + + + Text file, cells separated with commas. + + + + + Text file, cells separated with tabs. + + + + + Text file, cells separated with the character specified by the + property. + + + + + Microsoft Excel files (Xls/biff-8 or OpenXml formats). + + + + + Specifies options for use with the and + methods. + + + + + Use default settings. + + + + + Include fixed cells when loading or saving the grid. + + + + + Save only visible rows and columns. + + + + + Save only selected rows. + + + + + Save values as displayed (including formatting and mapping where available). + This flag has no effect when saving text files, which always contain values as displayed. + + + + + Save merged ranges when exporting to Excel with the method. + This flag has no effect when saving text files, it only affects Excel output. + + + + + Load merged ranges when importing from Excel with the method. + This flag has no effect when loading text files, it only affects Excel input. + + + + + Save and load merged ranges when exporting to or importing from Excel with the + and methods. + + + + + Do not freeze rows and columns when exporting to or importing from Excel with the + and methods. + + + + + Load or save file in OpenXml (Office 2007) format. + + + + + Save nodes as Excel groups when exporting to Excel. + + + + + Specifies the type of selection provided by the grid. + + + + + The user can select continuous blocks of cells using the keyboard and the mouse. + Clicking on header cells selects entire rows and columns. + + + + + The user can select only a single cell at a time. + + + + + The user can select continuous blocks of cells using the keyboard and the mouse. + Clicking on header cells does not affect the selection. + + + + + The user can select a single row at a time. + + + + + The user can select a range of contiguous rows at a time. + + + + + The user can select a single column at a time. + + + + + The user can select a range of contiguous columns at a time. + + + + + The user can select non-contiguous rows using control-click. + + + + + This enumeration is for internal use only. + + + + + No movement. + + + + + One cell left, then wrap to previous row. + + + + + One cell right, then wrap to next row. + + + + + One cell up. + + + + + One cell down. + + + + + One cell left. + + + + + One cell right. + + + + + Page up. + + + + + Page down. + + + + + Page left. + + + + + Page right. + + + + + Top cell. + + + + + Bottom cell. + + + + + Leftmost cell. + + + + + Rightmost cell. + + + + + Enumeration used to retrieve objects from the + collection. + + + Cell styles can be retrieved from the collection using the + indexer or the style name. Built-in styles can also be obtained directly through read-only properties. + + + The code below shows three ways to obtain a reference to a grid's default style: + + // s1, s2, and s3 are all references to the grid's Normal style: + CellStyle s1 = _flex.Styles[CellStyleEnum.Normal]; + CellStyle s2 = _flex.Styles["Normal"]; + CellStyle s3 = _flex.Styles.Normal; + + + + + Style used to render scrollable normal cells. + + + This is the parent style for most cells. Setting the control's BackColor, + ForeColor, or Font properties automatically sets the corresponding properties + on the Normal style. + If you change any properties in the Normal style, the changes will be reflected + in all styles that do not explicitly override those properties. + + + + + Style used to render scrollable cells in even-numbered rows. + + + + + Style used to render fixed cells. + + + + + Style used to render cells that are selected and highlighted. + + + + + Style used to render the cell that has the focus. + + + + + Style used to render cells being edited. + + + + + Style used to render cells that are being selected as the user types (see the property). + + + + + Style used to render cells that are frozen (editable and selectable, but not scrollable). + + + + + Style used to render cells that are frozen (editable and selectable, but not scrollable) in even-numbered rows. + + + + + Style used to render the last row on the grid when the property is set to true. + + + + + Style used to render the area of the grid where there are no cells. + + + + + Style used to render selected column headers. + + + + + Style used to render selected row headers. + + + + + Style automatically assigned to grand total nodes created with the method. + + + + + Style automatically assigned to level-0 nodes created with the method. + + + + + Style automatically assigned to level-1 nodes created with the method. + + + + + Style automatically assigned to level-2 nodes created with the method. + + + + + Style automatically assigned to level-3 nodes created with the method. + + + + + Style automatically assigned to level-4 nodes created with the method. + + + + + Style automatically assigned to level-5 nodes created with the method. + + + + + Style used to paint the filter editors. + + + + + Constant that indicates the first custom style. + + + + + Specifies how text is aligned in a grid cell. + + + + + Text is horizontally aligned to the left and vertically aligned to the top of the cell. + + + + + Text is horizontally aligned to the left and vertically aligned to the center of the cell. + + + + + Text is horizontally aligned to the left and vertically aligned to the bottom of the cell. + + + + + Text is horizontally aligned to the center and vertically aligned to the top of the cell. + + + + + Text is horizontally aligned to the center and vertically aligned to the center of the cell. + + + + + Text is horizontally aligned to the center and vertically aligned to the bottom of the cell. + + + + + Text is horizontally aligned to the right and vertically aligned to the top of the cell. + + + + + Text is horizontally aligned to the right and vertically aligned to the center of the cell. + + + + + Text is horizontally aligned to the right and vertically aligned to the bottom of the cell. + + + + + Numbers are aligned to the right, other values to the left, and vertically aligned to the top. + + + + + Numbers are aligned to the right, other values to the left, and vertically aligned to the center. + + + + + Numbers are aligned to the right, other values to the left, and vertically aligned to the bottom. + + + + + Specifies a 3D effect to use when rendering cell text. + + + + + No 3D effect. + + + + + Text is drawn with a shadow offset by one pixel to the right and below the text. + + + + + Text is drawn with a shadow offset by one pixel to the left and above the text. + + + + + Specifies how images are aligns in grid cells. + + + + + Image is horizontally aligned to the left and vertically aligned to the top of the cell. + + + + + Image is horizontally aligned to the left and vertically aligned to the center of the cell. + + + + + Image is horizontally aligned to the left and vertically aligned to the bottom of the cell. + + + + + Image is horizontally aligned to the center and vertically aligned to the top of the cell. + + + + + Image is horizontally aligned to the center and vertically aligned to the center of the cell. + + + + + Image is horizontally aligned to the center and vertically aligned to the bottom of the cell. + + + + + Image is horizontally aligned to the right and vertically aligned to the top of the cell. + + + + + Image is horizontally aligned to the right and vertically aligned to the center of the cell. + + + + + Image is horizontally aligned to the right and vertically aligned to the bottom of the cell. + + + + + Image is scaled to fit the maximum area within the cell while preserving the original aspect ratio. + + + + + Image is stretched to cover the whole cell. + + + + + Image is tiled to cover the whole cell. + + + + + Image is not displayed. + + + + + Image is split into a grid, corner parts are copied and center is stretched to cover the cell. + + + This tiling mode preserves the corners and borders of the source image, and is designed to be + used with the property. + + + + + Specifies whether a style should display the cell text, image, both, or none. + + + + + Display text only (no image). + + + + + Display image only (no text). + + + + + Display the text over the image. + + + + + Display the text next to the image. + + + + + Nothing (cell stays blank). + + + + + Specifies the direction to use when rendering text in a grid cell. + + + + + Text is rendered in the horizontal direction. + + + + + Text is rendered from the bottom of the cell to the top. + + + + + Text is rendered from the top of the cell to the bottom. + + + + + Specifies the type of cell border to display. + + + + + No border. + + + + + Solid flat border. + + + + + Double border. + + + + + Raised border. + + + + + Inset border. + + + + + Groove border. + + + + + Fillet border. + + + + + Dotted border. + + + + + Specifies the direction of cell borders. + + + + + Draw cell borders in both directions. + + + + + Draw cell borders only in the horizontal direction. + + + + + Draw cell borders only in the vertical direction. + + + + + Contains flags that specify which style elements are defined in a object. + + + This enumeration can be used to inspect styles and determine which elements it defines, and it + can also be used to clear specific elements from the style. + Any elements not defined in the style are inherited from the parent style. + + + + + No elements are defined. + + + + + The style defines a font. + + + + + The style defines a background color. + + + + + The style defines a foreground color. + + + + + The style defines margins. + + + + + The style defines borders. + + + + + The style defines the text alignment. + + + + + The style defines a 3D effect for the text. + + + + + The style defines the image alignment. + + + + + The style defines the spacing between images and text. + + + + + The style defines how long strings are trimmed to fit within cells. + + + + + The style defines whether long strings are allowed to wrap within cells. + + + + + The style defines whether to display text and/or images, in the cells. + + + + + The style defines a format string used to convert data into strings. + + + + + The style defines an edit mask used to constrain values entered in the cells. + + + + + The style defines a list of choices used to populate drop down editors. + + + + + The style defines an used to associate cell data with images. + + + + + The style defines the of values contained in the cells. + + + + + The style defines an used to associate cell data with display values. + + + + + The style defines whether text should be rendered horizontally or vertically. + + + + + The style defines an external control to be used as an editor for the cells. + + + + + The style contains arbitrary user data (not used by the control). + + + + + The style specifies a background image. + + + + + The style specifies a background image alignment. + + + + + The style defines a background color of found text. + + + + + All style elements. + + + + + Collection of objects defined for a grid. + + + + + Gets the default style used to paint scrollable cells. + + + + + Gets the style used to paint scrollable cells in alternate rows. + + + This style is empty by default, so all scrollable cells are rendered using the style. + + + + + Gets the style used to paint fixed cells. + + + + + Gets the style used to paint selected column headers. + + + + + Gets the style used to paint selected column headers. + + + + + Gets the style used to paint highlighted selected cells. + + + Use the property to determine whether cells should be + highlighted when the control does not have the focus. + Use the property to determine what types of selection + are allowed. + + + + + Gets the style used to paint the current cell when the control has focus. + + + This style is empty by default, so focused cells are rendered using the style. + + + + + Gets the style used to paint the cell being edited. + + + This style is empty by default, so cells being edited are rendered using the style. + + + + + Gets the style used to paint the cell selected while auto-searching. + + + Use the property to enable auto-searching. + + + + + Gets the style used to paint frozen cells (frozen cells are editable and selectable, but not scrollable). + + + + + Gets the style used to paint frozen cells (frozen cells are editable and selectable, but not scrollable) in alternate rows. + + + This style is empty by default, so frozen cells are rendered using the style. + + + + + Gets the style used to paint cells in the new row template at the bottom of the grid. + + + The new row template is only present when the property is set to true. + + + + + Gets the style used to paint the area of the grid below and to the right of all the cells. + + + Only the and elements of + this style are used. They define the appearance of the space between the last cell and the edges of + the control. + The value defines the color of the lines drawn around the + edge of the sheet and between frozen and scrollable cells. + + + + + Gets the style used to paint the column filter editors. + + + This style is only used if the grid's property + is set to true. + + + + + Gets a by index. + + + + + Gets a built-in by style type. + + + + + Gets a by name. + + + If the specified name doesn't exist, this indexer returns null. + + + + + Gets the number of objects in the collection. + + + + + Adds a new object to the collection. + + Name of the new style. + Base style, used to initialize the properties of the new style. + The new object. + + If a style with the given name already exists, the existing style is returned and no + exception is thrown. + + + + + Adds new object to the collection. + + Name of the new style. + Name of the base style, used to initialize the properties of the new style. + The new object. + + + + Adds a new empty object to the collection. + + Name of the new style. + The new object. + + + + Removes a custom style from the collection. + + Index of the style to be removed. + + Built-in styles can't be removed. + + + + + Removes a custom style from the collection. + + Name of the style to be removed. + + Built-in styles can't be removed. + + + + + Removes a custom style from the collection. + + Style to be removed from the collection. + + Built-in styles can't be removed. + + + + + Clear all styles (even those in use) and reset the built-in styles. + + + The Clear method also removes any custom styles assigned to rows, columns, + and cells. + + + + + Clear all unused styles. + + + Unused styles are unnamed styles that were created and are no longer assigned to + any grid elements. + + + + + Checks whether the collection contains a given style. + + Name of the style to look for. + True if the collection contains a style called , false otherwise. + + + + Gets the index of a style in the collection. + + Style object to look for. + Index of the style in the collection, or -1 if the style is not a member of the collection. + + + + Builds and returns a compact string representation of the style collection. + + Whether styles with no attributes should be included. + A compact string representation of the style collection. + + This method is used internally to implement design-time persistence. + It can also be used for implementing 'skins', by saving the current styles into + a collection and later applying them to the grid using the method. + + + + + Parses a string containing style definitions. + + String containing style definitions. + True if the string was parsed successfully, false otherwise. + + The style definition string is usually obtained from a call to method. + The new definitions are merged with the current ones. To completely replace the styles, + call the method before parsing the new styles. + + + + + The class encapsulates properties that control the appearance of grid cells. + This information includes the background and foreground colors, font, text and image alignment, etc. + + + The property exposes a collection of grid styles, and has + methods for creating and removing styles from the grid. + You can create and define styles at design time, but right-clicking the grid and selecting the + "Edit Styles" menu option. + Styles follow a hierarchical model similar to styles in Microsoft Word or in cascading style sheets. + Every property in a object may be left unassigned, in which case the value is + inherited from a parent style. The parent style is usually the built-in + style. + To determine which elements are defined in a particular style, use the + property. + When you modify the properties of a object, all cells that use that style + are automatically repainted to reflect the changes. + Styles may be assigned to , , and + objects, as shown in the example below. + + + The example below creates three objects and assigns them to grid rows, columns, + and cell ranges. + + // create style with red background + CellStyle cs = _flex.Styles.Add("red"); + Style.BackColor = Color.Red; + + // create style with green background + cs = _flex.Styles.Add("green"); + Style.BackColor = Color.Green; + + // create style with bold font + cs = _flex.Styles.Add("bold"); + Style.Font = new Font("Tahoma", 8, FontStyle.Bold); + + // assign red style to a column + _flex.Cols[3].Style = _flex.Styles["red"]; + + // assign green style to a row + _flex.Rows[3].Style = _flex.Styles["green"]; + + // assign bold style to a cell range + CellRange rg = _flex.GetCellRange(2, 2, 4, 4); + rg.Style = _flex.Styles["bold"]; + After running this code, the third column of the grid will be painted with a red background. The + third row will be painted with a green background. The cell at the intersection will be painted + in red, because column styles have priority over row styles. The remaining style elements for these + cells (font, alignment, etc) are not defined in the new styles and are automatically inherited from + the parent style ().The cells around the intersection will have a bold font. The style that defines the bold font + does not specify a background color, so that element is inherited from the parent style, which may be + the "red", "green", or "normal" styles. + + + + Gets or sets the style name. + + + Style names must be unique. Setting a style name to the name of an already existing + style will throw an exception. + Style names must have one or more characters and may not include curly braces ('{' and '}'). + + + + + Gets or sets the color used to paint the cell background. + + + + + Gets or sets the color of the text in the cell. + + + + + Gets or sets the color of the text in the cell. + + + + + Gets or sets the font used to paint text in the cell. + + + Setting the control's Font property automatically sets the Font + property of the Normal style. + + + + Gets or sets the margins between the edges of the cell and its contents, in pixels. + + + + + Gets or sets whether long strings should automatically wrap within the cell. + + + This property determines whether the grid should automatically break + long strings that contain spaces and display them in multiple lines. + String that contain hard line breaks (vbCrLf or "\n\r") are always + displayed in multiple lines. + + + + + Gets or sets how long strings are trimmed to fit the cell. + + + + + Gets or sets the text alignment. + + + + + Gets or sets the 3D effect used to paint text. + + + + + Gets or sets the text direction. + + + Cells containing vertical text can wrap and be auto sized as usual. + + + + + Gets or sets the image alignment. + + + + + Gets or sets the space between images and text in a cell, in pixels. + + + + + Gets or sets whether to show images, text, or both. + + + + + Gets or sets the format string used to display values. + + + + + Gets or sets the mask string used to edit values. + + + + + Gets or sets a pipe-delimited list of valid values. + + + If the cell is editable, this list of values is used to populate the drop-down + used to edit the cell. + If the list starts with a pipe character, then the list is not exclusive and the + user may type values that are not on the list. + If the list contains three periods ("..."), then a button is displayed in the + cell. When the user presses the button, the grid fires the + event. + If the list contains a pipe followed by three periods ("|..."), then a button is + displayed in the cell as before, and the user may also type into the cell. + See also the property for an alternate way of specifying + valid values for a cell. + + + + + Gets or sets an used to associate cell values with images. + + + + + Gets or sets an used to associate cell values with display values. + + + If the cell is editable, this list of values is used to populate the drop-down + used to edit the cell. In this case, the order of the items in the + combo list is determined by the order of the elements in the dictionary. + The most common dictionary class, , uses arbitrary order. + If you want control over the item order, use a different dictionary class such as + . + The C1FlexGrid assembly also includes a class, + which can be used to create multi-column and data-bound dictionaries. + + + + + Gets or sets the data type for the style. + + + When the grid is bound to a data source, this property is set automatically based on the + data schema. + This property is used to coerce values assigned to cells into the proper type. + + + + + Gets the CellBorder object associated with this style. + + + + + Gets or sets the custom editor used to edit cells that have this style. + + + The grid provides several built-in editors that are automatically + selected based on the properties of the cell being edited. + This property allows you to use external editors when editing values + that have a given . Any control can be used as an + external editor, but to achieve complete integration with the grid, the + external editor should implement the interface. + For details, see the property. + + + + + Gets or sets arbitrary user data associated with this style. + + + This data is not used by the control, and can be used to store any data that is + useful to the application. + + + + + Gets or sets the style's background image. + + + This property works with to determine + whether and how background images are rendered in cells. + + + + + Gets or sets the a value that determines how the style will scale and + position background image. + + + This property works with to determine + whether and how background images are rendered in cells. + + + + + Gets or sets which elements are defined in this style. + + + Elements that are not defined in a particular style are automatically + inherited from the ancestor style (usually the Normal style). + For example, if you create a custom style that defines the + property, all other elements (back color, + alignment, and so on) are inherited from the ancestor style, which may + be the Normal style or another custom style assigned to a row or + column. + + + + + Clears selected elements from this style. + + + + + Clears all elements in this style. + + + + + Copies all elements defined in a source style to this style. + + + This method is used to create styles preserving existing style elements + such as or . + + + The code below changes a column so it looks like a fixed column, without + modifying the column's data type, alignment, etc. + + // create a new style + CellStyle cs = _flex.Styles.Add("newStyle"); + + // set data type, alignment + cs.DataType = typeof(int); + cs.TextAlign = TextAlignEnum.CenterCenter; + + // copy remaining elements from "Fixed" style + cs.MergeWith(_flex.Styles.Fixed); + + // assign new style to grid column + _flex.Cols[col].Style = cs; + + + + + Returns a compact string representation of this . + + A string containing the settings of all style elements defined in this CellStyle. + + This method is used to persist grid styles and can be used to define and save 'skins'. + See the and + methods. + The string returned contains definitions only for the style elements that are defined by this + . Elements inherited from other styles are not included. To build a string containing + specific elements, use the method instead. + + + The code below creates a style with a custom font and background color and builds a string that represents + the new style. Then it uses the string to initialize a second style. + + // create style with custom font and back color + CellStyle cs = _flex.Styles.Add("s1"); + cs.Font = new Font("Arial", 12, FontStyle.Bold); + cs.BackColor = Color.Beige; + + // save style definition into a string + string styleDef = cs.BuildString(); + + // use string to initialize another style + CellStyle csNew = _flex.Styles.Add("s2"); + csNew.ParseString(styleDef); + + // compare styles + Debug.Assert(csNew.Font.Equals(cs.Font)); + Debug.Assert(csNew.BackColor.Equals(cs.BackColor)); + + + + + Returns a string representation of this . + + + that specifies which style elements should be included in the string. + A string containing the settings of the specified style elements. + + This method is used to persist grid styles and can be used to define and save 'skins'. + See the and + methods. + + + The code below shows the effect of specifying different values for the parameter. It builds + one compact string containing only the elements actually defined in a style, and another including all style elements. + + // build compact and a long style definition strings + string s1 = _flex.Styles.Fixed.BuildString(); + string s2 = _flex.Styles.Fixed.BuildString(StyleElementFlags.All); + + // show both style definitions + Console.WriteLine("{0}: {1}", s1.Length, s1); + Console.WriteLine("{0}: {1}", s2.Length, s2); + + + + + Rebuilds this style based on a description contained in a string. + + True if the string was successfully parsed, false otherwise. + + This method is used to persist grid styles and can be used to define and save 'skins'. + See the and + methods. + + + + + Renders a string and an image into a object using this style. + + + object to render into. + Area where the element will be displayed. + Text to render. + Image to render. + Combination of that determines which elements will be rendered. + + This method allows using objects to render objects outside the grid. It can be + useful when implementing owner-drawn applications and style editors for example. + + + + + Renders a string and an image into a object using this style. + + + object to render into. + Area where the element will be displayed. + Text to render. + Image to render. + + + + Renders a string and an image into a object using this style. + + + object to render into. + Area where the element will be displayed. + Text to render. + + + + Renders a string and an image into a object using this style. + + + object to render into. + Area where the element will be displayed. + Image to render. + + + + Gets the element used for rendering + strings when the + property is set to true. + + + + + Gets the content portion of a cell's rectangle. + + Cell rectangle. + A rectangle that represents the content portion of a cell, discounting the + area taken up by the cell borders. + + + + Gets the text portion of a cell's rectangle. + + Cell rectangle. + Image that shares the cell space with the text. + A rectangle that represents the text portion of a cell, discounting the + area taken up by the cell borders, padding, and images. + + + + Gets the image portion of a cell's rectangle. + + Cell rectangle. + Image to be displayed on the cell. + A rectangle that represents the image portion of a cell, discounting the + area taken up by the cell borders and padding. + + + + Determines whether two objects are equal. + + Style to compare with this style. + True if the two styles are equal, false otherwise. + + + + Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table. + + A hash code for the style instance. + + + + The class encapsulates properties that control the appearance of borders in + objects. + + + + + Gets or sets the border style. + + + + + Gets or sets the border direction. + + + + + Gets or sets the border color (except for 3D borders). + + + 3D borders are always drawn using the system colors defined for highlights and shadows. + + + + + Gets or sets the border width (except for 3D borders). + + + 3D borders are always one or two pixels wide. + + + + + Specifies the appearance of the outline tree. + + + + + Do not show the outline tree. + + + + + Show tree lines next to node rows. + + + + + Show expand/collapse symbols on node rows. + + + + + Show outline buttons across the top fixed row. + + + + + Show tree lines next to all rows (nodes and data). + + + + + Combination of , , and + . + + + + + Combination of and . + + + + + Combination of , , + and . + + + + + Combination of , , and + . + + + + + The GridTree class encapsulates properties that specify the appearance, position, and behavior of the outline tree. + + + Each grid has a single GridTree object, which can be obtained using the property. + + + + + Resets the object. + + + + + Gets or sets the color of the lines in the outline tree. + + + See also the property. + + + + + Gets or sets the line style used to draw the outline tree. + + + By default, this property is set to DashStyle.Dot, which causes the tree + to be drawn with dotted lines. You can change the value of this property to draw the + tree using solid lines instead. + + + + + Gets or sets the style of the outline tree. + + + Use the Style property to determine whether the outline tree should include lines connecting + the nodes and buttons for collapsing and expanding the nodes. See the + enumeration for details. + Use the property to determine where the grid will show the outline tree. + + + + + Gets or sets the index of the column where the outline tree is displayed. + + By default, this property is set to -1, which causes the tree to be hidden. + + + + Gets or sets the indentation, in pixels, of each tree level. + + + If you set the Indent property to a value that is too narrow to fit the and + images, the grid will adjust it to fit the images. + + + + Gets or sets the image displayed next to collapsed nodes. + + + Setting this property to null resets it and causes the grid to use the default image (a plus sign). + To hide the images, use the property. + + + + + Gets or sets the image displayed next to expanded nodes. + + + Setting this property to null resets it and causes the grid to use the default image (a minus sign). + To hide the images, use the property. + + + + + If True then the collapse/expand button will not be displayed if all children of node are invisible. + + + + + Expands all nodes up to the specified level, collapses others. + + The level to show. Any nodes with higher than this + will be collapsed, others will be expanded. + + + + Gets the level of the deepest node in the outline. + + + This property can be used with methods that take an outline level as + a parameter (for example, and ). + + + + + Sorts all nodes at the given level. + + Level of the nodes to sort. + + value that controls sort direction and options. + Start of the range of columns to sort. + End of the range of columns to sort. + + The grid recognizes two types of row: regular rows which contain data, and node rows which are used + to group data. This method only sorts the row nodes; it does not reorder the data rows within each node. + To sort the data rows, use the grid's method instead. + + + + + Sorts all nodes at the given level using the specified comparer. + + Level of the nodes to sort. + An object that compares objects. + + + + Static class containing UI strings used by the designer. + + + + + StyleContext contains a base Style definition and a list of + named Styles. It provides the following services: + - Style management (create, edit, and remove Styles) + - Style inheritance mechanism + - Rendering and measuring methods + + + + + Style contains a collection of arbitrary attributes, + represented by a name/object entry, a reference to a parent + Style, and a reference to the containing StyleContext. + + + + + Specifies the type of border to be drawn around the control. + + + + + No border. + + + + + A single-line border. + + + + + A three-dimensional border. + + + + + A light sunken border. + + + + + A border drawn using XP themes. + + + + + Base class for controls that support auto-scrolling behavior. + + + This class is similar to , but provides + extra customization, better scroll notification, and support for scroll tracking. + + + + + Creates a new instance of a class. + + + + + Gets or sets which scroll bars should appear on the control. + + + Scroll bars are displayed only if the contents of the control extend beyond its + client area. For example, if is set to , + a horizontal scroll bar is displayed only if the control is not wide enough to display all + columns at once. + Even when it has no scrollbars, the control will still scroll to keep the selection visible. + If you want to prevent scrolling, handle the event and + set its parameter to true. + You can force the control to display scrollbars at all times with the + property. + You can determine which scrollbars are currently visible with the + property. + + + + + + + Gets or sets the location of the auto-scroll position. + + + Use the property to get or set the scroll position using pixel coordinates. + Use the and properties to get or + set the scroll position using cell coordinates. + + + This code binds two grids (_flexLeft and _flexRight) together and synchronizes their scrolling in the vertical + direction (the user can scroll the grids independently in the horizontal direction). + + // bind grids together + _flexRight.DataSource = _flexLeft; + _flexLeft.ScrollBars = ScrollBars.Horizontal; + + // synchronize vertical scrolling + // (this handles the AfterScroll event for both grids) + void flex_AfterScroll(object sender, C1.Win.C1FlexGrid.RangeEventArgs e) + { + // update sender grid (could be _flexLeft or _flexRight) + C1FlexGrid.C1FlexGrid src = ((C1FlexGrid)sender); + src.Update(); + + // get new vertical position from sender grid + int y = src.ScrollPosition.Y; + + // apply new vertical position to the other grid + if (src.Equals == _flexLeft) + { + _flexRight.ScrollPosition = new Point(_flexRight.ScrollPosition.X, y); + } + else + { + _flexLeft.ScrollPosition = new Point(_flexLeft.ScrollPosition.X, y); + } + } + + + + + Gets or sets the type of border around the control. + + + + + Gets a value that indicates which scrollbars are currently visible. + + + + + + + Maintains performance by preventing the control from updating itself until + the method is called. + + + + + Resumes updating the control after calls to the method. + + + + + Called when the control receives a WM_THEMECHANGED message. + + + The WM_THEMECHANGED message is broadcast to every window following a + theme change event. Examples of theme change events are the activation of a + theme, the deactivation of a theme, or a transition from one theme to another. + + + + + Called when the control receives a WM_IME_STARTCOMPOSITION message. + + + The WM_IME_STARTCOMPOSITION message is sent immediately before the IME generates + the composition string as a result of a keystroke. The message is a notification to + an IME window to open its composition window. An application should process this + message if it displays composition characters itself. + + + + + Called after the control scrolls (see the property). + + + value that indicates the scroll direction. + + + + Called before the controls displays a scroll tip. + + New value for the vertical scrollbar. + + + + Gets a rectangle that defines the scrollable portion of the control. + + + + + Builds a rectangle that defines the scrollable portion of the control for a given pair of scroll offsets. + + Horizontal scroll offset. + Vertical scroll offset. + A that defines the scrollable portion of the control. + + This method is for internal use. It allows derived classes to customize the control scrolling behavior. + + + + + Raises the event. + + A that contains the event data. + + + + Raises the event. + + An that contains the event data. + + + + Raises the event. + + A that contains the event data. + + + + Raises the event. + + An that contains the event data. + + + + Calculates the new position of a scrollbar in response to a user command. + + Scroll command (SB_LINEUP, etc). + True for the vertical scrollbar, false for the horizontal scrollbar. + Current scrollbar position. + Scrollbar thumb position. + The new position for the scrollbar. + + Derived classes may override this method to customize the scrolling behavior. + + + + + Specifies a visual style to use when rendering the control. + + + + + Do not use any visual styles. Render the control using the styles and properties only. + + + + + Render the control with an appearance based on the current system settings. + + + + + Render the control with an appearance based on the Office 2007 Blue color scheme. + + + + + Render the control with an appearance based on the Office 2007 Silver color scheme. + + + + + Render the control with an appearance based on the Office 2007 Black color scheme. + + + + + Render the control with an appearance based on the Office 2010 Blue color scheme. + + + + + Render the control with an appearance based on the Office 2010 Silver color scheme. + + + + + Render the control with an appearance based on the Office 2010 Black color scheme. + + + + + Represents an abstract base class for custom grid renderers. + + + To create custom grid renderers, inherit from this class, override the appropriate + virtual methods and properties, and assign an instance of your class to the grid's + property. + + + + + Represents the type of cell being rendered. + + + + + A normal scrollable cell. + + + + + The top left fixed cell. + + + + + A column header cell. + + + + + A selected column header cell. + + + + + A column header cell currently under the mouse. + + + + + A selected column header cell currently under the mouse. + + + + + A row header cell. + + + + + A selected row header cell. + + + + + A row header cell currently under the mouse. + + + + + A selected row header cell currently under the mouse. + + + + + A selected normal cell. + + + + + The cell that contains the cursor. + + + + + Initializes a new instance of a . + + + + + Gets a value that determines whether this renderer tracks the selection to paint + highlighted column and row headers. + + + + + Gets a value that determines whether this renderer renders hot cells + differently than normal cells. + + + Hot cells are cells currently under the mouse. If a renderer tracks the mouse, + then it will be called as the mouse moves over the grid. + + + + + Gets the foreground color of header cells in the normal state. + + + + + Draws a grid cell of any type. + + + that contains the cell being drawn. + + that provides information about the cell being drawn. + + This method determines the type of cell being drawn and then calls the + method passing the type of cell to be drawn. + + + + + Draws a single grid cell of a specific type. + + + that contains the cell being drawn. + + that provides information about the cell being drawn. + + value that determines the type of cell being drawn. + + + + Gets a object used to paint the cell background for a specific cell type. + + + that contains the cell being drawn. + + value that determines the type of cell being drawn. + A that represents the bounds of the cell being drawn. + A object used to render the cell background. + + The parameter can be used to create or select complex brushes such as + gradient or tiled image brushes. + + + + + Gets a object used to paint the cell borders. + + + value that determines the type of cell being drawn. + A object used to paint the cell borders. + + + + Represents the base abstract class for Office2007 style renderers. + + + The easiest way to create a new high-quality renderer is to derive from + this class and provide a constructor that initializes the 25 colors that + define the renderer. + + + + + Initializes a new instance of a . + + Background color for highlighted cells. + Color of the border around the top left fixed cell. + Color of the background for the top left fixed cell. + First color of the gradient background for the image in the top left fixed cell. + Second color of the gradient background for the image in the top left fixed cell. + First color of the gradient background for column headers. + Second color of the gradient background for column headers. + Color of the border around column headers. + First color of the gradient background for selected column headers. + Second color of the gradient background for selected column headers. + Color of the border around selected column headers. + First color of the gradient background for hot column headers. + Second color of the gradient background for hot column headers. + Color of the border around hot column headers. + First color of the gradient background for selected hot column headers. + Second color of the gradient background for selected hot column headers. + Color of the border around hot selected column headers. + Color of the background for row headers. + Color of the border around row headers. + Color of the background for selected row headers. + Color of the border around selected row headers. + Color of the background for hot row headers. + Color of the border around hot row headers. + Color of the background for hot selected row headers. + Color of the border around selected hot row headers. + + + + Initializes a new instance of a using + a specified color palette. + + Array with 25 colors to be used as a palette. + + + + Gets or sets the color used to paint the background of highlighted cells. + + + + + Gets a value that determines whether this renderer renders hot cells + differently than normal cells. + + + Hot cells are cells currently under the mouse. If a renderer tracks the mouse, + then it will be called as the mouse moves over the grid. + + + + + Gets a value that determines whether this renderer tracks the selection to paint + highlighted column and row headers. + + + + + Gets the background brush for a cell. + + + that contains the cell. + + value that describes the type of cell being rendered. + + that defines the cell bounds. + A used to paint the cell. + + + + Gets a pen used to paint the cell borders. + + + that describes the type of cell being rendered. + A used to paint the cell borders. + + + + Draws a single grid cell of a specific type. + + + that contains the cell being drawn. + + that provides information about the cell being drawn. + + value that determines the type of cell being drawn. + + + + that implements the Office2007 Blue visual style. + + + + + Initializes a new instance of a . + + + + + that implements the Office2007 Silver visual style. + + + + + Initializes a new instance of a . + + + + + that implements the Office2007 Black visual style. + + + + + Initializes a new instance of a . + + + + + that implements the Office2010 Blue visual style. + + + + + Initializes a new instance of a . + + + + + that implements the Office2010 Silver visual style. + + + + + Initializes a new instance of a . + + + + + that implements the Office2010 Black visual style. + + + + + Initializes a new instance of a . + + + + + Gets the foreground color of header cells in the normal state. + + + + + that implements the System visual style. + + + + + Gets a value that determines whether this renderer renders hot cells + differently than normal cells. + + + Hot cells are cells currently under the mouse. If a renderer tracks the mouse, + then it will be called as the mouse moves over the grid. + + + + + Gets a value that determines whether this renderer tracks the selection to paint + highlighted column and row headers. + + + + + Draws a single grid cell of a specific type. + + + that contains the cell being drawn. + + that provides information about the cell being drawn. + + value that determines the type of cell being drawn. + + + + Static class containing UI strings used by the designer. + + + + + Specifies the language to be used for localizing the control. + + + + + Localize the control to the language specified by the CurrentUICulture. + + + + + Localize the control to Arabic. + + + + + Localize the control to Czech. + + + + + Localize the control to Danish. + + + + + Localize the control to Dutch. + + + + + Localize the control to English. + + + + + Localize the control to Finnish. + + + + + Localize the control to French. + + + + + Localize the control to German. + + + + + Localize the control to Greek. + + + + + Localize the control to Hebrew. + + + + + Localize the control to Italian. + + + + + Localize the control to Japanese. + + + + + Localize the control to Norwegian. + + + + + Localize the control to Polish. + + + + + Localize the control to Portuguese. + + + + + Localize the control to Russian. + + + + + Localize the control to Slovak. + + + + + Localize the control to Spanish. + + + + + Localize the control to Swedish. + + + + + Localize the control to Chinese (simplified, PRC and Singapore). + + + + + Localize the control to Turkish. + + + + + Localize the control to Persian (Farsi). + + + + + Localize the control to Korean. + + + + + Localize the control to Chinese (traditional, Taiwan, Hong Kong, and Macao). + + + + + Localize the control to Hungarian. + + + + \ No newline at end of file diff --git a/PROMS/WORD ADD-INs/FGAddIn Install/Application Files/FGAddIn_1_0_0_0/C1.Win.C1FlexGrid.2.dll.deploy b/PROMS/WORD ADD-INs/FGAddIn Install/Application Files/FGAddIn_1_0_0_0/C1.Win.C1FlexGrid.2.dll.deploy new file mode 100644 index 00000000..5283754f Binary files /dev/null and b/PROMS/WORD ADD-INs/FGAddIn Install/Application Files/FGAddIn_1_0_0_0/C1.Win.C1FlexGrid.2.dll.deploy differ diff --git a/PROMS/WORD ADD-INs/FGAddIn Install/Application Files/FGAddIn_1_0_0_0/FGAddIn.dll.deploy b/PROMS/WORD ADD-INs/FGAddIn Install/Application Files/FGAddIn_1_0_0_0/FGAddIn.dll.deploy new file mode 100644 index 00000000..76f75717 Binary files /dev/null and b/PROMS/WORD ADD-INs/FGAddIn Install/Application Files/FGAddIn_1_0_0_0/FGAddIn.dll.deploy differ diff --git a/PROMS/WORD ADD-INs/FGAddIn Install/Application Files/FGAddIn_1_0_0_0/FGAddIn.dll.manifest b/PROMS/WORD ADD-INs/FGAddIn Install/Application Files/FGAddIn_1_0_0_0/FGAddIn.dll.manifest new file mode 100644 index 00000000..7e8425d0 --- /dev/null +++ b/PROMS/WORD ADD-INs/FGAddIn Install/Application Files/FGAddIn_1_0_0_0/FGAddIn.dll.manifest @@ -0,0 +1,198 @@ + + + + FGAddIn + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + pPo/i4gW6PsXcEe7T9XOkIdZBQUdihI/5HD5157RqQ4= + + + + + + + + + + + + opx5p2MN6E73v+FltHn9BCgwVJgcmPLUVAlX5xFN3K8= + + + + + + + + + + + + jLCTF8Mm6bD4PDN+rnzN6q0+ReXaNgPh68kMWgatFwI= + + + + + + + + + + + + + + + + + + + FGAddIn + FGAddIn + + + + + + +pd186ECuuQwMWt8IfagMQsh9D3/LBADrJNy/w+da1Bg=ogiF1Mt9XcZhY6He3gNXvFkfawg0+NHSx13uP7Or28eLVDBxn6ktfOW0Dj7yZwZmR/gy4P3/7IF246YWE10rhuKV0zCma9YnHmO0F4Sj7ce2zHFlpBgE15T/A6mo+IcEJKW2V981h0jIgpItQR4cTKfvtxayME6wfyRSTXH6qW0=rghAhQ7/hHethob8lbZ9+PkYfHfoSOScDVou5jrgYzk4BO/u40SXxOLbyCOVy1Sg2eEbhSMjaXGObxYKx7Xjoe42XcVDKM/PCGAml3kDfTapVAmQGjXUDExFyX5t5OxmXKQIUrjMsS4zR1OvHAtlUXehNPHBrIUgHzfx3ted+B0=AQABCN=VLN\JeffuJt9OW0CA0rxKy0WLC4LgAq5XuOBYw10DJksYmfNdW0=KBPvnCgy/gI5UuzC5pPgBeZGrira6ZFV/ZAtzKQb4ILIo29yPnlTegC7/RCZl/tlgLBFTv0SPBd7/DA0Xd2O8loOltXG1eViT+jeOvTVx/aEL5/vJs+Sp2Mr8JKenJmnBwztYufh1MWBRJ6k/xaO+a+c4eP6irIlFPLiOAOYgPc=rghAhQ7/hHethob8lbZ9+PkYfHfoSOScDVou5jrgYzk4BO/u40SXxOLbyCOVy1Sg2eEbhSMjaXGObxYKx7Xjoe42XcVDKM/PCGAml3kDfTapVAmQGjXUDExFyX5t5OxmXKQIUrjMsS4zR1OvHAtlUXehNPHBrIUgHzfx3ted+B0=AQABMIIBuTCCASKgAwIBAgIQF0gpHnXZdZhG4yRlDQdQczANBgkqhkiG9w0BAQsFADAbMRkwFwYDVQQDHhAAVgBMAE4AXABKAGUAZgBmMB4XDTIxMDMyOTE4NDQ0MVoXDTIyMDMzMDAwNDQ0MVowGzEZMBcGA1UEAx4QAFYATABOAFwASgBlAGYAZjCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEArghAhQ7/hHethob8lbZ9+PkYfHfoSOScDVou5jrgYzk4BO/u40SXxOLbyCOVy1Sg2eEbhSMjaXGObxYKx7Xjoe42XcVDKM/PCGAml3kDfTapVAmQGjXUDExFyX5t5OxmXKQIUrjMsS4zR1OvHAtlUXehNPHBrIUgHzfx3ted+B0CAwEAATANBgkqhkiG9w0BAQsFAAOBgQCqwlPUuO+fJbmnykx77VIIKm6zikU2GEq0DUeRuow1dEPDMCdnyW0Occe0RlhjsKcVYtJLljDlbJddAkM7/qF0Txft5Hw9u5YpvEbvHyAKR0nZSdev6Fni4qrgvu7kRgndU50Dph7CHC7f6RbkFK0DEWVT+4nghDapVsQM6c537g== \ No newline at end of file diff --git a/PROMS/WORD ADD-INs/FGAddIn Install/Application Files/FGAddIn_1_0_0_0/FGAddIn.vsto b/PROMS/WORD ADD-INs/FGAddIn Install/Application Files/FGAddIn_1_0_0_0/FGAddIn.vsto new file mode 100644 index 00000000..528ee0f6 --- /dev/null +++ b/PROMS/WORD ADD-INs/FGAddIn Install/Application Files/FGAddIn_1_0_0_0/FGAddIn.vsto @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + HY8z+u6IQo0Ksdc26AYi70oPuw8VG+Tq/+Op8UUeYio= + + + +5zasxc/cEUfuNdwtpfOgf321LuIjqAyEevkqwDb4Lb8=AlXvYiVFbhI7bhyBVJa+XRSJe84Hrdq+bF6K4u0VgV04UmUO0l8eEnCi9ICyVq+jsNOviwre0dQaxUGRFnmT8U/wpD7zx17SCDYjeUU3lmoApDq7eeHZ+miTE+RLzUCKc2JfH6A6hoJsUI/mgjstwYanDHGN2txJj6vDY0+ZUAI=rghAhQ7/hHethob8lbZ9+PkYfHfoSOScDVou5jrgYzk4BO/u40SXxOLbyCOVy1Sg2eEbhSMjaXGObxYKx7Xjoe42XcVDKM/PCGAml3kDfTapVAmQGjXUDExFyX5t5OxmXKQIUrjMsS4zR1OvHAtlUXehNPHBrIUgHzfx3ted+B0=AQABCN=VLN\JeffdbxYn1M5i//rGErmD4DjOJgaDmC6Y672Or8OeZfMzBw=mvyQuVj1M3pIlQMlCawB6K+q6tSgkVR6NBJKRoNxrAu72Z9PiLh/2UXlSoEzEtS9m1PJ1YjFe0FkaK7Ac/LY0QH2owDDwL1rRuL4LoMNZbLtX75NxgR5qKACGI56mK4VijaeQiqLLgBsWxcyr9B1jlDoMV51pGsDsEgsQg3Nq4M=rghAhQ7/hHethob8lbZ9+PkYfHfoSOScDVou5jrgYzk4BO/u40SXxOLbyCOVy1Sg2eEbhSMjaXGObxYKx7Xjoe42XcVDKM/PCGAml3kDfTapVAmQGjXUDExFyX5t5OxmXKQIUrjMsS4zR1OvHAtlUXehNPHBrIUgHzfx3ted+B0=AQABMIIBuTCCASKgAwIBAgIQF0gpHnXZdZhG4yRlDQdQczANBgkqhkiG9w0BAQsFADAbMRkwFwYDVQQDHhAAVgBMAE4AXABKAGUAZgBmMB4XDTIxMDMyOTE4NDQ0MVoXDTIyMDMzMDAwNDQ0MVowGzEZMBcGA1UEAx4QAFYATABOAFwASgBlAGYAZjCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEArghAhQ7/hHethob8lbZ9+PkYfHfoSOScDVou5jrgYzk4BO/u40SXxOLbyCOVy1Sg2eEbhSMjaXGObxYKx7Xjoe42XcVDKM/PCGAml3kDfTapVAmQGjXUDExFyX5t5OxmXKQIUrjMsS4zR1OvHAtlUXehNPHBrIUgHzfx3ted+B0CAwEAATANBgkqhkiG9w0BAQsFAAOBgQCqwlPUuO+fJbmnykx77VIIKm6zikU2GEq0DUeRuow1dEPDMCdnyW0Occe0RlhjsKcVYtJLljDlbJddAkM7/qF0Txft5Hw9u5YpvEbvHyAKR0nZSdev6Fni4qrgvu7kRgndU50Dph7CHC7f6RbkFK0DEWVT+4nghDapVsQM6c537g== \ No newline at end of file diff --git a/PROMS/WORD ADD-INs/FGAddIn Install/Application Files/FGAddIn_1_0_0_0/Microsoft.Office.Tools.Common.v4.0.Utilities.dll.deploy b/PROMS/WORD ADD-INs/FGAddIn Install/Application Files/FGAddIn_1_0_0_0/Microsoft.Office.Tools.Common.v4.0.Utilities.dll.deploy new file mode 100644 index 00000000..03a6ef84 Binary files /dev/null and b/PROMS/WORD ADD-INs/FGAddIn Install/Application Files/FGAddIn_1_0_0_0/Microsoft.Office.Tools.Common.v4.0.Utilities.dll.deploy differ diff --git a/PROMS/WORD ADD-INs/FGAddIn Install/FGAddIn.vsto b/PROMS/WORD ADD-INs/FGAddIn Install/FGAddIn.vsto new file mode 100644 index 00000000..528ee0f6 --- /dev/null +++ b/PROMS/WORD ADD-INs/FGAddIn Install/FGAddIn.vsto @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + HY8z+u6IQo0Ksdc26AYi70oPuw8VG+Tq/+Op8UUeYio= + + + +5zasxc/cEUfuNdwtpfOgf321LuIjqAyEevkqwDb4Lb8=AlXvYiVFbhI7bhyBVJa+XRSJe84Hrdq+bF6K4u0VgV04UmUO0l8eEnCi9ICyVq+jsNOviwre0dQaxUGRFnmT8U/wpD7zx17SCDYjeUU3lmoApDq7eeHZ+miTE+RLzUCKc2JfH6A6hoJsUI/mgjstwYanDHGN2txJj6vDY0+ZUAI=rghAhQ7/hHethob8lbZ9+PkYfHfoSOScDVou5jrgYzk4BO/u40SXxOLbyCOVy1Sg2eEbhSMjaXGObxYKx7Xjoe42XcVDKM/PCGAml3kDfTapVAmQGjXUDExFyX5t5OxmXKQIUrjMsS4zR1OvHAtlUXehNPHBrIUgHzfx3ted+B0=AQABCN=VLN\JeffdbxYn1M5i//rGErmD4DjOJgaDmC6Y672Or8OeZfMzBw=mvyQuVj1M3pIlQMlCawB6K+q6tSgkVR6NBJKRoNxrAu72Z9PiLh/2UXlSoEzEtS9m1PJ1YjFe0FkaK7Ac/LY0QH2owDDwL1rRuL4LoMNZbLtX75NxgR5qKACGI56mK4VijaeQiqLLgBsWxcyr9B1jlDoMV51pGsDsEgsQg3Nq4M=rghAhQ7/hHethob8lbZ9+PkYfHfoSOScDVou5jrgYzk4BO/u40SXxOLbyCOVy1Sg2eEbhSMjaXGObxYKx7Xjoe42XcVDKM/PCGAml3kDfTapVAmQGjXUDExFyX5t5OxmXKQIUrjMsS4zR1OvHAtlUXehNPHBrIUgHzfx3ted+B0=AQABMIIBuTCCASKgAwIBAgIQF0gpHnXZdZhG4yRlDQdQczANBgkqhkiG9w0BAQsFADAbMRkwFwYDVQQDHhAAVgBMAE4AXABKAGUAZgBmMB4XDTIxMDMyOTE4NDQ0MVoXDTIyMDMzMDAwNDQ0MVowGzEZMBcGA1UEAx4QAFYATABOAFwASgBlAGYAZjCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEArghAhQ7/hHethob8lbZ9+PkYfHfoSOScDVou5jrgYzk4BO/u40SXxOLbyCOVy1Sg2eEbhSMjaXGObxYKx7Xjoe42XcVDKM/PCGAml3kDfTapVAmQGjXUDExFyX5t5OxmXKQIUrjMsS4zR1OvHAtlUXehNPHBrIUgHzfx3ted+B0CAwEAATANBgkqhkiG9w0BAQsFAAOBgQCqwlPUuO+fJbmnykx77VIIKm6zikU2GEq0DUeRuow1dEPDMCdnyW0Occe0RlhjsKcVYtJLljDlbJddAkM7/qF0Txft5Hw9u5YpvEbvHyAKR0nZSdev6Fni4qrgvu7kRgndU50Dph7CHC7f6RbkFK0DEWVT+4nghDapVsQM6c537g== \ No newline at end of file diff --git a/PROMS/WORD ADD-INs/FGAddIn Install/setup.exe b/PROMS/WORD ADD-INs/FGAddIn Install/setup.exe new file mode 100644 index 00000000..272b3f0c Binary files /dev/null and b/PROMS/WORD ADD-INs/FGAddIn Install/setup.exe differ diff --git a/PROMS/WORD ADD-INs/FGAddIn/FGAddIn.sln b/PROMS/WORD ADD-INs/FGAddIn/FGAddIn.sln new file mode 100644 index 00000000..6b65a64d --- /dev/null +++ b/PROMS/WORD ADD-INs/FGAddIn/FGAddIn.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.31112.23 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FGAddIn", "FGAddIn\FGAddIn.csproj", "{60D841FC-B80A-4911-927D-7C31E2EB7745}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {60D841FC-B80A-4911-927D-7C31E2EB7745}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {60D841FC-B80A-4911-927D-7C31E2EB7745}.Debug|Any CPU.Build.0 = Debug|Any CPU + {60D841FC-B80A-4911-927D-7C31E2EB7745}.Release|Any CPU.ActiveCfg = Release|Any CPU + {60D841FC-B80A-4911-927D-7C31E2EB7745}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {A120D023-73B6-475A-BBA5-17E6209946EE} + EndGlobalSection +EndGlobal diff --git a/PROMS/WORD ADD-INs/FGAddIn/FGAddIn/FGAddIn.csproj b/PROMS/WORD ADD-INs/FGAddIn/FGAddIn/FGAddIn.csproj new file mode 100644 index 00000000..556bade1 --- /dev/null +++ b/PROMS/WORD ADD-INs/FGAddIn/FGAddIn/FGAddIn.csproj @@ -0,0 +1,246 @@ + + + + + {BAA0C2D2-18E2-41B9-852F-F413020CAA33};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + Debug + AnyCPU + {60D841FC-B80A-4911-927D-7C31E2EB7745} + Library + false + FGAddIn + FGAddIn + v4.7.2 + VSTO40 + true + C:\Data\WORD ADD-INs\ + + en + 1.0.0.0 + true + true + 7 + days + False + FGAddIn + + + FGAddIn + + 3 + + + + False + Microsoft .NET Framework 4.7.2 %28x86 and x64%29 + true + + + False + .NET Framework 3.5 SP1 + false + + + False + Microsoft Visual Studio 2010 Tools for Office Runtime %28x86 and x64%29 + true + + + + + Word + + + + true + full + false + bin\Debug\ + false + $(DefineConstants);DEBUG;TRACE + 4 + + + + pdbonly + true + bin\Release\ + false + $(DefineConstants);TRACE + 4 + + + + + + False + ..\..\..\..\..\..\Program Files (x86)\ComponentOne\WinForms Edition\bin\v2.0\C1.Win.C1FlexGrid.2.dll + + + + + + + + + + + + + + False + + + False + + + False + + + False + + + False + + + + + True + + + + + False + true + + + False + true + + + False + + + + + + Code + + + ResXFileCodeGenerator + Resources.Designer.cs + Designer + + + True + Resources.resx + + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + True + Settings.settings + + + Code + + + ThisAddIn.cs + + + ThisAddIn.Designer.xml + + + + + 10.0 + $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) + + + true + + + FGAddIn_TemporaryKey.pfx + + + 62C9754A491AEBCCCC855EE86017AC369CB20AD4 + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/PROMS/WORD ADD-INs/FGAddIn/FGAddIn/FGAddIn.csproj.user b/PROMS/WORD ADD-INs/FGAddIn/FGAddIn/FGAddIn.csproj.user new file mode 100644 index 00000000..86d5d7a6 --- /dev/null +++ b/PROMS/WORD ADD-INs/FGAddIn/FGAddIn/FGAddIn.csproj.user @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/PROMS/WORD ADD-INs/FGAddIn/FGAddIn/FGAddIn_TemporaryKey.pfx b/PROMS/WORD ADD-INs/FGAddIn/FGAddIn/FGAddIn_TemporaryKey.pfx new file mode 100644 index 00000000..dbd8bfef Binary files /dev/null and b/PROMS/WORD ADD-INs/FGAddIn/FGAddIn/FGAddIn_TemporaryKey.pfx differ diff --git a/PROMS/WORD ADD-INs/FGAddIn/FGAddIn/Properties/AssemblyInfo.cs b/PROMS/WORD ADD-INs/FGAddIn/FGAddIn/Properties/AssemblyInfo.cs new file mode 100644 index 00000000..fff3b8a7 --- /dev/null +++ b/PROMS/WORD ADD-INs/FGAddIn/FGAddIn/Properties/AssemblyInfo.cs @@ -0,0 +1,38 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Security; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("FGAddIn")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("Windows User")] +[assembly: AssemblyProduct("FGAddIn")] +[assembly: AssemblyCopyright("Copyright © Windows User 2021")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("c8ffb2de-c945-4123-82d5-db500d9fada2")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] + diff --git a/PROMS/WORD ADD-INs/FGAddIn/FGAddIn/Properties/Resources.Designer.cs b/PROMS/WORD ADD-INs/FGAddIn/FGAddIn/Properties/Resources.Designer.cs new file mode 100644 index 00000000..73599263 --- /dev/null +++ b/PROMS/WORD ADD-INs/FGAddIn/FGAddIn/Properties/Resources.Designer.cs @@ -0,0 +1,62 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace FGAddIn.Properties { + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("FGAddIn.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + } +} diff --git a/PROMS/WORD ADD-INs/FGAddIn/FGAddIn/Properties/Resources.resx b/PROMS/WORD ADD-INs/FGAddIn/FGAddIn/Properties/Resources.resx new file mode 100644 index 00000000..af7dbebb --- /dev/null +++ b/PROMS/WORD ADD-INs/FGAddIn/FGAddIn/Properties/Resources.resx @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/PROMS/WORD ADD-INs/FGAddIn/FGAddIn/Properties/Settings.Designer.cs b/PROMS/WORD ADD-INs/FGAddIn/FGAddIn/Properties/Settings.Designer.cs new file mode 100644 index 00000000..2b9866b6 --- /dev/null +++ b/PROMS/WORD ADD-INs/FGAddIn/FGAddIn/Properties/Settings.Designer.cs @@ -0,0 +1,26 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace FGAddIn.Properties { + + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.0.0.0")] + internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { + + private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); + + public static Settings Default { + get { + return defaultInstance; + } + } + } +} diff --git a/PROMS/WORD ADD-INs/FGAddIn/FGAddIn/Properties/Settings.settings b/PROMS/WORD ADD-INs/FGAddIn/FGAddIn/Properties/Settings.settings new file mode 100644 index 00000000..39645652 --- /dev/null +++ b/PROMS/WORD ADD-INs/FGAddIn/FGAddIn/Properties/Settings.settings @@ -0,0 +1,7 @@ + + + + + + + diff --git a/PROMS/WORD ADD-INs/FGAddIn/FGAddIn/ThisAddIn.Designer.cs b/PROMS/WORD ADD-INs/FGAddIn/FGAddIn/ThisAddIn.Designer.cs new file mode 100644 index 00000000..dc717fe8 --- /dev/null +++ b/PROMS/WORD ADD-INs/FGAddIn/FGAddIn/ThisAddIn.Designer.cs @@ -0,0 +1,237 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +#pragma warning disable 414 +namespace FGAddIn { + + + /// + [Microsoft.VisualStudio.Tools.Applications.Runtime.StartupObjectAttribute(0)] + [global::System.Security.Permissions.PermissionSetAttribute(global::System.Security.Permissions.SecurityAction.Demand, Name="FullTrust")] + public sealed partial class ThisAddIn : Microsoft.Office.Tools.AddInBase { + + internal Microsoft.Office.Tools.CustomTaskPaneCollection CustomTaskPanes; + + internal Microsoft.Office.Tools.SmartTagCollection VstoSmartTags; + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Tools.Office.ProgrammingModel.dll", "16.0.0.0")] + private global::System.Object missing = global::System.Type.Missing; + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Tools.Office.ProgrammingModel.dll", "16.0.0.0")] + internal Microsoft.Office.Interop.Word.Application Application; + + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Never)] + public ThisAddIn(global::Microsoft.Office.Tools.Word.ApplicationFactory factory, global::System.IServiceProvider serviceProvider) : + base(factory, serviceProvider, "AddIn", "ThisAddIn") { + Globals.Factory = factory; + } + + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Tools.Office.ProgrammingModel.dll", "16.0.0.0")] + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Never)] + protected override void Initialize() { + base.Initialize(); + this.Application = this.GetHostItem(typeof(Microsoft.Office.Interop.Word.Application), "Application"); + Globals.ThisAddIn = this; + global::System.Windows.Forms.Application.EnableVisualStyles(); + this.InitializeCachedData(); + this.InitializeControls(); + this.InitializeComponents(); + this.InitializeData(); + } + + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Tools.Office.ProgrammingModel.dll", "16.0.0.0")] + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Never)] + protected override void FinishInitialization() { + this.InternalStartup(); + this.OnStartup(); + } + + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Tools.Office.ProgrammingModel.dll", "16.0.0.0")] + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Never)] + protected override void InitializeDataBindings() { + this.BeginInitialization(); + this.BindToData(); + this.EndInitialization(); + } + + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Tools.Office.ProgrammingModel.dll", "16.0.0.0")] + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Never)] + private void InitializeCachedData() { + if ((this.DataHost == null)) { + return; + } + if (this.DataHost.IsCacheInitialized) { + this.DataHost.FillCachedData(this); + } + } + + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Tools.Office.ProgrammingModel.dll", "16.0.0.0")] + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Never)] + private void InitializeData() { + } + + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Tools.Office.ProgrammingModel.dll", "16.0.0.0")] + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Never)] + private void BindToData() { + } + + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + private void StartCaching(string MemberName) { + this.DataHost.StartCaching(this, MemberName); + } + + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + private void StopCaching(string MemberName) { + this.DataHost.StopCaching(this, MemberName); + } + + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + private bool IsCached(string MemberName) { + return this.DataHost.IsCached(this, MemberName); + } + + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Tools.Office.ProgrammingModel.dll", "16.0.0.0")] + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Never)] + private void BeginInitialization() { + this.BeginInit(); + this.CustomTaskPanes.BeginInit(); + this.VstoSmartTags.BeginInit(); + } + + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Tools.Office.ProgrammingModel.dll", "16.0.0.0")] + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Never)] + private void EndInitialization() { + this.VstoSmartTags.EndInit(); + this.CustomTaskPanes.EndInit(); + this.EndInit(); + } + + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Tools.Office.ProgrammingModel.dll", "16.0.0.0")] + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Never)] + private void InitializeControls() { + this.CustomTaskPanes = Globals.Factory.CreateCustomTaskPaneCollection(null, null, "CustomTaskPanes", "CustomTaskPanes", this); + this.VstoSmartTags = Globals.Factory.CreateSmartTagCollection(null, null, "VstoSmartTags", "VstoSmartTags", this); + } + + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Tools.Office.ProgrammingModel.dll", "16.0.0.0")] + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Never)] + private void InitializeComponents() { + } + + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + private bool NeedsFill(string MemberName) { + return this.DataHost.NeedsFill(this, MemberName); + } + + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Tools.Office.ProgrammingModel.dll", "16.0.0.0")] + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Never)] + protected override void OnShutdown() { + this.VstoSmartTags.Dispose(); + this.CustomTaskPanes.Dispose(); + base.OnShutdown(); + } + } + + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Tools.Office.ProgrammingModel.dll", "16.0.0.0")] + internal sealed partial class Globals { + + /// + private Globals() { + } + + private static ThisAddIn _ThisAddIn; + + private static global::Microsoft.Office.Tools.Word.ApplicationFactory _factory; + + private static ThisRibbonCollection _ThisRibbonCollection; + + internal static ThisAddIn ThisAddIn { + get { + return _ThisAddIn; + } + set { + if ((_ThisAddIn == null)) { + _ThisAddIn = value; + } + else { + throw new System.NotSupportedException(); + } + } + } + + internal static global::Microsoft.Office.Tools.Word.ApplicationFactory Factory { + get { + return _factory; + } + set { + if ((_factory == null)) { + _factory = value; + } + else { + throw new System.NotSupportedException(); + } + } + } + + internal static ThisRibbonCollection Ribbons { + get { + if ((_ThisRibbonCollection == null)) { + _ThisRibbonCollection = new ThisRibbonCollection(_factory.GetRibbonFactory()); + } + return _ThisRibbonCollection; + } + } + } + + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Tools.Office.ProgrammingModel.dll", "16.0.0.0")] + internal sealed partial class ThisRibbonCollection : Microsoft.Office.Tools.Ribbon.RibbonCollectionBase { + + /// + internal ThisRibbonCollection(global::Microsoft.Office.Tools.Ribbon.RibbonFactory factory) : + base(factory) { + } + } +} diff --git a/PROMS/WORD ADD-INs/FGAddIn/FGAddIn/ThisAddIn.Designer.xml b/PROMS/WORD ADD-INs/FGAddIn/FGAddIn/ThisAddIn.Designer.xml new file mode 100644 index 00000000..4d476ef5 --- /dev/null +++ b/PROMS/WORD ADD-INs/FGAddIn/FGAddIn/ThisAddIn.Designer.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/PROMS/WORD ADD-INs/FGAddIn/FGAddIn/ThisAddIn.cs b/PROMS/WORD ADD-INs/FGAddIn/FGAddIn/ThisAddIn.cs new file mode 100644 index 00000000..aed60d98 --- /dev/null +++ b/PROMS/WORD ADD-INs/FGAddIn/FGAddIn/ThisAddIn.cs @@ -0,0 +1,82 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Xml.Linq; +using Word = Microsoft.Office.Interop.Word; +using Office = Microsoft.Office.Core; +using Microsoft.Office.Tools.Word; +using System.IO; + +namespace FGAddIn +{ + public partial class ThisAddIn + { + private void ThisAddIn_Startup(object sender, System.EventArgs e) + { + } + + private void ThisAddIn_Shutdown(object sender, System.EventArgs e) + { + } + + #region VSTO generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InternalStartup() + { + this.Startup += new System.EventHandler(ThisAddIn_Startup); + this.Shutdown += new System.EventHandler(ThisAddIn_Shutdown); + } + + #endregion + } +} +namespace W2PGrid +{ + public partial class ThisGrid : C1.Win.C1FlexGrid.C1FlexGrid + { + public const string ClassID = "73ED6A9D-4E4B-4521-823C-F4A5BC8DCB3C"; + public const string InterfaceID = "01A4D93F-C962-478D-9376-B50C52ECC554"; + public const string EventID = "AD4FB6C2-3E13-4527-8324-4D7ACF3AB67A"; + + public ThisGrid() + { + InitializeComponent(); + } + + public ThisGrid(System.ComponentModel.IContainer container) + { + container.Add(this); + + InitializeComponent(); + } + + private void InitializeComponent() + { + throw new NotImplementedException(); + } + + public string GetXML() + { + string retstr = null; + using (StringWriter sw = new StringWriter()) + { + this.WriteXml(sw); + retstr = sw.GetStringBuilder().ToString(); + sw.Close(); + } + return retstr; + } + public object GetAGrid() + { + ThisGrid fg = new ThisGrid(); + return fg; + } + } + +} + diff --git a/PROMS/WORD ADD-INs/FGAddIn/FGAddIn/bin/Debug/C1.Win.C1FlexGrid.2.dll b/PROMS/WORD ADD-INs/FGAddIn/FGAddIn/bin/Debug/C1.Win.C1FlexGrid.2.dll new file mode 100644 index 00000000..5283754f Binary files /dev/null and b/PROMS/WORD ADD-INs/FGAddIn/FGAddIn/bin/Debug/C1.Win.C1FlexGrid.2.dll differ diff --git a/PROMS/WORD ADD-INs/FGAddIn/FGAddIn/bin/Debug/C1.Win.C1FlexGrid.2.xml b/PROMS/WORD ADD-INs/FGAddIn/FGAddIn/bin/Debug/C1.Win.C1FlexGrid.2.xml new file mode 100644 index 00000000..34100237 --- /dev/null +++ b/PROMS/WORD ADD-INs/FGAddIn/FGAddIn/bin/Debug/C1.Win.C1FlexGrid.2.xml @@ -0,0 +1,12769 @@ + + + + C1.Win.C1FlexGrid.2 + + + + + Static class containing UI strings used by the designer. + + + + + Represents a filter that contains a and a + . + + + + + Gets the contained in this . + + + + + Gets the contained in this . + + + + + Gets or sets a value that determines whether the filter is active. + + + + + Resets the filter making it inactive. + + + + + Applies the filter to a value. + + Value to be filtered. + True if the satisfies the filter; False otherwise. + + + + Gets the editor used to modify the filter at run time. + + A that is used to edit the filter + at run time. + + + + Interface implemented by column filter objects. + + + + + Gets a value that determines whether the filter is active. + + + + + Resets the filter making it inactive. + + + + + Applies the filter to a value. + + Value to be filtered. + True if the satisfies the filter; + False otherwise. + + + + Gets the editor used to modify the filter at run time. + + A to be used to modify the filter at + run time. + The control returned must implement the + interface. + + + + Interface implemented by column filter editor controls. + + + + + Initializes the editor with parameters from a filter to be edited. + + + that contains the column to be filtered. + Index of the column that contains the values to be filtered. + + being edited. + + + + Applies changes to the filter being edited. + + + + + Gets a value that determines whether the containing form should remain + open even when it is deactivated. + + + This property allows custom editors to display modal dialogs. + + + + + Represents a filter based on a set of values. + + + + + Gets or sets an array with the values that should be included in the output. + + + Setting this property to null causes the filter to include all values in the output. + + + + + Gets or sets the limit count of displayed values in value filter. + + + + + Gets or sets a value that determines whether the filter is active. + + + + + Resets the filter making it inactive. + + + + + Applies the filter to a value. + + Value to be filtered. + True if the satisfies the filter; False otherwise. + + + + Gets the editor used to modify the filter at run time. + + A that is used to edit the filter at run time. + + + + Static class containing UI strings used by the designer. + + + + + Summary description for GridDesigner. + + + + + Gets the design time action lists supported by the component associated + with this designer. + + + + + Initializes the designer with the specified component. + + Component associated with the designer. + + + + Releases the resources associated with the designer. + + True to release all resources, false to release unmanaged resources only. + + + + Indicates whether a mouse click at the specified point should be handled by the control. + + Point indicating the mouse position, in screen coordinates. + True if the control should handle the click, false otherwise. + + + + Helper class that provides information about a currently active ComboBox editor. + + + + + Gets or sets the selected index in the currently active ComboBox editor. + + + If there's no active editor, or if the editor is not a ComboBox, + the value returned is -1. + + + + + Gets or sets the selected item in the currently active ComboBox editor. + + + If there's no active editor, or if the editor is not a ComboBox, + the value returned is null. + + + + + Gets the key that corresponds to the selected item in the currently + active ComboBox editor. + + + If there's no active editor, if the editor is not a , or if the cell + being edited does not have an associated DataMap, the value returned is null. + + + + + Gets the collection of items in the currently active ComboBox editor. + + + If there's no active editor, or if the editor is not a ComboBox, + the value returned is null. + + + + + Interface implemented by editors and used by the grid to host edit controls + on cells. + + + All built-in grid editors implement this interface, as do the controls in the + ComponentOne C1Input library. + If you want to use a third-party editor with the , consider + creating a derived class and implementing this interface. + Note that the methods in IC1EmbeddedEditor are called using reflection. + Controls do not need to implement the entire interface. Any public methods with matching + signatures (names, parameters, and return values) will be invoked by the grid. + The grid supplies default handlers for any methods not implemented by the control. + + + + + Called to initialize the editor content and styles. + + Contains the grid data that should be displayed in the editor. + Contains a dictionary with keys that correspond to style element names and values for the cell being edited. + + The dictionary contains the following keys: + + BackColor: Cell background color. + + ForeColor: Cell foreground color. + + Font: Cell font. + + Format: Cell format string (e.g. "#,##0.##"). + + ContentAlignment: Cell text alignment. + + Margins: Extra margins around the cell content (in pixels). + + Wrap: Whether word wrapping is enabled. + + + + + Gets the current value of the editor. + + The current value of the editor (any data type). + + + + Gets a value that determines if the editor's current contents are valid. + + True if the editor currently has valid content (e.g it contains + an EditMask and all required positions have been filled). + + + + + Called to update the editor's size and position. + + The bounds of the cell being edited, in client coordinates. + + This method is called during initialization and also when the grid scrolls. + + + + + Gets a value that determines whether a given key should finalize editing. + + Key to be tested. + True if the key should finish the edits and close the editor. + + If this method returns true, the grid copies the editor value to the cell and + exits edit mode. The key is then processed by the grid (unless the e.Handled + parameter is set to true). + For example, pressing the down arrow typically causes the grid to exit edit + mode and move the cursor to the next row. + The default handler returns true for the TAB, ENTER, and ESC keys. + It also handles the arrow keys for editors based on TextBox, ComboBox, + and DateTimePicker controls. + + + + + Formats a given value using a specified mask. + + Value to be formatted. + Formatting mask. + A string containing the formatted value. + The default implementation ignores the mask and returns value.ToString(). + + + + Gets the editor style, which determines the type of button that is displayed in + the cell before and during editing (DropDown, Modal, or None). + + + The default handler returns DropDown for ComboBoxes, DateTimePickers, and + UpDown controls. It returns None for other control types. + The UITypeEditorEditStyle enumeration is defined in the System.Drawing.Design + namespace. The available settings are DropDown, Modal, and None. + + + + + Interface that extends and can be used to implement multi-column data maps. + + + + + Gets the string that should be displayed in the grid while not in edit mode. + + Value to look up in the dictionary. + The string that should be displayed in the grid while not in edit mode. + + When the is used to populate a , + all columns are displayed when the combo is dropped down. When the combo is closed, only one + column can be displayed. This method returns that value. + + + + + Interface that extends and can be used to implement multi-column data maps. + + + + + Gets the string which is in given column of the dictionary. + + Value to look up in the dictionary. + >Column index in the dictionary. + The string that should be displayed in the grid while not in edit mode. + + + + Class that implements the and can be used as + a column DataMap to create multi-column combo editors. + + + The class can be used to implement simple string-based + data maps or bound data maps that get the data from a data source object. + + + The code below creates an unbound two-column data map and assigns it to a grid column: + + // create string-based MultiColumnDictionary and assign it to column + // note: this will automatically generate keys of type 'int' for each item, + // the key values will be stored in the grid. + string text = "Row1, Col1\tRow1, Col2|Row2, Col1\tRow2, Col3|Row2, Col1\tRow3, Col2"; + MultiColumnDictionary map = new MultiColumnDictionary(text, 0, true); + _flex.Cols[1].DataMap = map; + + The map consists of three items, each with two columns. Because the autoKeys + parameter was set to true in the map's constructor, the map will have unique integer keys for + each value,and those integers will be stored in the grid cells. If autoKeys + had been set to false, the strings themselves would be used as keys and stored in the grid + cells. + The code below creates a bound data map and assigns it to a grid column: + + // create data-based MultiColumnDictionary and assign it to column + // notes: the list will automatically be updated is the data source changes. + DataTable dt = GetDataTable("employees"); + string[] columnNames = new string[] { "FirstName", "LastName", "Country" }; + MultiColumnDictionary map = new MultiColumnDictionary(dt, "EmployeeID", columnNames, 1); + _flex.Cols[2].DataMap = map; + + This map is bound to an Employees DataTable. The keyColumn parameter is set + to "EmployeeID", causing this field to be used as a key. When the grid is edited, the values + stored in the cells will be the employee's ID. However, this value is never displayed be the grid. + The drop-down list will show the employee's first name, last name, and country, as specified by the + columnNames parameter. + When the list is closed, the grid will display the employee's last name, as specified + by the displayColumn parameter. + Note that this map is dynamically bound to the data source, so if the employees table is + modified, the editor list will reflect the changes automatically. + Note also that the usual combo editing features such as auto-search and double-click cycling + still work. + + + + + Initializes a new instance of an unbound class. + + String that contains the items, delimited by pipe characters ("|"). + Each item may contain multiple columns, delimited by tabs (vbTab or '\t'). + + This constructor causes the map to show all columns when the editor is dropped down and only the + first column when the editor is closed or inactive. + + + + + Initializes a new instance of an unbound class. + + String that contains the items. Items are delimited by pipe characters ("|"). + Each item may contain multiple columns, delimited by tabs (vbTab or '\t'). + Index of the column that is displayed in the grid. + True if keys are to be automatically generated, false if the items themselves are + to be used as keys. Note that in the latter case, duplicate items are not allowed. + + + + Initializes a new instance of a bound class. + + Data source object. + Name of the data source column that contains unique keys. + Array with the names of the columns that are included in the map. + Name of the column that is displayed in the grid. + + + + Initializes a new instance of a bound class. + + Data source object. + Name of the data source column that contains unique keys. + + This constructor causes the map to show all columns when the editor is dropped down and only the + first column when the editor is closed or inactive. + + + + + Initializes a new instance of a bound class. + + Data source object. + Name of the data source column that contains unique keys. + Array with the names of the columns that are included in the map. + Name of the column that is displayed in the grid. + + + + Initializes a new instance of a bound class. + + Data source object. + Name of the data source column that contains unique keys. + + + + Removes all entries from the . + + + + + Adds an entry with the specified key and value into the . + + + + + Gets or sets the value associated with the specified key + + The key of the value to get or set. + + + + Gets the string which is in given column of the dictionary. + + Value to look up in the dictionary. + >Column index in the dictionary. + The string that should be displayed in the grid while not in edit mode. + + + + Specifies how adjacent cells are merged for display. + + + + + Do not merge any cells. + + + + + Merge any adjacent cells with same contents. + + + + + Merge rows only if cells above are also merged. + + + + + Merge columns only if cells to the left are also merged. + + + + + Merge cells only if cells above or to the left are also merged. + + + + + Merge only fixed cells. This setting is useful for setting up complex + headers for the data and preventing the data itself from being merged. + + + + + Allow long entries to spill into empty adjacent cells. + + + + + Allow long entries in node rows to spill into empty adjacent cells. + + + + + Use collection to determine which cells are merged. + + + + + Use the setting specified for the property. + + + + + The C1FlexGrid control is a powerful, full-featured grid. + C1FlexGrid provides advanced features such as outline trees, cell merging, + masked editing, translated combo and image lists, owner-draw cells, and automatic + data aggregation. + + + C1FlexGrid can be used in bound mode, where it displays data from .NET + data sources, or in unbound mode, where the grid itself manages the data. + You can use C1FlexGrid to read and write Excel files (.Xls), or read and write + grid contents to and from Xml files. + Classes derived from should have a LicenseProvider + attribute so Visual Studio will embed the appropriate licensing information into + projects that use the derived control. + For example: + + [LicenseProvider(typeof(LicenseProvider))] + public class MyGrid : C1FlexGrid + { + // implementation + } + + + + + + Creates a new instance of the control. + + + + + Gets or sets how cells should be merged. + + + Merging cells allows you to display data in a clear, appealing way, + because it highlights groups of identical information. It also gives you + flexibility to build tables similar to the ones you can create in HTML or + using Microsoft Word, both of which support merged cells. + To create tables with merged cells, set the + property to a value other than , and + set the property of individual rows and + columns true for the rows and columns you wish to merge. After these + properties are set, the grid will automatically merge adjacent cells + that have the same contents. + Whenever the cell contents change, the grid updates the merging state. + + + The code below causes the grid to merge cells with the same data in column 1: + + flex.AllowMerging = AllowMergingEnum.Free; + flex.Cols[1].AllowMerging = true; // merge values in column 1 + + + + + Gets or sets how non-scrollable cells should be merged. + + + By default, this property is set to , which + causes fixed cells to be merged with the same setting as scrollable cells. + If you specify a different value for this property, you can use different merging + modes for fixed cells such as column headers than the setting used for scrollable cells. + + + + + Returns the merged range of cells that includes a given cell. + + Row index. + Column index. + Whether the range should be clipped to the visible area of the grid. + A object that contains the given cell. + + Cell merging is controlled by the property. + The method allows you to determine whether a cell is + merged with adjacent cells. + You can override the method to implement custom merging + logic. If you do this, make sure the merging method is consistent and efficient, since + it gets called frequently and affects the grid's appearance and behavior. + + + The code below checks the current cell after a selection to see if it is part + of a merged range: + + private void _flex_SelChange(object sender, System.EventArgs e) + { + CellRange rg = this._flex.GetMergedRange(_flex.Row, _flex.Col, false); + if (!rg.IsSingleCell) + { + Console.WriteLine("selection is merged: {0},{1}-{2},{3}", + rg.TopRow, rg.LeftCol, rg.BottomRow, rg.RightCol); + } + } + + The code below shows how you can override the method + to provide custom merging: + + public class CustomMerge : C1FlexGrid + { + public CustomMerge() + { + // allow free merging by default + AllowMerging = AllowMergingEnum.Free; + for (int r = 0; r < Rows.Count; r++) Rows[r].AllowMerging = true; + for (int c = 0; c < Cols.Count; c++) Cols[c].AllowMerging = true; + } + override public CellRange GetMergedRange(int row, int col, bool clip) + { + // merge cells in range (1,1)-(3,3) + if (row >= 1 && row <= 3 && col >= 1 && col <= 3) + return GetCellRange(1, 1, 3, 3); + + // don't merge anything else + return GetCellRange(row, col); + } + } + + + + + Returns the merged range of cells that includes a given cell. + + Row index. + Column index. + A object that contains the given cell. + + This method returns the entire range, including invisible cells. + + + + + Gets the that determines which grid + cells are merged when the property is set to + . + + + + + Reflects grid over its main diagonal. + + + The Transpose method also removes sorting and filtering for every columns. + + + + + Overridden to clear merged ranges. + + + + + Gets the state for a Windows XP theme while the mouse moves over a cell. + + + This method is for internal use. It allows inherited classes to customize the hot-tracking behavior. + + Row under the mouse. + Column under the mouse. + An integer representing the item state (2 for hot-tracking, 1 for normal). + + + + Gets a cell glyph to show in a cell. + + + This method is for internal use. It allows inherited classes to customize the display of the sorting glyphs. + + Row index. + Column index. + Cell rectangle + Glyph to display above the cell content. + Glyphs to display on the left of the cell. + Glyphs to display on the right of the cell. + True if any glyphs were assigned to the cell, false otherwise. + + + + Applies a value to a cell or cell range. + + + This method is for internal use. It allows inherited classes to customize the way data + coming from cell editors is applied to the cells. + + Row index. + Column index. + Data to be applied to the cell. + Whether the data should be coerced into the cell's data type. + + + + + + Applies a value to a cell or cell range. + + + This method is for internal use. It allows inherited classes to customize the way checkbox + data is applied to the cells. + + Row index. + Column index. + Value to apply to the cell. + + + + Invalidates a cell range, causing it to be repainted. + + Range to be invalidated. + + This method is rarely used by the programmer, since the grid automatically + performs invalidation as needed. + + + + + Gets a rectangle representing the coordinates of a cell, row, or column. + + + This method is for internal use. It allows inherited classes to customize the way cell geometry + is calculated. + + Row index (or -1 to get column bounds). + Column index (or -1 to get row bounds). + Whether the rectangle should be horizontally clipped to the grid's client area. + Whether the rectangle should be vertically clipped to the grid's client area. + A containing the display area for the row, column, or cell, in client + coordinates and accounting for scroll position. + + + + Gets a rectangle representing the coordinates of a cell editor. + + + This method is for internal use. It allows inherited classes to customize the way cell geometry + is calculated. + + Row index. + Column index. + Rectangle used to position the cell editor. + + + + Starts editing a cell in response to a key press. + + + This method is for internal use. It allows inherited classes to customize the editing process. + + Row index. + Column index. + Key that initiated the edit process. + Whether editing should start even in non-editable cells (e.g. fixed cells). + True if the editing process was started successfully, false otherwise. + + + + Starts editing a cell in response to a mouse action. + + + This method is for internal use. It allows inherited classes to customize the editing process. + + Row index. + Column index. + Mouse position in client coordinates. + Whether the action was a double-click. + True if the editing process was started successfully, false otherwise. + + + + Gets a value that determines if a cell contains the grid cursor. + + Row index. + Column index. + True if the cell contains the cursor, false otherwise. + + + + Gets a value that determines if a cell is part of the selection and should be highlighted. + + Row index. + Column index. + True if the cell should be highlighted, false otherwise. + + + + Gets a value that indicates what types of child nodes a row has. + + + This method is for internal use. It allows inherited classes to customize outline trees. + + Row index. + Column index. + Outline level. + Zero if the row has no children, 1 if it has regular data rows only, + 2 if it has child nodes, and 3 if it has data and child nodes. + + + + + Draws a grid row. + + A that contains a + object where the row will be drawn. + Index of the row to draw. + + This method is for internal use. It allows inherited classes to customize the grid appearance. + + + + + Draws a grid cell. + + A that contains a + object where the cell will be drawn. + Index of the cell's row. + Index of the cell's column. + The index of the last column painted (may be greater than + if columns are merged). + + This method is for internal use. It allows inherited classes to customize the grid appearance. + + + + + Draws a grid cell. + + + object where the cell will be drawn. + Index of the cell's row. + Index of the cell's column. + + that defines the cell position. + + This method is for internal use. It allows inherited classes to customize the grid appearance. + + + + + Moves or extends the current selection. + + + value that specifies the type of cursor movement. + Whether to extend the current selection. + + This method is for internal use. It allows inherited classes to customize the grid appearance. + + + + + Automatically size grid columns to fit the largest entry. + + + object used to measure the cell contents. + Index of the first row to be measured. + Index of the first column to be measured. + Index of the last row to be measured. + Index of the first column to be measured. + Extra space, in twips, to add to the largest entry. + + value that specifies auto sizing behavior. + + This method is for internal use. It allows inherited classes to customize the grid appearance. + + + + + Automatically size grid columns to fit the largest entry. + + + object used to measure the cell contents. + Index of the first row to be measured. + Index of the first column to be measured. + Index of the last row to be measured. + Index of the first column to be measured. + Extra space, in twips, to add to the largest entry. + + value that specifies auto-sizing behavior. + + This method is for internal use. It allows inherited classes to customize the grid appearance. + + + + + Raises the event. + + Object raising the event. + A that contains event data. + + + + Called when the grid contents scroll. + + + value that specifies the scroll direction. + + This method is for internal use. It allows inherited classes to customize the grid scrolling behavior. + + + + + Specifies whether the user should be able to resize rows and columns with the mouse. + + + + + The user may not resize rows or columns. + + + + + The user may resize columns with the mouse by dragging the edge of the column headers. + Double-clicking the edge of a column header automatically sizes the column to fit the widest entry. + + + + + The user may resize rows with the mouse by dragging the edge of the row headers. + Double-clicking the edge of a row header automatically sizes the row to fit the tallest entry. + + + + + The user may resize rows and columns with the mouse. + + + + + The user may change the default column width with the mouse. + Resizing any column will resize all columns that don't have a specific width assigned to them. + + + + + The user may change the default row height with the mouse. + Resizing any row will resize all rows that don't have a specific height assigned to them. + + + + + The user may change the default column width or row height with the mouse. + + + + + Specifies whether the user should be able to freeze rows and columns with the mouse. + + + + + The user may not freeze rows or columns. + + + + + The user may freeze columns by dragging the frozen region vertical boundary with the mouse. + + + + + The user may freeze rows by dragging the frozen region horizontal boundary with the mouse. + + + + + The user may freeze rows and columns by dragging the frozen region boundaries with the mouse. + + + + + Specifies whether the user should be able to drag rows and columns with the mouse. + + + + + The user may not drag rows or columns. + + + + + The user may drag columns with the mouse. + + + + + The user may drag rows with the mouse. + + + + + The user may drag rows and columns with the mouse. + + + + + Specifies whether the user should be able to sort columns with the mouse. + + + + + The user may not sort columns with the mouse. + + + + + The user may sort single columns by clicking on its header cell. + + + + + The user may sort a range of columns by clicking on the header cell + of the rightmost column in the range. + + + + + Specifies whether the grid should highlight the selected range. + + + + + Never highlight the selected range. + + + + + Always highlight the selected range. + + + + + Highlight the selected range when the control has focus. + + + + + Specifies the appearance of the focus rectangle. + + + + + No focus rectangle. + + + + + Show a light focus rectangle (dotted, 1-pixel wide). This is the default setting. + + + + + Show a heavy focus rectangle (dotted, 2-pixel wide). + + + + + Show a solid focus rectangle. The color of the rectangle is determined by the + BackColor property of the style. + + + + + Show a raised focus rectangle. + + + + + Show an inset focus rectangle. + + + + + Specifies options that control auto-sizing. + + + + + Default behavior. + + + + + All rows (or columns) in the range are set to the same size. + + + + + Ignore invisible rows (or columns) when auto-sizing. + + + + + Ignore merged cells when auto-sizing. + + + + + Specifies whether cells should be drawn entirely by the grid or with + help from custom drawing code. + + + + + Grid cells are drawn by the grid. + + + + + The grid fires the event to allow custom + cell drawing. + + + + + Specifies which elements of the cell should be drawn by the grid. + + + This enumeration is used when rendering owner-drawn cells. + If you set the property to , + the grid will fire the event to allow custom cell drawing. + The parameter passed to the event handler has a + method that allows you to use the standard + drawing routines for rendering parts of the cell. For example, you can paint a custom background + and use the standard drawing routines for the cell borders and content. + See the event for an example. + + + + + Draw the cell background. + + + + + Draw the cell border. + + + + + Draw the cell content (text, images, check boxes, etc). + + + + + Draw all cell elements (background, border, and contents). + + + + + Specifies when the grid should display combo buttons in cells. + + + + + Show buttons only while editing the cell. + + + + + Show buttons when the cell has the focus. This is the default setting for grid. + + + + + Always show buttons. + + + + + Never show buttons. + + + + + ShowButtons property of the column is inherited from the grid. This is default setting for column. Cannot be used with ShowButtons property of the grid. + + + + + Specifies options that customize the grid's editing behavior. + + + + + No special behavior. + + + + + Search for entries in lists as the user types. + + + + + Cycle to the next item on the list when the user double-clicks a cell. + + + + + Check and uncheck all check boxes in a selection simultaneously. + + + + + Use built-in numeric editor when editing numeric types. + + + + + Commit changes to data source only when changing rows or moving focus. + + + + + Exit editor if user presses the right arrow key at the end of the content + or the left arrow key at the start of the content. + + + + + Enter edit mode only in response to mouse or keyboard events. Setting this + flag to false causes the grid to enter edit mode when the control gets the + focus or when the user moves the cursor. + + + + + All of the above. + + + + + Specifies whether the control should use themes for displaying row or column headers. + + + + + Use themed headers when the property is set to XpThemes. + + + + + Do not use themed headers. + + + + + Use themed headers for row headers. + + + + + Use themed headers for column headers. + + + + + Use themed headers for row and column headers. + + + + + Use themed headers to indicate selected rows and columns when VisualStyle + is set to one of the Office styles. + + + + + Specifies options that customize scrollbar behavior. + + + + + Use the default scrolling behavior. + + + + + Keep scrollbars visible even when they are disabled. + + + + + Scroll by rows and columns (instead of by pixel). + + + + + Do not scroll the control contents until the user releases the scrollbar thumb. + + + + + Fire the event and display a tooltip next to + the vertical scrollbar while scrolling vertically. + + + + + Do not scroll the control to the first cell of merged range. + + + + + Specifies what parts of the grid should be copied to the clipboard when the + property is set to true. + + + + + Only the selected data is copied. + + + + + Copy the selected data and include the column headers. + + + + + Copy the selected data and include the row headers. + + + + + Copy the selected data and include row and column headers. + + + + + Do not copy any data to the clipboard. + + + + + Specifies the position of the sort glyphs within the column header cells. + + + + + Do not show sort glyphs. + + + + + Show sort glyphs on the right of the column header cells. + + + + + Show sort glyphs on the top of the column header cells. + + + + + Show sort glyphs on the top of the column header cells if filtering + is enabled, and on the right otherwise. + + + + + Base class for the control. + + + + + Releases all resources used by the . + + True to release both managed and unmanaged resources; + False to release only unmanaged resources. + + + + Signals the object that initialization is starting. + + + + + Signals the object that initialization is complete. + + + + + Occurs when the filter localizes a string in the user interface. + + + The control automatically localizes the + column filter based on the system's current culture and in the setting + of the property. + This event allows you to customize the filter strings or to + implement localization to languages that are not supported by the grid's + built-in localization mechanism. + To modify the content of any of the filter's UI elements, handle + this event and set the e.Value parameter to the text you would + like to display. + + + The example below shows how you can change the strings in the filter + UI based on the string value and on the name of the controls being + localized: + + void Initialize() + { + // enable filtering + _flex.AllowFiltering = true; + + // set GetLocalizedString handler + _flex.GetLocalizedString += _flex_GetLocalizedString; + } + void _flex_GetLocalizedString(object sender, C1.Win.C1FlexGrid.GetLocalizedStringEventArgs e) + { + // customize item based on text value + if (e.Value == "(Select All)") + { + e.Value = "(Select Everything)"; + } + + // customize item based on component name + switch (e.ComponentName) + { + case "_btnApplyFilter": + e.Value = "OK"; + break; + case "_btnClearFilter": + e.Value = "Reset"; + break; + case "_btnCancel": + e.Value = "Close"; + break; + } + } + + + + + Raises the event. + + + that contains the event data. + + + + Creates a new accessibility object for the control. + + A new for the control. + + + + Retrieves the specified . + + Row index of the accessibility object to return. + The for the specified row. + + + + Raises the event. + + An that contains the event data. + + + + Gets the default size of the control. + + + + + Fires when the grid or its contents change. + + + This is a general event that fires before more specific events. + For example, if the user drags a column with the mouse, the control fires the + , , and + events. + The GridChanged event allows you to create a centralized handler + for all types of grid events. It does not provide detailed arguments for + every event, nor the option of canceling user actions. + + + + + Raises the event. + + + + + Fires before the event is handled by the grid. + + + This event fires before the grid processes the event, and + gives the program a chance to customize the behavior of the control and optionally + cancel the default handling of the mouse. + + + The code below handles the event to detect clicks + on row headers and provide OLE drag and drop functionality. + + void _flex_BeforeMouseDown(object sender, C1.Win.C1FlexGrid.BeforeMouseDownEventArgs e) + { + // start dragging when the user clicks the row headers + HitTestInfo hti = _flex.HitTest(e.X, e.Y); + if (hti.Type == HitTestTypeEnum.RowHeader) + { + e.Cancel = true; // cancel default handling + HandleRowDragDrop(hti.Row); // handle row drag/drop + } + } + + + + + Raises the event. + + + + + Fires before the DoubleClick event is handled by the grid. + + + This event fires before the grid processes the event, and + gives the program a chance to customize the behavior of the control and optionally + cancel the default handling of the mouse. + + + The code below handles the event to detect double-clicks + on cells in a specific column and provide a custom edit dialog instead of using the + built-in editor. + + void _flex_BeforeDoubleClick(object sender, C1.Win.C1FlexGrid.BeforeMouseDownEventArgs e) + { + // detect double-clicks on column "Customer" + HitTestInfo hti = _flex.HitTest(e.X, e.Y); + if (hti.Type == HitTestTypeEnum.Cell && _flex[hti.Column].Name == "Customer") + { + e.Cancel = true; // cancel default handling + ShowCustomEditDialog(hti.Row, hti.Column); // handle row drag/drop + } + } + + + + + Fires when the user starts dragging a row. + + + This event only fires when the user drags a row using the mouse. + It does not fire when a row is moved using the method. + You can prevent specific rows from being dragged by the user by setting their + property to false. + + + + + Raises the event. + + A that contains the event data. + + + + Fires as the user drags a row to a new position. + + + This event only fires when the user drags a row using the mouse. + It does not fire when a row is moved using the method. + You can prevent specific rows from being dragged by the user by setting their + property to false. + + + + + Raises the event. + + A that contains the event data. + + + + Fires after the user finishes dragging a row. + + + This event only fires when the user drags a row using the mouse. + It does not fire when a row is moved using the method. + You can prevent specific rows from being dragged by the user by setting their + property to false. + + + + + Raises the event. + + A that contains event data. + + + + Fires when the user starts dragging a column. + + + This event only fires when the user drags a column using the mouse. + It is does not fire when a column is moved using the method. + You can prevent specific columns from being dragged by the user by setting their + property to false. + + + + + Raises the event. + + A that contains event data. + + + + Fires as the user drags a column to a new position. + + + This event only fires when the user drags a column using the mouse. + It does not fire when a row is moved using the method. + You can prevent specific columns from being dragged by the user by setting their + property to false. + + + + + Raises the event. + + A that contains the event data. + + + + Fires after the user finishes dragging a column. + + + This event only fires when the user drags a column using the mouse. + It does not fire when a column is moved using the method. + You can prevent specific columns from being dragged by the user by setting their + property to false. + + + + + Raises the event. + + A that contains event data. + + + + Fires before a column is sorted by a click on a column header. + + + This event only fires if the sorting was caused by a click on a column header. It does not fire + before sorting with the method. + This event is useful when you want to prevent the user from sorting certain columns or to specify + custom sorting orders for specific columns. You may do so by modifying the value of the + parameter. + + + + + Raises the event. + + A that contains event data. + + + + Fires after a column is sorted by a click on a column header. + + + This event only fires if the sorting was caused by a click on a column header cell (see the + property). It does not fire after sorting with the method. + This event is useful if you want to update user interface elements to reflect the new sorting. + To prevent certain columns from being sorted, or to alter their default sorting order, use the + or handle the event. + + + + + Raises the event. + + A that contains event data. + + + + Fires before a row is automatically resized by a double-click on a row header. + + + + + Raises the event. + + A that contains event data. + + + + Fires before a column is automatically resized by a double-click on a column header. + + + + + Raises the event. + + A that contains event data. + + + + Fires before a row is resized by dragging the row header. + + + Use the grid's property to determine whether users + are allowed to resize rows, columns, or both. + and + objects also have an property + that allows you to prevent specific rows and columns from being resized. + + + + Raises the event. + + A that contains event data. + + + + Fires after a row is resized by dragging the row header. + + + This event is fired after a row is resized by the user, by dragging the edge + of the row header cell with the mouse (see the property). + It is not fired when a row is resized by assigning a new value to the + property. + + + + + Raises the event. + + A that contains event data. + + + + Fires before a column is resized by dragging the column header. + + + + + Raises the event. + + A that contains event data. + + + + Fires after a column is resized by dragging the column header. + + + This event is fired after a column is resized by the user, by dragging the edge + of the column header cell with the mouse (see the property). + It is not fired when a column is resized by assigning a new value to the + property. + + + + + Raises the event. + + A that contains event data. + + + + Fires before rows are frozen by dragging the frozen row divider. + + + Use the property to enable or disable row and column freezing. + + + + + Raises the event. + + A that contains event data. + + + + Fires after rows are frozen by dragging the frozen row divider. + + + Use the property to enable or disable row and column freezing. + + + + + Raises the event. + + A that contains event data. + + + + Fires before columns are frozen by dragging the frozen column divider. + + + Use the property to enable or disable row and column freezing. + + + + + Raises the event. + + A that contains event data. + + + + Fires after columns are frozen by dragging the frozen column divider. + + + Use the property to enable or disable row and column freezing. + + + + + Raises the event. + + A that contains event data. + + + + Fires when the mouse enters a cell. + + + Many applications track mouse movement and react to the cell that is currently + under the mouse. This can be done using the event, but that + is not very efficient since the event fires many times while the mouse is over the + same cell. + The MouseEnterCell event allows you to implement cell tracking + efficiently, since it only fires once until the mouse leaves the cell. + + + The code below tracks mouse movement and highlights the cell under the mouse: + + void Form1_Load(object sender, EventArgs e) + { + // create style for tracking cell under the mouse + CellStyle cs = _flex.Styles.Add("track"); + cs.BackColor = Color.Gold; + } + void _flex_MouseEnterCell(object sender, RowColEventArgs e) + { + // apply tracking style when mouse enters the cell + _flex.SetCellStyle(e.Row, e.Col, _flex.Styles["track"]); + } + void _flex_MouseLeaveCell(object sender, RowColEventArgs e) + { + // remove tracking style when mouse leaves the cell + _flex.SetCellStyle(e.Row, e.Col, (CellStyle)null); + } + + + + + Raises the event. + + + that contains the event data. + + + + Fires when the mouse leaves a cell. + + + + + Raises the event. + + + that contains the event data. + + + + Fires before the grid scrolls. + + + + + Raises the event. + + A that contains event data. + + + + Fires after the grid scrolls. + + + This event allows you to prevent the user from scrolling the grid while an operation + is being performed on the current selection. + + + The code below prevents the grid from scrolling while the grid is in edit mode. + + void _flex_BeforeScroll(object sender, C1.Win.C1FlexGrid.RangeEventArgs e) + { + if (_flex.Editor != null) + e.Cancel = true; + } + + + + + Raises the event. + + A object that contains event data. + + + + Fires before the vertical ScrollTip is displayed. + + + This event fires only if the ShowScrollTips flag is set in the property. + It allows you to specify the text that will be displayed in the scroll tip. + + + The code below uses the event to display a scroll tip showing the value of the + first cell that will become visible when the user stops scrolling. + + _flex.ScrollOptions = ScrollFlags.DelayedScroll | ScrollFlags.ShowScrollTips; + void _flex_ShowScrollTip(object sender, ToolTipEventArgs e) + { + e.ToolTipText = string.Format("row {0}", e.Row); + } + + + + + Raises the event. + + A object that contains event data. + + + + Fires before the current cell changes ( and properties). + + + This event fires before the or properties change, either as a + result of user actions or through code. It allows you to prevent the selection of certain cells, + thus creating "protected" ranges on a grid. + + fires only when the or + properties are about to change. To detect extended selections, you also need to handle the + event. + + + + + Raises the event. + + A that contains event data. + + + + Fires after the current cell changes ( and properties). + + + This event fires before the or properties change, either as a + result of user actions (mouse or keyboard) or through code. It allows you to display additional information + about the currently selected row, column, or cell. + To perform validation or prevent certain cells from being selected, use the + and events instead. + + + + + Raises the event. + + A that contains event data. + + + + Fires before the selection changes (, , , properties). + + + This event fires before the and properties change, either as a result + of user actions or through code. It allows you to prevent the selection of certain cells, thus creating + "protected" ranges on a grid. + To prevent the selection of a range, you also need to handle the event, which + is fired before the Row and Col properties change. + + + + + Raises the event. + + A that contains event data. + + + + Fires after the selection changes (, , , + properties). + + + This event is fired after the or properties change, either as + a result of user actions (mouse or keyboard) or through code. + This event is useful if you want to display additional information about the current selection. To + perform validation or prevent certain cells from being selected, use the and + events instead. + + + + + Raises the event. + + A that contains event data. + + + + Fires after the current cell changes ( and properties). + + + + fires when the or properties change, either + as a result of user actions (mouse or keyboard) or through code. + This event does not fire when the selection changes ( or properties) + but the active cell (, ) remains the same. In this case, the + event fires instead. + + + + + Raises the event. + + A that contains event data. + + + + Fires after the selection changes (, , , + properties). + + + + fires after the , , , + or properties change, either as a result of user actions (mouse or keyboard) + or through code. + This event also fires while the user extends the selection with the mouse. + + + + + Raises the event. + + An that contains event data. + + + + Fires before the current cell changes ( and properties). + + + This event fires before the cursor leaves the current cell, either as a result of user actions + (mouse or keyboard), or through code. + + + + + Raises the event. + + An that contains event data. + + + + Fires after the current cell changes ( and properties). + + + This event fires after the cursor enters a cell, either as a result of user actions (mouse or keyboard), + or through code. + + + + + Raises the event. + + An that contains event data. + + + + Fires before the grid enters edit mode, and also when the cell that has the + focus needs to be painted. + + + This event doesn't fire only when the grid is about to enter edit mode. + It also fires while painting cells, in order to support drawing the editor's + drop-down buttons. + The event fires only when the grid is about to enter + edit mode. + + + + + Raises the event. + + A that contains event data. + + + + Fires before the control enters edit mode. + + + This event fires before the control enters edit mode. It allows you to prevent + editing by setting the Cancel parameter to true, or to supply a list of choices + for a combo list using the property, or an edit mask using the + property. + If the choices or the mask are the same for a whole column, you may set them more + efficiently using the and + properties for the object. In this case, there's no need to handle + the StartEdit event at all. + The grid also exposes a event. The difference between + the two is that BeforeEdit fires when the grid paints the cell that has the focus + (so it can determine whether the cell has a drop-down button). BeforeEdit fires + more often than StartEdit, and does not always indicate that the grid is actually + entering edit mode. + + + + + Raises the event. + + A that contains event data. + + + + Fires after a cell has been edited. + + + This event does not fire if the user cancels the edits by pressing the ESC key. + The event fires whenever the grid leaves edit mode, + even if the edits were canceled. + + + + + Raises the event. + + A that contains event data. + + + + Fires after the control leaves edit mode. + + + + + Raises the event. + + A that contains event data. + + + + Fires after the user clicks a cell button. + + + This event fires when the user clicks an edit button on a cell. Typically, + this event is used to pop up a custom editor for the cell (for example, dialogs for + selecting colors, dates, files, pictures, and so on). + By default, cell edit buttons are displayed on the right side of a cell, + with an ellipsis caption ("..."). They are similar to the buttons displayed in the + PropertyGrid control, next to Image properties. You may customize + the button's appearance by assigning a picture to the property. + To create an edit button on a cell, you must set the + property to true and set the property (on the grid or on specific + columns) to an ellipsis ("..."). + + + + + Raises the event. + + A that contains event data. + + + + Fires after a cell editor has been initialized by the grid, to allow additional custom initialization. + + + This event can be used to customize the behavior of the cell editor by setting properties + on the editor control. + For example, the code below checks to see if the editor being used is a TextBox, and then + sets the editor's CharacterCasing and MaxLength properties. + + void _flex_SetupEditor(object sender, RowColEventArgs e) + { + TextBox tb = _flex.Editor as TextBox; + if (tb != null) + { + if (_flex.Cols[e.Col].Name == "ID") + tb.MaxLength = 4; + else + tb.MaxLength = 32000; + } + } + + + + + + Raises the event. + + A that contains event data. + + + + Fires before the control exits cell edit mode, while the editor is still active. + + + When this event fires, the contents of the editor have not been applied to the + grid. You can validate the editor contents and cancel the edits if necessary. + To validate the editor contents, check the value contained in the Editor.Text + property. If the value is invalid for the cell, set the Cancel parameter to true + and the grid will remain in edit mode until the user types a valid entry. + + For example, the code below checks to make sure the value entered is an integer + between 0 and 100: + + void _flex_ValidateEdit(object sender, ValidateEditEventArgs e) + { + if (_flex.Cols[e.Col].Name = "Score") + { + try + { + int value = int.Parse(_flex.Editor.Text); + if (value >= 0 && value <= 50) + return; // accept edits + } + catch {} + + // error or invalid range, refuse edits + e.Cancel = true; + } + } + + + + + + Raises the event. + + A that contains event data. + + + + Fires after a checkbox in a cell is checked or unchecked by the user. + + + + + Raises the event. + + A that contains event data. + + + + Fires in edit mode, after the contents of the editor change. + + + This event fires while the grid is in edit mode and the contents of the editor change. + This may be caused by the user typing into the editor or selecting a new item in a + drop down list. + When this event fires, the new editor content has not been applied to the grid cell yet. + You may check the new content using the property. + + + The code below shows a message when the text being edited contains more than 10 characters: + + void _flex_ChangeEdit(object sender, EventArgs e) + { + // get text in editor + string text = _flex.Editor.Text; + + // show message if it's too long + statusStrip1.Text = text.Length > 10 + ? "This text seems too long..." + : "This text looks OK..."; + } + + + + + Raises the event. + + An that contains event data. + + + + Fires in edit mode, when the dropdown portion of an editor opens. + + + + + Raises the event. + + A that contains event data. + + + + Fires in edit mode, when the dropdown portion of an editor closes. + + + + + Raises the event. + + A that contains event data. + + + + Fires in edit mode, when the user presses a key. + + + The KeyDownEdit event corresponds to the event, + except it fires when the grid is in edit mode (in this case, the control that received the + key is the editor, not the grid itself). + The editor has three modes: text, drop-down combo, or drop-down list. The mode used is + determined by the properties in the grid and column objects. + While editing with the text editor or with a drop-down combo, you may set or retrieve + the contents of the editor by retrieving the editor control with the + property and casting it to the proper type. + + + + + Raises the event. + + A that contains event data. + + + + Fires in edit mode, when the user releases a key. + + + The event corresponds to the + event, except it fires when the grid is in edit mode (in this case, the control that + receives the key is the editor, not the grid itself). + The editor has three modes: text, drop-down combo, or drop-down list. The mode + used is determined by the properties in the grid and column objects. + While editing with the text editor or with a drop-down combo, you may set or retrieve + the contents of the editor by retrieving the editor control with the + property and casting it to the proper type. + + + + + Raises the event. + + A that contains event data. + + + + Fires in edit mode, when the user presses a character key. + + + The event corresponds to the + event, except it fires when the + grid is in edit mode (in this case, the control that receives the + key is the editor, not the grid itself). + The editor has three modes: text, drop-down combo, or drop-down list. + The mode used is determined by the properties in the + grid and column objects. + While editing with the text editor or with a drop-down combo, you may set + or retrieve the contents of the editor by retrieving the editor control with the + property and casting it to the proper type. + + + + + Raises the event. + + A that contains event data. + + + + Fires after the contents of a cell have changed. + + + This event allows you to perform processing whenever the contents of a cell + change, regardless of how they were changed (for example, a user typed data into + the cell, data got loaded from a database, or data was assigned to the grid through code). + This event can be used to provide conditional formatting and dynamic data summaries, + which get updated automatically whenever the data changes. + This event fires in bound and unbound modes. In some bound more scenarios, the + data source object may inform the grid that some data in the current row changed, without + specifying which column changed. In this case, the Col parameter will be set to -1. + Event handlers should be prepared to handle this situation without throwing exceptions. + + + + + Raises the event. + + A that contains event data. + + + + Fires after any data source change notifications. + + + When the grid is used in bound mode, any changes to the data source cause the + grid to fire the event. This event is the ideal place + to put code that updates the grid with data-dependent elements such as subtotals and + outline trees. + + Note: The delegate is defined in + the System.ComponentModel namespace. + + + + + Raises the event. + + A that contains event data. + + + + Fires after the data source reports an error condition. + + + + + Raises the event. + + A that contains event data. + + + + Fires when the grid needs to retrieve data for an unbound cell. + + + This event fires in bound mode when the grid contains unbound columns. + Unbound columns are columns that have the Name property set to values + that do not map to columns in the data source. The information in unbound columns + must be provided by the application, by setting the Value property of the + parameter. + The class supports calculated columns that in many + situations can be used instead of unbound columns. + + + + + Raises the event. + + An that contains event data. + + + + Fires when the grid needs to store data in an unbound cell. + + + This event fires in bound mode when the grid contains unbound columns. + Unbound columns are columns that have the Name property set to values + that do not map to columns in the data source. The information in unbound columns + must be provided by the application using the event. + In most cases, unbound columns are read-only, and you don't need to handle this event. + However, if a value is assigned to an unbound cell, either through editing or programmatically, + the grid fires this event to allow the application to store the value using whatever mechanism + is appropriate. + + + + + Raises the event. + + An that contains event data. + + + + Fires after a data-binding operation has finished. + + + + + Raises the event. + + + that contains the event data. + + + + Fires when the value of the property changes. + + + + + Raises the event. + + + that contains the event data. + + + + Fires when the value of the property changes. + + + + + Raises the event. + + + that contains the event data. + + + + Fires before a node row is collapsed or expanded. + + + + + Raises the event. + + A that contains event data. + + + + Fires after a node row is collapsed or expanded. + + + The and events + fire before and after node rows are expanded or collapsed. You can determine + whether the node is being collapsed or expanded by checking the value of the + node's its property. + These events allow you to populate outlines on demand, so you only need + to create the rows that will actually be shown to the user. For example, if + you are using the grid to display a directory tree, it would take a long time + to read each directory on the disk in order to populate the tree. + + + + + Raises the event. + + A that contains event data. + + + + Fires before the grid draws a cell, when the property is set to . + + + The OwnerDrawCell event only fires when the property is + set to . + You can use this event to customize the appearance of any cell in the grid. + The event allows three main types of customization: + + + + + + Change the value of the Text and Image parameters to modify the values displayed + by the grid. You can use this type of customization to replace password strings with asterisks, + for example. + + + + + + Change the Style property to display the cell using a different style than the one + selected by the grid by default. You can use this type of customization to provide conditional + formatting, for example. + + + + + + Use the Graphics and Bounds parameters and draw the cell yourself. When drawing + cells this way, you may call the member to force + the grid to draw specific parts of the cell, while your code draws other parts. For example, + you could paint a custom background and then call DrawCell to have the grid paint the cell + border and contents. + + + + The OwnerDrawCell event also fires when the grid auto sizes rows or columns (see the + and methods). This is done because the + grid needs to measure the cell using the same text, image, and style parameters that are used to + render it. In these cases, the Measuring parameter is set to true and the Bounds + rectangle is empty. + + + + + Raises the event. + + An that contains event data. + + + + Fires while the control is being printed to provide control over page breaks. + + + This event is fired while the control is being printed with the + method to provide control over page breaks. + Set the Cancel parameter to true to indicate that the given Row should + not be printed at the top of a page. In this case, the control will move the break point up + and fire the event again until it finds a valid break point. Note that you can only prevent + page breaks, not force them. + + + + + Raises the event. + + A that contains event data. + + + + Fires before the grid starts printing. + + + + + Raises the event. + + A that contains event data. + + + + Fires after the grid finishes printing. + + + This event is typically used to update the user interface and provide + feedback while printing the grid. + Use the method to print the grid and specify the document + name, common printing options, headers and footers. + Use the property to specify less common printing + options such as header and footer fonts, page margins, orientation, and so on. + + + + + Raises the event. + + A that contains event data. + + + + Fires after the grid finishes printing a page. + + + This event is typically used to provide feedback while printing the grid, + and to offer the user a cancel button that can be used to stop the printing process. + You can also use this event to add custom elements to the printed pages. + Use the method to print the grid and specify the document name, + common printing options, headers and footers. + Use the property to specify less common printing options + such as header and footer fonts, page margins, orientation, and so on. + + + + + Raises the event. + + A that contains event data. + + + + Fires before the grid starts an automatic OLE drag operation. + + + + + Raises the event. + + A that contains event data. + + + + Fires before a new row is added by the user. + + + This event only fires when is set to true and + the user creates a new empty row by moving the cursor into the last row on the grid. + It does not fire when a new row is added to the grid programmatically or when a + row is added to the grid's data source. + You can use this event to cancel the creation of new rows by setting the + Cancel parameter to true. In this case, the cursor does not move into + the new row. + + + + + Raises the event. + + A that contains event data. + + + + Fires after a new row is added by the user. + + + This event only fires when property is set to true + and the user creates a new empty row by moving the cursor into the last row on the + grid. + It does not fire when a new row is added to the grid programmatically or + through the grid's data source. + You can use this event to initialize the new rows. + When a new row is created this way, it is initially empty, and the user may + cancel the row by moving the cursor out of the new row before making any edits. + In this case, the grid fires the event and the new + (empty) row is removed. + + + + + Raises the event. + + A that contains event data. + + + + Fires when the cursor leaves the new row without making any changes to it. + + + For details, see the event. + + + + + Raises the event. + + A that contains event data. + + + + Fires before a row is deleted by the user. + + + This event only fires when is set to true and the + user deletes one or more rows by selecting them and pressing the DEL key. + It does not fire when rows are removed from the grid programmatically or through + the grid's data source. + You can use this event to cancel the deletion of the rows by setting the + Cancel parameter to true. + + + + + Raises the event. + + A that contains event data. + + + + Fires after one or more rows are deleted by the user. + + + This event only fires when property is set to True + and the user deletes one or more rows by pressing the DEL key. It does not fire + when rows are removed from the grid programmatically or through the grid's data source. + When this event fires, the rows have already been removed from the grid, so the + Row parameter is always set to E. + + + + + Raises the event. + + A that contains event data. + + + + Fires when is set to true and the control needs error information for a cell. + + + + + Raises the event. + + A that contains event data. + + + + Fires when is set to true and the control needs error information for a row. + + + + + Raises the event. + + A that contains event data. + + + + Fires before each subtotal row is added to the grid. + + + Subtotal rows are added when the method is invoked. + The event handler may prevent the grid from adding a particular row, or it + may customize the caption, style, and aggregate value used in the new subtotal row. + + + + + Raises the event. + + + that contains the event data. + + + + Fires after each subtotal row has been added to the grid. + + + Subtotal rows are added when the method is invoked. + + + + + Raises the event. + + + that contains the event data. + + + + Fires before the column filters are applied to the grid. + + + + + Raises the event. + + + that contains the event data. + + + + Fires after the column filters have been applied to the grid. + + + + + Raises the event. + + + that contains the event data. + + + + Gets or sets the data in a grid cell. + + + This is one of the indexers you can use to get or set the data stored in grid cells. + You can index cells using the row and column indices or using the row + index and column name. + Using integer indices is more efficient, because the grid doesn't have to + look up the column. Using column names is more flexible, because references + remain valid even if the user moves columns to a new position. + When assigning a value to a cell, the grid tries to convert it into the type + specified for the column (see the property). If the + grid can't convert the value, it fires the event and the + cell retains its original value. + + + The example below creates a column and assigns it a name, then sets the value of + a cell using the column index and retrieves the value using the column name: + + // create a column, assign it a name and get the new index + Column myCol = flex.Cols.Add(); + myCol.Name = "address"; + myCol.DataType = typeof(string); + int colIndex = myCol.Index; + + // assign a value to a cell using cell coordinates: + flex[1, colIndex] = "555, Broadway"; + + // get the value using the column name + string address = (string)flex[1, "address"]; + MessageBox.Show("The address is " + address); + + + + + Gets or sets the data in a grid cell. + + + This is one of the indexers you can use to get or set the data stored in grid cells. + You can index cells using the row and column indices or using the row index and column name. + + + + + Gets a custom associated with a cell. + + Row index. + Column name. + + object associated with the cell, + or null if the cell doesn't have a custom style. + + If the cell doesn't have a custom style, the grid paints it using one of the + built-in styles. The built-in style is selected based on the cell position + and state (fixed, scrollable, highlighted, etc). To retrieve the style that + will be used to paint the cell (custom or built-in) use the method. + + + + + Gets a custom associated with a cell. + + Row index. + Column index. + + object associated with the cell, + or null if the cell doesn't have a custom style. + + If the cell doesn't have a custom style, the grid paints it using one of the + built-in styles. The built-in style is selected based on the cell position + and state (fixed, scrollable, highlighted, etc). To retrieve the style that + will be used to paint the cell (custom or built-in) use the method. + + + + + Assigns a custom to a cell. + + Row index. + Column name. + The to associate with the cell. + + The method is useful if you want to assign a new style + to a single cell. You can also reset the cell style by setting it to null (Nothing, in VB). + To apply a custom cell style to an entire row or column, set the row or column's + properties. + To apply a custom style to a range cells, use a object. + For example: + + CellRange rg = _flex.GetCellRange(3, 3, 10, 10); + rg.Style = _flex.Styles["MyRangeStyle"]; + + + + + + Assigns a custom to a cell. + + Row index. + Column index + The to associate with the cell. + + The method is useful if you want to assign a new style + to a single cell. You can also reset the cell style by setting it to null (Nothing, in VB). + To apply a custom cell style to an entire row or column, set the row or column's + properties. + To apply a custom style to a range cells, use a object. + For example: + + CellRange rg = _flex.GetCellRange(3, 3, 10, 10); + rg.Style = _flex.Styles["MyRangeStyle"]; + + + + + + Assigns a custom to a cell. + + Row index. + Column index + Name of the new style. + + + + Gets the style used to render a cell. + + Row index. + Column index + + object used to display the cell. + + The object returned may be a composite with elements from several + styles. For example, a cell with the focus is painted with a style that contains elements + from the , a custom style associated with the cell, + row, and column (if available), and the style. + + + + + Gets the image displayed in a grid cell. + + Row index. + Column name. + An object previously assigned to the cell using the + method. + + + + Gets the image displayed in a grid cell. + + Row index. + Column index. + An object previously assigned to the cell using the + method. + + + + Sets the image displayed in a grid cell. + + Row index. + Column name. + An object containing an image to display in the cell. + + In addition to the usual cell contents, you can display images in cells. + There are two methods for showing images in cells: + 1. You can use the and methods to + assign images directly to the cells. In this case, the cell contents and the image are + independent. To update the image, you need to call again. + 2. You can use the property to associate images with + specific cell values. In this case, images are updated automatically whenever the cell + contents change. The property allows you to specify whether + the control should display the images in addition to or instead of the cell text. + + + + + Sets the image displayed in a grid cell. + + Row index. + Column index. + An object containing an image to display in the cell. + + In addition to the usual cell contents, you can display images in cells. + There are two methods for showing images in cells: + 1. You can use the and methods to + assign images directly to the cells. In this case, the cell contents and the image are + independent. To update the image, you need to call again. + 2. You can use the property to associate images with + specific cell values. In this case, images are updated automatically whenever the cell + contents change. The property allows you to specify whether + the control should display the images in addition to or instead of the cell text. + + + + + Gets or sets whether the user is allowed to resize rows and columns with the mouse. + + + To resize rows or columns, the mouse must be over the fixed area of the grid, and + close to a border between rows or columns. The mouse pointer will change into a sizing + pointer and the user can drag the row or column to change the row height or column width. + If a group of columns is selected (from first to last row) and the user resizes one + of them, all selected columns are resized. The same applies to rows. + If column sizing is allowed, users may double-click the resizing area to resize a + column so it will automatically fit the longest entry. + Rows with zero height and columns with zero width can't be resized by the user. + If you want to make them very small but still resizable, set their height or width to + one pixel, not to zero. + The and events fire + before resizing starts, and may be used to prevent resizing of specific rows and columns. + The and events fire after + resizing, and may be used to validate the user's action and to update the display. + + + + + Gets or sets whether the user is allowed to freeze rows and columns with the mouse. + + + Frozen cells remain on the screen when the user scrolls the control + (like fixed cells), but they are selectable and editable (like scrollable cells). + They are painted using the style. + To freeze rows or columns at runtime, the mouse must be near the edge of the + frozen area. The mouse pointer will then change into a 'freeze' pointer (looks like + a padlock) and the user can drag the frozen boundary to a new row or column. + + + + + Gets or sets whether the user is allowed to drag rows and columns with the mouse. + + + Row dragging may not work in bound mode. This is because some data sources + do not allow absolute positioning of rows. + ADO.NET DataTable object in particular do not support this. + Column dragging is supported for any data source, and row dragging is always + supported in unbound mode. + You can prevent specific rows and columns from being dragged by setting + their property to false. + + + + + Gets or sets when to highlight selected cells. + + + You can customize the appearance of highlighted cells by modifying the + property. + + + + + Gets or sets the type of focus rectangle to display. + + + If the focus rectangle is drawn, then the current cell is painted using + the style, which by default looks like a regular + scrollable cell (as in most spreadsheets and grids). + If the focus rectangle is hidden (using the setting), + the current cell is painted using the style. + + + + + Gets or sets whether the user is allowed to edit grid contents. + + + If you set to false, editing is disabled for the + entire grid. + To enable editing on some rows and columns, set to true + for the grid and set the or + properties to false for the rows and columns that should not be editable. + You can also disable editing of specific cells by handling the + event and setting the Cancel event parameter to true. + + + + + Gets or sets when to display combo buttons in cells. + + + By default, the grid will show editing buttons in cells only when they + have the focus. This is the same behavior used by the + control. + If you set to , + the grid will display buttons on any cells that have associated lists, even if they + don't have the focus. + For details on how to associate lists with cells, see the , + , and properties. + + + + + Gets or sets whether the grid displays a record selector image on the first fixed column. + + + + The record selector is a small triangle similar to the one used in Access and most data grids. + + + + + + Gets or sets whether the grid should display sorting glyphs (a triangle) on the headers of sorted columns. + + + + + Gets or sets a value that determines the position of the sort glyphs within column header cells. + + + + + Gets or sets whether the grid should display error information in cells and rows. + + + Setting this property to true causes the grid to display error information in cells and + rows. Error information is displayed as error icons in the cells or row headers. Moving the + mouse over the error icons show tooltips containing an error description. + The error information may be supplied directly by data sources that implement the + interface (for example, the DataTable class implements this + interface). + If the grid is bound to a data source that doesn't support , + you can provide error information using the and + events. + + + + + Gets or sets whether the grid should display labels over cells whose contents are partially hidden. + + + + + Gets or sets whether the user is allowed to sort columns using the mouse. + + + When the grid is used in bound mode, the sorting is performed by the + object. If the data source object does not support sorting, + this property has no effect. + In unbound mode, you can also sort data using the method. + + + + + Gets or sets whether the last column should be extended to fill the control. + + + This property only affects painting. It does not modify the + property of the last column. + + + + + Gets or sets the row that contains the cursor. + + + Use the and properties to make a cell current or to find + out which row or column contains the current cell. Columns and rows are + numbered from zero, beginning at the top for rows and at the left for columns. + The property may be set to -1 to hide the selection, to a value + between zero and Rows.Fixed-1 to select a cell in a fixed row, or to a value between + Rows.Fixed and Rows.Count-1 to select a cell in a scrollable row. + Setting the Row and Col properties automatically collapses the selection to a + single cell, resetting the and properties. + To specify a block selection, you must set Row and Col, then RowSel and ColSel. Alternatively, + you can use the method to select an arbitrary range with a single statement. + Setting the Row and Col properties does not ensure that the current cell is visible. + To do that, use the method. + + + + + Gets or sets the column that contains the cursor. + + + Use the and properties to make a cell current or to find + out which row or column contains the current cell. Columns and rows are + numbered from zero, beginning at the top for rows and at the left for columns. + The property may be set to -1 to hide the selection, to a value + between zero and Cols.Fixed-1 to select a cell in a fixed column, or to a value between + Cols.Fixed and Cols.Count-1 to select a cell in a scrollable column. + Setting the Row and Col properties automatically collapses the selection to a + single cell, resetting the and properties. + To specify a block selection, you must set Row and Col, then RowSel and ColSel. Alternatively, + you can use the method to select an arbitrary range with a single statement. + Setting the Row and Col properties does not ensure that the current cell is visible. + To do that, use the method. + + + + + Gets or sets the last row in the current selection. + + + Use the and properties to modify a + selection or to determine which cells are currently selected. Columns and rows are + numbered from zero, beginning at the top for rows and at the left for columns. + Setting the and properties automatically + collapses the selection to a single cell, resetting the RowSel and ColSel properties. + Therefore, to specify a block selection, you must Row and Col, then RowSel and ColSel. + Alternatively, you may use the method to select a range with a + single statement. + If the property is set to , + you should use the property on individual row objects to + select and deselect rows. + When a range is selected, the value of may be greater than or + less than , and may be greater than or less than . + This is inconvenient when you need to set up bounds for loops. In these cases, you can + use the property to retrieve a normalized + object, where r1 <= r2 and c1 <= c2. + See the property for an example. + + + + + Gets or sets the last column in the current selection. + + + Use the and properties to modify a + selection or to determine which cells are currently selected. Columns and rows are + numbered from zero, beginning at the top for rows and at the left for columns. + Setting the and properties automatically + collapses the selection to a single cell, resetting the RowSel and ColSel properties. + Therefore, to specify a block selection, you must Row and Col, then RowSel and ColSel. + Alternatively, you may use the method to select a range with a + single statement. + When a range is selected, the value of may be greater than or + less than , and may be greater than or less than . + This is inconvenient when you need to set up bounds for loops. In these cases, you can + use the property to retrieve a normalized + object, where r1 <= r2 and c1 <= c2. + + + The code below loops though the cells in the current selection: + + CellRange rg = flex.Selection; + for (int r = rg.r1; r <= rg.r2; r++) + for (int c = rg.c1; c <= rg.c2; c++) + Console.WriteLine("the value at {0} {1} is {2}", r, c, flex[r, c]); + + + + + Gets the collection of objects in the grid. + + + The property returns a reference to the list of rows + that make up the grid. With this reference, you can add, remove, move, + and count the rows. For more information on the tasks that can be performed + with this collection, see the object. + This property is read-only. The grid creates and manages the row collection for you. + Upgrade Note: In the VSFlexGrid ActiveX control, the Rows and FixedRows properties + corresponded to the number of rows and fixed rows on the grid. In C1FlexGrid, use Rows.Count + and Rows.Fixed. + + + + + Gets the collection of objects in the grid. + + + The property returns a reference to the list of columns + that make up the grid. With this reference, you can add, remove, move, + and count the columns. For more information on the tasks that can be performed + with this collection, see the object. + This property is read-only. The grid creates and manages the column collection for you. + Upgrade Note: In the VSFlexGrid ActiveX control, the Cols and FixedCols properties + corresponded to the number of columns and fixed columns on the grid. In C1FlexGrid, use + Cols.Count and Cols.Fixed instead. + + + + + Gets or sets the first visible column in the scrollable area. + + + Setting the property causes the grid to scroll horizontally + so that the given column becomes the leftmost visible column. This is often useful when + you want to synchronize two or more grids so that when one of them scrolls, the other + scrolls as well. To scroll vertically, use the property. + When setting this property, the largest possible column number is the total + number of columns minus the number of columns that will fit the display. Attempting + to set to a greater value will cause the grid to set it to the + largest possible value (no error will occur). + The value returned by the and properties + may correspond to partially visible rows or columns. + Use the and properties to scroll using + cells as units. Use the property to scroll the grid using + pixel units. + To ensure that a given cell is visible, use the method. + + + + + Gets or sets the first visible row in the scrollable area. + + + Setting the property causes the grid to scroll vertically + so that the given row becomes the topmost visible row. This is often useful when + you want to synchronize two or more grids so that when one of them scrolls, the other + scrolls as well. To scroll horizontally, use the property. + When setting this property, the largest possible row number is the total + number of rows minus the number of rows that will fit the display. Attempting + to set to a greater value will cause the grid to set it to the + largest possible value (no error will occur). + The value returned by the and properties + may correspond to partially visible rows or columns. + Use the and properties to scroll using + cells as units. Use the property to scroll the grid using + pixel units. + To ensure that a given cell is visible, use the method. + + + + + Gets the last visible column in the scrollable area. + + + The index returned may correspond to a column that is only partially visible. + This property is read-only. To scroll the contents of the grid, see the + , , and properties. + To ensure that a cell is visible, use the method. + + + + + Gets the last visible row in the scrollable area. + + + The index returned may correspond to a row that is only partially visible. + This property is read-only. To scroll the contents of the grid, see the + , , and properties. + To ensure that a cell is visible, use the method. + + + + + Assigns a value to a grid cell. + + Row index. + Column index. + Value to assign to the cell. + Whether the value should be converted to the column's data type. + True if the value was assigned to the cell. + + If is set to true and the value can't be converted into + the proper data type, the grid will fire the event and the + cell will retain its original value. + Using with set to true is equivalent + to setting the grid's indexer. For example, the following lines of code are equivalent: + + flex.SetData(1, 1, "Hello", true); + flex[1, 1] = "Hello"; // same thing + + + + + + Assigns a value to a range of cells. + + + that specifies the cells that will be assigned a new value. + Value that will be assigned to all cells in the range. + Whether the value should be converted to the column's data type. + True if the value was assigned to all cells in the destination range. + + + + Assigns a value to a grid cell, coercing the value into the cell's specified DataType. + + Row index. + Column index. + Value to assign to the cell. + True if the value was assigned to the cell, false if the value could not be + assigned (usually because it could not be converted to the appropriate type). + + + + Assigns a value to a range of cells, coercing the value into each cell's specified DataType. + + + that specifies the cells that will be assigned a new value. + Value that will be assigned to all cells in the range. + True if the value was assigned to all cells in the destination range, false if + the value could not be assigned to all cells in the range (usually because it could not be + converted to the appropriate type). + + + + Assigns a value to a grid cell. + + Row index. + Column name. + Value to assign to the cell. + Whether the value should be converted to the column's data type. + True if the value was assigned to the cell, False otherwise. + + If is set to true and the value can't be converted into + the proper data type, the grid will fire the event and the + cell will retain its original value. + Using with set to true is equivalent + to setting the grid's indexer. For example, the following lines of code are equivalent: + + flex.SetData(1, "ColName", "Hello", true); + flex[1, "ColName"] = "Hello"; // same thing + + + + + + Assigns a value to a grid cell, coercing the value into the cell's specified data type. + + Row index. + Column name. + Value to assign to the cell. + True if the value was assigned to the cell, False otherwise. + + + + Assigns a value to a grid cell, optionally coercing the value into the cell's specified data type. + + Row index. + Column index. + Data to be applied to the cell. + Whether to coerce the value into the cell's specified data type. + True if the value was assigned to the cell, False otherwise. + + + + Gets the value of a grid cell. + + Row index. + Column index. + The value of the cell. + + The method returns the raw data stored in a specific grid cell. + It is equivalent to using the grid's indexer. For example: + + object foo = flex.GetData(1, 1); + object bar = flex[1, 1]; // same thing + + The data displayed on the grid might be different from the raw data, depending on + the setting of the and properties. + To obtain the display value (which is always a string), use the + method instead. + + + + + Gets the value of a grid cell, taking into account the value returned by the method. + + Row index. + Column index. + Whether to take into account the value of the method. + + + + + + Gets the value of a grid cell. + + Row index. + Column name. + The value of the cell. + + + + Gets user data associated with a cell. + + Row index. + Column index. + Object associated with the cell. + + The user data is not used internally by the grid. It is reserved for additional data that you may want to + associate with a cell. + + + + + Gets user data associated with a cell. + + Row index. + Column name. + Object associated with the cell. + + The user data is not used internally by the grid. It is reserved for additional data that you may want to + associate with a cell. + + + + + Assigns user data to a cell. + + Row index. + Column index. + User data to assign to the cell. + + The user data is not used internally by the grid. It is reserved for + additional data that you may want to associate with a cell. + + + + + Assigns user data to a cell. + + Row index. + Column name. + User data to assign to the cell. + + The user data is not used internally by the grid. It is reserved for additional data that you may want to + associate with a cell. + + + + + Gets the value in a grid cell, formatted as a string. + + Row index. + Column index. + A string containing the data displayed in the given grid cell. + + + + Gets the value in a grid cell, formatted as a string. + + Row index. + Column name. + A string containing the data displayed in the given grid cell. + + + + Gets the value in a grid cell, formatted as a string, and the image or checkbox in the cell. + + Row index. + Column index. + Returns the image in the cell. + Returns the checkbox value in the cell. + A string containing the data displayed in the given grid cell. + + This method provides a way to retrieve all the data that is displayed in a cell with a single call. + The image returned in the parameter may be an image assigned to the + cell using the method, a mapped value obtained through an , + or an image stored as cell data (when the cell's is set to Image). + The value returned in the parameter is the value + returned by the method. + + + + + Gets the value in a grid cell, formatted as a string, and the image or checkbox in the cell. + + Row index. + Column name. + Returns the image in the cell. + Returns the checkbox value in the cell. + A string containing the data displayed in the given grid cell. + + This method provides a way to retrieve all the data that is displayed in a cell with a single call. + The image returned in the parameter may be an image assigned to the + cell using the method, a mapped value obtained through an , + or an image stored as cell data (when the cell's is set to Image). + The value returned in the parameter is the value + returned by the method. + + + + + Gets or sets the grid's selection behavior. + + + In most selection modes, you can obtain the current selection using the + property. + When is set to , + however, the selection may consist of a non-continuous range of rows. In this case, + you can check the selection state of individual rows using the + property or obtain a collection of selected rows using the property. + + + + + Selects a range of cells. + + + that specifies the cells that will be selected. + Whether to scroll the new selection into view. + + + + Selects a range of cells and scrolls it into view. + + + that specifies the cells that will be selected. + + + + Selects a range of cells. + + New value for the property. + New value for the property. + New value for the property. + New value for the property. + Whether to scroll the new selection into view. + + Using the method is equivalent to setting the , + , , and properties. + + + + + Selects a range of cells and scrolls it into view. + + New value for the property. + New value for the property. + New value for the property. + New value for the property. + + Using the method is equivalent to setting the , + , , and properties. + + + + + Selects a cell. + + New value for the property. + New value for the property. + Whether to scroll the new selection into view. + + Using the method is equivalent to setting the and properties. + + + + + Selects a cell and scrolls it into view. + + New value for the property. + New value for the property. + + Using the method is equivalent to setting the and properties. + + + + + Sorts the grid contents based on a column. + + + value that specifies the sort direction and options. + Column to sort on. + + Sorting works differently depending on whether the grid is bound to a data source or not. + In bound mode, the grid passes the sort request to the underlying data source object. In this case, + the sort settings remain in effect as the grid data changes. Editing values in the sort column will cause + the data source to re-sort the data, and grid will show the changes automatically. This is equivalent to + setting the property on a object for example. + In unbound mode, the Sort method sorts the data that is currently stored in the grid. Changing + the data after it has been sorted will not automatically update the sort. + When the grid is bound to a new data source, it inherits the sort settings currently applied to the + new data source object. Because of this, calling Sort immediately before setting the + property has no effect on the grid. + In unbound mode, the grid uses a stable sorting algorithm. This means that the sorting keeps the + relative order of records when the sorting key is the same. For example, if you sort a list of files by + name, then by extension, the list will still be sorted by name within each extension group. + The grid recognizes two types of row: regular rows which contain data, and node rows which are used + to group data. The Sort method only sorts regular rows; it does not affect node rows at all. + To sort nodes, use the method in the property or the + method in the class. + + + + + Sorts the grid contents based on a column range. + + + value that specifies the sort direction and options. + First column in the range. + Last column in the range. + + When you sort multiple columns, the same sorting options are applied to each column, + starting from the leftmost column in the range and proceeding to the right. + To sort multiple columns using a different sorting order for each, you can either + call the method multiple times or set each column's + property and call the method including the + flag in the parameter. + + + + + Sorts a range of cells in the grid. + + + value that specifies the sort direction and options. + + object that specifies the range of cells to sort. + + When you sort multiple columns, the same sorting options are applied to each column, + starting from the leftmost column in the range and proceeding to the right. + To sort multiple columns using a different sorting order for each, you can either + call the method multiple times or set each column's + property and call the method including the + flag in the flags parameter. + + + + + Sorts a group of rows using the specified comparer. + + First row in the sort range. + Number of rows in the sort range. + An object that compares objects. + + The interface has a single method called that + takes two objects as arguments (in this case, they will be objects) and + returns -1, 0, or +1. For more details, see the documentation for . + Custom sorting can only be used when the grid is in unbound mode. + + + + + Sorts the grid using the specified comparer. + + An object that compares objects. + + The interface has a single method called that + takes two objects as arguments (in this case, they will be objects) and + returns -1, 0, or +1. For more details, see the documentation for . + Custom sorting can only be used when the grid is in unbound mode. + + + + + Shows the sorting glyph on a column header. + + + value that specifies the glyph to display. + Column index. + + This method is useful if you want to perform custom sorting and need control over the appearance + and position of the sorting glyph (the little triangle that appears on the header of sorted columns). + + + + + Gets the selected range in normalized form. + + + The range returned corresponds to the current selection, defined by the , , + , and properties. + The range is normalized, so range.r1 <= range.r2 and range.c1 <= range.c2. This makes + it easy to loop through the selection. For example: + + int total = 0; + CellRange rg = flex.Selection; + for (int r = rg.r1; r <= rg.r2; r++) + for (int c = rg.c1; c <= rg.c2; c++) + total += (int)flex[r,c]; + Console.WriteLine("The total is: {0}", total); + + + + + Gets a object that contains the cell at coordinates , . + + + To get a object that spans the entire selection, use the property. + + + + + Scrolls a cell into view. + + Row index. + Column index. + + This method does not affect the current selection. To move the cursor to a specific cell + and optionally bring it into view, use the method. + + + + + Invalidates the control. + + + + + Invalidates a cell, causing it to be repainted. + + Row index. + Column index. + + This method is rarely used by the programmer, since the grid automatically performs invalidation as needed. + + + + + Invalidates a cell range, causing it to be repainted. + + Top row in the range. + Left column in the range. + Bottom row in the range. + Right column in the range. + + + + Invalidates a cell range, causing it to be repainted. + + + that will be invalidated. + + This method is rarely used by the programmer, since the grid automatically + performs invalidation as needed. + + + + + Gets the collection of cell styles defined in the grid. + + + The property enables you to obtain a reference to the list of + styles that are currently defined in the grid. With this reference, you can add, remove, + and count the styles. For more information on the tasks that can be performed with this + collection, see the class reference topics. For information + on cell formatting, see the reference topics. + This property is read-only. The grid creates and manages the collection for you. + Upgrade Note: The VSFlexGrid ActiveX control had many properties that affected the way + the grid was displayed (e.g. BackColor, BackColorAlternate, BackColorBkg, BackColorFixed, + BackColorFrozen, BackColorSel, and so on). The C1FlexGrid control replaces all these + properties with a collection of objects. This makes the object + model simpler, more consistent, and more powerful. You can change the built-in styles or + define your own, and assign them to rows, columns, or arbitrary cell ranges. + + + + + Gets or sets whether the grid should move the cursor searching for entries as the user types. + + + If is on, the grid will search the current column as the user + types, automatically moving the cursor and highlighting matches using the style. + The search is case-insensitive. The search is canceled when the user presses the ESC key or + moves the selection with the mouse or cursor keys. + When the user stops typing for about a second, the search buffer is reset. This amount of + time can be changed by setting the property. + If is on and is set to true, the user + will need to hit ENTER, or F2 to start editing cells. Other keys are used for searching. + + + + + Gets or sets the delay (in seconds) before the buffer is reset. + + + See the property for details. + + + + + Gets or sets the action to be performed when the user presses the ENTER key. + + + By default, the grid will move the selection down to the next visible row when the + user presses the ENTER key. If the grid is editable, pressing ENTER will cause the grid + to enter edit mode, and pressing ENTER while in edit mode will cause the cursor to move down. + This property allows you to modify this behavior and disable cell navigation with the + ENTER key, or cause it to move the selection to the next column instead of row. + Note that the and as + settings have the same effect when applied to this property. Pressing the ENTER key will + move the selection within the grid, but will not move the focus to the next control on the form. + + + + + Gets or sets the action to be performed when the user presses the TAB key. + + + By default, the grid will ignore the TAB key and it will be handled by the form, moving the focus to + the next control in the tab order. If you set the property to a value + other than , the grid will trap the TAB key and use it for navigating cells. + + + + + Gets or sets the image to be used in cell buttons. + + + This property allows you to customize the appearance of cell buttons. For details on how to + create and handle cell buttons, see the event. + If you want to use a single picture for all cell buttons on the grid, assign the picture to the + property at design time. To change pictures depending on the row, column, or cell + being edited, set the picture in response to the event. + The pictures used for cell buttons should fit within the button (larger pictures are truncated). + They should also be transparent, so the button face can be seen through the empty parts of the picture. + For best results, use small icons (16 x 16 pixels) and draw the picture in the upper left 12 x 12 + rectangle within the icon. + + + + + Gets the index of the row under the cursor. + + + The and properties are often useful when + handling the event, to provide custom mouse handling. + They are also useful when handling mouse events that do not change the selection and for + detecting clicks on the fixed areas of the grid. + Typical uses for these properties include displaying help information or tooltips when + the user moves the mouse over a selection, and the implementation of manual drag-and-drop + manipulation of OLE objects. + + and return -1 if the mouse is not over + any rows or columns. + To obtain more detailed hit-testing information, use the method. + + + + + Gets the index of the column under the cursor. + + + The and properties are often useful when + handling the event, to provide custom mouse handling. + They are also useful when handling mouse events that do not change the selection and for + detecting clicks on the fixed areas of the grid. + Typical uses for these properties include displaying help information or tooltips when + the user moves the mouse over a selection, and the implementation of manual drag-and-drop + manipulation of OLE objects. + + and return -1 if the mouse is not over + any rows or columns. + To obtain more detailed hit-testing information, use the method. + + + + + Returns information about the control at a specified point on the control surface. + + The horizontal position of the client coordinate. + The vertical position of the client coordinate. + A object that contains information about the point. + + This method is especially useful when handling the event. + It allows you to determine whether the mouse is over a specific cell, grid buttons, + resizing elements, etc. + + + The code below shows hit test information whenever the user clicks the mouse: + + void _flex_BeforeMouseDown(object sender, BeforeMouseDownEventArgs e) + { + HitTestInfo hti = _flex.HitTest(e.X, e.Y); + Console.WriteLine("at {0},{1}: row {2} col {3} type {4}", + hti.X, hti.Y, hti.Row, hti.Column, hti.Type); + } + + + + + Returns information about the control at a specified point on the control surface. + + + in client coordinates. + A object that contains information about the point. + + This method is especially useful when handling the event. + It allows you to determine whether the mouse is over a specific cell, grid buttons, + resizing elements, etc. + + + + + Returns information about the control at the current mouse position. + + A object that contains information about the point. + + + + Gets a object with the coordinates of the cell within the control. + + Row index. + Column index. + Whether to scroll the cell into view before calculating the rectangle. + A object with the coordinates of the cell, in pixels and + relative to the control's client area. + + This property is useful if you need to implement custom editors or other elements that need + to be positioned over cells. + + + + + Gets a object with the coordinates of the cell within the control. + + Row index. + Column index. + + This property is useful if you need to implement custom editors or other elements that need + to be positioned over cells. + This method does not ensure the cell is visible. + + + + + Finds a row that contains a specified string. + + String to look for. + Index of the row where the search should start. + Column that contains the data to be searched. + Whether the search should be case-sensitive. + Whether a full match is required. If this parameter is set to false, searching for "John" may return a row that contains "Johnson". + Whether the search should stop at the bottom of the grid or wrap around and restart from the first scrollable row. + The index of the row that contains the string, or -1 if the string is not found. + + To allow users to search for data as they type, use the property. + + + + + Finds a row that contains a specified value in a given column. + + Object to look for. + Index of the row where the search should start. + Column to be searched. + Whether the search should stop at the bottom of the grid or wrap around and restart from the first scrollable row. + The index of the row that contains the data, or -1 if the object is not found. + + + + Finds a row that contains a specified value in a given column using a RegularExpression. + + The regular expression pattern to match. + Index of the row where the search should start. + Column that contains the data to be searched. + Whether the search should stop at the bottom of the grid or wrap around and restart from the first scrollable row. + The index of the row that matches the pattern, or -1 if no matches were found. + + The parameter specifies a regular expression pattern + expressed in the usual syntax. + The regular expression syntax supports character classes, ranges, repeat counts, + alternate matches, and more. Please refer to the .NET documentation for details and examples. + + + + + Gets or sets whether the grid should paint its contents. + + + This property is deprecated. Use the and + methods instead. + + + + + Maintains performance by preventing the control from updating itself until + the method is called. + + + The and methods are used to + optimize the performance of the grid. Call before making + extensive changes, and call when done to suspend repainting. + This will reduce flicker and increase performance. This optimization is especially + effective when adding large numbers of rows to the grid, because it needs to + recalculate ranges and update scrollbars each time a row is added. + + + The code below shows how to add a large number of rows to the grid efficiently. + Note how the method is called inside a 'finally' block + to ensure repainting is properly restored. + + void UpdateGrid(C1FlexGrid flex) + { + try + { + flex.BeginUpdate(); // suspend painting to avoid flicker + flex.Rows.Count = 1; + for (int i = 1; i < 10000; i++) + flex.AddItem("Row " + i.ToString()); + } + finally + { + flex.EndUpdate(); // always restore painting + } + } + + + + + Resumes updating the control after calls to the method. + + + + + Gets or sets whether the control should fire the event. + + + If you set this property to , the grid will + fire the event whenever a cell needs to be painted. + You can handle the event and customize the way each cell is painted, either by changing + the cell contents and style, or by taking over the painting and doing it yourself. + For more details and examples, see the event. + + + + + Gets or sets whether the control should use an off-screen buffer when painting to reduce flicker. + + + This property is set to true by default, and rarely needs to be changed. + Setting to false may increase performance of applications + running under terminal server software. + + + + + Gets or sets the characters used as row and column separators in clip strings. + + For details and an example, see the property. + + + + Gets or sets the contents of the selected range. + + + The string assigned to (or returned by) the property may contain + multiple cells. By default, tab characters (\t) indicate column breaks, and carriage return + characters (\n) indicate row breaks. + The default row and column delimiters may be changed using the property. + When a string is assigned to the property, only the selected + cells are affected. If there are more cells in the selected region than are described in the + clip string, the remaining cells are ignored. If there are more cells described in the clip + string than in the selected region, the extra portion of the clip string is ignored. Empty + entries in the string will clear existing cell contents. + To get or set a clip string for an arbitrary range, use a object. + The value returned is affected by the setting of the + property. + + + The code below puts text into a selected area two rows high and two columns wide. + + // build clip string + string s = "r1 c1\tr1 c2\nr2 c1\tr2 c2"; + + // select a 2 x 2 range and apply clip string to selection + flex.Select(2, 2, 4, 4); + flex.Clip = s; + + + + + Clears a range. + + + value that specifies the elements to clear. + Range to clear. + + + + Clears a range. + + + value that specifies the elements to clear. + Top row in the range. + Left column in the range. + Bottom row in the range. + Right column in the range. + + + + Clears a cell. + + + value that specifies the elements to clear. + Row index. + Column index. + + + + Clears the grid. + + + value that specifies the elements to clear. + + The method does not affect the number of rows and columns on the grid, + and can't be used to clear data when the grid is bound to a data source. + + + + + Clears the grid. + + + This method removes all data, styles, and user data from all cells, rows, and columns on the grid. + The method does not affect the number of rows and columns on the grid, + and can't be used to clear data when the grid is bound to a data source. + + + + + Gets a object that can be used to format and manipulate a cell. + + Row index. + Column index. + A object that can be used to format and manipulate the cell. + + + + Gets a object that can be used to format and manipulate a range. + + Top row in the range. + Left column in the range. + Bottom row in the range. + Right column in the range. + A object that can be used to format and manipulate the range. + + The object provides access to properties of the cells in the range. + For example, the code below sets the style of a range: + + CellRange rg = flex.GetCellRange(5, 5, 20, 8); + rg.Style = flex.Styles["MyStyle"]; + + Note: is a class, not a struct. Because of this, you have to + assign the value to a variable and then use the variable. For example, the following code + will not compile: + + // this does not compile + flex.GetCellRange(5, 5, 20, 8).Style = flex.Styles["MyStyle"]; + + + + + + Creates an image of the entire grid. + + An object containing a metafile image of the grid. + + Use this method to copy grid images to the clipboard so you can paste them into + documents or other applications. + + + The code below creates an image of a grid range and saves it to a PNG file that can be + included in other documents such as web pages: + + Image img = flex.CreateImage(0,0,10,5); + img.Save(@"c:\temp\grid.png", System.Drawing.Imaging.ImageFormat.Png); + + + + + Creates an image of a portion of the grid. + + Top row in the range. + Left column in the range. + Bottom row in the range. + Right column in the range. + An object containing a metafile image of the grid. + + The image returned includes any fixed and frozen cells in addition to the specified range. + + + + + Creates an image of a portion of the grid. + + + that specifies which cells should be included in the image. + An object containing a metafile image of the grid. + + The image returned includes any fixed and frozen cells in addition to the specified range. + + + + + Creates an image of a portion of the grid. + + Top row in the range. + Left column in the range. + Bottom row in the range. + Right column in the range. + + value that determines the type of metafile to create. + An object containing a metafile image of the grid. + + The image returned includes any fixed and frozen cells in addition to the specified range. + + + + + Creates an image of a portion of the grid. + + + that specifies which cells should be included in the image. + + value that determines the type of metafile to create. + An object containing a metafile image of the grid. + + The image returned includes any fixed and frozen cells in addition to the specified range. + + + + + Draws a grid cell. + + + object where the cell will be drawn. + Index of the cell's row. + Index of the cell's column. + + that defines the cell position. + + This method is for internal use. It allows inherited classes to customize the grid appearance. + + + + + Gets or sets a reference to the cell editor that is currently active. + + + The property returns a reference to the cell editor that is + currently active. This may be one of the built-in editors (a TextBox, a ComboBox, or a + DateTimePicker control), a custom editor, or null (if the grid is not in edit mode). + You can use this property to programmatically access the editor, or to find out + if the grid is in edit mode. + If you don't want to use the grid's built-in editors, you can use any other control + instead. To do this, either associate the external editor with a specific grid row, column, + or using the property, which you can + get and set at any time. + Alternatively, you can handle the event and assign any control + directly to the property. (Note that the grid's Editor property can only + be assigned while handling the event, and is automatically reset to + null when the grid exits edit mode.) + Any control can be used as an external editor, but to achieve complete integration with + the grid, the external editor should implement the IC1EmbeddedEditor interface. Some controls + implement this interface natively and don't require any extra code to be used as grid editors + (like the ones in the C1Input library). Most, however, will require you to implement at least + a few of the methods in IC1EmbeddedEditor. + For examples of custom editors, please see Using Custom Editors and Creating Custom Editors + in this documentation, or visit our on-line sample library at https://www.grapecity.com/en/samples + and download the "CustomEditors" sample. + + + The code below uses the event to customize the current editor + by setting two properties. + + void _flex_SetupEditor(object sender, C1.Win.C1FlexGrid.RowColEventArgs e) + { + TextBox tb = _flex.Editor as TextBox; + if (tb != null) + { + tb.CharacterCasing = CharacterCasing.Upper; + tb.MaxLength = 12; + } + } + + + + + If True then empty strings from editor are interpreted as null values. + + + + + Gets or sets the list of items to be used by the drop-down editor. + + + The property specifies the type of editor to be used when + editing a cell. You may use a text box, drop-down list, drop-down combo, or an edit button + to pop up custom editor forms. + To use the property, set the property + to true and respond to the event by setting the + property to a string that describes the type of editing you want to use for that cell. + The options are described below: + 1. To edit the cell using a regular text box, set the property to an empty string. + For example: + flex.ComboList = string.Empty; + 2. To edit the cell using a drop-down list, set the property to a string containing the + available options, separated by pipe characters. For example: + flex.ComboList = "Item 1|Item 2|Item 3"; + 3. To edit the cell using a drop-down combo, set the property to a string containing the + available options, separated by pipe characters ("|") and starting with a pipe character. For example: + flex.ComboList = "|Item 1|Item 2|Item 3"; + 4. To display an edit button, set the property to a string containing an ellipsis ("..."). + Edit buttons look like regular push buttons, aligned to the right of the cell, with an ellipsis as a caption. + When the user clicks on the edit button, the grid fires the CellButtonClick event. In this case, the user can't + edit the cell contents directly. For example: + flex.ComboList = "..."; + 5. To display an edit button next to an editable cell, set the property to a string + containing a pipe and an ellipsis ("|..."). In this case, you get a regular edit button but the user can also edit the + cell contents directly. For example: + flex.ComboList = "|..."; + The property is especially useful in cases where different rows in + the same column may contain different types of data (for example a control such as the PropertyGrid). + In this case, the property allows you to adjust the type of editing you + want to provide depending on the current row. + If all rows in the column contain the same type of data, use the Column's + property instead. This way, the grid will automatically select the list depending on the column + being edited and you don't need to handle any events. + Note that the ComboList allows you to specify lists of strings only. Cells will store and display + these strings. If you want to store a certain type of data and display values associated with that data, see + the property. The DataMap property allows you to store values in the cells + (for example a CustomerID) and display strings associated with that data (for example the customer name). + + + The code below handles the event and assigns a value to the + property so that the grid displays buttons on every other row. + + void _flex_BeforeEdit(object sender, RowColEventArgs e) + { + _flex.ComboList = string.Empty; + if (e.Row % 2 == 0) _flex.ComboList = "..."; + } + + + + + Gets or sets the input mask to use when editing cells. + + + The specifies an input mask for automatic input formatting and + validation. The mask syntax is similar to the one used by the Microsoft MaskedEdit ActiveX + control and by Microsoft Access and is described below. + Set the property in response to the event, + in the same way you would set the property. + If the same mask is used to edit all values in a column, use the column's + property. This simplifies your code because you don't need to handle the event. + When the user is done editing a cell with a mask, the event fires. + The event parameter will be set to true if the mask was not filled + out properly, so in most cases you don't have to implement the handler. The default behavior ensures that + only valid data will be entered. + The string is composed of the following symbols: + + + 1) Wildcards + 0 digit + 9 digit or space + # digit, space, or sign + L letter + ? letter or space + A letter or digit + a letter, digit, or space + & any character + + + 2) Localized characters + . localized decimal separator + , localized thousand separator + : localized time separator + / localized date separator + + + 3) Command characters + \ next character is taken as a literal + > translate letters to uppercase + < translate letters to lowercase + + + 4) Placeholder specification + ; next character is used as a placeholder (the default is an underscore) + + + The code below sets the edit mask so the user can enter a phone number, with optional + area code, and a state in uppercase letters. The space-holder used is an asterisk ("*"). + + flex.EditMask = "(###) 000-0000 St\ate\: >LL;*"; + + + + + Puts the grid in edit mode and starts editing a cell. + + Row index. + Column index. + Initial character to be sent to the editor. + True if the grid entered edit mode successfully, false otherwise. + + + + Puts the grid in edit mode and starts editing a cell. + + Row index. + Column index. + True if the grid entered edit mode successfully, false otherwise. + + + + Puts the grid in edit mode and starts editing the current cell. + + True if the grid entered edit mode successfully, false otherwise. + + If the property is set to true, the control goes into + edit mode automatically when the user presses the edit key (F2), the space bar, or + any printable character. You may use the method to force + the control into cell-editing mode. + The method forces the control into editing mode even + if is set to False. You may also use it to allow editing of + fixed cells. + + + The code below uses the method to keep the grid in edit mode + while the user moves the selection (like the .NET DataGrid control): + + void _flex_RowColChange(object sender, System.EventArgs e) + { + _flex.StartEditing(); + } + + + + + Finishes editing the current cell and takes the grid out of edit mode. + + True if the grid left edit mode successfully, false otherwise. + + + + Finishes editing the current cell and takes the grid out of edit mode, + optionally canceling the edits. + + Whether to cancel the current edits and revert the cell to its original value. + True if the grid left edit mode successfully, false otherwise. + + If the cancel parameter is set to false, the grid tries to apply the edits, + and fires the , , and events as usual. + If validation fails, the grid stays in edit mode (and returns false). + If the cancel parameter is set to true, the original cell value is restored and the + grid is guaranteed to leave the edit mode. In this case, only the event fires. + To determine whether the grid is in edit mode, check whether the property is null. + + + + + Starts editing a cell in response to a key press. + + + This method is for internal use. It allows inherited classes to customize the editing process. + + Row index. + Column index. + Key that initiated the edit process. + Whether editing should start even in non-editable cells (e.g. fixed cells). + True if the editing process was started successfully, false otherwise. + + + + Starts editing a cell in response to a mouse action. + + + This method is for internal use. It allows inherited classes to customize the editing process. + + Row index. + Column index. + Mouse position in client coordinates. + Whether the action was a double-click. + True if the editing process was started successfully, false otherwise. + + + + Gets a reference to the object that controls the appearance + of the outline tree in the grid. + + + The can group data hierarchically and display it with a + collapsible tree similar to the one in the Microsoft TreeView control. + The object is used to specify the position and appearance + of the outline tree. + For details on create outlines, see the method and + the property. + + + + + Gets an array containing all zero-level + rows on the grid. + + + + + Gets or sets the specific list in a object that the grid should display. + + + If a contains multiple sources of data, you should set the + property to one of the sources. + For example, if the DataSource is a contains three tables named Customers, + Orders, and OrderDetails, you must specify one of the tables to bind to. + If the contains only one , you may set the + DataMember property to an empty string. + You can use the method to set the + and properties at the same time. + + + + + Gets or sets the data source for the grid. + + + Any object that implements the or + interfaces can be used as a data source. + Specifically, the following ADO.NET data sources are valid: DataTable, DataView, + DataSet, and DataViewManager. + The following ComponentOne DataObjects components are also valid data sources: + C1ExpressTable, C1ExpressVew, C1ExpressConnection, C1DataView, C1DataTableSource, and C1DataSet. + If the reference contains more than one table, you must + also set the property a string that specifies the table to bind to. + For example, if the DataSource is a DataSet or DataViewManager that contains three tables named + Customers, Orders, and OrderDetails, you must specify one of the tables to bind to. + You can use the method to set the + and properties simultaneously. + You can also assign another object to the + property. In this case, the controls will share the same grid model, including the data, display styles, + selection, etc. This can be used to implement split views, where different controls display different + parts of the same data. + + + + + Sets the and properties. + + The new data source object. + The table to bind to within the data source object. + + + + Sets the and properties, + optionally keeping the current column layout. + + The new data source object. + The table to bind to within the data source object. + Whether the current column layout should be preserved or re-generated + automatically based on the data source schema. + + + + Gets or sets whether column widths are automatically adjusted when data is loaded. + + + This property works when the control is bound to a . + If is set to true, the control automatically resizes its + columns to fit the widest entry every time new data is read from the data source. + If the data source contains a large number of rows and columns, the automatic + resizing may take a relatively long time. In these cases, you should consider setting + to false and setting the column widths directly in code. + You may also use the method to adjust the column widths + automatically. + + + + + Gets or sets whether columns are automatically created when the grid is bound to a data source. + + + By default, assigning a new to the grid resets the column collection + to reflect the data source schema. If you set to false, the + existing column layout will be preserved. + + + + + Calculates aggregate statistics for a range. + + + value that specifies the type of aggregate to calculate. + + object that contains the values to be aggregated. + + value that specifies aggregation options. + A that represents the aggregate value. + + + + Calculates aggregate statistics for a range. + + + value that specifies the type of aggregate to calculate. + Top row in the range. + Left column in the range. + Bottom row in the range. + Right column in the range. + + value that specifies aggregation options. + A that represents the aggregate value. + + + + Calculates aggregate statistics for the current selection. + + + value that specifies the type of aggregate to calculate. + + value that specifies aggregation options. + A that represents the aggregate value. + + + + Calculates aggregate statistics for the current selection. + + + value that specifies the type of aggregate to calculate. + A that represents the aggregate value. + + The code below method to calculate aggregate statistics + for the current selection. Whenever the selection changes, new aggregates are + calculated and written to the console. + + void flex_SelChange(object sender, System.EventArgs e) + { + string fmt = "Count {0:0}, Sum {1:#,##0.00}, " + + "Avg {2:#,##0.00}, Stdev {3:#,##0.00}"; + Console.WriteLine(fmt, + flex.Aggregate(AggregateEnum.Count), + flex.Aggregate(AggregateEnum.Sum), + flex.Aggregate(AggregateEnum.Average), + flex.Aggregate(AggregateEnum.Std)); + } + + + + + Calculates aggregate statistics for a range. + + + value that specifies the type of aggregate to calculate. + + object that contains the values to be aggregated. + A that represents the aggregate value. + + + + Calculates aggregate statistics for a range. + + + value that specifies the type of aggregate to calculate. + Top row in the range. + Left column in the range. + Bottom row in the range. + Right column in the range. + A that represents the aggregate value. + + + + Groups rows based on cell contents and calculates aggregate values. + + + value that specifies the type of aggregate to calculate. + Outline level to assign to the new subtotal rows. This parameter allows the creation of multi-level subtotals and affects the display of the outline tree. + First column in the range used to detect group breaks. + Last column in the range used to detect group breaks. + Column that contains values to be aggregated (usually numeric). + Text to insert in the subtotal rows. + + The method inserts rows containing aggregate values. These new rows are set + to behave as tree nodes so they can be collapsed and expanded to display a dynamic hierarchical + outline. + You can control the appearance and behavior of the outline tree using the property. + The node rows added by the method have their property + automatically set to one of the Styles.Subtotal* styles. You can use the + collection to modify the appearance of all subtotal rows on the grid. + To create an outline tree manually, insert node rows using the method, + or convert regular rows into nodes by setting the property to true for the + node rows. Then use the property to set the outline level for the new + nodes. + + + The code below assumes a grid with four columns: "Product", "Region", "Employee", and "Sales". + The code groups on the first two columns, calculating total sales for each product and for + each region within each product. + If the user drags a column to a new position, the tree is automatically rebuilt to show + the new grouping (by Employee, Region, etc). + + void UpdateTotals() + { + // no repainting until we're done + _flex.Redraw = false; + + // clear old subtotals, if any + _flex.Subtotal(AggregateEnum.Clear); + + // sort the grid on the columns that will be grouped + _flex.Sort(SortFlags.Ascending, 0, 3); + + // show outline tree on column 0 + _flex.Tree.Column = 0; + + // get a grand total (use -1 instead of column index) + _flex.Subtotal(AggregateEnum.Sum, -1, -1, 3, "Grand Total"); + + // total on column 0 (initially Product) + _flex.Subtotal(AggregateEnum.Sum, 0, 0, 3); + + // total on column 1 (initially Region) + _flex.Subtotal(AggregateEnum.Sum, 1, 1, 3); + + // show outline level 1 + _flex.Tree.Show(1); + + // restore painting + _flex.Redraw = true; + } + void _flex_AfterDragColumn(object sender, C1.Win.C1FlexGrid.DragRowColEventArgs e) + { + UpdateTotals(); // user moved a column, update totals + } + + + + + + Groups rows based on cell contents and calculates aggregate values. + + + value that specifies the type of aggregate to calculate. + Outline level to assign to the new subtotal rows. This parameter allows the creation of multi-level subtotals and affects the display of the outline tree. + Column used to detect group breaks. + Column that contains values to be aggregated (usually numeric). + Text to insert in the subtotal rows. + + + + Groups rows based on cell contents and calculates aggregate values. + + + value that specifies the type of aggregate to calculate. + Outline level to assign to the new subtotal rows. This parameter allows the creation of multi-level subtotals and affects the display of the outline tree. + Column used to detect group breaks. + Column that contains values to be aggregated (usually numeric). + + + + Groups rows based on cell contents and calculates aggregate values. + + + value that specifies the type of aggregate to calculate. + + This version of the method does not take any column parameters, + and is useful only for clearing the subtotals. For example: + + flex.Subtotal(AggregateEnum.Clear); // clear all subtotals + + + + + Groups rows based on cell contents and calculates aggregate values. + + + value that specifies the type of aggregate to calculate. + Outline level to assign to the new subtotal rows. This parameter allows the creation of multi-level subtotals and affects the display of the outline tree. + Name of the first column in the range used to detect group breaks. + Name of the last column in the range used to detect group breaks. + Name of the column that contains values to be aggregated (usually numeric). + Text to insert in the subtotal rows. + + This is a variant of the method + that takes column names instead of indices. + + + + + Groups rows based on cell contents and calculates aggregate values. + + + value that specifies the type of aggregate to calculate. + Outline level to assign to the new subtotal rows. This parameter allows the creation of multi-level subtotals and affects the display of the outline tree. + Name column used to detect group breaks. + Name of the column that contains values to be aggregated (usually numeric). + Text to insert in the subtotal rows. + + This is a variant of the method + that takes column names instead of indices. + + + + + Groups rows based on cell contents and calculates aggregate values. + + + value that specifies the type of aggregate to calculate. + Outline level to assign to the new subtotal rows. This parameter allows the creation of multi-level subtotals and affects the display of the outline tree. + Name column used to detect group breaks. + Name of the column that contains values to be aggregated (usually numeric). + + This is a variant of the method + that takes column names instead of indices. + + + + + Gets or sets whether node rows appear above or below the data. + + + This property determines how the outline tree is drawn, and it also determines + whether the method should add subtotal rows (which are node rows) + above or below the data being summarized. + Changing this property clears any existing nodes. + + + + + Adds a row to the grid and populates the new row with data. + + String containing the data for the new row. Items are separated by tab characters + by default. You can change the separator character using the property. + A reference to the new row. + + You can also add and remove rows using the collection. The + method provides a concise syntax for creating the row, populating it with data, and then adding it to the grid. + Before using to add a large number of rows to the grid, remember to set the + property to false. When finished adding the rows, set back to + its original value. This will significantly improve performance. + + + The code below adds 300 rows to the grid. + + // suspend painting to improve performance + bool redraw = flex.Redraw; + flex.Redraw = false; + + // append 100 rows, using tabs as separators + flex.ClipSeparators = "\t\n"; + for (int i = 0; i < 100; i++) + flex.AddItem("\tcol1\tcol2\tcol3"); + + // add 100 rows at the top, using pipes as separators + flex.ClipSeparators = "|;"; + for (int i = 0; i < 100; i++) + flex.AddItem("|col1|col2|col3", 0); + + // append 100 rows at the bottom, using an object array + object[] items = { "col1", "col2", "col3" }; + for (int i = 0; i < 100; i++) + flex.AddItem(items, flex.Rows.Count, flex.Cols.Fixed); + + // restore painting + flex.Redraw = redraw; + + + + + Adds a row to the grid and populates the new row with data. + + Array of objects that will be assigned to the new row. + A reference to the new row. + + + + Adds a row to the grid at a specified position and populates the new row with data. + + String containing the data for the new row. Items are separated by tab characters + by default. You can change the separator character using the property. + Position where the new row will be inserted. + A reference to the new row. + + + + Adds a row to the grid at a specified position and populates the new row with data. + + Array of objects that will be assigned to the new row. + Position where the new row will be inserted. + First column to populate with the items in the + array. This parameter is usually set to the index of the first scrollable column. + A reference to the new row. + + + + Removes the last row from the grid. + + + You can also add and remove rows using the collection. + The method is provided for consistency, since the grid + also has an method. + + + + + Removes a row at a specified position from the grid. + + Index of the row to be removed. + + + + Prints the grid, optionally showing a page setup or print preview dialog. + + The document name, which appears on the progress dialogs and on the print job windows. + Flags that select printing options. + True if the grid was printed, false if the user canceled the operation before printing started. + + Use the property to set up options such as page orientation + and margins, header and footer fonts, etc. + The method returns true if the user started the printing process. If the user clicks cancel while + the grid is printing, the method returns true (some pages may be printed anyway depending on the + printer settings). To detect canceled jobs, handle the event and check the + value of the e.Cancel parameter. + + + + + Prints the grid, optionally showing a page setup or print preview dialog. + + The document name, which appears on the progress dialogs and on the print job windows. + Flags that select printing options. + String that appears on the top of every page. + String that appears on the bottom of every page. + True if the grid was printed, false if the user canceled the operation. + + The header and footer strings may contain up to three tab-delimited sections, which are + aligned to the left, center, and right of the page. The strings may also contain placeholders + that are replaced with the current page number and total number of pages ("{0}" and "{1}"). + Use the property to set up options such as page orientation + and margins, header and footer fonts, etc. + + + + + Prints the grid, optionally showing a page setup or print preview dialog. + + The document name, which appears on the progress dialogs and on the print job windows. + True if the grid was printed, false if the user canceled the operation. + + Use the property to set up options such as page orientation + and margins, header and footer fonts, etc. + + + + + Gets a object that specifies printing parameters for the grid. + + + Use the method to print the grid and specify the document name, + common printing options, headers and footers. + Use the property to specify less common printing options + such as header and footer fonts, page margins, and page orientation. + + + + + Gets or sets a value that determines if the control can accept data that the user drags onto it. + + + This property allows you to use the control as a target for OLE drag-drop operations. + If set to (the default value), the control does not act as a drop target. + If set to , the control fires the standard drag-drop events + and the programmer is responsible for handling them. The main events involved are and + . These events are provided by the standard System.Windows.Forms.Control object. + If set to , the control handles the and + events automatically by performing the following actions: + 1) Query the data object for data in text or filename formats. + 2) Scroll if the user drags an object near the edges of the control. + 3) Paste the contents of the data object when the user drops valid data on the control. + Note: This property replaces and extends the property provided by the + base object. + + + + + Gets or sets a value that determines if the user can drag data from the control. + + + This property allows you to use the control as a source for OLE drag-drop operations. If + set to any of the automatic settings, the control provides the following services: + 1) Detect when the mouse is near the edge of a selected cell or range and display the + OLE drag cursor. + 2) If the user clicks the mouse while the OLE drag cursor is displayed, initiate a + drag operation with a data object containing the current selection. + In manual mode, the programmer is responsible for starting drag-drop operations using + the method. + + + + + Saves the grid contents to a file. + + Name of the file to save, including the path. + File format to use. + Options to use when saving the file. + + to use when saving the file. + + Grids saved to CSV and other text files include data only (no formatting information is saved). + Grids saved to Excel files include data and formatting information. Images are not saved. + Grids can also be persisted to Xml format using the and methods. + + + + + Saves the grid contents to a file. + + Name of the file to save, including the path. + File format to use. + Options to use when saving the file. + + + + Saves the grid contents to a file. + + Name of the file to save, including the path. + File format to use. + + + + Loads the grid from a file. + + Name of the file to load, including the path. + File format to use. + Options to use when loading the file. + + to use when saving the file. + + This method loads grid from a file previously saved with the method. + Formats supported include comma-delimited text files (CSV format), tab-delimited + text files, and Microsoft Excel files (.XLS). + When loading text files, rows and columns are added to the grid if needed to + accommodate the file contents. Text files contain only data and no formatting information. + When loading Excel files, the grid retrieves the first worksheet from the specified + workbook file. The method allows you to specify which worksheet should be loaded. + You can use the + method allows you to retrieve a list of the worksheets stored in an XLS file. + The grid can save and load data and formatting information from XLS files. + Grids can also be persisted to Xml format using the and methods. + + + + + Loads the grid from a file. + + Name of the file to load, including the path. + File format to use. + Options to use when loading the file. + + + + Loads the grid from a file. + + Name of the file to load, including the path. + File format to use. + + + + Saves the grid contents to a Microsoft Excel (.XLS) file. + + Name of the file to save, including the path. + Name of the sheet to add to the Excel workbook. + Options to use when saving the file. + + to use when saving the file. + + If the specified file exists, the control will add or replace a single worksheet in it. + Existing sheets will be preserved if possible. + The worksheet to add or replace is identified by the parameter. + If the specified file is in use by another application (usually Excel), the method will fail. + This method does not require Microsoft Excel to be installed on the machine. + + + + + Saves the grid contents to a Microsoft Excel (.XLS) file. + + Name of the file to save, including the path. + Name of the sheet to add to the Excel workbook. + Options to use when saving the file. + + If the specified file exists, the control will add or replace a single worksheet in it. + Existing sheets will be preserved if possible. + The worksheet to add or replace is identified by the parameter. + If the specified file is in use by another application (usually Excel), the method will fail. + This method does not require Microsoft Excel to be installed on the machine. + + + + + Saves the grid contents to a Microsoft Excel (.XLS) file. + + Name of the file to save, including the path. + Name of the sheet to add to the Excel workbook. + + + + Saves the grid contents to a Microsoft Excel (.XLS) file. + + Name of the file to save, including the path. + + + + + + Saves the grid contents to a Microsoft Excel (.XLS) file. + + Name of the file to save, including the path. + + + + Loads the grid from a Microsoft Excel (.XLS) file. + + Name of the file to load, including the path. + Name of the worksheet to load. + Options to use when loading the file. + + Use the method to obtain a list of the worksheets + in an XLS file. + + + + + Loads the grid from a Microsoft Excel (.XLS) file. + + Name of the file to load, including the path. + Name of the worksheet to load. + + Use the method to obtain a list of the worksheets + in an XLS file. + + + + + Loads the grid from the first worksheet in a Microsoft Excel (.XLS) file. + + Name of the file to load, including the path. + Options to use when loading the file. + + + + Loads the grid from the first worksheet in a Microsoft Excel (.XLS) file. + + Name of the file to load, including the path. + + + + Gets a list with the names of the worksheets in a Microsoft Excel (.XLS) file. + + Name of the Excel file, including the path. + An array containing the names of the worksheets defined in the file. + + This method is used to obtain a list of sheet names that can later be used to load and + save specific sheets using the and methods. + + + The code below loads all sheets in an Excel workbook into a collection of grids in a + TabControl: + + // clear tabControl + tabControl.TabPages.Clear(); + + // load sheet names + string fileName = "c:\book1.xls"; + string[] sheets = _flexGrid.LoadExcelSheetNames(fileName); + + // load each sheet + foreach (string sheetName in sheets) + { + // create a new grid for this sheet + C1FlexGrid flex = new C1FlexGrid(); + flex.Dock = DockStyle.Fill; + + // load sheet into new grid + flex.LoadExcel(fileName, sheetName); + + // add grid to the tabControl + TabPage page = new TabPage(); + page.Controls.Add(flex); + page.Text = sheetName; + tabControl.TabPages.Add(page); + } + + + + + Gets or sets whether the grid should display a new row template after the last data row. + + + If the user enters data into the new row template, a new row is automatically added to the grid. + This property works in bound mode (if the data source supports adding new rows) and also in + unbound mode. + Note that if this property is set to true, the Rows.Count property will return a value + that includes the new row template. If you set the Rows.Count property, the grid will set the + number of data rows and will automatically add the new row template. For example: + + flex.AllowAddNew = true; + flex.Rows.Count = 10; + Console.WriteLine("Row count is {0}.", _flex.Rows.Count); + Row count is 11. + + + + + + Gets or sets whether the grid should monitor the keyboard and handle the DEL key. + + + If this property is set to true, the user can delete rows by selecting them and then pressing + the DEL key. + This property works in bound mode (if the data source supports deleting rows) and in unbound mode. + + + + + Gets the collection of control glyphs (images used to show sorting, check boxes, etc). + + + The property returns a collection with an indexer + of type . This collection allows you to get or set the images used to + indicate column sorting, collapsed and expanded outline groups, check boxes, cursors, + error information, etc. + Note: Setting a glyph to null restores the default (built-in) image. If you want to make a glyph + invisible, set it to a small blank image instead. + + + For example, the code below causes the grid to use custom images to display the column sorting order + (instead of the built-in hollow triangles): + + flex.Glyphs[GlyphEnum.Ascending] = imgAscending; + flex.Glyphs[GlyphEnum.Descending] = imgDescending; + + + + + Gets or sets whether the grid should handle the clipboard keys and automatically + perform cut, copy, paste, and delete operations. + + + Setting this property to true causes the grid to monitor the keyboard for the + following clipboard keys: + Copy: CTRL-INS, CTRL-C + Cut: CTRL-X, SHIFT-DEL + Paste: CTRL-V, SHIFT-INS + Delete: DEL + Cut, paste, and delete actions are performed only if the + property is set to true. + If you want to handle only a subset of the supported keys, add a handler to the + event and set the Handled parameter to true to disable some of the keys. + Automatic clipboard operations only affect the grid data. Styles and images are + not copied, pasted, or deleted. + Values copied to the clipboard are affected by the setting of the + property. + + + + + Gets or sets a custom comparer object used by the grid to perform grouping, + merging, and searching operations. + + + The grid has a default implementation that is used to compare + cells and determine if their contents are equivalent. This implementation is used when merging, + grouping, or searching for values (see the property and the + and methods). + The default implementation is case-sensitive and takes leading and trailing blanks into account. + If you want to merge cells using a case-insensitive comparison or trimming blanks, + write a custom class that implements the interface and assign an + instance of it to the grid's property. + Setting this property to null (Nothing in Visual Basic) restores the default behavior. + + + The code below replaces the built-in comparer with a . + This causes the method to group items that differ only in case into the + same groups: + + // use case-insensitive comparer + flex.CustomComparer = new CaseInsensitiveComparer(); + + // add groups ignoring case + flex.Subtotal(AggregateEnum.Sum, 0, groupOn, totalOn); + + // restore default (case-sensitive) comparer + flex.CustomComparer = null; + + + + + Gets or sets an flags that affect the grid's editing behavior. + + + The default value for this property is , which enables + all editing options. See the enumeration for a list of + options available. + + + + + Gets a value that determines if a cell contains the grid cursor. + + Row index. + Column index. + True if the cell contains the cursor, false otherwise. + + + + Gets a value that determines if a cell belongs to a fixed row or column. + + Row index. + Column index. + True if the cell is fixed, false otherwise. + + + + Gets a value that determines if a cell is selected. + + Row index. + Column index. + True if the cell is selected, false otherwise. + + + + Gets a value that determines if a pair of cell coordinates are valid. + + Row index. + Column index. + True if the cell coordinates are valid, false otherwise. + + + + Gets a value that determines if a cell is part of the selection and should be highlighted. + + Row index. + Column index. + True if the cell should be highlighted, false otherwise. + + + + Gets a value that determines whether the cell contents are displayed as a checkbox. + + Row index. + Column index. + True if the cell contents should be displayed as a checkbox, false otherwise. + + Boolean values are displayed as check boxes unless one of the following conditions is true: + 1) The cell has an associated . In this case the values specified + in the DataMap are displayed instead of check boxes. + 2) The cell has a multi-part string (such as "yes;no"). In this case + the Format is used instead of check boxes. + 3) The cell belongs to a subtotal row and does not contain a Boolean value. + + + + + Specifies whether text rendering should be compatible with previous releases of WinForms. + + + This property determines whether the control should render text using the + class (compatible with previous versions), or the new class + (available in .NET 2.0 and later). + The class supports complex scripts and Uniscribe APIs, making + it better suited for some international applications. + However, the class seems to render about 25% slower than the + traditional method. + You may want to try both modes and select the one that matches the appearance of other + controls and forms in your application. + + + + + Gets a object that provides easy access to properties of the currently + active ComboBox editor. + + + The object can be used to get and set properties on the currently + active ComboBox editor without casting the property. + If no editor is active, or if the editor is not a , these properties + return null or -1, and cannot be set. + + + The code below shows two equivalent ways of accessing the selected index of the currently active ComboBox editor: + + // with the ComboBoxEditor property: + Console.WriteLine("The current combo index is {0}", + _flex.ComboBoxEditor.SelectedIndex); + + // without the ComboBoxEditor property: + ComboBox cb = _flex.Editor as ComboBox; + int index = (cb != null) ? cb.SelectedIndex : -1; + Console.WriteLine("The current combo index is {0}", + index); + + + + + Gets or sets a value that specifies the grid scrolling behavior. + + + + + Gets or sets flag that specify entering edit mode of cell after exiting from previous cell with arrow keys or tab key. + + + + + Gets or sets an C1SuperErrorProvider object used to indicate error state of the control. + + + + + Saves the grid contents to an Xml document. + + Name of the file to save, including the path. + + The grid serializes all its contents into the Xml document, including the + data stored in the cells, row and column properties, styles, images, etc. + Objects of custom types stored in the grid are also serialized as long as + they have an associated that provides conversions to + and from string. + The method has several overloads that allow you to + save several grids into a single Xml document, along with other information stored + in the Xml document. + + + The code below saves a grid into an Xml file: + + // save a grid into am Xml file + flex.WriteXml(fileName); + + The code below saves two grids into an Xml file, then reads them back in reverse order: + + // prepare XmlTextWriter + XmlTextWriter w = new XmlTextWriter(fileName, new UTF8Encoding(false)); + w.Formatting = Formatting.Indented; + w.WriteStartDocument(); + w.WriteStartElement("Grids"); + + // save first grid + w.WriteStartElement(c1FlexGrid1.Name); + c1FlexGrid1.WriteXml(w); + w.WriteEndElement(); + + // save second grid + w.WriteStartElement(c1FlexGrid2.Name); + c1FlexGrid2.WriteXml(w); + w.WriteEndElement(); + + // close document + w.WriteEndElement(); + w.Close(); + + // load document from file + XmlDocument doc = new XmlDocument(); + doc.Load(fileName); + XmlNode n = doc.SelectSingleNode("Grids"); + + // load grids in reverse order + c1FlexGrid2.ReadXml(n.ChildNodes[0]); + c1FlexGrid1.ReadXml(n.ChildNodes[1]); + + + + + Saves the grid contents to an Xml document. + + The where the document is saved. + + + + Saves the grid contents to an Xml document. + + The where the document is saved. + + + + Saves the grid contents to an Xml document. + + The where the document is saved. + + + + Loads the grid from an Xml document. + + Name of the file to load, including the path. + + + + Loads the grid from an Xml document. + + + object to use for loading the grid. + + + + Loads the grid from an Xml document. + + + object to use for loading the grid. + + + + Loads the grid from an Xml document. + + + object to use for loading the grid. + + + + Loads the grid from an Xml document. + + + object to use for loading the grid. + + + + Loads the grid from an Xml document. + + + object to use for loading the grid. + + + + Raises the event. + + Object raising the event. + A that contains event data. + + + + Gets a rectangle that defines the scrollable portion of the control. + + + The value returned corresponds to the control's client area minus any fixed + and frozen rows and columns. + + + + + Builds a rectangle that defines the scrollable portion of the control for a given pair of scroll offsets. + + Horizontal scroll offset. + Vertical scroll offset. + A that defines the scrollable portion of the control. + + This method is for internal use. It allows derived classes to customize the control scrolling behavior. + + + + + Raises the event. + + An that contains the event data. + + + + Raises the event. + + An that contains the event data. + + + + Raises the event. + + An that contains the event data. + + + + Raises the event. + + A that contains the event data. + + + + Paints the control background. + + A that contains information about the control to paint. + + + + Called when the control receives a WM_THEMECHANGED message. + + + The WM_THEMECHANGED message is broadcast to every window following a + theme change event. Examples of theme change events are the activation of a + theme, the deactivation of a theme, or a transition from one theme to another. + + + + + Gets or sets the background color for the control. + + + This is the color used to paint the background of the scrollable cells, also defined by the + cell style. + + + + + Gets or sets the foreground color for the control. + + + This is the color used to paint the text in scrollable cells, also defined by the + cell style. + + + + + Raises the event. + + An that contains the event data. + + + + Raises the event. + + An that contains the event data. + + + + Raises the event. + + An that contains the event data. + + + + Calculates the new position of a scrollbar in response to a user command. + + Scroll command (SB_LINEUP, etc). + True for the vertical scrollbar, false for the horizontal scrollbar. + Current scrollbar position. + Scrollbar thumb position. + The new position for the scrollbar. + + Derived classes may override this method to customize the scrolling behavior. + + + + + Raises the event. + + A that contains the event data. + + + + Raises the event. + + + that contains the event data. + + + + Fires when a row is losing focus and needs to be validated. + + + This event is analogous to the event. + Use this event to perform validation on all the values of a row. + If the row does not pass validation, set the property to true. + Canceling this event prevents the event from occurring, + and also prevents the user from leaving the invalid row. + + + + + Raises the event. + + A that contains the event data. + + + + Fires after a row lost focus and has been validated. + + + This event is analogous to the event. + Use this event to perform post-processing on a row of values. + + + + + Raises the event. + + A that contains the event data. + + + + Moves or extends the current selection. + + + value that specifies the type of cursor movement. + Whether to extend the current selection. + + This method is for internal use. It allows inherited classes to customize the grid appearance. + + + + + Moves or extends the selection from a given cell. + + + value that specifies the type of cursor movement. + Whether to extend the current selection. + Row index for the initial selection. + Column index for the initial selection. + + This method is for internal use. It allows inherited classes to customize the grid appearance. + + + + + Gets a value that indicates what types of child nodes a row has. + + + This method is for internal use. It allows inherited classes to customize outline trees. + + Row index. + Column index. + Outline level. + Zero if the row has no children, 1 if it has regular data rows only, + 2 if it has child nodes, and 3 if it has data and child nodes. + + + + + Gets a rectangle representing the coordinates of a cell, row, or column. + + + This method is for internal use. It allows inherited classes to customize the way cell geometry + is calculated. + + Row index (or -1 to get column bounds). + Column index (or -1 to get row bounds). + Whether the rectangle should be horizontally clipped to the grid's client area. + Whether the rectangle should be vertically clipped to the grid's client area. + A containing the display area for the row, column, or cell, + in client coordinates and accounting for scroll position. + + + + Gets a rectangle representing the coordinates of a cell, row, or column. + + + This method is for internal use. It allows inherited classes to customize the way cell geometry + is calculated. + + Row index (or -1 to get column bounds). + Column index (or -1 to get row bounds). + A containing the display area for the row, column, or cell, + in client coordinates and accounting for scroll position. + + + + Gets a rectangle representing the coordinates of a cell editor. + + + This method is for internal use. It allows inherited classes to customize the way cell geometry + is calculated. + + Row index. + Column index. + Rectangle used to position the cell editor. + + + + Draws a grid row. + + A that contains a + object where the row will be drawn. + Index of the row to draw. + + This method is for internal use. It allows inherited classes to customize the grid appearance. + + + + + Draws a grid cell. + + A that contains a + object where the cell will be drawn. + Index of the cell's row. + Index of the cell's column. + The index of the last column painted (may be greater than + if columns are merged). + + This method is for internal use. It allows inherited classes to customize the grid appearance. + + + + + Gets the state for a Windows Xp theme while the mouse moves over a cell. + + + This method is for internal use. It allows inherited classes to customize the + hot-tracking behavior. + + Row under the mouse. + Column under the mouse. + An integer representing the item state (2 for hot-tracking, 1 for normal). + + + + Gets a cell glyph to show in a cell. + + + This method is for internal use. It allows inherited classes to customize the display of the sorting glyphs. + + Row index. + Column index. + Cell rectangle + Glyph to display above the cell content. + Glyphs to display on the left of the cell. + Glyphs to display on the right of the cell. + True if any glyphs were assigned to the cell, false otherwise. + + + + Gets the state of the checkbox in a grid cell. + + Row index. + Column index. + One of the values in the enumeration. + + By default, the grid displays values in Boolean columns as check boxes (the column's + data type determined by the property). If you don't want Boolean + values displayed as check boxes, set the column's property to a + string containing the values that should be displayed for True and False values, separated by + a semi-colon. For example: + + flex.Cols["CheckBoxes"].DataType = typeof(bool); + flex.Cols["yesNo"].DataType = typeof(bool); + flex.Cols["yesNo"].Format := "Yes;No"; + + In unbound mode, you can use the and + methods to add check boxes to any cells. The check boxes will be displayed along with any text in + the cell, and you can set their position using the column's property. + There are two types of check boxes: Boolean and tri-state. Boolean check boxes toggle between + the and states. Tri-state check + boxes cycle through the settings , , + and . + For example, the code below creates a Boolean checkbox in cell (3,3) and a tri-state checkbox + in cell (4,3): + + flex.SetCellCheck(3, 3, CheckEnum.Unchecked) // Boolean; + flex.SetCellCheck(4, 3, CheckEnum.TSUnchecked) // tri-state; + + + + + + Sets the state of the checkbox in a grid cell. + + Row index. + Column index. + + value to assign to the cell. + + For details and examples, see the method. + + + + + Applies a value to a cell or cell range. + + + This method is for internal use. It allows inherited classes to customize the way checkbox + data is applied to the cells when cells are edited. + + Row index. + Column index. + Value to apply to the cell. + + + + Adjusts the width of a column range to fit the data in a cell range. + + Top row in the range. + Left column in the range. + Bottom row in the range. + Right column in the range. + Amount of extra space, in pixels, to add to the column widths. + Flags that control auto-sizing options. + + By default, the method measures every cell in each column, + taking into account the cell contents and style. + If the grid has a large number of rows, you can improve performance by using the + and parameters to specify a row range. + You can include only a few hundred rows in the process, and add some extra spacing for safety. + + + + + Adjusts the width of all columns to fit the data. + + + + + Adjusts the width of columns in a range to fit the data. + + Left column in the range. + Right column in the range. + Amount of extra space, in pixels, to add to the column widths. + + + + Adjusts the width of all columns fit the data. + + Amount of extra space, in pixels, to add to the column widths. + + + + Adjusts the width of a column to fit the data. + + Column index. + + This method measures every cell in the column, taking into account the cell contents and style. + If the grid has a large number of rows, consider using the + method instead, because it allows you to specify a smaller set of rows and columns to measure. + + + + + Adjusts the width of a column to fit the data. + + Column index. + Amount of extra space, in pixels, to add to the column widths. + + This method measures every cell in the column, taking into account the cell contents and style. + If the grid has a large number of rows, consider using the + method instead, because it allows you to specify a smaller set of rows and columns to measure. + + + + + Adjusts the height of a row range to fit the data in a cell range. + + Top row in the range. + Left column in the range. + Bottom row in the range. + Right column in the range. + Amount of extra space, in pixels, to add to the column widths. + Flags that control auto-sizing options. + + + + Adjusts the height of all rows to fit the data. + + + + + Adjusts the height of a row to fit the data. + + Row index. + + + + Automatically size grid columns to fit the largest entry. + + + object used to measure the cell contents. + Index of the first row to be measured. + Index of the first column to be measured. + Index of the last row to be measured. + Index of the first column to be measured. + Extra space, in twips, to add to the largest entry. + + value that specifies auto-sizing behavior. + + This method is for internal use. It allows inherited classes to customize the grid appearance. + + + + + Automatically size grid columns to fit the largest entry. + + + object used to measure the cell contents. + Index of the first row to be measured. + Index of the first column to be measured. + Index of the last row to be measured. + Index of the first column to be measured. + Extra space, in twips, to add to the largest entry. + + value that specifies auto-sizing behavior. + + This method is for internal use. It allows inherited classes to customize the grid appearance. + + + + + Gets a reference to the column that defines the current sort applied to the grid. + + + The grid may be sorted by a call to the method, by a user clicking + a column header, or as a result of sorting applied directly to the object that is being + used as the grid's . + To determine the current sort direction, use the sorted column's + property. + If the grid is not currently sorted, this property returns null. + + + + + Gets or sets whether the control should use Xp themes for displaying row or column headers. + + + This property only has an effect if the application is themed. To enable themes for + an application, you can either call the Application.EnableVisualStyles method or use + a manifest file. Please refer to MSDN for details. + Setting the property to BorderStyleEnum.XpThemes + automatically sets this property to ShowThemedHeadersEnum.Both. + + + + + Raises the event. + + An that contains the event data. + + + + Raises the event. + + An that contains the event data. + + + + Raises the event. + + An that contains the event data. + + + + Raises the event. + + An that contains the event data. + + + + Determines whether the specified key is a regular input key or a special + key that requires preprocessing. + + One of the values. + True if the specified key is a regular input key, False otherwise. + + + + Determines if a character is an input character that the control recognizes. + + The character to test. + True if the character should be sent directly to the control and not preprocessed, False otherwise. + + + + Raises the event. + + A that contains the event data. + + + + Raises the event. + + A that contains the event data. + + + + Raises the event. + + An that contains the event data. + + + + Raises the event. + + A that contains the event data. + + + + Raises the event. + + A that contains the event data. + + + + Raises the event. + + A that contains the event data. + + + + Raises the event. + + An that contains the event data. + + + + Called when the grid contents scroll. + + + value that specifies the scroll direction. + + This method is for internal use. It allows inherited classes to customize the grid scrolling behavior. + + + + + Called when the grid contents scroll vertically, to update the value of the scroll tip. + + New value for the vertical scroll bar. + + This method processes the new scroll position and calls . + + + + + Raises the event. + + A that contains event data. + + + + Raises the event. + + A that contains event data. + + + + Raises the event. + + A that contains event data. + + + + Gets or sets a value that determines the overall appearance of the control. + + + This property allows you to quickly customize the appearance of the grid so + it matches the appearance of your application. + The settings available include System, various Microsoft Office color + schemes, and Custom, which relies on the control's standard styles and + appearance properties. + + + + + Gets a value that determines whether the + property is set explicitly and should be persisted. + + True if the property was explicitly set by the user. + + + + Resets the value of the ambient property. + + + + + Method invoked when the property changes. + + + + + Gets or sets a used to customize the look and + feel of the control. + + + + + Gets the current . + + + + + + + Gets or sets a string that is displayed over the new row template + when the property is set to true. + + + + + Gets or sets what parts of the grid are copied to the clipboard when the + property is set to true. + + + + + Copies the current selection to the clipboard. + + + + + Cuts the content of the current selection to the clipboard. + + + This command copies the current selection to the clipboard, then deletes + the editable content within the selection. + + + + + Pastes the content of the clipboard onto the current selection. + + + + + Gets or sets whether the user is allowed to filter the data. + + + When this property is set to true, the grid displays filter icons + on the column headers. Users may click the icons to define filters to be + applied to the data. + When a filter is applied, the grid hides rows that don't match the + filter by setting their property to false. The + filter is not applied to the data source. + You may specify the type of filter to use for each individual column + by setting the columns property. + You may also create custom filters by creating classes the implement + the interface and assigning instances of that + class to the column's property. + + + + + Gets or sets a value that determines whether the filter should ignore diacritics + (accents) when comparing values. + + + By default, the filter compares values as they appear in the data source. + For example, if you are looking for values that contain the string "fac", you + will find "factory" but not "façade". + If you set this property to true, the filter will remove any diacritics + before performing the comparisons. In this case, looking for the string "fac" + will return both "factory" and "façade". + This property is especially useful in applications localized for languages + that contain many accents, such as French, Spanish, Portuguese, etc. + + + + + Gets or sets an XML string containing the current filter state. + + + + + Applies all column filters to the data on the grid. + + + + + Edits the filter associated with a given column. + + Index of the column whose filter should be edited. + + + + Edits the filter associated with a given column. + + + whose filter should be edited. + + + + Clears the filter associated with a given column. + + Index of the column whose filter should be cleared. + + + + Clears the filter associated with a given column. + + + whose filter should be cleared. + + + + Clears all column filters. + + + + + Applies search to the data on the grid. + + Words which will be searched. + Defines will search results be highlighted or not. + Defines will search results be filtered or not. + Defines will perform search through only visible columns or not. + + + + Applies search to the data on the grid. + + Words which will be searched. + Defines will search results be highlighted or not. + Defines will search results be filtered or not. + + + + Applies search to the data on the grid. + + Words which will be searched. + + + + Gets or sets the language to use when localizing the column filters. + + + + + Specifies how grid columns should be sorted. + + + This enumeration contains flags that can be combined to customize the sorting process. + + + For example, the code below sorts two grid columns ignoring case. + + // C# + SortFlags order = SortFlags.Ascending | SortFlags.IgnoreCase; + _flex.Sort(order, col1, col2); + + ' VB + Dim order As SortFlags = SortFlags.Ascending Or SortFlags.IgnoreCase + _flex.Sort(order, col1, col2) + + + + + Do not sort. This setting is useful for skipping certain columns when sorting column ranges. + + + + + Sort in ascending order. + + + + + Sort in descending order. + + + + + Sort using the string representation of the data. In this mode, "100" appears before "2". + + + + + Ignore case when sorting strings. + + + + + Use the flags stored in the property of individual objects. + + + + + Specifies which elements of the grid should be cleared by the method. + + + This enumeration contains flags that can be combined to customize the sorting process. + + + + + Clear cell content, including data, images, and check boxes if any. + + + + + Clear custom styles assigned to cells. + + + + + Clear user data associated with cells. + + + + + All of the above. + + + + + Specifies the type of checkbox to draw in a cell. + + + There are two types of check boxes: regular and tri-state. + Regular check boxes are used to display simple Boolean values. + They cycle through settings Checked and Unchecked when clicked with the mouse. + Tri-state check boxes are used to display values that may be true, false, or + indeterminate (grayed). They cycle through settings TSChecked, TSGrayed, and + TSUnchecked when clicked with the mouse. + Visually, Checked and Unchecked look the same as TSChecked and TSUnchecked. + + + + + No check box. + + + + + Check box with a check mark in it. + + + + + Empty check box. + + + + + Check box in undefined state. + + + + + Tri-state check box with a check mark in it. + + + + + Tri-state empty check box. + + + + + Tri-state check box in undefined state. + + + + + Specifies the type of aggregate function to calculate with the and + methods. + + + + + No aggregate. This setting is used with the method to create an + outline tree without any numerical aggregates. + + + + + Clear existing aggregates. This setting is used with the method + to clear any existing subtotals, usually before calculating new subtotals. + + + + + Returns the sum of all values in the range. + + + + + Percent of grand total. This setting is used with the method to + calculate the percentage of the grand total represented by each sub group. (This setting can't + be used with the method). + + + + + Returns the count of non-empty cells in a range. + + + + + Returns the average value of the non-empty cells in a range. + + + + + Returns the maximum value in a range. + + + + + Returns the minimum value in a range. + + + + + Returns the sample standard deviation of the values in a range (uses the formula based on n-1). + + + + + Returns the sample variance of the values in a range (uses the formula based on n-1). + + + + + Returns the population standard deviation of the values in a range (uses the formula based on n). + + + + + Returns the population variance of the values in a range (uses the formula based on n). + + + + + Specifies options to use when calculating aggregates with the method. + + + + + Default setting. Include all rows and use numerical values only. + + + + + Exclude node rows from aggregate. This option is useful when the grid contains subtotal rows, + which are marked as nodes and contain values that are subtotals and should thus be excluded + from aggregates. + + + + + Calculate aggregates for dates instead of numerical values. Only a few aggregate functions + are meaningful for dates: count, maximum, and minimum. + + + + + Calculate aggregates for Boolean values. This flag causes the value True to be interpreted as one, + and False as zero. This option is useful for counting the number of checked check boxes in a range. + + + + + Exclude hidden rows and columns from the aggregate. + + + + + Exclude collapsed rows from the aggregate. + + + + + Exclude hidden rows from the aggregate. + + + + + Specifies whether subtotals rows created with the method should be + inserted above or below the data they refer to. + + + + + Subtotal rows are inserted above the data (tree-style). + + + + + Subtotal rows are inserted below the data (spreadsheet-style). + + + + + Specifies the type of change that occurred when the controls fires the + event. + + + + + No action. + + + + + The number of grid rows or columns has changed. + + + + + The number of fixed grid rows or columns has changed. + + + + + A style definition has changed. + + + + + A style has been applied to a range. + + + + + The grid has been invalidated and will be repainted. + + + + + The value in a cell has changed. + + + + + A range has been invalidated and will be repainted. + + + + + The grid will be repainted. + + + + + A tree node is about to be collapsed or expanded. + + + + + A tree node has just been collapsed or expanded. + + + + + A tree node will be scrolled into view. + + + + + A tree node will be selected. + + + + + A row has been moved into a new position. + + + + + A row has been added to the grid. + + + + + A row has been removed from the grid. + + + + + A row has been selected or de-selected. + + + + + A column has been moved into a new position. + + + + + A column has been added to the grid. + + + + + A column has been removed from the grid. + + + + + A column has been selected or de-selected. + + + + + The selection is about to change. + + + + + The selection has just changed. + + + + + Represents the method that will handle the event. + + + + + Provides data for the event handler. + + + + + The type of action that caused the event to fire. + + + + + Range of cells affected by the event. + + + + + Range of cells affected by the event. + + + + + Range of cells affected by the event. + + + + + Range of cells affected by the event. + + + + + Represents cell ranges, allowing the caller to set properties for multiple cells + with a single statement. + + + The structure does not have a public constructor. To create a + object, use the method. + Note that is a structure, not a class. This means the object is used as a value, + not as a reference. If you pass a to a method and change the object within that method, + the original value is not modified. + Ranges are defined by two rows and two columns (, , , and + ). These values do not have to be in order ( may be smaller or greater than + ). To obtain the values in order, use the method or the , + , , and properties. + + + + + Gets or sets the range's first row index. + + + + + Gets or sets the range's first column index. + + + + + Gets or sets the range's last row index. + + + + + Gets or sets the range's last column index. + + + + + Gets a value that indicates if the range contains a single cell. + + + + + Gets a value that indicates if the range contains valid row and column indices. + + + This property returns true if the range coordinates are valid. The range is valid + if both r1 and r2 are between 0 Rows.Count-1, both c1 and c2 are between 0 and + Cols.Count-1. + + + + + Determines whether the range contains a given row. + + Index of the row to check. + True if the range contains the row, False otherwise. + + + + Determines whether the range contains a given column. + + Index of the column to check. + True if the range contains the column, False otherwise. + + + + Determines whether the range contains a given cell. + + Index of the row to check. + Index of the column to check. + True if the range contains the cell, False otherwise. + + + + Gets the index of the top row in the range. + + + + + Gets the index of the bottom row in the range. + + + + + Gets the index of the left column in the range. + + + + + Gets the index of the right column in the range. + + + + + Normalizes the range so that is the , + is the , + is the , + and is the . + + + + + Gets or sets the data stored in the range. + + + When getting, this property returns the value in the first cell of + the range (r1, c1). When setting, it stores the given value in every + cell within the range. + + + + + Gets the value in cell (, ), formatted as a string. + + + This property is similar to the property, except Clip + returns a tab-delimited string containing data in the entire range, and DataDisplay + returns the contents of the first cell only (r1, c1). + + + + + Gets or sets the style used to display every cell in the range. + + + Getting or setting the range style ensures that every cell in the range has + the same style. If the range does not contain any cells with custom styles, + this property returns null. + + + The code below creates a structure and uses it to + apply a custom style to the entire range. + + // create a style + CellStyle cs = _flex.Styles.Add("red"); + cs.BackColor = Color.Red; + + // create a cell range and assign it a style + CellRange rg = _flex.GetCellRange(1, 1, 5, 5); + rg.Style = cs; + + + + + Gets or sets the style used to display every cell in the range, creating a new style if necessary. + + + This property never returns null. If the range does not have a style assigned to it, a new style + will be created automatically. + + + The code below creates a structure and uses it to apply a custom style to + the entire range. + + // create a cell range + CellRange rg = _flex.GetCellRange(1, 1, 5, 5); + + // make sure range is red + rg.StyleNew.BackColor = Color.Red; + + + + + Gets the style used to render cell (, ). + + + This property never returns null. It will return the custom style assigned to the + first cell in the range, to the cell's row, column, or a built-in style. + + + + + Gets or sets the state of the checkbox in the range. + + + When getting, this property returns the checkbox value that corresponds to cell + (, ). When setting, it applies the new value to all + cells in the range. + + + + + Gets or sets the assigned to cells in the range. + + + When getting, this property returns the assigned to cell + (, ). When setting, it applies the new value to all + cells in the range. + + + + + Gets or sets arbitrary used data assigned to cells in the range. + + + When getting, this property returns the user data assigned to cell + (, ). When setting, it applies the new value to all + cells in the range. + + + + + Gets or sets a string containing the values of all cells in the range. + + + The cell values are delimited by characters specified by the + property. + By default, columns are separated by tabs (\t or vbTab) and rows by line breaks (\n or vbCr). + + + + + Clears selected elements from the range. + + + value that specifies which elements + should be cleared. + + + + Gets a string representation for this object. + + A string representation for this object. + + + + Collection of objects. + + + + + Initializes a new instance of a . + + Grid that owns the collection. + + + + Gets or sets the object at a specified index. + + + + + Gets the number of objects in the collection. + + + + + Adds a new object to the collection. + + Top row in the range. + Left column in the range. + Bottom row in the range. + Right column in the range. + The index of the object in the collection. + + + + Adds a new object to the collection. + + Object to add to the collection. + The index of the object in the collection. + + + + Adds a new object to the collection, optionally + removing other overlapping ranges from the collection. + + Top row in the range. + Left column in the range. + Bottom row in the range. + Right column in the range. + Whether to remove overlapping + ranges from the collection before adding the new range. + The index of the object in the collection. + + + + Adds a new object to the collection, optionally + removing other overlapping ranges from the collection. + + Object to add to the collection. + Whether to remove overlapping + ranges from the collection before adding the new range. + The index of the object in the collection. + + + + Removes all objects from the collection. + + + + + Determines whether a object is a member of the collection. + + Object to locate in the collection. + True if the object is a member of the collection, false otherwise. + + + + Gets the index of a object in the collection. + + Object to locate in the collection. + The index of the object in the collection, or -1 if the object is not a member of the collection. + + + + Gets the index of the first object in the collection that contains the specified row and column. + + Index of the row contained in the range. + Index of the column contained in the range. + The index of the object in the collection, or -1 if no range could be found containing the specified row and column. + + + + Inserts a object in the collection at a specified index. + + + + + + + + + Removes a object from the collection. + + Object to remove from the collection. + + + + Removed the object at a specified index from the collection. + + Index of the object to remove from the collection. + + + + Represents a filter based on one or two logical conditions. + + + + + Initializes a new instance of a . + + + + + Gets the first filter condition. + + + + + Gets the second filter condition. + + + + + Gets or sets whether the filter conditions should be combined + with an 'And' or with an 'Or' operator. + + + + + Creates a clone of this . + + A clone of this . + + + + Gets or sets a value that determines whether the filter is active. + + + + + Resets the filter making it inactive. + + + + + Applies the filter to a value. + + Value to be filtered. + True if the satisfies the filter; + False otherwise. + + + + Gets the editor used to modify the filter at run time. + + A that is used to modify the filter at run time. + + + + Represents operators used in filter conditions. + + + + + Disables the operator. + + + + + Return true if the value equals the operator parameter. + + + + + Return true if the value does not equal the operator parameter. + + + + + Return true if the value is greater than the operator parameter. + + + + + Return true if the value is less than the operator parameter. + + + + + Return true if the value is greater than or equal to the operator parameter. + + + + + Return true if the value is less than or equal to the operator parameter. + + + + + Return true if the string representation of the value contains the operator parameter. + + + + + Return true if the string representation of the value does not contain the operator parameter. + + + + + Return true if the string representation of the value begins with the operator parameter. + + + + + Return true if the string representation of the value ends with the operator parameter. + + + + + Represents a condition within a . + + + Each contains up to two conditions that + can be combined with 'And' or 'Or' operators. + + + + + Gets a value that indicates whether the condition is active. + + + + + Gets or sets the operator used by this condition. + + + + + Gets or sets the parameter used by this condition. + + + + + Clears this condition by setting the to 'None' + and the to null. + + + + + Applies the condition to a given value. + + Value to test. + True if the value satisfies the condition, false otherwise. + + + + Specifies the behavior of the control as an OLE drag-drop target. + + + + + The control can't be used as a drop target. + + + + + The control fires drag-drop events that can be handled to provide drop target functionality. + + + + + The control automatically handles dropping of text or filename data. + + + + + Specifies the behavior of the control as an OLE drag-drop source. + + + + + The control does not provide any drag support. The caller can still initiate drag-drop operations + using the method. + + + + + The control provides automatic dragging of data. If the mouse hovers near the edges of the selected range, + the cursor will change and allow the user to move or copy data (pressing the CTRL key to copy). + + + + + Same as Automatic, except the data is always copied (never moved). + + + + + Same as Automatic, except the data is always moved (never copied). + + + + + Represents the method that will handle the event. + + Object that fired the event. + + object that contains the event data. + + + + Provides data for the event. + + + + + Gets which mouse button was pressed. + + + + + Gets the number of times the mouse button was pressed and released. + + + + + Gets the x-coordinate of a mouse click. + + + + + Gets the y-coordinate of a mouse click. + + + + + Gets a signed count of the number of detents the mouse wheel has rotated. A detent is one notch of the mouse wheel. + + + + + Gets or sets a value indicating whether the event should be canceled. + + + + + Initializes a new instance of the BeforeMouseDownEventArgs class. + + + with mouse event information. + + + + Initializes a new instance of the BeforeMouseDownEventArgs class. + + Control that will fire the event. + + value that indicates which button was pressed. + Number of times the button was pressed and released. + + + + Represents the method that will handle the , , and events. + + Object that fired the event. + + object that contains the event data. + + + + Provides data for the , , + , and events. + + + + + Gets the original index of the row that was dragged by the user. + + + + + Gets the original index of the column that was dragged by the user. + + + + + Gets the new index of the column or row that was dragged by the user. + + + + + Gets or sets a value indicating whether the drag operation should be canceled. + + + + + Initializes a new instance of the DragRowColEventArgs class. + + The original index of the row that was dragged by the user. + The original index of the column that was dragged by the user. + The new index of the column or row. + + + + Represents the method that will handle the and + events. + + Object that fired the event. + + object that contains the event data. + + + + Provides data for the and events. + + + + + Gets the column that is being sorted. + + + + + Gets or sets a value that determines the sorting order. + + + + + Gets or sets a value indicating whether the drag operation should be canceled. + + + Setting this parameter to true cancels the built-in sort operation and leaves the sorting glyph unchanged. + + + + + Gets or sets a value indicating whether the drag operation has been handled by the event handler. + + + Setting this parameter to true cancels the built-in sort but updates the sorting glyph as if the + sort had been performed. This is useful when the event handler performs custom sorting. + + + + + Initializes a new instance of the SortColEventArgs class. + + The column that is being sorted. + + value that determines the sorting order. + + + + Represents the method that will handle the , + , , + , , + , , + , , + , , + , and events. + + Object that fired the event. + + object that contains the event data. + + + + Provides data for the , , + , , + , , + , , + , , + , , and + events. + + + + + Gets the index of the row that caused the event. + + + This value may be set to -1 if the event was caused by a column. + + + + + Gets the index of the column that caused the event. + + + This value may be set to -1 if the event was caused by a row. + + + + + Gets or sets a value indicating whether the operation should be canceled. + + + + + Initializes a new instance of the RowColEventArgs class. + + Index of the row that caused the event. + Index of the column that caused the event. + + + + Represents the method that will handle the , + , , + , , and + events. + + Object that fired the event. + + object that contains the event data. + + + + Provides data for the , , + , , + , and events. + + + + + Gets the range selected before the event. + + + + + Gets the range that will be selected after the event. + + + + + Gets or sets a value indicating whether the new selection should be canceled. + + + + + Initializes a new instance of the RangeEventArgs class. + + The range selected before the event. + The range that will be selected after the event. + + + + Represents the method that will handle the event. + + Object that fired the event. + + object that contains the event data. + + + + Provides data for the event. + + + + + Gets or sets the text to be displayed in the tooltip. + + + + + Initializes a new instance of the ToolTipEventArgs class. + + Index of the row that caused the event. + Index of the column that caused the event. + Text to display in the ToolTip + + + + Represents the method that will handle the and + events. + + + + + Provides data for the and events. + + + + + Gets the row index of the cell being edited when the key was pressed. + + + + + Gets the column index of the cell being edited when the key was pressed. + + + + + Gets the integer representation of the property. + + + + + Gets the key code for the event, which will be one of the values. + + + + + Gets the key code for the key that was pressed, combined with modifier flags that indicate which + combination of CTRL, SHIFT, and ALT keys were pressed at the same time. + + + + + Gets the modifier flags, as defined in Keys. This indicates which combination of modifier keys + (CTRL, SHIFT, and ALT) were pressed. + + + + + Gets a value indicating whether the ALT key was pressed. + + + + + Gets a value indicating whether the CTRL key was pressed. + + + + + Gets a value indicating whether the SHIFT key was pressed. + + + + + Gets or sets a value indicating whether the event was handled and should be ignored by the control. + + + + + Initializes a new instance of the KeyEditEventArgs class. + + The row index of the cell being edited when the key was pressed. + The column index of the cell being edited when the key was pressed. + A object containing the keyboard data. + + + + Represents the method that will handle the event. + + + + + Provides data for the event. + + + + + Gets the row index of the cell being edited when the key was pressed. + + + + + Gets the column index of the cell being edited when the key was pressed. + + + + + Gets the character corresponding to the key pressed. + + + + + Gets or sets a value indicating whether the event was handled and should be ignored by the control. + + + + + Initializes a new instance of the KeyPressEditEventArgs class. + + The row index of the cell being edited when the key was pressed. + The column index of the cell being edited when the key was pressed. + The character corresponding to the key pressed. + + + + Represents the method that will handle the event. + + + + + Provides data for the event. + + + + + Gets the row index of the cell being edited. + + + + + Gets the column index of the cell being edited. + + + + + If the cell contains a checkbox, the new checkbox state about to be applied to the cell. + + + + + Gets or sets a value indicating whether the edit operation should be canceled. + + + If this parameter is set to true, the edits are considered invalid. The editor will remain open + and the current cell selected until the user provides a valid entry or cancels the edit operation + by pressing the ESC key. + + + + + Initializes a new instance of the ValidateEditEventArgs class. + + The row index of the cell being edited. + The column index of the cell being edited. + The new checkbox state about to be applied to the cell, if any. + + + + Represents the method that will handle the event. + + + + + Provides data for the event. + + + + + Gets the row index of the cell where the error was detected. + + + + + Gets the column index of the cell where the error was detected. + + + + + Gets the object that contains information about the error. + + + + + Gets or sets a value indicating whether the error situation has been handled by the control. + + + If this value is set to False, the grid will throw the exception. + + + + + Initializes a new instance of the GridErrorEventArgs class. + + The row index of the cell where the error was detected. + The column index of the cell where the error was detected. + The object that contains information about the error. + Whether the error was handled internally and no exception should be thrown. + + + + Represents the method that will handle the and + events. + + + + + Provides data for the and + events. + + + + + Gets the index of the row that may contain errors. + + + + + Gets the index of the column that may contain errors (or -1 if checking for row errors). + + + + + Gets or sets a message that describes the error. + + + + + Initializes a new instance of the class. + + The row index when error information is needed for a cell or row. + The column index when error information is needed for a cell or row. + + + + Represents the method that will handle the event. + + + + + Provides data for the event. + + + + + Initializes a new instance of the OwnerDrawCellEventArgs class. + + The control that contains the cell being painted. + The object where the cell will be painted. + The row index of the cell being painted. + The column index of the cell being painted. + The that will be used to paint the cell. + The bounds of the cell being painted. + The text that will be displayed in the cell. + The image that will be displayed in the cell. + + + + Gets the object used to draw the cell. Use this object to draw custom elements in the cell. + + + + + Get the row index of the cell being painted. + + + + + Get the column index of the cell being painted. + + + + + Sets or sets the object used to paint the cell. + + + This parameter is often used to provide dynamic formatting based on cell contents. For example, + if the cell contains a value outside a given range, the event handler may assign a new style to + this parameter. + Although it is legal to modify the members of the parameter in this + event, this is not recommended, since the change will affect other cells that may be using this style. + + + The code below uses the event to highlight cells that + indicate low stock levels. + + // create style used to display low-stock items + CellStyle cs = _flex.Styles.Add("Critical"); + cs.BackColor = Color.Red; + + private void _flex_OwnerDrawCell(object sender, C1.Win.C1FlexGrid.OwnerDrawCellEventArgs e) + { + // ignore fixed cells + if (e.Row < _flex.Rows.Fixed || e.Col < _flex.Cols.Fixed) + return; + + // apply custom style if reorder level is critical + if (_flex.Cols[e.Col].Name == "UnitsInStock") + { + // change the style by applying the "Critical" style to the Style parameter + // (do not change the e.Style.BackColor property directly since that would + // affect other cells that use this style) + if ((short)_flex[e.Row, "UnitsInStock"] < (short)_flex[e.Row, "ReorderLevel"]) + e.Style = _flex.Styles["Critical"]; + } + } + + + + + Get the rectangle where the cell will be painted (in client coordinates). + + + + + Gets or sets the text that will be displayed in the cell. + + + Changing this value is an easy way to modify the text displayed in a cell without any custom drawing code. + + + + + Gets or sets the image that will be displayed in the cell. + + + Changing this value is an easy way to modify the image displayed in a cell without any custom drawing code. + + + + + Gets a value that determines if the event was fired only to measure the cell. + + + This occurs while auto-sizing rows and columns, since the event handler may change the + value displayed in the cell while handling this event. + + + + + Gets or sets whether the event has finished drawing the cell. + + + If this parameter is set to true, the grid assumes the call has been painted by the event handler. If it + is set to false, the grid will paint the cell when the event returns. + Note that calling the method automatically sets this parameter to true. + + + + + Causes the grid to paint parts of the cell (background, foreground, border, etc.) + + + that specifies the parts of the cell. + + This method is typically called in handlers when the code + intends to draw some elements of the cell but not everything. + For example, the code may want to draw a custom border only. In this case, it could call + e.DrawCell(DrawCellFlags.Background | DrawCellFlags.Content) to draw the cell background and content, + and later draw the custom border. + Or the code could want to draw a custom marker in a cell (like a note indicator in Excel). In this case, it + should call e.DrawCell() to draw the entire cell, and later add the note marker (little red triangle + on the top right corner of the cell). + If the owner-draw code draws the entire cell (including the background), then there's no need to call + e.DrawCell at all. + + + + + Causes the grid to paint the whole cell. + + + + + Represents the method that will handle the and + events. + + + object that raised the event. + + that contains the event data. + + + + Provides data for the and + events. + + + + + Gets the row index for the cell that has an unbound value. + + + + + Gets the column index for the cell that has an unbound value. + + + + + Gets or sets the unbound value that should be displayed in the cell. + + + + + Initializes a new instance of the UnboundValueEventArgs class. + + Row index for the cell that has an unbound value. + Column index for the cell that has an unbound value. + Unbound value that should be displayed in the cell. + + + + Represents the method that will handle the and + events. + + + object that raised the event. + + that contains the event data. + + + + Provides data for the and events. + + + + + Gets the value that specifies the type of aggregate to calculate.. + + + + + Outline level to assign to the new subtotal rows. + + + + + Gets the index of the first column in the range used to detect group breaks. + + + + + Gets the index of the last column in the range used to detect group breaks. + + + + + Gets the index of the column that contains values being aggregated. + + + + + Gets or sets the text to insert in the new subtotal row. + + + + + Gets the index of the new subtotal row. + + + + + Gets a value that determines whether the subtotal row is a new row or the + subtotal is being added to an existing subtotal row. + + + + + Gets the index of the top row in the group. + + + + + Gets the index of the bottom row in the group. + + + + + Gets or sets the calculated aggregate value for the group. + + + + + Gets or sets the to be applied to the new subotal row. + + + + + Whether to cancel the creation of the new subtotal row. + + + + + Initializes a new instance of a object. + + + value that specifies the type of aggregate to calculate. + Outline level to assign to the new subtotal rows. This parameter allows the creation of multi-level subtotals and affects the display of the outline tree. + First column in the range used to detect group breaks. + Last column in the range used to detect group breaks. + Column that contains values being aggregated. + Text to insert in the new subtotal row. + Index of the new subtotal row. + Whether the subtotal row is a new row or the subtotal is being added to an existing subtotal row. + Index of the top row in the group. + Index of the bottom row in the group. + Calculated aggregate value for the group. + + to be applied to the new subotal row. + + + + Represents the method that will handle the event. + + + object that raised the event. + + that contains the event data. + + + + Provides data for the event. + + + + + Gets or sets the value of the localized string. + + + + + Gets the name of the component being localized. + + + + + Parent of the component being localized. + + + + + Component being localized. + + + + + Initializes a new instance of a . + + Value to be localized. + Name of the component being localized. + Parent of the component being localized. + Component being localized. + + + + Specifies the type of filter to be used for a . + + + + + Filter column using a . + + + + + Filter column by values using a . + + + + + Filter column by conditions using a . + + + + + Filter column using a filter specified by the caller. + + + + + Do not provide a filter for this column. + + + + + Specifies a type of glyph (image) used by the grid to convey information about a row, column, or cell. + + + + + Indicates column sorted in ascending order (default is hollow triangle pointing up). + + + + + Indicates column sorted in descending order (default is hollow triangle pointing down). + + + + + Checkbox in checked state. + + + + + Checkbox in unchecked state. + + + + + Checkbox in gray (undefined) state. + + + + + Collapsed tree node (default is plus sign). + + + + + Expanded tree node (default is minus sign). + + + + + Indicates current record (default is black triangle pointing right). + + + + + Indicates row being added to data source (default is asterisk). + + + + + Indicates row or cell error (default is red exclamation sign). + + + + + Indicates that a column has a drop-down filter editor. + + + + + Indicates that a column has a filter currently active. + + + + + Represents a collection of glyphs (images) indexed by glyph type ( type). + + + The collection contains the images used by the grid to indicate column + sorting direction, collapsed and expanded outline groups, check boxes, cursors, error information, etc. + You can use the property get or set these images. + + + + + Gets or sets the glyph for a particular value. + + + Setting a glyph to null causes the grid to use the default image for the glyph. To suppress + a glyph, assign it a small transparent image. + + + + Specifies where the grid should start searching for cells when using the + property. + + + + + No auto-searching. + + + + + Search from the first scrollable row. + + + + + Search from the current row. + + + + + Specifies the action to perform when the ENTER and TAB keys are pressed. + + + + + No special action (allow system to handle the key). For example, the TAB key is normally + used to cycle through the controls on a form. + + + + + Move to the next row. + + + + + Move to the next column. At the end of the row, wrap to the start of the next row. + + + + + Same as MoveAcross, but move the focus to the next control in the tab order when + the last cell in the grid is reached. + This setting applies only to the property; + when used with it behaves like MoveAcross. + + + + + Type of grid element at a specific point on the control. + + + + + The point is in the grid's empty area. + + + + + The point is on a grid cell. (The cell coordinates are stored in the + and properties). + + + + + The point is on a fixed row, over a column. + + + + + The point is near the right edge of a fixed cell, in the column resizing area. + + + + + The point is near the right edge of the last frozen column, in the column freezing area. + + + + + The point is on a fixed column, next to a row. + + + + + The point is near the bottom edge of a fixed cell, in the row resizing area. + + + + + The point is near the bottom edge of the last frozen row, in the row freezing area. + + + + + The point is on a check box. + + + + + The point is on an edit button (drop down, popup editors). + + + + + The point is on the outline bar (visible when the grid's property + has a that contains the flag). + + + + + The point is on the collapse/expand button on an outline tree (visible when the grid's + property contains the flag). + + + + + The point is on the filter icon on a column header cell. + + + + + Contains information, such as the row and column indexes, about a specific coordinate pair + in the control. + + + Use the method to obtain a value. + + + + + Get the index of the row at the point being tested (if the point does not correspond to a cell, it returns -1). + + + + + Get the index of the column at the point being tested (if the point does not correspond to a cell, it returns -1). + + + + + The point on the control surface, in pixels. + + + + + The X coordinate of a point on the control surface, in pixels. + + + + + The Y coordinate of a point on the control surface, in pixels. + + + + + Gets a that describes the type of element described by a . + + + This property allows you to determine whether the point corresponds to a grid cell or + to special elements such as row and column headers, resizing areas, and so on. + + + + Specifies a node with respect to another given node. + + + This enumeration is used with the method. + + + + + The node's top-level parent. + + + + + The node's immediate parent. + + + + + The node's first child. + + + + + The node's last child. + + + + + The node's first sibling (node with same level and same parent). + + + + + The node's last sibling. + + + + + The node's next sibling. + + + + + The node's previous sibling. + + + + + The node's first visible sibling. + + + + + The node's last visible sibling. + + + + + The node's next visible sibling. + + + + + The node's previous visible sibling. + + + + + The node's first visible child. + + + + + Specifies the destination of nodes when they are moved with the method. + + + + + Move the node one level in, deeper into the outline. + + + + + Move the node one level out, towards the root. + + + + + Move the node to the position before its previous sibling. + + + + + Move the node to the position after its next sibling. + + + + + Move the node to the position before its first sibling. + + + + + Move the node to the position after its last sibling. + + + + + Make the node a child of the specified node. + + + + + The class encapsulates properties and methods used for manipulating node rows + (collapsing, expanding, moving, and sorting them). + + + You can create node rows using the method or by setting the + property to true. + + + + + Gets or sets the outline level for this node. + + + Higher levels mean deeper nesting. Set the level to zero to create root nodes, + or set the level to negative values to create nodes that do not appear on the outline tree. + + + + + Gets or sets whether this node is collapsed. + + + + + Gets or sets whether this node is expanded. + + + + + Gets the number of child nodes under this node. + + + Only immediate children are included in the count. Grand-children are not included. + + + + + Gets or sets the image on this node row at the column that contains the outline tree. + + + + + Gets or sets the associated with this node row. + + + + + Gets or sets the data on this node row at the column that contains the outline tree. + + + + + Gets or sets the checkbox value associated with this node. + + + + + Returns a reference to the object that corresponds to this node. + + + + + Returns a CellRange object containing this row and all its child rows. + + A CellRange object containing this row and all its child rows. + + The object returned includes all columns. + + + + + Returns a reference to a node located at a given position relative to this node. + + A value from the enumeration that specifies + the position relative to this node. + A node object. + + If the node requested does not exist, returns null (for example, + the root node does not have a previous sibling). + + + + + Gets the parent node of this node. + + + + + Gets the previous sibling node. + + + + + Gets the previous visible sibling node. + + + + + Gets the next sibling node. + + + + + Gets the next visible sibling node. + + + + + Gets the first child node. + + + + + Gets the first visible child node. + + + + + Gets the last child node. + + + + + Gets the first sibling node. + + + + + Gets the last sibling node. + + + + + Gets the index of this node in the collection. + + + + + Gets an array containing the children of this node. + + + + + Gets whether any child of node is visible. + + + + + Creates a node row at a specified position relative to this node. + + A value from the enumeration that specifies + where the new node will be added with respect to this node (e.g. Child, Sibling). + Value of the property for the new node. + Value of the property for the new node. + Value of the property for the new node. + A reference to the new added to the grid. + + + + Creates a node row at a specified position relative to this node. + + A value from the enumeration that specifies + where the new node will be added with respect to this node (e.g. Child, Sibling). + Value of the property for the new node. + A reference to the new added to the grid. + + + + Removes this node row and all its child rows (nodes and data) from the grid. + + + + + Moves a node to a new position. + + A value from the enumeration that specifies + where the node will be moved with respect to its current position. + + object to use as a target when the + parameter is set to . + Returns true if the method was successful, false otherwise. + + + + Moves a node to a new position. + + A value from the enumeration that specifies where + the node will be moved with respect to its current position. + Returns true if the method was successful, false otherwise. + + + + Ensures that this node is visible, expanding its parent nodes and scrolling it into view if necessary. + + + + + Selects the node. + + + This method sets the control's property. + + + + + Sorts this node's child nodes in the specified order. + + One or more values from the enumeration that specify + the type of sorting to be applied (e.g. ascending, descending, case-sensitive, etc). + Start of a range of columns to sort. + End of a range of columns to sort. + + The grid recognizes two types of row: regular rows which contain data, and node rows which are used + to group data. This method only sorts the row nodes; it does not reorder the data rows within each node. + To sort the data rows, use the grid's method instead. + + + + + Sorts this node's child nodes in the specified order. + + One or more values from the enumeration that specify + the type of sorting to be applied (e.g. ascending, descending, case-sensitive, etc). + + The grid recognizes two types of row: regular rows which contain data, and node rows which are used + to group data. This method only sorts the row nodes; it does not reorder the data rows within each node. + To sort the data rows, use the grid's method instead. + + + + + Sorts this node's child nodes using a given object to determine the node order. + + An object that implements the interface used + to compare objects. This can be used to provide custom sorting. + + The grid recognizes two types of row: regular rows which contain data, and node rows which are used + to group data. This method only sorts the row nodes; it does not reorder the data rows within each node. + To sort the data rows, use the grid's method instead. + + + + + Contains flags that specify printing options to use with the method. + + + + + Print the grid in actual (screen size). If the grid is too wide to fit on a page, columns spill onto + separate pages. If the grid is too tall to fit on a page, rows spill onto additional pages. + + + + + Scale the grid so its width will fit on a single page. If the grid is too tall to fit on a page, + rows spill onto additional pages. + + + + + Scale the grid so it will fit on a single page (rows and columns). + + + + + Show a page setup dialog before printing so the user can select paper size, orientation, and margins. + + + + + Show a print setup dialog before printing so the user can select the printer to use. + + + + + Show a print preview dialog before printing so the user can inspect the document before printing it. + + + + + Show highlighted selection while printing. + + + + + Extend the last column on each printed page. + + + + + Represents a class that encapsulates the control printing functionality, including page and printer + settings, headers, and footers. + + + See also the method. + + + + + Gets the object that specifies page and printer settings. + + + The class is part of the .NET framework, defined in the + System.Drawing.Printing namespace. It contains properties that specify printer and page settings for the document. + + + + + Specifies the font to use for rendering page headers. + + + See also the property. + + + + + Specifies the font to use for rendering page footers. + + + See also the property. + + + + + Gets the number of the page being printed (the first page is numbered one). + + + Applications typically use this property to provide user feedback while printing grids. + + + + + Gets the total number of the pages in the print document. + + + The value returned is accurate only while the document is printing. Before or after + a document is done printing, this property returns zero. + + + + + Gets a reference to the used to display the grid's print preview. + + + Use this property to customize the size and position of the preview dialog when printing the grid + with the option. + + + The code below uses the PrintPreviewDialog property to display the preview dialog with a + custom caption and in a maximized state: + + Form dlg = _flex.PrintParameters.PrintPreviewDialog as Form; + dlg.Text = "Custom Caption"; + dlg.StartPosition = FormStartPosition.Manual; + dlg.WindowState = FormWindowState.Maximized; + _flex.PrintGrid("test", PrintGridFlags.ShowPreviewDialog); + + + + + Gets or sets the flags that specify printing options to use with the + method. See the enumeration for details. + + + + + Gets or sets a string that contains the page headers. + + + The string may be divided by tab characters into up to three sections. The sections are then + left, center, and right-aligned at the top of each page. + The string may contain placeholders "{0}" and "{1}" which are replaced with the current + page number and total page count. + Use the property to select the font used to render the header. + + + The code below specifies a right-aligned header with a "Page n of m" display using a 10-point Tahoma font. + + _flex.Header = "\t\tPage {0} of {1}"; + _flex.HeaderFont = new Font("Tahoma", 10); + _flex.PrintGrid("Header"); + + + + + Gets or sets a string that contains the page footers. + + + The string may be divided by tab characters into up to three sections. The sections are then + left, center, and right-aligned at the top of each page. + The string may contain placeholders "{0}" and "{1}" which are replaced with the current + page number and total page count. + Use the property to select the font used to render the footer. + + + + + Represents an object that renders a into a + paged . + + + This class may be used to print multiple grids, along with other + custom content, into an existing object. + To use it, create one PrintDocumentGridRenderer for each + grid you want to print. Then handle the document events and call the + event for the renderers until the value of the + property equals . + + The code below renders two grids into a : + + // print two grids into an existing PrintDocument + private void button1_Click(object sender, EventArgs e) + { + using (var dlg = new PrintPreviewDialog()) + { + dlg.Document = this.printDocument1; + dlg.ShowDialog(this); + } + } + + // event handlers for the PrintDocument object on the form + PrintDocumentGridRenderer _g1, _g2; + void printDocument1_BeginPrint(object sender, System.Drawing.Printing.PrintEventArgs e) + { + // create and configure grid renderer for the first grid + _g1 = new PrintDocumentGridRenderer(c1FlexGrid1); + _g1.Options = PrintGridFlags.FitToPageWidth | PrintGridFlags.ExtendLastCol; + + // create and configure grid renderer for the second grid + _g2 = new PrintDocumentGridRenderer(c1FlexGrid2); + _g2.Options = PrintGridFlags.FitToPageWidth | PrintGridFlags.ExtendLastCol; + } + void printDocument1_PrintPage(object sender, System.Drawing.Printing.PrintPageEventArgs e) + { + // render first grid + if (_g1.CurrentPage < _g1.PageCount) + { + _g1.PrintPage(e); + e.HasMorePages = true; + } + + // render second grid + else if (_g2.CurrentPage < _g2.PageCount) + { + _g2.PrintPage(e); + e.HasMorePages = _g2.CurrentPage < _g2.PageCount; + } + } + + + + + + Initializes a new instance of a . + + + that will be painted by + this renderer. + + + + Gets or sets the flags that specify printing options to use with the + method. See the enumeration for details. + + + + + Gets the index of the page being rendered. + + + + + Gets the total number of pages in the document. + + + + + Gets or sets the Y coordinate of the first block of cells rendered on + the document. + + + + + Renders the current page into the document. + + + that provides parameters for rendering the page. + + + + Renders a specific page into the document. + + + that provides parameters for rendering the page. + Index of the page to print. + + This method is used to render specific ranges of pages within the document. + + + + + Calculates the zoom factor and page breaks in the document. + + + that contains the page information. + + + + Base class for grid rows and columns ( and classes). + + + + + Initializes a new instance of the class. + + + + + Gets or sets whether a Row or Column is visible. + + + This property returns true even if the row or column has been scrolled out of view. + To determine whether a row is currently within view, check the + and properties. + To determine whether a column is currently within view, check the + and properties. + + + + + Gets whether this row is collapsed. + + + Rows are collapsed when one of their parent nodes is collapsed. + Collapsed rows are not visible to the user even if their + property is set to true. + + + + + Gets whether this row is currently visible to the user. + + + This property returns true if the property + is set to true and the row is collapsed ( + property returns false). + + + + + Gets or sets whether this row or column is selected. + + + Use this property to get or set the selection state for individual rows when the grid's + property is set to . + + + + + Gets or sets user data associated with this row or column. + + + The UserData value is not used internally by the grid. It is reserved for additional data that + the application may associate with rows or columns. + + + + + Gets or sets whether the user can drag this row or column with the mouse. + + + The grid object also has an property. + If dragging is disabled at the grid level, the user will not be able to drag any rows or columns. + If dragging is allowed by the grid's property, then + dragging of individual rows and columns can still be disabled by setting this property to false. + + + + + Gets or sets whether the user can resize this row or column with the mouse. + + + To resize rows or columns, the mouse must be over the fixed area of the grid, and close to a border + between rows or columns. The mouse pointer will then change into a sizing pointer and the user can drag + the row or column to change the row height or column width. + If a group of columns is selected (from first to last row) and the user resizes one of them, all + selected columns are resized. The same applies to rows. + If column sizing is allowed, users may double-click the resizing area to resize a column so it will + automatically fit the longest entry. + Rows with zero height and columns with zero width can't be resized by the user. If you want to make + them very small but still resizable, set their height or width to one pixel, not to zero. + The and + events fire before resizing starts, and may be used to prevent resizing of specific rows and columns. + The and + fire after resizing, and may be used to validate the user's action and to update the display. + + + + + Specifies whether adjacent cells with similar contents will be merged. + + + Merging cells allows you to display data in a clear, appealing way because it highlights groups of identical + information. It also gives you flexibility to build tables similar to the ones you can create in HTML or using + Microsoft Word, both of which support merged cells. + To create tables with merged cells, you must set the property to a value other + than , and then set the property of individual + rows and columns true for the rows and columns you wish to merge. + After these properties are set, the grid will automatically merge adjacent cells that have the same + contents. Whenever the cell contents change, the grid updates the merging state. + + + + + Gets or sets whether cells on this row or column can be edited by the user. + + + The grid object also has an property. + If editing is disabled at the grid level, the user will not be able to edit any cells. + If editing is allowed by the grid's property, then + editing of individual rows and columns can still be disabled by setting this property to false. + + + + + Gets or sets the type of object stored in this row or column. + + + By default, the column's DataType property is set to , which allows you to store + any data values in the column. + If you set a row or column's DataType to a specific type, the grid will try to convert any values assigned + to cells in that column to the specified data type. If the conversion fails, the grid will fire a + event and the cell value will not be changed. + + The DataType property affects how values are stored internally in the grid, how they are sorted, and the + type of control that is used to edit the values in the column. For example, a + control is used to edit values in columns, and check boxes are used to display and edit + values in Boolean columns. + If you want to store times (not dates) in a column, you can still use the DateTime type, but you should + use a that displays only the time, not the date. + + + + + + Gets or sets a string that specifies how to format the data on this column. + + + The Format property affects how values are formatted for display, not the values stored internally. + To retrieve the formatted value of a cell, use the property. + The Format string has the same semantics as the format argument in the .NET + method. For details and a complete set of examples, see the .NET documentation. + + + + + Gets or sets the input mask to use when editing cells on this column. + + + The grid also has an property that applies to the entire grid. + For details and mask syntax, refer to that property. + + + + + Gets the index of this row or column in its parent collection. + + + This property returns -1 if the row or column is not a member of the collection. + + + + + Gets or sets a custom associated with this row or column. + + + If the row or column does not have a custom style, this property returns null. + + + + + Gets or sets a custom associated with this row or column, creating a new + style if necessary. + + + This property never returns null. If this element does not have a custom style, a new one will be + created automatically and returned. + + + The code below sets a column's background color to red. + + // get the style associated with column 1 (create a new one if necessary) + CellStyle cs = _flex.Cols[1].StyleNew.BackColor; + + // set the new style's back color to red + cs.BackColor = Color.Red; + + + + + Gets the style used to display this row or column. + + + This property never returns null. If the row or column has a custom style, this property returns that style. + Otherwise, it returns the stock style used to display the row (e.g., Normal, Alternate, Fixed, Frozen). + + + + + Gets the stock used to paint fixed cells in this row or column. + + + + + Gets the custom style associated with fixed cells on this row or column, creating a new one of necessary. + + + If the row or column has a custom style associated with its fixed cells, this property returns that style. + Otherwise, it creates a new , assigns it to the row or column, and returns a reference + to the new style. + + + + + Gets the style used to display fixed cells on this row or column. + + + If the row or column has a custom style associated with its fixed cells, this property returns that style. + Otherwise, it returns the stock style used to display the column (e.g., Normal, Fixed). + + + + + Gets or sets a value that determines how text is aligned in + scrollable cells on this row or column. + + + This property gets or sets the alignment value specified by the + object associated with the column. + + + + + Gets or sets a value that determines how text is aligned in + fixed cells on this row or column. + + + This property gets or sets the alignment value specified by the + object associated with the fixed cells in the row or column. + + + + + Gets or sets an value that determines how images are aligned in + scrollable cells on this row or column. + + + This property gets or sets the alignment value specified by the + object associated with the column. + + + + + Gets or sets an value that determines how images are aligned in + fixed cells on this row or column. + + + + + Gets or sets an object used to translate data values into images for this row or column. + + + Use this property to associate data values in this row or column with images. For example, if a column contains + country names, you can use this property to display the corresponding flags. + Use the property to determine whether the image is displayed instead of or in + addition to the cell text. + + + + + Gets or sets a value that determines whether images found in this row or column's should + be displayed instead of or in addition to the cell text. + + + + + Gets or sets an object used to translate data values into display values + for this row or column. + + + The DataMap property allows you to implement "translated" rows or columns. In translated rows or columns, + the grid does not display the values stored in the cells. Instead, it looks up those values in the column's + DataMap and displays the mapped value. + The grid also uses the DataMap value to populate drop-down lists when the column is editable. + Note that the DataMap property has no effect when the property is also + set. Using both properties on a single row or column is legal, but it effectively disables the DataMap. + + + + + Gets or sets a list of items to be used by the drop-down editor. + + + The ComboList property specifies the type of editor to be used when editing a cell. You may use a text box, + drop-down list, drop-down combo, or an edit button to pop up custom editor forms. + To use the ComboList property, set the property to True, and + set the ComboList property to a string that describes the type of editing you want to use for that cell. + The options are described below: + 1. To edit the cell using a regular text box, set the ComboList property to an empty string (""). + 2. To edit the cell using a drop-down list, set the ComboList property to a string containing the available + options, separated by pipe characters (for example "option 1| option 2"). + 3. To edit the cell using a drop-down combo, set the ComboList property to a string containing the + available options, separated by pipe characters and starting with a pipe character (for example "|option 1|option 2"). + 4. To display an edit button, set the ComboList property to a string containing an ellipsis ("..."). + Edit buttons look like regular push buttons, aligned to the right of the cell, with an ellipsis as a caption. + When the user clicks on the edit button, the grid fires the event. + In this case, the user can't edit the cell contents directly. + 5. To display an edit button next to an editable cell, set the ComboList property to a string containing a + pipe and an ellipsis ("|..."). In this case, you get a regular edit button but the user can also edit the cell + contents directly. + Note that the ComboList property has precedence over the property. + Using both properties on a single row or column is legal, but it effectively disables the DataMap. + + + + + Gets or sets the custom editor used to edit cells in this column. + + + The grid provides several built-in editors that are automatically selected based on the properties of the + cell being edited. + This property allows you to use external editors when editing values in a given column. Any control + can be used as an external editor, but to achieve complete integration with the grid, the external editor should + implement the interface. + You can associate external editors with columns at design time (using the grid's Column Editor) or at run + time, by setting this property. + + + The code below creates a C1DateEdit control and assigns it to the property of a grid + column. The control will be used to edit cells on this column instead of the default + control. + All controls in the C1Input library implement the interface and can be + used as grid editors without any extra code. + + // create C1DateEdit control (included with C1Input) + C1DateEdit dateEdit = new C1DateEdit(); + + // use the new control as an editor for a grid column + _flex.Cols[1].DataType = typeof(DateTime); + _flex.Cols[1].Editor = c1DateEdit; + + + + + + Clears the contents of the row or column. + + + value specifying which elements of the row or + column should be cleared. + + Use this method to reset column properties to their default values (width, visibility, style, + user data, and so on). This method only clears the column object itself, it does not clear + the contents of the cells in the column. + + + + + Moves this row or column to a new position in the collection. + + An integer specifying the new position. + + + + Gets a reference to the control that owns this row or column. + + + + + Invalidates an individual row or column, causing it to be repainted. + + + + + Class that represents a grid row. + + + This class does not have a public constructor. You can add and remove rows using methods + in the grid's property, which exposes the row collection. + + + + + Gets or sets the cell value specified by the column index in this row. + + + + + Gets or sets the cell value specified by the column name in this row. + + + + + Gets the position of the top of this row, in pixels, relative to the grid. + + + The value returned is the sum of row heights from the top of the grid until this row, and + does not account for the scroll position. To account for the scroll position, this value should + be adjusted using the grid's + property. + To retrieve the size and position of a cell, use the method. + + + + + Gets the position of the bottom of this row, in pixels, relative to the grid. + + + The value returned corresponds to the sum of the and properties. + + + + + Gets or sets the height of this row, in pixels (the value -1 represents the default row height). + + + Setting this property to -1 causes the grid to use the default row height for this row + (see the property). + Height returns the height assigned to the row even if the row is invisible, and returns -1 + if the row has the default height. To obtain the actual display height of a row, use the + property. + + + + + Gets or sets the display height for this row, in pixels. + + + HeightDisplay returns zero if the row is invisible, and returns the actual display height + even if the property is set to -1 (which stands for default row height). + + + + + Gets the index of this row in the collection. + + + This property returns -1 if the is not a member of the collection. + See also the and properties. + + + + + Gets the index of this row in the collection. + + + This property is similar to the property, except it throws an exception + if the is not a member of the collection. + + + + + Gets the index of this row in the collection, excluding fixed and node rows. + + + This property returns -1 if the row is a fixed or node row. + If the grid is bound to a data source, the return value can be used as an indexer into the grid's data + source to obtain a reference to the item bound to the row. + You can also obtain the underlying data object directly using the row's property. + + + + + Gets or sets the text of the first fixed cell in the row. + + + + + Indicates the row is a placeholder for adding new rows to the grid. + + + This property returns true for the last row on the grid when the + property is set to true. This is the row that has an asterisk glyph on the first fixed column. + + + + + Gets the object that provides data for this row. + + + The type of object returned depends on the type of DataSource assigned to the grid. For example, + if the grid is bound to a object, then this property will return the + specific object that is bound to this row. + This property returns null if the grid is unbound, or if the row is a fixed or node row that doesn't + correspond to any objects in the grid's data source. + For an example, see the event. + + + + + Clears this row. + + + value specifying which elements of the row should be cleared. + + Use this method to reset row properties to their default values (height, visibility, style, user data, etc.). + + + + + Moves a row to a new position in the collection. + + An integer specifying the row's new position. + + + + Gets or sets whether this row is a node row in an outline. + + + This property determines whether the row behaves as a node in an outline tree. + You can use to create custom outline trees, or use the grid's + method to create outline trees automatically. + + + + + Gets the object associated with this row. + + + If the row is a node (see the property), this property returns a + object that can be used to collapse or expand the node, set its level within + the outline tree, etc. + If the row is not a node, this property gets the row's parent node. + + + + + Gets or sets whether this row is selected. + + + Use this property to get or set the selection status for individual rows when the grid's + property is set to . + + + + + Invalidates this row, causing it to be repainted. + + + + + Class that represents a grid column. + + + This class does not have a public constructor. You can add and remove + columns using methods in the grid's + property, which exposes the column collection. + + + + + Gets or sets the cell value specified by the row index in this column. + + + + + Gets the position of the left of this column, in pixels, relative to the grid. + + + The value returned is the sum of column widths from the left of the grid until this column, and + does not account for the scroll position. To account for the scroll position, this value should + be adjusted using the grid's + property. + To retrieve the size and position of a cell, use the method. + + + + + Gets the position of the right of this column, in pixels, relative to the grid. + + + The value returned corresponds to the sum of the and properties. + + + + + Gets or sets the width of this column, in pixels (the value -1 represents the default column width). + + + Setting this property to -1 causes the grid to use the default column width for this column + (see the property). + + Width returns the width assigned to the column even if the row is invisible, and + returns -1 if the row has the default height. To obtain the actual display width of a column, + use the property. + + + + + Gets or sets the display width for this column, in pixels. + + + WidthDisplay returns zero if the column is invisible, and returns the actual display width + even if the property is set to -1 (which stands for default column width). + + + + + Gets the index of this column in the collection. + + + This property is similar to the property, except it throws an exception + if the is not a member of the collection. + + + + + Gets the position of the column in the data source object. + + + This property returns -1 for fixed and unbound columns. + + + + + Gets or sets that cells in the will accept null value or null will be replaced by default value in unbound mode. + + + This property works only if IsValueType member of property + equals to True and for type . + If value was changed to False then all null values in the will be + replaced by defaults of current . + + + + + Gets or sets whether this column can be sorted by clicking on the column header. + + + The grid has an property that determines whether columns can be + sorted with the mouse. The AllowSorting property of the objects can be used to prevent + the user from sorting specific columns. + + + + + Gets or sets this type of filter to use for this column. + + + The grid has an property that determines whether + columns can be filtered by the user. If that property is set to true, then filters are created + automatically for each column based on the setting of the column's + property. + The grid provides condition and value filters. Condition filters allow users to specify + conditions such as 'value > 10'. Value filters allow users to select values that should be displayed + from a list of values present in the data source. All filters can be customized in code as shown + in the examples below. + + + The code below customizes the filters for two columns. The "ShipRegion" column is initialized to + show only two states, AK and CA. The "UnitPrice" column is initialized to show only items with + unit price greater than $30. After the column filters have been initialized, the code calls the + method to apply the filters. + + // initialize "ShipRegion" column filter to show only two values: "AK" and "CA" + var col = _flex.Cols["ShipRegion"]; + col.AllowFiltering = AllowFiltering.ByValue; + var vf = col.Filter as ValueFilter; + vf.ShowValues = new object[] { "AK", "CA" }; + + // initialize "UnitPrice" column filter to show only values greater than $30 + col = _flex.Cols["UnitPrice"]; + col.AllowFiltering = AllowFiltering.ByCondition; + var cf = col.Filter as ConditionFilter; + cf.Condition1.Operator = ConditionOperator.GreaterThan; + cf.Condition1.Parameter = 30; + + // apply both column filters to the data + _flex.ApplyFilters(); + + + + + Gets or sets the responsible for filtering this column. + + + + + Gets the that is currently filtering this column. + + + + + Gets or sets the name of this column. + + + The name can be used as an index in the property indexer. + When the grid is bound to a DataSource, the column names are set automatically to the names + of columns in the data source, and are used for binding. + + + + + Specifies how this column should be sorted when the method is called + with a flag. + + + Use this property when you want to sort multiple columns in different orders. For example, you could + set the Sort property to for columns 1, 2, and 3, and to + for columns 4, 5, and 6. + You would then call the grid's method with the sort parameter + set to to perform the sort using the order specified for each column. + + + + + Gets the index of this column in the collection. + + Returns -1 if the column is not a member of the collection. + + + + Gets or sets whether this column is selected. + + + + + Invalidates this column, causing it to be repainted. + + + + + Gets or sets the text of the column's header cell. + + + + + Clears this . + + + value specifying which elements of the + should be cleared. + + + + Moves a to a new position in the collection. + + An integer specifying the column's new position. + + + + Gets or sets when to display combo buttons in cells. + + + By default, the column will show editing buttons in cells only when they + have the focus. This is the same behavior used by the + control. + If you set to , + the column will display buttons on any cells that have associated lists, even if they + don't have the focus. + For details on how to associate lists with cells, see the , + , and properties. + + + + + Base class for grid row and column collections ( + and classes). + + + + + Gets or sets the number of rows or columns in the collection. + + + + + Gets or sets the number of fixed rows or columns in the collection. + + + + + Gets or sets the number of frozen rows or columns in the collection. + + + Use the property to determine whether + the user can freeze rows or columns with the mouse. + + + + + Moves a row or column to a new position in the collection. + + Index of row or column to be moved. + New position. + + + + Moves a range of rows or columns to a new position in the collection. + + The index of the first row or column in the range to be moved. + The number of rows or columns that will be moved. + New position. + + + + Determines whether the collection contains a given row or column. + + Row or column items to be detected. + True if the row or column is a member of the collection, False otherwise. + + + + Gets or sets the minimum size for rows and columns in the collection. + + + The MinSize property limits the minimum size of rows or columns when they are resized by the user or + adjusted to fit the contents with the or + method. + + + + + Gets or sets the maximum size for rows and columns in the collection. + + + The MaxSize property limits the maximum size of rows or columns when they are resized by the user or + adjusted to fit the contents with the or + method. + Setting this property to zero disables it. + + + + + Gets or sets the default size of the rows or columns in the collection (in pixels). + + + This value is set automatically when the grid's property changes. + The default size is used when the row's Height property or columns Width property is set to -1. + + + + + Gets a reference to the control that owns this collection. + + + + + Gets the index of the previous visible row or column. + + Index of the original row or column. + Index of the previous visible row or column. + + + + Gets the index of the next visible row or column. + + Index of the original row or column. + Index of the next visible row or column. + + + + Updates the position of rows or columns. + + + + + Collection of grid objects. + + + + + Gets the at the specified index. + + + Use the object returned by this method to set attributes such as row + height, visibility, style, selected state, and so on. + + + + + Gets or sets the number of rows in the collection. + + + You can add or remove rows by assigning a new value to this property, or you can use the + , , , and methods. + + + + + Gets or sets the index of the row used to display the sorting and filtering glyphs. + + + The default value is -1, which causes the sorting and filtering glyphs to be shown + on the last fixed row. If you set this property to a value larger than the number + of fixed rows, then the glyphs will not be displayed. + + + + + Gets or sets the number of fixed rows in the collection. + + + + + Gets a collection of objects that are currently selected. + + + This property is especially useful when the grid's property + is set to . + + + The code below removes all selected rows from the grid. + Note that foreach loops can't be used to modify the collections being iterated over. This example + works because the collection is being enumerated while the + collection is being modified. + + // delete all selected rows + foreach (Row r in _flex.Rows.Selected) + { + _flex.Rows.Remove(r); + } + + + + + + Appends a new object to the collection. + + + The Add method appends a new row to the collection. To insert a row at a specific position, + use the method. + + A reference to the that was added to the collection. + + + + Appends a given number of objects to the collection. + + Number of rows to add to the collection. + + + + Adds a new object to the collection at a specified position. + + The position where the new row will be inserted. + A reference to the that was added to the collection. + + + + Adds a new row to the row collection at a specified position. + + The position where the new node row will be inserted. + Outline level for the new node row. + A reference to the that was added to the collection. + + This method is especially useful when the grid is bound to a data source, because in this + case you can't change the value of the property. When the grid + is unbound, you can add rows and turn them into nodes later using the property. + + + + + Appends a new row to the row collection. + + Outline level for the new node row. + A reference to the that was added to the collection. + + + + Adds a range of rows to the collection at a specified position. + + The position where the new range will be inserted. + The number of rows to add. + + + + Removes a object from the collection. + + The index of the row to remove from the collection. + A reference to the that was removed from the collection. + + + + Removes a object from the collection. + + The row to be removed. + A reference to the that was removed from the collection. + + + + Removes a range of rows from the collection. + + The index of the first row to remove from the collection. + The number of rows to remove from the collection. + + + + Move a object to a new position in the collection. + + Index of row to be moved. + New position for the row. + + + + Moves a range of rows to a new position in the collection. + + The index of the first row in the range that will be moved. + The number of rows that will be moved. + New position for the first row in the range. + + + + Updates the position and data index of each row in this collection. + + + + + Collection of grid objects. + + + + + Gets the at the specified index. + + + + + Gets the that has the specified column name. + + + You can use the object returned by this method to set + attributes such as column height, visibility, style, selected state, and so on. + This indexer looks for a column with the specified . + The column name is set automatically for you when the grid is bound to a database, + or it may be set using code. + + + + + Gets a value that determines whether the collection contains a with the given name. + + Column name to look for (case-insensitive). + True if the collection contains a column with the given name, False otherwise. + + + + Gets the index of the with the specified name. + + Column name to look for (case-insensitive). + Index of the column that has the given name in this collection, or -1 if the collection + does not contain a column with the given name. + + + + Gets the index of the with the specified name. The search starts at a specified index. + + Column name to look for (case-insensitive). + The search starting index. + Index of the column that has the given name in this collection, or -1 if the collection + does not contain a column with the given name. + + + + Gets the index of the with the specified name, optionally + throwing an exception if the column is not found. + + Column name to look for (case-insensitive). + Whether to throw and exception if the column cannot be found. + Index of the column that has the given name in this collection, or -1 if the collection + does not contain a column with the given name. + If the parameter is set to true and + a column named cannot be found, the control throws + an . This makes it easier to write + compact code that relies on column names. + + The example below uses the IndexOf method to convert column names into + indices. Note that if the column names are invalid, the exception will be thrown + by the IndexOf method (column not found) rather than in the following + method, where it would not be as clear (invalid index). + + int columnIndex = _flex.Cols.IndexOf("total"); + _flex.AutoSizeCol(columnIndex); + + + + + Gets the index of the with the specified name, optionally + throwing an exception if the column is not found. The search starts at a specified index. + + Column name to look for (case-insensitive). + Whether to throw and exception if the column cannot be found. + The search starting index. + Index of the column that has the given name in this collection, or -1 if the collection + does not contain a column with the given name. + If the parameter is set to true and + a column named cannot be found, the control throws + an . This makes it easier to write + compact code that relies on column names. + + The example below uses the IndexOf method to convert column names into + indices. Note that if the column names are invalid, the exception will be thrown + by the IndexOf method (column not found) rather than in the following + method, where it would not be as clear (invalid index). + + int columnIndex = _flex.Cols.IndexOf("total"); + _flex.AutoSizeCol(columnIndex); + + + + + Gets or sets the number of objects in this collection. + + + You can add or remove columns by assigning a new value to this property, or you can use the + , , , and methods. + + + + + Gets or sets the number of fixed columns in this collection. + + + + + Appends a new object to this collection. + + A reference to the that was added to the collection. + + + + Appends a given number of objects to the collection. + + Number of columns to add to the collection. + + This method adds the new columns to the end of the collection. To insert columns at specific + positions, use the or methods. + + + + + Adds a new object to this collection at a specified position. + + The position where the new column will be inserted. + A reference to the that was inserted to the collection. + + + + Adds a range of objects to the collection at a specified position. + + The position where the new range will be inserted. + The number of columns to add. + + + + Removes a object from the collection. + + The index of the column to remove from the collection. + A reference to the that was removed from the collection. + + + + Removes a object from the collection. + + The column to remove. + A reference to the that was removed from the collection. + + + + Removes a object from the collection. + + Name of the column to remove. + A reference to the that was removed from the collection. + + + + Removes a range of objects from the collection. + + The index of the first column to remove from the collection. + The number of columns to remove from the collection. + + + + Moves a object to a new position in the collection. + + Index of the column to be moved. + New position for the column. + + + + Moves a range of objects to a new position in the collection. + + The index of the first column in the range that will be moved. + The number of columns that will be moved. + New position for the first column in the range. + + + + Gets a collection of objects that are currently selected. + + + + + Gets a string build a string that contains a complete description of + the column collection, suitable for persisting the control state. + + Whether to include default values in the description. + A string that describes the column collection. + + + + Parses a string containg a description of the column collection (usually obtained + by calling the method) and applies it to a grid. + + Grid that receives the column collection. + String that contains the column collection definition. + True if the column definition was applied successfully. + + + + Specifies the type of file to save or load with the + and methods. + + + + + Text file, cells separated with commas. + + + + + Text file, cells separated with tabs. + + + + + Text file, cells separated with the character specified by the + property. + + + + + Microsoft Excel files (Xls/biff-8 or OpenXml formats). + + + + + Specifies options for use with the and + methods. + + + + + Use default settings. + + + + + Include fixed cells when loading or saving the grid. + + + + + Save only visible rows and columns. + + + + + Save only selected rows. + + + + + Save values as displayed (including formatting and mapping where available). + This flag has no effect when saving text files, which always contain values as displayed. + + + + + Save merged ranges when exporting to Excel with the method. + This flag has no effect when saving text files, it only affects Excel output. + + + + + Load merged ranges when importing from Excel with the method. + This flag has no effect when loading text files, it only affects Excel input. + + + + + Save and load merged ranges when exporting to or importing from Excel with the + and methods. + + + + + Do not freeze rows and columns when exporting to or importing from Excel with the + and methods. + + + + + Load or save file in OpenXml (Office 2007) format. + + + + + Save nodes as Excel groups when exporting to Excel. + + + + + Specifies the type of selection provided by the grid. + + + + + The user can select continuous blocks of cells using the keyboard and the mouse. + Clicking on header cells selects entire rows and columns. + + + + + The user can select only a single cell at a time. + + + + + The user can select continuous blocks of cells using the keyboard and the mouse. + Clicking on header cells does not affect the selection. + + + + + The user can select a single row at a time. + + + + + The user can select a range of contiguous rows at a time. + + + + + The user can select a single column at a time. + + + + + The user can select a range of contiguous columns at a time. + + + + + The user can select non-contiguous rows using control-click. + + + + + This enumeration is for internal use only. + + + + + No movement. + + + + + One cell left, then wrap to previous row. + + + + + One cell right, then wrap to next row. + + + + + One cell up. + + + + + One cell down. + + + + + One cell left. + + + + + One cell right. + + + + + Page up. + + + + + Page down. + + + + + Page left. + + + + + Page right. + + + + + Top cell. + + + + + Bottom cell. + + + + + Leftmost cell. + + + + + Rightmost cell. + + + + + Enumeration used to retrieve objects from the + collection. + + + Cell styles can be retrieved from the collection using the + indexer or the style name. Built-in styles can also be obtained directly through read-only properties. + + + The code below shows three ways to obtain a reference to a grid's default style: + + // s1, s2, and s3 are all references to the grid's Normal style: + CellStyle s1 = _flex.Styles[CellStyleEnum.Normal]; + CellStyle s2 = _flex.Styles["Normal"]; + CellStyle s3 = _flex.Styles.Normal; + + + + + Style used to render scrollable normal cells. + + + This is the parent style for most cells. Setting the control's BackColor, + ForeColor, or Font properties automatically sets the corresponding properties + on the Normal style. + If you change any properties in the Normal style, the changes will be reflected + in all styles that do not explicitly override those properties. + + + + + Style used to render scrollable cells in even-numbered rows. + + + + + Style used to render fixed cells. + + + + + Style used to render cells that are selected and highlighted. + + + + + Style used to render the cell that has the focus. + + + + + Style used to render cells being edited. + + + + + Style used to render cells that are being selected as the user types (see the property). + + + + + Style used to render cells that are frozen (editable and selectable, but not scrollable). + + + + + Style used to render cells that are frozen (editable and selectable, but not scrollable) in even-numbered rows. + + + + + Style used to render the last row on the grid when the property is set to true. + + + + + Style used to render the area of the grid where there are no cells. + + + + + Style used to render selected column headers. + + + + + Style used to render selected row headers. + + + + + Style automatically assigned to grand total nodes created with the method. + + + + + Style automatically assigned to level-0 nodes created with the method. + + + + + Style automatically assigned to level-1 nodes created with the method. + + + + + Style automatically assigned to level-2 nodes created with the method. + + + + + Style automatically assigned to level-3 nodes created with the method. + + + + + Style automatically assigned to level-4 nodes created with the method. + + + + + Style automatically assigned to level-5 nodes created with the method. + + + + + Style used to paint the filter editors. + + + + + Constant that indicates the first custom style. + + + + + Specifies how text is aligned in a grid cell. + + + + + Text is horizontally aligned to the left and vertically aligned to the top of the cell. + + + + + Text is horizontally aligned to the left and vertically aligned to the center of the cell. + + + + + Text is horizontally aligned to the left and vertically aligned to the bottom of the cell. + + + + + Text is horizontally aligned to the center and vertically aligned to the top of the cell. + + + + + Text is horizontally aligned to the center and vertically aligned to the center of the cell. + + + + + Text is horizontally aligned to the center and vertically aligned to the bottom of the cell. + + + + + Text is horizontally aligned to the right and vertically aligned to the top of the cell. + + + + + Text is horizontally aligned to the right and vertically aligned to the center of the cell. + + + + + Text is horizontally aligned to the right and vertically aligned to the bottom of the cell. + + + + + Numbers are aligned to the right, other values to the left, and vertically aligned to the top. + + + + + Numbers are aligned to the right, other values to the left, and vertically aligned to the center. + + + + + Numbers are aligned to the right, other values to the left, and vertically aligned to the bottom. + + + + + Specifies a 3D effect to use when rendering cell text. + + + + + No 3D effect. + + + + + Text is drawn with a shadow offset by one pixel to the right and below the text. + + + + + Text is drawn with a shadow offset by one pixel to the left and above the text. + + + + + Specifies how images are aligns in grid cells. + + + + + Image is horizontally aligned to the left and vertically aligned to the top of the cell. + + + + + Image is horizontally aligned to the left and vertically aligned to the center of the cell. + + + + + Image is horizontally aligned to the left and vertically aligned to the bottom of the cell. + + + + + Image is horizontally aligned to the center and vertically aligned to the top of the cell. + + + + + Image is horizontally aligned to the center and vertically aligned to the center of the cell. + + + + + Image is horizontally aligned to the center and vertically aligned to the bottom of the cell. + + + + + Image is horizontally aligned to the right and vertically aligned to the top of the cell. + + + + + Image is horizontally aligned to the right and vertically aligned to the center of the cell. + + + + + Image is horizontally aligned to the right and vertically aligned to the bottom of the cell. + + + + + Image is scaled to fit the maximum area within the cell while preserving the original aspect ratio. + + + + + Image is stretched to cover the whole cell. + + + + + Image is tiled to cover the whole cell. + + + + + Image is not displayed. + + + + + Image is split into a grid, corner parts are copied and center is stretched to cover the cell. + + + This tiling mode preserves the corners and borders of the source image, and is designed to be + used with the property. + + + + + Specifies whether a style should display the cell text, image, both, or none. + + + + + Display text only (no image). + + + + + Display image only (no text). + + + + + Display the text over the image. + + + + + Display the text next to the image. + + + + + Nothing (cell stays blank). + + + + + Specifies the direction to use when rendering text in a grid cell. + + + + + Text is rendered in the horizontal direction. + + + + + Text is rendered from the bottom of the cell to the top. + + + + + Text is rendered from the top of the cell to the bottom. + + + + + Specifies the type of cell border to display. + + + + + No border. + + + + + Solid flat border. + + + + + Double border. + + + + + Raised border. + + + + + Inset border. + + + + + Groove border. + + + + + Fillet border. + + + + + Dotted border. + + + + + Specifies the direction of cell borders. + + + + + Draw cell borders in both directions. + + + + + Draw cell borders only in the horizontal direction. + + + + + Draw cell borders only in the vertical direction. + + + + + Contains flags that specify which style elements are defined in a object. + + + This enumeration can be used to inspect styles and determine which elements it defines, and it + can also be used to clear specific elements from the style. + Any elements not defined in the style are inherited from the parent style. + + + + + No elements are defined. + + + + + The style defines a font. + + + + + The style defines a background color. + + + + + The style defines a foreground color. + + + + + The style defines margins. + + + + + The style defines borders. + + + + + The style defines the text alignment. + + + + + The style defines a 3D effect for the text. + + + + + The style defines the image alignment. + + + + + The style defines the spacing between images and text. + + + + + The style defines how long strings are trimmed to fit within cells. + + + + + The style defines whether long strings are allowed to wrap within cells. + + + + + The style defines whether to display text and/or images, in the cells. + + + + + The style defines a format string used to convert data into strings. + + + + + The style defines an edit mask used to constrain values entered in the cells. + + + + + The style defines a list of choices used to populate drop down editors. + + + + + The style defines an used to associate cell data with images. + + + + + The style defines the of values contained in the cells. + + + + + The style defines an used to associate cell data with display values. + + + + + The style defines whether text should be rendered horizontally or vertically. + + + + + The style defines an external control to be used as an editor for the cells. + + + + + The style contains arbitrary user data (not used by the control). + + + + + The style specifies a background image. + + + + + The style specifies a background image alignment. + + + + + The style defines a background color of found text. + + + + + All style elements. + + + + + Collection of objects defined for a grid. + + + + + Gets the default style used to paint scrollable cells. + + + + + Gets the style used to paint scrollable cells in alternate rows. + + + This style is empty by default, so all scrollable cells are rendered using the style. + + + + + Gets the style used to paint fixed cells. + + + + + Gets the style used to paint selected column headers. + + + + + Gets the style used to paint selected column headers. + + + + + Gets the style used to paint highlighted selected cells. + + + Use the property to determine whether cells should be + highlighted when the control does not have the focus. + Use the property to determine what types of selection + are allowed. + + + + + Gets the style used to paint the current cell when the control has focus. + + + This style is empty by default, so focused cells are rendered using the style. + + + + + Gets the style used to paint the cell being edited. + + + This style is empty by default, so cells being edited are rendered using the style. + + + + + Gets the style used to paint the cell selected while auto-searching. + + + Use the property to enable auto-searching. + + + + + Gets the style used to paint frozen cells (frozen cells are editable and selectable, but not scrollable). + + + + + Gets the style used to paint frozen cells (frozen cells are editable and selectable, but not scrollable) in alternate rows. + + + This style is empty by default, so frozen cells are rendered using the style. + + + + + Gets the style used to paint cells in the new row template at the bottom of the grid. + + + The new row template is only present when the property is set to true. + + + + + Gets the style used to paint the area of the grid below and to the right of all the cells. + + + Only the and elements of + this style are used. They define the appearance of the space between the last cell and the edges of + the control. + The value defines the color of the lines drawn around the + edge of the sheet and between frozen and scrollable cells. + + + + + Gets the style used to paint the column filter editors. + + + This style is only used if the grid's property + is set to true. + + + + + Gets a by index. + + + + + Gets a built-in by style type. + + + + + Gets a by name. + + + If the specified name doesn't exist, this indexer returns null. + + + + + Gets the number of objects in the collection. + + + + + Adds a new object to the collection. + + Name of the new style. + Base style, used to initialize the properties of the new style. + The new object. + + If a style with the given name already exists, the existing style is returned and no + exception is thrown. + + + + + Adds new object to the collection. + + Name of the new style. + Name of the base style, used to initialize the properties of the new style. + The new object. + + + + Adds a new empty object to the collection. + + Name of the new style. + The new object. + + + + Removes a custom style from the collection. + + Index of the style to be removed. + + Built-in styles can't be removed. + + + + + Removes a custom style from the collection. + + Name of the style to be removed. + + Built-in styles can't be removed. + + + + + Removes a custom style from the collection. + + Style to be removed from the collection. + + Built-in styles can't be removed. + + + + + Clear all styles (even those in use) and reset the built-in styles. + + + The Clear method also removes any custom styles assigned to rows, columns, + and cells. + + + + + Clear all unused styles. + + + Unused styles are unnamed styles that were created and are no longer assigned to + any grid elements. + + + + + Checks whether the collection contains a given style. + + Name of the style to look for. + True if the collection contains a style called , false otherwise. + + + + Gets the index of a style in the collection. + + Style object to look for. + Index of the style in the collection, or -1 if the style is not a member of the collection. + + + + Builds and returns a compact string representation of the style collection. + + Whether styles with no attributes should be included. + A compact string representation of the style collection. + + This method is used internally to implement design-time persistence. + It can also be used for implementing 'skins', by saving the current styles into + a collection and later applying them to the grid using the method. + + + + + Parses a string containing style definitions. + + String containing style definitions. + True if the string was parsed successfully, false otherwise. + + The style definition string is usually obtained from a call to method. + The new definitions are merged with the current ones. To completely replace the styles, + call the method before parsing the new styles. + + + + + The class encapsulates properties that control the appearance of grid cells. + This information includes the background and foreground colors, font, text and image alignment, etc. + + + The property exposes a collection of grid styles, and has + methods for creating and removing styles from the grid. + You can create and define styles at design time, but right-clicking the grid and selecting the + "Edit Styles" menu option. + Styles follow a hierarchical model similar to styles in Microsoft Word or in cascading style sheets. + Every property in a object may be left unassigned, in which case the value is + inherited from a parent style. The parent style is usually the built-in + style. + To determine which elements are defined in a particular style, use the + property. + When you modify the properties of a object, all cells that use that style + are automatically repainted to reflect the changes. + Styles may be assigned to , , and + objects, as shown in the example below. + + + The example below creates three objects and assigns them to grid rows, columns, + and cell ranges. + + // create style with red background + CellStyle cs = _flex.Styles.Add("red"); + Style.BackColor = Color.Red; + + // create style with green background + cs = _flex.Styles.Add("green"); + Style.BackColor = Color.Green; + + // create style with bold font + cs = _flex.Styles.Add("bold"); + Style.Font = new Font("Tahoma", 8, FontStyle.Bold); + + // assign red style to a column + _flex.Cols[3].Style = _flex.Styles["red"]; + + // assign green style to a row + _flex.Rows[3].Style = _flex.Styles["green"]; + + // assign bold style to a cell range + CellRange rg = _flex.GetCellRange(2, 2, 4, 4); + rg.Style = _flex.Styles["bold"]; + After running this code, the third column of the grid will be painted with a red background. The + third row will be painted with a green background. The cell at the intersection will be painted + in red, because column styles have priority over row styles. The remaining style elements for these + cells (font, alignment, etc) are not defined in the new styles and are automatically inherited from + the parent style ().The cells around the intersection will have a bold font. The style that defines the bold font + does not specify a background color, so that element is inherited from the parent style, which may be + the "red", "green", or "normal" styles. + + + + Gets or sets the style name. + + + Style names must be unique. Setting a style name to the name of an already existing + style will throw an exception. + Style names must have one or more characters and may not include curly braces ('{' and '}'). + + + + + Gets or sets the color used to paint the cell background. + + + + + Gets or sets the color of the text in the cell. + + + + + Gets or sets the color of the text in the cell. + + + + + Gets or sets the font used to paint text in the cell. + + + Setting the control's Font property automatically sets the Font + property of the Normal style. + + + + Gets or sets the margins between the edges of the cell and its contents, in pixels. + + + + + Gets or sets whether long strings should automatically wrap within the cell. + + + This property determines whether the grid should automatically break + long strings that contain spaces and display them in multiple lines. + String that contain hard line breaks (vbCrLf or "\n\r") are always + displayed in multiple lines. + + + + + Gets or sets how long strings are trimmed to fit the cell. + + + + + Gets or sets the text alignment. + + + + + Gets or sets the 3D effect used to paint text. + + + + + Gets or sets the text direction. + + + Cells containing vertical text can wrap and be auto sized as usual. + + + + + Gets or sets the image alignment. + + + + + Gets or sets the space between images and text in a cell, in pixels. + + + + + Gets or sets whether to show images, text, or both. + + + + + Gets or sets the format string used to display values. + + + + + Gets or sets the mask string used to edit values. + + + + + Gets or sets a pipe-delimited list of valid values. + + + If the cell is editable, this list of values is used to populate the drop-down + used to edit the cell. + If the list starts with a pipe character, then the list is not exclusive and the + user may type values that are not on the list. + If the list contains three periods ("..."), then a button is displayed in the + cell. When the user presses the button, the grid fires the + event. + If the list contains a pipe followed by three periods ("|..."), then a button is + displayed in the cell as before, and the user may also type into the cell. + See also the property for an alternate way of specifying + valid values for a cell. + + + + + Gets or sets an used to associate cell values with images. + + + + + Gets or sets an used to associate cell values with display values. + + + If the cell is editable, this list of values is used to populate the drop-down + used to edit the cell. In this case, the order of the items in the + combo list is determined by the order of the elements in the dictionary. + The most common dictionary class, , uses arbitrary order. + If you want control over the item order, use a different dictionary class such as + . + The C1FlexGrid assembly also includes a class, + which can be used to create multi-column and data-bound dictionaries. + + + + + Gets or sets the data type for the style. + + + When the grid is bound to a data source, this property is set automatically based on the + data schema. + This property is used to coerce values assigned to cells into the proper type. + + + + + Gets the CellBorder object associated with this style. + + + + + Gets or sets the custom editor used to edit cells that have this style. + + + The grid provides several built-in editors that are automatically + selected based on the properties of the cell being edited. + This property allows you to use external editors when editing values + that have a given . Any control can be used as an + external editor, but to achieve complete integration with the grid, the + external editor should implement the interface. + For details, see the property. + + + + + Gets or sets arbitrary user data associated with this style. + + + This data is not used by the control, and can be used to store any data that is + useful to the application. + + + + + Gets or sets the style's background image. + + + This property works with to determine + whether and how background images are rendered in cells. + + + + + Gets or sets the a value that determines how the style will scale and + position background image. + + + This property works with to determine + whether and how background images are rendered in cells. + + + + + Gets or sets which elements are defined in this style. + + + Elements that are not defined in a particular style are automatically + inherited from the ancestor style (usually the Normal style). + For example, if you create a custom style that defines the + property, all other elements (back color, + alignment, and so on) are inherited from the ancestor style, which may + be the Normal style or another custom style assigned to a row or + column. + + + + + Clears selected elements from this style. + + + + + Clears all elements in this style. + + + + + Copies all elements defined in a source style to this style. + + + This method is used to create styles preserving existing style elements + such as or . + + + The code below changes a column so it looks like a fixed column, without + modifying the column's data type, alignment, etc. + + // create a new style + CellStyle cs = _flex.Styles.Add("newStyle"); + + // set data type, alignment + cs.DataType = typeof(int); + cs.TextAlign = TextAlignEnum.CenterCenter; + + // copy remaining elements from "Fixed" style + cs.MergeWith(_flex.Styles.Fixed); + + // assign new style to grid column + _flex.Cols[col].Style = cs; + + + + + Returns a compact string representation of this . + + A string containing the settings of all style elements defined in this CellStyle. + + This method is used to persist grid styles and can be used to define and save 'skins'. + See the and + methods. + The string returned contains definitions only for the style elements that are defined by this + . Elements inherited from other styles are not included. To build a string containing + specific elements, use the method instead. + + + The code below creates a style with a custom font and background color and builds a string that represents + the new style. Then it uses the string to initialize a second style. + + // create style with custom font and back color + CellStyle cs = _flex.Styles.Add("s1"); + cs.Font = new Font("Arial", 12, FontStyle.Bold); + cs.BackColor = Color.Beige; + + // save style definition into a string + string styleDef = cs.BuildString(); + + // use string to initialize another style + CellStyle csNew = _flex.Styles.Add("s2"); + csNew.ParseString(styleDef); + + // compare styles + Debug.Assert(csNew.Font.Equals(cs.Font)); + Debug.Assert(csNew.BackColor.Equals(cs.BackColor)); + + + + + Returns a string representation of this . + + + that specifies which style elements should be included in the string. + A string containing the settings of the specified style elements. + + This method is used to persist grid styles and can be used to define and save 'skins'. + See the and + methods. + + + The code below shows the effect of specifying different values for the parameter. It builds + one compact string containing only the elements actually defined in a style, and another including all style elements. + + // build compact and a long style definition strings + string s1 = _flex.Styles.Fixed.BuildString(); + string s2 = _flex.Styles.Fixed.BuildString(StyleElementFlags.All); + + // show both style definitions + Console.WriteLine("{0}: {1}", s1.Length, s1); + Console.WriteLine("{0}: {1}", s2.Length, s2); + + + + + Rebuilds this style based on a description contained in a string. + + True if the string was successfully parsed, false otherwise. + + This method is used to persist grid styles and can be used to define and save 'skins'. + See the and + methods. + + + + + Renders a string and an image into a object using this style. + + + object to render into. + Area where the element will be displayed. + Text to render. + Image to render. + Combination of that determines which elements will be rendered. + + This method allows using objects to render objects outside the grid. It can be + useful when implementing owner-drawn applications and style editors for example. + + + + + Renders a string and an image into a object using this style. + + + object to render into. + Area where the element will be displayed. + Text to render. + Image to render. + + + + Renders a string and an image into a object using this style. + + + object to render into. + Area where the element will be displayed. + Text to render. + + + + Renders a string and an image into a object using this style. + + + object to render into. + Area where the element will be displayed. + Image to render. + + + + Gets the element used for rendering + strings when the + property is set to true. + + + + + Gets the content portion of a cell's rectangle. + + Cell rectangle. + A rectangle that represents the content portion of a cell, discounting the + area taken up by the cell borders. + + + + Gets the text portion of a cell's rectangle. + + Cell rectangle. + Image that shares the cell space with the text. + A rectangle that represents the text portion of a cell, discounting the + area taken up by the cell borders, padding, and images. + + + + Gets the image portion of a cell's rectangle. + + Cell rectangle. + Image to be displayed on the cell. + A rectangle that represents the image portion of a cell, discounting the + area taken up by the cell borders and padding. + + + + Determines whether two objects are equal. + + Style to compare with this style. + True if the two styles are equal, false otherwise. + + + + Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table. + + A hash code for the style instance. + + + + The class encapsulates properties that control the appearance of borders in + objects. + + + + + Gets or sets the border style. + + + + + Gets or sets the border direction. + + + + + Gets or sets the border color (except for 3D borders). + + + 3D borders are always drawn using the system colors defined for highlights and shadows. + + + + + Gets or sets the border width (except for 3D borders). + + + 3D borders are always one or two pixels wide. + + + + + Specifies the appearance of the outline tree. + + + + + Do not show the outline tree. + + + + + Show tree lines next to node rows. + + + + + Show expand/collapse symbols on node rows. + + + + + Show outline buttons across the top fixed row. + + + + + Show tree lines next to all rows (nodes and data). + + + + + Combination of , , and + . + + + + + Combination of and . + + + + + Combination of , , + and . + + + + + Combination of , , and + . + + + + + The GridTree class encapsulates properties that specify the appearance, position, and behavior of the outline tree. + + + Each grid has a single GridTree object, which can be obtained using the property. + + + + + Resets the object. + + + + + Gets or sets the color of the lines in the outline tree. + + + See also the property. + + + + + Gets or sets the line style used to draw the outline tree. + + + By default, this property is set to DashStyle.Dot, which causes the tree + to be drawn with dotted lines. You can change the value of this property to draw the + tree using solid lines instead. + + + + + Gets or sets the style of the outline tree. + + + Use the Style property to determine whether the outline tree should include lines connecting + the nodes and buttons for collapsing and expanding the nodes. See the + enumeration for details. + Use the property to determine where the grid will show the outline tree. + + + + + Gets or sets the index of the column where the outline tree is displayed. + + By default, this property is set to -1, which causes the tree to be hidden. + + + + Gets or sets the indentation, in pixels, of each tree level. + + + If you set the Indent property to a value that is too narrow to fit the and + images, the grid will adjust it to fit the images. + + + + Gets or sets the image displayed next to collapsed nodes. + + + Setting this property to null resets it and causes the grid to use the default image (a plus sign). + To hide the images, use the property. + + + + + Gets or sets the image displayed next to expanded nodes. + + + Setting this property to null resets it and causes the grid to use the default image (a minus sign). + To hide the images, use the property. + + + + + If True then the collapse/expand button will not be displayed if all children of node are invisible. + + + + + Expands all nodes up to the specified level, collapses others. + + The level to show. Any nodes with higher than this + will be collapsed, others will be expanded. + + + + Gets the level of the deepest node in the outline. + + + This property can be used with methods that take an outline level as + a parameter (for example, and ). + + + + + Sorts all nodes at the given level. + + Level of the nodes to sort. + + value that controls sort direction and options. + Start of the range of columns to sort. + End of the range of columns to sort. + + The grid recognizes two types of row: regular rows which contain data, and node rows which are used + to group data. This method only sorts the row nodes; it does not reorder the data rows within each node. + To sort the data rows, use the grid's method instead. + + + + + Sorts all nodes at the given level using the specified comparer. + + Level of the nodes to sort. + An object that compares objects. + + + + Static class containing UI strings used by the designer. + + + + + StyleContext contains a base Style definition and a list of + named Styles. It provides the following services: + - Style management (create, edit, and remove Styles) + - Style inheritance mechanism + - Rendering and measuring methods + + + + + Style contains a collection of arbitrary attributes, + represented by a name/object entry, a reference to a parent + Style, and a reference to the containing StyleContext. + + + + + Specifies the type of border to be drawn around the control. + + + + + No border. + + + + + A single-line border. + + + + + A three-dimensional border. + + + + + A light sunken border. + + + + + A border drawn using XP themes. + + + + + Base class for controls that support auto-scrolling behavior. + + + This class is similar to , but provides + extra customization, better scroll notification, and support for scroll tracking. + + + + + Creates a new instance of a class. + + + + + Gets or sets which scroll bars should appear on the control. + + + Scroll bars are displayed only if the contents of the control extend beyond its + client area. For example, if is set to , + a horizontal scroll bar is displayed only if the control is not wide enough to display all + columns at once. + Even when it has no scrollbars, the control will still scroll to keep the selection visible. + If you want to prevent scrolling, handle the event and + set its parameter to true. + You can force the control to display scrollbars at all times with the + property. + You can determine which scrollbars are currently visible with the + property. + + + + + + + Gets or sets the location of the auto-scroll position. + + + Use the property to get or set the scroll position using pixel coordinates. + Use the and properties to get or + set the scroll position using cell coordinates. + + + This code binds two grids (_flexLeft and _flexRight) together and synchronizes their scrolling in the vertical + direction (the user can scroll the grids independently in the horizontal direction). + + // bind grids together + _flexRight.DataSource = _flexLeft; + _flexLeft.ScrollBars = ScrollBars.Horizontal; + + // synchronize vertical scrolling + // (this handles the AfterScroll event for both grids) + void flex_AfterScroll(object sender, C1.Win.C1FlexGrid.RangeEventArgs e) + { + // update sender grid (could be _flexLeft or _flexRight) + C1FlexGrid.C1FlexGrid src = ((C1FlexGrid)sender); + src.Update(); + + // get new vertical position from sender grid + int y = src.ScrollPosition.Y; + + // apply new vertical position to the other grid + if (src.Equals == _flexLeft) + { + _flexRight.ScrollPosition = new Point(_flexRight.ScrollPosition.X, y); + } + else + { + _flexLeft.ScrollPosition = new Point(_flexLeft.ScrollPosition.X, y); + } + } + + + + + Gets or sets the type of border around the control. + + + + + Gets a value that indicates which scrollbars are currently visible. + + + + + + + Maintains performance by preventing the control from updating itself until + the method is called. + + + + + Resumes updating the control after calls to the method. + + + + + Called when the control receives a WM_THEMECHANGED message. + + + The WM_THEMECHANGED message is broadcast to every window following a + theme change event. Examples of theme change events are the activation of a + theme, the deactivation of a theme, or a transition from one theme to another. + + + + + Called when the control receives a WM_IME_STARTCOMPOSITION message. + + + The WM_IME_STARTCOMPOSITION message is sent immediately before the IME generates + the composition string as a result of a keystroke. The message is a notification to + an IME window to open its composition window. An application should process this + message if it displays composition characters itself. + + + + + Called after the control scrolls (see the property). + + + value that indicates the scroll direction. + + + + Called before the controls displays a scroll tip. + + New value for the vertical scrollbar. + + + + Gets a rectangle that defines the scrollable portion of the control. + + + + + Builds a rectangle that defines the scrollable portion of the control for a given pair of scroll offsets. + + Horizontal scroll offset. + Vertical scroll offset. + A that defines the scrollable portion of the control. + + This method is for internal use. It allows derived classes to customize the control scrolling behavior. + + + + + Raises the event. + + A that contains the event data. + + + + Raises the event. + + An that contains the event data. + + + + Raises the event. + + A that contains the event data. + + + + Raises the event. + + An that contains the event data. + + + + Calculates the new position of a scrollbar in response to a user command. + + Scroll command (SB_LINEUP, etc). + True for the vertical scrollbar, false for the horizontal scrollbar. + Current scrollbar position. + Scrollbar thumb position. + The new position for the scrollbar. + + Derived classes may override this method to customize the scrolling behavior. + + + + + Specifies a visual style to use when rendering the control. + + + + + Do not use any visual styles. Render the control using the styles and properties only. + + + + + Render the control with an appearance based on the current system settings. + + + + + Render the control with an appearance based on the Office 2007 Blue color scheme. + + + + + Render the control with an appearance based on the Office 2007 Silver color scheme. + + + + + Render the control with an appearance based on the Office 2007 Black color scheme. + + + + + Render the control with an appearance based on the Office 2010 Blue color scheme. + + + + + Render the control with an appearance based on the Office 2010 Silver color scheme. + + + + + Render the control with an appearance based on the Office 2010 Black color scheme. + + + + + Represents an abstract base class for custom grid renderers. + + + To create custom grid renderers, inherit from this class, override the appropriate + virtual methods and properties, and assign an instance of your class to the grid's + property. + + + + + Represents the type of cell being rendered. + + + + + A normal scrollable cell. + + + + + The top left fixed cell. + + + + + A column header cell. + + + + + A selected column header cell. + + + + + A column header cell currently under the mouse. + + + + + A selected column header cell currently under the mouse. + + + + + A row header cell. + + + + + A selected row header cell. + + + + + A row header cell currently under the mouse. + + + + + A selected row header cell currently under the mouse. + + + + + A selected normal cell. + + + + + The cell that contains the cursor. + + + + + Initializes a new instance of a . + + + + + Gets a value that determines whether this renderer tracks the selection to paint + highlighted column and row headers. + + + + + Gets a value that determines whether this renderer renders hot cells + differently than normal cells. + + + Hot cells are cells currently under the mouse. If a renderer tracks the mouse, + then it will be called as the mouse moves over the grid. + + + + + Gets the foreground color of header cells in the normal state. + + + + + Draws a grid cell of any type. + + + that contains the cell being drawn. + + that provides information about the cell being drawn. + + This method determines the type of cell being drawn and then calls the + method passing the type of cell to be drawn. + + + + + Draws a single grid cell of a specific type. + + + that contains the cell being drawn. + + that provides information about the cell being drawn. + + value that determines the type of cell being drawn. + + + + Gets a object used to paint the cell background for a specific cell type. + + + that contains the cell being drawn. + + value that determines the type of cell being drawn. + A that represents the bounds of the cell being drawn. + A object used to render the cell background. + + The parameter can be used to create or select complex brushes such as + gradient or tiled image brushes. + + + + + Gets a object used to paint the cell borders. + + + value that determines the type of cell being drawn. + A object used to paint the cell borders. + + + + Represents the base abstract class for Office2007 style renderers. + + + The easiest way to create a new high-quality renderer is to derive from + this class and provide a constructor that initializes the 25 colors that + define the renderer. + + + + + Initializes a new instance of a . + + Background color for highlighted cells. + Color of the border around the top left fixed cell. + Color of the background for the top left fixed cell. + First color of the gradient background for the image in the top left fixed cell. + Second color of the gradient background for the image in the top left fixed cell. + First color of the gradient background for column headers. + Second color of the gradient background for column headers. + Color of the border around column headers. + First color of the gradient background for selected column headers. + Second color of the gradient background for selected column headers. + Color of the border around selected column headers. + First color of the gradient background for hot column headers. + Second color of the gradient background for hot column headers. + Color of the border around hot column headers. + First color of the gradient background for selected hot column headers. + Second color of the gradient background for selected hot column headers. + Color of the border around hot selected column headers. + Color of the background for row headers. + Color of the border around row headers. + Color of the background for selected row headers. + Color of the border around selected row headers. + Color of the background for hot row headers. + Color of the border around hot row headers. + Color of the background for hot selected row headers. + Color of the border around selected hot row headers. + + + + Initializes a new instance of a using + a specified color palette. + + Array with 25 colors to be used as a palette. + + + + Gets or sets the color used to paint the background of highlighted cells. + + + + + Gets a value that determines whether this renderer renders hot cells + differently than normal cells. + + + Hot cells are cells currently under the mouse. If a renderer tracks the mouse, + then it will be called as the mouse moves over the grid. + + + + + Gets a value that determines whether this renderer tracks the selection to paint + highlighted column and row headers. + + + + + Gets the background brush for a cell. + + + that contains the cell. + + value that describes the type of cell being rendered. + + that defines the cell bounds. + A used to paint the cell. + + + + Gets a pen used to paint the cell borders. + + + that describes the type of cell being rendered. + A used to paint the cell borders. + + + + Draws a single grid cell of a specific type. + + + that contains the cell being drawn. + + that provides information about the cell being drawn. + + value that determines the type of cell being drawn. + + + + that implements the Office2007 Blue visual style. + + + + + Initializes a new instance of a . + + + + + that implements the Office2007 Silver visual style. + + + + + Initializes a new instance of a . + + + + + that implements the Office2007 Black visual style. + + + + + Initializes a new instance of a . + + + + + that implements the Office2010 Blue visual style. + + + + + Initializes a new instance of a . + + + + + that implements the Office2010 Silver visual style. + + + + + Initializes a new instance of a . + + + + + that implements the Office2010 Black visual style. + + + + + Initializes a new instance of a . + + + + + Gets the foreground color of header cells in the normal state. + + + + + that implements the System visual style. + + + + + Gets a value that determines whether this renderer renders hot cells + differently than normal cells. + + + Hot cells are cells currently under the mouse. If a renderer tracks the mouse, + then it will be called as the mouse moves over the grid. + + + + + Gets a value that determines whether this renderer tracks the selection to paint + highlighted column and row headers. + + + + + Draws a single grid cell of a specific type. + + + that contains the cell being drawn. + + that provides information about the cell being drawn. + + value that determines the type of cell being drawn. + + + + Static class containing UI strings used by the designer. + + + + + Specifies the language to be used for localizing the control. + + + + + Localize the control to the language specified by the CurrentUICulture. + + + + + Localize the control to Arabic. + + + + + Localize the control to Czech. + + + + + Localize the control to Danish. + + + + + Localize the control to Dutch. + + + + + Localize the control to English. + + + + + Localize the control to Finnish. + + + + + Localize the control to French. + + + + + Localize the control to German. + + + + + Localize the control to Greek. + + + + + Localize the control to Hebrew. + + + + + Localize the control to Italian. + + + + + Localize the control to Japanese. + + + + + Localize the control to Norwegian. + + + + + Localize the control to Polish. + + + + + Localize the control to Portuguese. + + + + + Localize the control to Russian. + + + + + Localize the control to Slovak. + + + + + Localize the control to Spanish. + + + + + Localize the control to Swedish. + + + + + Localize the control to Chinese (simplified, PRC and Singapore). + + + + + Localize the control to Turkish. + + + + + Localize the control to Persian (Farsi). + + + + + Localize the control to Korean. + + + + + Localize the control to Chinese (traditional, Taiwan, Hong Kong, and Macao). + + + + + Localize the control to Hungarian. + + + + \ No newline at end of file diff --git a/PROMS/WORD ADD-INs/FGAddIn/FGAddIn/bin/Debug/FGAddIn.dll b/PROMS/WORD ADD-INs/FGAddIn/FGAddIn/bin/Debug/FGAddIn.dll new file mode 100644 index 00000000..76f75717 Binary files /dev/null and b/PROMS/WORD ADD-INs/FGAddIn/FGAddIn/bin/Debug/FGAddIn.dll differ diff --git a/PROMS/WORD ADD-INs/FGAddIn/FGAddIn/bin/Debug/FGAddIn.dll.manifest b/PROMS/WORD ADD-INs/FGAddIn/FGAddIn/bin/Debug/FGAddIn.dll.manifest new file mode 100644 index 00000000..7e8425d0 --- /dev/null +++ b/PROMS/WORD ADD-INs/FGAddIn/FGAddIn/bin/Debug/FGAddIn.dll.manifest @@ -0,0 +1,198 @@ + + + + FGAddIn + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + pPo/i4gW6PsXcEe7T9XOkIdZBQUdihI/5HD5157RqQ4= + + + + + + + + + + + + opx5p2MN6E73v+FltHn9BCgwVJgcmPLUVAlX5xFN3K8= + + + + + + + + + + + + jLCTF8Mm6bD4PDN+rnzN6q0+ReXaNgPh68kMWgatFwI= + + + + + + + + + + + + + + + + + + + FGAddIn + FGAddIn + + + + + + +pd186ECuuQwMWt8IfagMQsh9D3/LBADrJNy/w+da1Bg=ogiF1Mt9XcZhY6He3gNXvFkfawg0+NHSx13uP7Or28eLVDBxn6ktfOW0Dj7yZwZmR/gy4P3/7IF246YWE10rhuKV0zCma9YnHmO0F4Sj7ce2zHFlpBgE15T/A6mo+IcEJKW2V981h0jIgpItQR4cTKfvtxayME6wfyRSTXH6qW0=rghAhQ7/hHethob8lbZ9+PkYfHfoSOScDVou5jrgYzk4BO/u40SXxOLbyCOVy1Sg2eEbhSMjaXGObxYKx7Xjoe42XcVDKM/PCGAml3kDfTapVAmQGjXUDExFyX5t5OxmXKQIUrjMsS4zR1OvHAtlUXehNPHBrIUgHzfx3ted+B0=AQABCN=VLN\JeffuJt9OW0CA0rxKy0WLC4LgAq5XuOBYw10DJksYmfNdW0=KBPvnCgy/gI5UuzC5pPgBeZGrira6ZFV/ZAtzKQb4ILIo29yPnlTegC7/RCZl/tlgLBFTv0SPBd7/DA0Xd2O8loOltXG1eViT+jeOvTVx/aEL5/vJs+Sp2Mr8JKenJmnBwztYufh1MWBRJ6k/xaO+a+c4eP6irIlFPLiOAOYgPc=rghAhQ7/hHethob8lbZ9+PkYfHfoSOScDVou5jrgYzk4BO/u40SXxOLbyCOVy1Sg2eEbhSMjaXGObxYKx7Xjoe42XcVDKM/PCGAml3kDfTapVAmQGjXUDExFyX5t5OxmXKQIUrjMsS4zR1OvHAtlUXehNPHBrIUgHzfx3ted+B0=AQABMIIBuTCCASKgAwIBAgIQF0gpHnXZdZhG4yRlDQdQczANBgkqhkiG9w0BAQsFADAbMRkwFwYDVQQDHhAAVgBMAE4AXABKAGUAZgBmMB4XDTIxMDMyOTE4NDQ0MVoXDTIyMDMzMDAwNDQ0MVowGzEZMBcGA1UEAx4QAFYATABOAFwASgBlAGYAZjCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEArghAhQ7/hHethob8lbZ9+PkYfHfoSOScDVou5jrgYzk4BO/u40SXxOLbyCOVy1Sg2eEbhSMjaXGObxYKx7Xjoe42XcVDKM/PCGAml3kDfTapVAmQGjXUDExFyX5t5OxmXKQIUrjMsS4zR1OvHAtlUXehNPHBrIUgHzfx3ted+B0CAwEAATANBgkqhkiG9w0BAQsFAAOBgQCqwlPUuO+fJbmnykx77VIIKm6zikU2GEq0DUeRuow1dEPDMCdnyW0Occe0RlhjsKcVYtJLljDlbJddAkM7/qF0Txft5Hw9u5YpvEbvHyAKR0nZSdev6Fni4qrgvu7kRgndU50Dph7CHC7f6RbkFK0DEWVT+4nghDapVsQM6c537g== \ No newline at end of file diff --git a/PROMS/WORD ADD-INs/FGAddIn/FGAddIn/bin/Debug/FGAddIn.pdb b/PROMS/WORD ADD-INs/FGAddIn/FGAddIn/bin/Debug/FGAddIn.pdb new file mode 100644 index 00000000..b36a27f1 Binary files /dev/null and b/PROMS/WORD ADD-INs/FGAddIn/FGAddIn/bin/Debug/FGAddIn.pdb differ diff --git a/PROMS/WORD ADD-INs/FGAddIn/FGAddIn/bin/Debug/FGAddIn.vsto b/PROMS/WORD ADD-INs/FGAddIn/FGAddIn/bin/Debug/FGAddIn.vsto new file mode 100644 index 00000000..570f58d5 --- /dev/null +++ b/PROMS/WORD ADD-INs/FGAddIn/FGAddIn/bin/Debug/FGAddIn.vsto @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + HY8z+u6IQo0Ksdc26AYi70oPuw8VG+Tq/+Op8UUeYio= + + + +0qp5j3mahV//AVY8j8E3yGAEKWZHOyofDVZ0zlovG9k=RELs3h21TiA+4aCWIE+rO7mn4GhuHVpUMxixh1HZqf6K3HQ7aW1FAfG7Uq4+AVFR9IH4c/waEOdeSbHPRgWIRuV1p5CZflppxDJd6FcWnSmD3/N48K5Ncrf4rG/O0Rzg7kKYsHJ+T5Rh2GTG7SxKoFBJhQ98bM7sOGcKMzZvCeQ=rghAhQ7/hHethob8lbZ9+PkYfHfoSOScDVou5jrgYzk4BO/u40SXxOLbyCOVy1Sg2eEbhSMjaXGObxYKx7Xjoe42XcVDKM/PCGAml3kDfTapVAmQGjXUDExFyX5t5OxmXKQIUrjMsS4zR1OvHAtlUXehNPHBrIUgHzfx3ted+B0=AQABCN=VLN\JeffVWdbpRpq17vLRn7RVeNM/BGRP2P0IP/83bsAlt+GW8M=AhOGddIxR0zOkoAQHYumNvfnsBLBEmAJrzZlFb+xAw6BphdLiKhgnr9AJyPZKWDLUSV5i64FnHgjDGin/k6Yk5zbUbfmnKr448hyGZ5hOkUT2sv0BEov84IFw1N/8RR5nPsH0fOiOqswBsS/q6DKA1JgTk8kGmnO8F7kpcZEFZU=rghAhQ7/hHethob8lbZ9+PkYfHfoSOScDVou5jrgYzk4BO/u40SXxOLbyCOVy1Sg2eEbhSMjaXGObxYKx7Xjoe42XcVDKM/PCGAml3kDfTapVAmQGjXUDExFyX5t5OxmXKQIUrjMsS4zR1OvHAtlUXehNPHBrIUgHzfx3ted+B0=AQABMIIBuTCCASKgAwIBAgIQF0gpHnXZdZhG4yRlDQdQczANBgkqhkiG9w0BAQsFADAbMRkwFwYDVQQDHhAAVgBMAE4AXABKAGUAZgBmMB4XDTIxMDMyOTE4NDQ0MVoXDTIyMDMzMDAwNDQ0MVowGzEZMBcGA1UEAx4QAFYATABOAFwASgBlAGYAZjCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEArghAhQ7/hHethob8lbZ9+PkYfHfoSOScDVou5jrgYzk4BO/u40SXxOLbyCOVy1Sg2eEbhSMjaXGObxYKx7Xjoe42XcVDKM/PCGAml3kDfTapVAmQGjXUDExFyX5t5OxmXKQIUrjMsS4zR1OvHAtlUXehNPHBrIUgHzfx3ted+B0CAwEAATANBgkqhkiG9w0BAQsFAAOBgQCqwlPUuO+fJbmnykx77VIIKm6zikU2GEq0DUeRuow1dEPDMCdnyW0Occe0RlhjsKcVYtJLljDlbJddAkM7/qF0Txft5Hw9u5YpvEbvHyAKR0nZSdev6Fni4qrgvu7kRgndU50Dph7CHC7f6RbkFK0DEWVT+4nghDapVsQM6c537g== \ No newline at end of file diff --git a/PROMS/WORD ADD-INs/FGAddIn/FGAddIn/bin/Debug/Microsoft.Office.Tools.Common.v4.0.Utilities.dll b/PROMS/WORD ADD-INs/FGAddIn/FGAddIn/bin/Debug/Microsoft.Office.Tools.Common.v4.0.Utilities.dll new file mode 100644 index 00000000..03a6ef84 Binary files /dev/null and b/PROMS/WORD ADD-INs/FGAddIn/FGAddIn/bin/Debug/Microsoft.Office.Tools.Common.v4.0.Utilities.dll differ diff --git a/PROMS/WORD ADD-INs/FGAddIn/FGAddIn/bin/Debug/app.publish/Application Files/FGAddIn_1_0_0_0/C1.Win.C1FlexGrid.2.dll.deploy b/PROMS/WORD ADD-INs/FGAddIn/FGAddIn/bin/Debug/app.publish/Application Files/FGAddIn_1_0_0_0/C1.Win.C1FlexGrid.2.dll.deploy new file mode 100644 index 00000000..5283754f Binary files /dev/null and b/PROMS/WORD ADD-INs/FGAddIn/FGAddIn/bin/Debug/app.publish/Application Files/FGAddIn_1_0_0_0/C1.Win.C1FlexGrid.2.dll.deploy differ diff --git a/PROMS/WORD ADD-INs/FGAddIn/FGAddIn/bin/Debug/app.publish/Application Files/FGAddIn_1_0_0_0/FGAddIn.dll.deploy b/PROMS/WORD ADD-INs/FGAddIn/FGAddIn/bin/Debug/app.publish/Application Files/FGAddIn_1_0_0_0/FGAddIn.dll.deploy new file mode 100644 index 00000000..76f75717 Binary files /dev/null and b/PROMS/WORD ADD-INs/FGAddIn/FGAddIn/bin/Debug/app.publish/Application Files/FGAddIn_1_0_0_0/FGAddIn.dll.deploy differ diff --git a/PROMS/WORD ADD-INs/FGAddIn/FGAddIn/bin/Debug/app.publish/Application Files/FGAddIn_1_0_0_0/FGAddIn.dll.manifest b/PROMS/WORD ADD-INs/FGAddIn/FGAddIn/bin/Debug/app.publish/Application Files/FGAddIn_1_0_0_0/FGAddIn.dll.manifest new file mode 100644 index 00000000..7e8425d0 --- /dev/null +++ b/PROMS/WORD ADD-INs/FGAddIn/FGAddIn/bin/Debug/app.publish/Application Files/FGAddIn_1_0_0_0/FGAddIn.dll.manifest @@ -0,0 +1,198 @@ + + + + FGAddIn + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + pPo/i4gW6PsXcEe7T9XOkIdZBQUdihI/5HD5157RqQ4= + + + + + + + + + + + + opx5p2MN6E73v+FltHn9BCgwVJgcmPLUVAlX5xFN3K8= + + + + + + + + + + + + jLCTF8Mm6bD4PDN+rnzN6q0+ReXaNgPh68kMWgatFwI= + + + + + + + + + + + + + + + + + + + FGAddIn + FGAddIn + + + + + + +pd186ECuuQwMWt8IfagMQsh9D3/LBADrJNy/w+da1Bg=ogiF1Mt9XcZhY6He3gNXvFkfawg0+NHSx13uP7Or28eLVDBxn6ktfOW0Dj7yZwZmR/gy4P3/7IF246YWE10rhuKV0zCma9YnHmO0F4Sj7ce2zHFlpBgE15T/A6mo+IcEJKW2V981h0jIgpItQR4cTKfvtxayME6wfyRSTXH6qW0=rghAhQ7/hHethob8lbZ9+PkYfHfoSOScDVou5jrgYzk4BO/u40SXxOLbyCOVy1Sg2eEbhSMjaXGObxYKx7Xjoe42XcVDKM/PCGAml3kDfTapVAmQGjXUDExFyX5t5OxmXKQIUrjMsS4zR1OvHAtlUXehNPHBrIUgHzfx3ted+B0=AQABCN=VLN\JeffuJt9OW0CA0rxKy0WLC4LgAq5XuOBYw10DJksYmfNdW0=KBPvnCgy/gI5UuzC5pPgBeZGrira6ZFV/ZAtzKQb4ILIo29yPnlTegC7/RCZl/tlgLBFTv0SPBd7/DA0Xd2O8loOltXG1eViT+jeOvTVx/aEL5/vJs+Sp2Mr8JKenJmnBwztYufh1MWBRJ6k/xaO+a+c4eP6irIlFPLiOAOYgPc=rghAhQ7/hHethob8lbZ9+PkYfHfoSOScDVou5jrgYzk4BO/u40SXxOLbyCOVy1Sg2eEbhSMjaXGObxYKx7Xjoe42XcVDKM/PCGAml3kDfTapVAmQGjXUDExFyX5t5OxmXKQIUrjMsS4zR1OvHAtlUXehNPHBrIUgHzfx3ted+B0=AQABMIIBuTCCASKgAwIBAgIQF0gpHnXZdZhG4yRlDQdQczANBgkqhkiG9w0BAQsFADAbMRkwFwYDVQQDHhAAVgBMAE4AXABKAGUAZgBmMB4XDTIxMDMyOTE4NDQ0MVoXDTIyMDMzMDAwNDQ0MVowGzEZMBcGA1UEAx4QAFYATABOAFwASgBlAGYAZjCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEArghAhQ7/hHethob8lbZ9+PkYfHfoSOScDVou5jrgYzk4BO/u40SXxOLbyCOVy1Sg2eEbhSMjaXGObxYKx7Xjoe42XcVDKM/PCGAml3kDfTapVAmQGjXUDExFyX5t5OxmXKQIUrjMsS4zR1OvHAtlUXehNPHBrIUgHzfx3ted+B0CAwEAATANBgkqhkiG9w0BAQsFAAOBgQCqwlPUuO+fJbmnykx77VIIKm6zikU2GEq0DUeRuow1dEPDMCdnyW0Occe0RlhjsKcVYtJLljDlbJddAkM7/qF0Txft5Hw9u5YpvEbvHyAKR0nZSdev6Fni4qrgvu7kRgndU50Dph7CHC7f6RbkFK0DEWVT+4nghDapVsQM6c537g== \ No newline at end of file diff --git a/PROMS/WORD ADD-INs/FGAddIn/FGAddIn/bin/Debug/app.publish/Application Files/FGAddIn_1_0_0_0/FGAddIn.vsto b/PROMS/WORD ADD-INs/FGAddIn/FGAddIn/bin/Debug/app.publish/Application Files/FGAddIn_1_0_0_0/FGAddIn.vsto new file mode 100644 index 00000000..528ee0f6 --- /dev/null +++ b/PROMS/WORD ADD-INs/FGAddIn/FGAddIn/bin/Debug/app.publish/Application Files/FGAddIn_1_0_0_0/FGAddIn.vsto @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + HY8z+u6IQo0Ksdc26AYi70oPuw8VG+Tq/+Op8UUeYio= + + + +5zasxc/cEUfuNdwtpfOgf321LuIjqAyEevkqwDb4Lb8=AlXvYiVFbhI7bhyBVJa+XRSJe84Hrdq+bF6K4u0VgV04UmUO0l8eEnCi9ICyVq+jsNOviwre0dQaxUGRFnmT8U/wpD7zx17SCDYjeUU3lmoApDq7eeHZ+miTE+RLzUCKc2JfH6A6hoJsUI/mgjstwYanDHGN2txJj6vDY0+ZUAI=rghAhQ7/hHethob8lbZ9+PkYfHfoSOScDVou5jrgYzk4BO/u40SXxOLbyCOVy1Sg2eEbhSMjaXGObxYKx7Xjoe42XcVDKM/PCGAml3kDfTapVAmQGjXUDExFyX5t5OxmXKQIUrjMsS4zR1OvHAtlUXehNPHBrIUgHzfx3ted+B0=AQABCN=VLN\JeffdbxYn1M5i//rGErmD4DjOJgaDmC6Y672Or8OeZfMzBw=mvyQuVj1M3pIlQMlCawB6K+q6tSgkVR6NBJKRoNxrAu72Z9PiLh/2UXlSoEzEtS9m1PJ1YjFe0FkaK7Ac/LY0QH2owDDwL1rRuL4LoMNZbLtX75NxgR5qKACGI56mK4VijaeQiqLLgBsWxcyr9B1jlDoMV51pGsDsEgsQg3Nq4M=rghAhQ7/hHethob8lbZ9+PkYfHfoSOScDVou5jrgYzk4BO/u40SXxOLbyCOVy1Sg2eEbhSMjaXGObxYKx7Xjoe42XcVDKM/PCGAml3kDfTapVAmQGjXUDExFyX5t5OxmXKQIUrjMsS4zR1OvHAtlUXehNPHBrIUgHzfx3ted+B0=AQABMIIBuTCCASKgAwIBAgIQF0gpHnXZdZhG4yRlDQdQczANBgkqhkiG9w0BAQsFADAbMRkwFwYDVQQDHhAAVgBMAE4AXABKAGUAZgBmMB4XDTIxMDMyOTE4NDQ0MVoXDTIyMDMzMDAwNDQ0MVowGzEZMBcGA1UEAx4QAFYATABOAFwASgBlAGYAZjCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEArghAhQ7/hHethob8lbZ9+PkYfHfoSOScDVou5jrgYzk4BO/u40SXxOLbyCOVy1Sg2eEbhSMjaXGObxYKx7Xjoe42XcVDKM/PCGAml3kDfTapVAmQGjXUDExFyX5t5OxmXKQIUrjMsS4zR1OvHAtlUXehNPHBrIUgHzfx3ted+B0CAwEAATANBgkqhkiG9w0BAQsFAAOBgQCqwlPUuO+fJbmnykx77VIIKm6zikU2GEq0DUeRuow1dEPDMCdnyW0Occe0RlhjsKcVYtJLljDlbJddAkM7/qF0Txft5Hw9u5YpvEbvHyAKR0nZSdev6Fni4qrgvu7kRgndU50Dph7CHC7f6RbkFK0DEWVT+4nghDapVsQM6c537g== \ No newline at end of file diff --git a/PROMS/WORD ADD-INs/FGAddIn/FGAddIn/bin/Debug/app.publish/Application Files/FGAddIn_1_0_0_0/Microsoft.Office.Tools.Common.v4.0.Utilities.dll.deploy b/PROMS/WORD ADD-INs/FGAddIn/FGAddIn/bin/Debug/app.publish/Application Files/FGAddIn_1_0_0_0/Microsoft.Office.Tools.Common.v4.0.Utilities.dll.deploy new file mode 100644 index 00000000..03a6ef84 Binary files /dev/null and b/PROMS/WORD ADD-INs/FGAddIn/FGAddIn/bin/Debug/app.publish/Application Files/FGAddIn_1_0_0_0/Microsoft.Office.Tools.Common.v4.0.Utilities.dll.deploy differ diff --git a/PROMS/WORD ADD-INs/FGAddIn/FGAddIn/bin/Debug/app.publish/FGAddIn.vsto b/PROMS/WORD ADD-INs/FGAddIn/FGAddIn/bin/Debug/app.publish/FGAddIn.vsto new file mode 100644 index 00000000..528ee0f6 --- /dev/null +++ b/PROMS/WORD ADD-INs/FGAddIn/FGAddIn/bin/Debug/app.publish/FGAddIn.vsto @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + HY8z+u6IQo0Ksdc26AYi70oPuw8VG+Tq/+Op8UUeYio= + + + +5zasxc/cEUfuNdwtpfOgf321LuIjqAyEevkqwDb4Lb8=AlXvYiVFbhI7bhyBVJa+XRSJe84Hrdq+bF6K4u0VgV04UmUO0l8eEnCi9ICyVq+jsNOviwre0dQaxUGRFnmT8U/wpD7zx17SCDYjeUU3lmoApDq7eeHZ+miTE+RLzUCKc2JfH6A6hoJsUI/mgjstwYanDHGN2txJj6vDY0+ZUAI=rghAhQ7/hHethob8lbZ9+PkYfHfoSOScDVou5jrgYzk4BO/u40SXxOLbyCOVy1Sg2eEbhSMjaXGObxYKx7Xjoe42XcVDKM/PCGAml3kDfTapVAmQGjXUDExFyX5t5OxmXKQIUrjMsS4zR1OvHAtlUXehNPHBrIUgHzfx3ted+B0=AQABCN=VLN\JeffdbxYn1M5i//rGErmD4DjOJgaDmC6Y672Or8OeZfMzBw=mvyQuVj1M3pIlQMlCawB6K+q6tSgkVR6NBJKRoNxrAu72Z9PiLh/2UXlSoEzEtS9m1PJ1YjFe0FkaK7Ac/LY0QH2owDDwL1rRuL4LoMNZbLtX75NxgR5qKACGI56mK4VijaeQiqLLgBsWxcyr9B1jlDoMV51pGsDsEgsQg3Nq4M=rghAhQ7/hHethob8lbZ9+PkYfHfoSOScDVou5jrgYzk4BO/u40SXxOLbyCOVy1Sg2eEbhSMjaXGObxYKx7Xjoe42XcVDKM/PCGAml3kDfTapVAmQGjXUDExFyX5t5OxmXKQIUrjMsS4zR1OvHAtlUXehNPHBrIUgHzfx3ted+B0=AQABMIIBuTCCASKgAwIBAgIQF0gpHnXZdZhG4yRlDQdQczANBgkqhkiG9w0BAQsFADAbMRkwFwYDVQQDHhAAVgBMAE4AXABKAGUAZgBmMB4XDTIxMDMyOTE4NDQ0MVoXDTIyMDMzMDAwNDQ0MVowGzEZMBcGA1UEAx4QAFYATABOAFwASgBlAGYAZjCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEArghAhQ7/hHethob8lbZ9+PkYfHfoSOScDVou5jrgYzk4BO/u40SXxOLbyCOVy1Sg2eEbhSMjaXGObxYKx7Xjoe42XcVDKM/PCGAml3kDfTapVAmQGjXUDExFyX5t5OxmXKQIUrjMsS4zR1OvHAtlUXehNPHBrIUgHzfx3ted+B0CAwEAATANBgkqhkiG9w0BAQsFAAOBgQCqwlPUuO+fJbmnykx77VIIKm6zikU2GEq0DUeRuow1dEPDMCdnyW0Occe0RlhjsKcVYtJLljDlbJddAkM7/qF0Txft5Hw9u5YpvEbvHyAKR0nZSdev6Fni4qrgvu7kRgndU50Dph7CHC7f6RbkFK0DEWVT+4nghDapVsQM6c537g== \ No newline at end of file diff --git a/PROMS/WORD ADD-INs/FGAddIn/FGAddIn/bin/Debug/app.publish/setup.exe b/PROMS/WORD ADD-INs/FGAddIn/FGAddIn/bin/Debug/app.publish/setup.exe new file mode 100644 index 00000000..272b3f0c Binary files /dev/null and b/PROMS/WORD ADD-INs/FGAddIn/FGAddIn/bin/Debug/app.publish/setup.exe differ diff --git a/PROMS/WORD ADD-INs/FGAddIn/FGAddIn/obj/Debug/.NETFramework,Version=v4.7.2.AssemblyAttributes.cs b/PROMS/WORD ADD-INs/FGAddIn/FGAddIn/obj/Debug/.NETFramework,Version=v4.7.2.AssemblyAttributes.cs new file mode 100644 index 00000000..3871b184 --- /dev/null +++ b/PROMS/WORD ADD-INs/FGAddIn/FGAddIn/obj/Debug/.NETFramework,Version=v4.7.2.AssemblyAttributes.cs @@ -0,0 +1,4 @@ +// +using System; +using System.Reflection; +[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")] diff --git a/PROMS/WORD ADD-INs/FGAddIn/FGAddIn/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/PROMS/WORD ADD-INs/FGAddIn/FGAddIn/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache new file mode 100644 index 00000000..048b3664 Binary files /dev/null and b/PROMS/WORD ADD-INs/FGAddIn/FGAddIn/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/PROMS/WORD ADD-INs/FGAddIn/FGAddIn/obj/Debug/FGAddIn.Properties.Resources.resources b/PROMS/WORD ADD-INs/FGAddIn/FGAddIn/obj/Debug/FGAddIn.Properties.Resources.resources new file mode 100644 index 00000000..6c05a977 Binary files /dev/null and b/PROMS/WORD ADD-INs/FGAddIn/FGAddIn/obj/Debug/FGAddIn.Properties.Resources.resources differ diff --git a/PROMS/WORD ADD-INs/FGAddIn/FGAddIn/obj/Debug/FGAddIn.csproj.AssemblyReference.cache b/PROMS/WORD ADD-INs/FGAddIn/FGAddIn/obj/Debug/FGAddIn.csproj.AssemblyReference.cache new file mode 100644 index 00000000..44189b35 Binary files /dev/null and b/PROMS/WORD ADD-INs/FGAddIn/FGAddIn/obj/Debug/FGAddIn.csproj.AssemblyReference.cache differ diff --git a/PROMS/WORD ADD-INs/FGAddIn/FGAddIn/obj/Debug/FGAddIn.csproj.CopyComplete b/PROMS/WORD ADD-INs/FGAddIn/FGAddIn/obj/Debug/FGAddIn.csproj.CopyComplete new file mode 100644 index 00000000..e69de29b diff --git a/PROMS/WORD ADD-INs/FGAddIn/FGAddIn/obj/Debug/FGAddIn.csproj.CoreCompileInputs.cache b/PROMS/WORD ADD-INs/FGAddIn/FGAddIn/obj/Debug/FGAddIn.csproj.CoreCompileInputs.cache new file mode 100644 index 00000000..6a61527a --- /dev/null +++ b/PROMS/WORD ADD-INs/FGAddIn/FGAddIn/obj/Debug/FGAddIn.csproj.CoreCompileInputs.cache @@ -0,0 +1 @@ +286fe1ab86e7b5aff1b9df6936232697c2cf437a diff --git a/PROMS/WORD ADD-INs/FGAddIn/FGAddIn/obj/Debug/FGAddIn.csproj.FileListAbsolute.txt b/PROMS/WORD ADD-INs/FGAddIn/FGAddIn/obj/Debug/FGAddIn.csproj.FileListAbsolute.txt new file mode 100644 index 00000000..98a26932 --- /dev/null +++ b/PROMS/WORD ADD-INs/FGAddIn/FGAddIn/obj/Debug/FGAddIn.csproj.FileListAbsolute.txt @@ -0,0 +1,28 @@ +C:\Users\Jeff.VLN\source\repos\FGAddIn\FGAddIn\bin\Debug\FGAddIn.dll +C:\Users\Jeff.VLN\source\repos\FGAddIn\FGAddIn\bin\Debug\FGAddIn.pdb +C:\Users\Jeff.VLN\source\repos\FGAddIn\FGAddIn\bin\Debug\FGAddIn.dll.manifest +C:\Users\Jeff.VLN\source\repos\FGAddIn\FGAddIn\bin\Debug\FGAddIn.vsto +C:\Users\Jeff.VLN\source\repos\FGAddIn\FGAddIn\bin\Debug\C1.Win.C1FlexGrid.2.dll +C:\Users\Jeff.VLN\source\repos\FGAddIn\FGAddIn\bin\Debug\Microsoft.Office.Tools.Common.v4.0.Utilities.dll +C:\Users\Jeff.VLN\source\repos\FGAddIn\FGAddIn\bin\Debug\C1.Win.C1FlexGrid.2.xml +C:\Users\Jeff.VLN\source\repos\FGAddIn\FGAddIn\obj\Debug\FGAddIn.csprojAssemblyReference.cache +C:\Users\Jeff.VLN\source\repos\FGAddIn\FGAddIn\obj\Debug\FGAddIn.Properties.Resources.resources +C:\Users\Jeff.VLN\source\repos\FGAddIn\FGAddIn\obj\Debug\FGAddIn.csproj.GenerateResource.cache +C:\Users\Jeff.VLN\source\repos\FGAddIn\FGAddIn\obj\Debug\FGAddIn.csproj.CoreCompileInputs.cache +C:\Users\Jeff.VLN\source\repos\FGAddIn\FGAddIn\obj\Debug\FGAddIn.csproj.CopyComplete +C:\Users\Jeff.VLN\source\repos\FGAddIn\FGAddIn\obj\Debug\FGAddIn.dll +C:\Users\Jeff.VLN\source\repos\FGAddIn\FGAddIn\obj\Debug\FGAddIn.pdb +C:\Data\WORD ADD-INs\FGAddIn\FGAddIn\bin\Debug\FGAddIn.dll +C:\Data\WORD ADD-INs\FGAddIn\FGAddIn\bin\Debug\FGAddIn.pdb +C:\Data\WORD ADD-INs\FGAddIn\FGAddIn\bin\Debug\FGAddIn.dll.manifest +C:\Data\WORD ADD-INs\FGAddIn\FGAddIn\bin\Debug\FGAddIn.vsto +C:\Data\WORD ADD-INs\FGAddIn\FGAddIn\bin\Debug\C1.Win.C1FlexGrid.2.dll +C:\Data\WORD ADD-INs\FGAddIn\FGAddIn\bin\Debug\Microsoft.Office.Tools.Common.v4.0.Utilities.dll +C:\Data\WORD ADD-INs\FGAddIn\FGAddIn\bin\Debug\C1.Win.C1FlexGrid.2.xml +C:\Data\WORD ADD-INs\FGAddIn\FGAddIn\obj\Debug\FGAddIn.csproj.AssemblyReference.cache +C:\Data\WORD ADD-INs\FGAddIn\FGAddIn\obj\Debug\FGAddIn.Properties.Resources.resources +C:\Data\WORD ADD-INs\FGAddIn\FGAddIn\obj\Debug\FGAddIn.csproj.GenerateResource.cache +C:\Data\WORD ADD-INs\FGAddIn\FGAddIn\obj\Debug\FGAddIn.csproj.CoreCompileInputs.cache +C:\Data\WORD ADD-INs\FGAddIn\FGAddIn\obj\Debug\FGAddIn.csproj.CopyComplete +C:\Data\WORD ADD-INs\FGAddIn\FGAddIn\obj\Debug\FGAddIn.dll +C:\Data\WORD ADD-INs\FGAddIn\FGAddIn\obj\Debug\FGAddIn.pdb diff --git a/PROMS/WORD ADD-INs/FGAddIn/FGAddIn/obj/Debug/FGAddIn.csproj.GenerateResource.cache b/PROMS/WORD ADD-INs/FGAddIn/FGAddIn/obj/Debug/FGAddIn.csproj.GenerateResource.cache new file mode 100644 index 00000000..292b7f5e Binary files /dev/null and b/PROMS/WORD ADD-INs/FGAddIn/FGAddIn/obj/Debug/FGAddIn.csproj.GenerateResource.cache differ diff --git a/PROMS/WORD ADD-INs/FGAddIn/FGAddIn/obj/Debug/FGAddIn.csprojAssemblyReference.cache b/PROMS/WORD ADD-INs/FGAddIn/FGAddIn/obj/Debug/FGAddIn.csprojAssemblyReference.cache new file mode 100644 index 00000000..24339e48 Binary files /dev/null and b/PROMS/WORD ADD-INs/FGAddIn/FGAddIn/obj/Debug/FGAddIn.csprojAssemblyReference.cache differ diff --git a/PROMS/WORD ADD-INs/FGAddIn/FGAddIn/obj/Debug/FGAddIn.dll b/PROMS/WORD ADD-INs/FGAddIn/FGAddIn/obj/Debug/FGAddIn.dll new file mode 100644 index 00000000..76f75717 Binary files /dev/null and b/PROMS/WORD ADD-INs/FGAddIn/FGAddIn/obj/Debug/FGAddIn.dll differ diff --git a/PROMS/WORD ADD-INs/FGAddIn/FGAddIn/obj/Debug/FGAddIn.pdb b/PROMS/WORD ADD-INs/FGAddIn/FGAddIn/obj/Debug/FGAddIn.pdb new file mode 100644 index 00000000..b36a27f1 Binary files /dev/null and b/PROMS/WORD ADD-INs/FGAddIn/FGAddIn/obj/Debug/FGAddIn.pdb differ diff --git a/PROMS/WORD ADD-INs/FGAddIn/UpgradeLog.htm b/PROMS/WORD ADD-INs/FGAddIn/UpgradeLog.htm new file mode 100644 index 00000000..146effe4 Binary files /dev/null and b/PROMS/WORD ADD-INs/FGAddIn/UpgradeLog.htm differ diff --git a/PROMS/WORD ADD-INs/Microsoft.Office.Tools.Common.v4.0.Utilities.dll b/PROMS/WORD ADD-INs/Microsoft.Office.Tools.Common.v4.0.Utilities.dll new file mode 100644 index 00000000..03a6ef84 Binary files /dev/null and b/PROMS/WORD ADD-INs/Microsoft.Office.Tools.Common.v4.0.Utilities.dll differ diff --git a/PROMS/WORD ADD-INs/PXMLAddIn Install/Application Files/PXMLAddIn_1_0_0_0/C1.Win.C1FlexGrid.2.dll.deploy b/PROMS/WORD ADD-INs/PXMLAddIn Install/Application Files/PXMLAddIn_1_0_0_0/C1.Win.C1FlexGrid.2.dll.deploy new file mode 100644 index 00000000..5283754f Binary files /dev/null and b/PROMS/WORD ADD-INs/PXMLAddIn Install/Application Files/PXMLAddIn_1_0_0_0/C1.Win.C1FlexGrid.2.dll.deploy differ diff --git a/PROMS/WORD ADD-INs/PXMLAddIn Install/Application Files/PXMLAddIn_1_0_0_0/Microsoft.Office.Tools.Common.v4.0.Utilities.dll.deploy b/PROMS/WORD ADD-INs/PXMLAddIn Install/Application Files/PXMLAddIn_1_0_0_0/Microsoft.Office.Tools.Common.v4.0.Utilities.dll.deploy new file mode 100644 index 00000000..03a6ef84 Binary files /dev/null and b/PROMS/WORD ADD-INs/PXMLAddIn Install/Application Files/PXMLAddIn_1_0_0_0/Microsoft.Office.Tools.Common.v4.0.Utilities.dll.deploy differ diff --git a/PROMS/WORD ADD-INs/PXMLAddIn Install/Application Files/PXMLAddIn_1_0_0_0/PXMLAddIn.dll.deploy b/PROMS/WORD ADD-INs/PXMLAddIn Install/Application Files/PXMLAddIn_1_0_0_0/PXMLAddIn.dll.deploy new file mode 100644 index 00000000..5bbda0e8 Binary files /dev/null and b/PROMS/WORD ADD-INs/PXMLAddIn Install/Application Files/PXMLAddIn_1_0_0_0/PXMLAddIn.dll.deploy differ diff --git a/PROMS/WORD ADD-INs/PXMLAddIn Install/Application Files/PXMLAddIn_1_0_0_0/PXMLAddIn.dll.manifest b/PROMS/WORD ADD-INs/PXMLAddIn Install/Application Files/PXMLAddIn_1_0_0_0/PXMLAddIn.dll.manifest new file mode 100644 index 00000000..80f45f7f --- /dev/null +++ b/PROMS/WORD ADD-INs/PXMLAddIn Install/Application Files/PXMLAddIn_1_0_0_0/PXMLAddIn.dll.manifest @@ -0,0 +1,203 @@ + + + + PXMLAddIn + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + pPo/i4gW6PsXcEe7T9XOkIdZBQUdihI/5HD5157RqQ4= + + + + + + + + + + + + jLCTF8Mm6bD4PDN+rnzN6q0+ReXaNgPh68kMWgatFwI= + + + + + + + + + + + + LbvMaYUKt9dpSpKOgbXmQq/NoBetO7UrHzwDxz7MTNc= + + + + + + + + + + + + + + + + + + + PXMLAddIn + PXMLAddIn + + + + + + +EGFxcYO8hluGyNbqMjfOA5/69tOmjrGHGrNNA3kaLvw=gTlbvNdhhKDro7Ld+/z4eGu3hYpwol/nCnkWrTBf3i4ynGzSCGiN66X56LXv2brgCokgx9AURPQP37Bk4M/qxoWQZVKuZ/FWSg87ojdRMONxExWXSsDWQPV7jVuN2/FHXeYaBP2QjWB70ePrK0RuZ5uN8XZPShUbzy0swZW0aC8=1VYtkFvJh4LNgUqof6a1wBEpWB3gL9ExzZDRuBZko5CJS/J9VW/OMxutyMDin8lvef8UeEaYItk8UGmuWNUCSRj0HbO1XdJtNUFy0QC4HplKZ6dXcj2uK4KtrHL80dZQX9aNHhacq4fuZUdLEjqX+dp88ITfdRuyUL0DqMyfU/E=AQABCN=VLN\Jeffapzco6xn/AE0S2eO4tPVwtzPbQe4psrO2U1a9ukyrnM=mLq7cO1/fV62XFpz12oueCQMMU9qrkff0VEtDcjjjg3+RTAAvBSqD1ivZKAKhi/bYzcZTMniNbF+wuLOvKaCd5Y6paAPnpzJIYXoh6ocz5ZkjfiJ7w9Y6xGZSvIFTtzpf82IyN6HfZJ5eTudD9KZ+rZ8Pk20lJdtpxRlEJK21uQ=1VYtkFvJh4LNgUqof6a1wBEpWB3gL9ExzZDRuBZko5CJS/J9VW/OMxutyMDin8lvef8UeEaYItk8UGmuWNUCSRj0HbO1XdJtNUFy0QC4HplKZ6dXcj2uK4KtrHL80dZQX9aNHhacq4fuZUdLEjqX+dp88ITfdRuyUL0DqMyfU/E=AQABMIIBuTCCASKgAwIBAgIQF8ktG8KZs6xBtdrISQWuUjANBgkqhkiG9w0BAQsFADAbMRkwFwYDVQQDHhAAVgBMAE4AXABKAGUAZgBmMB4XDTIxMDMyOTE5MzcxMVoXDTIyMDMzMDAxMzcxMVowGzEZMBcGA1UEAx4QAFYATABOAFwASgBlAGYAZjCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA1VYtkFvJh4LNgUqof6a1wBEpWB3gL9ExzZDRuBZko5CJS/J9VW/OMxutyMDin8lvef8UeEaYItk8UGmuWNUCSRj0HbO1XdJtNUFy0QC4HplKZ6dXcj2uK4KtrHL80dZQX9aNHhacq4fuZUdLEjqX+dp88ITfdRuyUL0DqMyfU/ECAwEAATANBgkqhkiG9w0BAQsFAAOBgQBg8LhmNDNbi8PNUw/BMY9gbyc4KqhjCu5AcbgIFm6xlEqz8FMp7f0KNfK9Icuw6i4DesWuf/G155QXCxvkOtp0jPXbP84l9D/rccIoFhezBh//2YSPodtL/VF5cM17w+zxkr0RUZiqsbPnMP/qLeM5uRrUxfBqsF+Jp8BkmB4e4g== \ No newline at end of file diff --git a/PROMS/WORD ADD-INs/PXMLAddIn Install/Application Files/PXMLAddIn_1_0_0_0/PXMLAddIn.vsto b/PROMS/WORD ADD-INs/PXMLAddIn Install/Application Files/PXMLAddIn_1_0_0_0/PXMLAddIn.vsto new file mode 100644 index 00000000..506b5f08 --- /dev/null +++ b/PROMS/WORD ADD-INs/PXMLAddIn Install/Application Files/PXMLAddIn_1_0_0_0/PXMLAddIn.vsto @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + th4/ucY68THr4LcheSPOyFpECz6e6gz7ShcJKu5giHY= + + + +Pi7V5RPHi7f+Zdw4W8ncHXYCGy89f6pHu66XLg48MPI=BB5hr5rMlbGxPj1BZx5AEto4udx/wLg7cNY4vRedLjM8iH6yibgXiXop+m2yCezELWW2CNWhCuAoyyYUYWWc/jfRwWTAmavYMlBO9mUTKJXXw8gpmGt9ac2ppCw2tcR6OWaYxgkLjFnBJXT6DK1Tz0oHKBKJ7GOS8//AqLjkYXo=1VYtkFvJh4LNgUqof6a1wBEpWB3gL9ExzZDRuBZko5CJS/J9VW/OMxutyMDin8lvef8UeEaYItk8UGmuWNUCSRj0HbO1XdJtNUFy0QC4HplKZ6dXcj2uK4KtrHL80dZQX9aNHhacq4fuZUdLEjqX+dp88ITfdRuyUL0DqMyfU/E=AQABCN=VLN\Jeff2juU1utcMQ+/Lw91mHcxzMINDpPM4iy2ERRWrwbWw5k=nQR4UZUvVY3YntgD4XVreYa2gcfti2YFfZL9IgI/R75syyJc+MFFV2d1UzYt1WTlnjQupVCq20w/7cSjU7YQPGl6uVZyun9ThwVkQd0zg+WqSlcfWBL8D1hlt82gGAEFk3Mkr8wa+yqr6gk5slfzM+ZAGC20k22JvU8zmh1zI+c=1VYtkFvJh4LNgUqof6a1wBEpWB3gL9ExzZDRuBZko5CJS/J9VW/OMxutyMDin8lvef8UeEaYItk8UGmuWNUCSRj0HbO1XdJtNUFy0QC4HplKZ6dXcj2uK4KtrHL80dZQX9aNHhacq4fuZUdLEjqX+dp88ITfdRuyUL0DqMyfU/E=AQABMIIBuTCCASKgAwIBAgIQF8ktG8KZs6xBtdrISQWuUjANBgkqhkiG9w0BAQsFADAbMRkwFwYDVQQDHhAAVgBMAE4AXABKAGUAZgBmMB4XDTIxMDMyOTE5MzcxMVoXDTIyMDMzMDAxMzcxMVowGzEZMBcGA1UEAx4QAFYATABOAFwASgBlAGYAZjCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA1VYtkFvJh4LNgUqof6a1wBEpWB3gL9ExzZDRuBZko5CJS/J9VW/OMxutyMDin8lvef8UeEaYItk8UGmuWNUCSRj0HbO1XdJtNUFy0QC4HplKZ6dXcj2uK4KtrHL80dZQX9aNHhacq4fuZUdLEjqX+dp88ITfdRuyUL0DqMyfU/ECAwEAATANBgkqhkiG9w0BAQsFAAOBgQBg8LhmNDNbi8PNUw/BMY9gbyc4KqhjCu5AcbgIFm6xlEqz8FMp7f0KNfK9Icuw6i4DesWuf/G155QXCxvkOtp0jPXbP84l9D/rccIoFhezBh//2YSPodtL/VF5cM17w+zxkr0RUZiqsbPnMP/qLeM5uRrUxfBqsF+Jp8BkmB4e4g== \ No newline at end of file diff --git a/PROMS/WORD ADD-INs/PXMLAddIn Install/PXMLAddIn.vsto b/PROMS/WORD ADD-INs/PXMLAddIn Install/PXMLAddIn.vsto new file mode 100644 index 00000000..506b5f08 --- /dev/null +++ b/PROMS/WORD ADD-INs/PXMLAddIn Install/PXMLAddIn.vsto @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + th4/ucY68THr4LcheSPOyFpECz6e6gz7ShcJKu5giHY= + + + +Pi7V5RPHi7f+Zdw4W8ncHXYCGy89f6pHu66XLg48MPI=BB5hr5rMlbGxPj1BZx5AEto4udx/wLg7cNY4vRedLjM8iH6yibgXiXop+m2yCezELWW2CNWhCuAoyyYUYWWc/jfRwWTAmavYMlBO9mUTKJXXw8gpmGt9ac2ppCw2tcR6OWaYxgkLjFnBJXT6DK1Tz0oHKBKJ7GOS8//AqLjkYXo=1VYtkFvJh4LNgUqof6a1wBEpWB3gL9ExzZDRuBZko5CJS/J9VW/OMxutyMDin8lvef8UeEaYItk8UGmuWNUCSRj0HbO1XdJtNUFy0QC4HplKZ6dXcj2uK4KtrHL80dZQX9aNHhacq4fuZUdLEjqX+dp88ITfdRuyUL0DqMyfU/E=AQABCN=VLN\Jeff2juU1utcMQ+/Lw91mHcxzMINDpPM4iy2ERRWrwbWw5k=nQR4UZUvVY3YntgD4XVreYa2gcfti2YFfZL9IgI/R75syyJc+MFFV2d1UzYt1WTlnjQupVCq20w/7cSjU7YQPGl6uVZyun9ThwVkQd0zg+WqSlcfWBL8D1hlt82gGAEFk3Mkr8wa+yqr6gk5slfzM+ZAGC20k22JvU8zmh1zI+c=1VYtkFvJh4LNgUqof6a1wBEpWB3gL9ExzZDRuBZko5CJS/J9VW/OMxutyMDin8lvef8UeEaYItk8UGmuWNUCSRj0HbO1XdJtNUFy0QC4HplKZ6dXcj2uK4KtrHL80dZQX9aNHhacq4fuZUdLEjqX+dp88ITfdRuyUL0DqMyfU/E=AQABMIIBuTCCASKgAwIBAgIQF8ktG8KZs6xBtdrISQWuUjANBgkqhkiG9w0BAQsFADAbMRkwFwYDVQQDHhAAVgBMAE4AXABKAGUAZgBmMB4XDTIxMDMyOTE5MzcxMVoXDTIyMDMzMDAxMzcxMVowGzEZMBcGA1UEAx4QAFYATABOAFwASgBlAGYAZjCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA1VYtkFvJh4LNgUqof6a1wBEpWB3gL9ExzZDRuBZko5CJS/J9VW/OMxutyMDin8lvef8UeEaYItk8UGmuWNUCSRj0HbO1XdJtNUFy0QC4HplKZ6dXcj2uK4KtrHL80dZQX9aNHhacq4fuZUdLEjqX+dp88ITfdRuyUL0DqMyfU/ECAwEAATANBgkqhkiG9w0BAQsFAAOBgQBg8LhmNDNbi8PNUw/BMY9gbyc4KqhjCu5AcbgIFm6xlEqz8FMp7f0KNfK9Icuw6i4DesWuf/G155QXCxvkOtp0jPXbP84l9D/rccIoFhezBh//2YSPodtL/VF5cM17w+zxkr0RUZiqsbPnMP/qLeM5uRrUxfBqsF+Jp8BkmB4e4g== \ No newline at end of file diff --git a/PROMS/WORD ADD-INs/PXMLAddIn Install/setup.exe b/PROMS/WORD ADD-INs/PXMLAddIn Install/setup.exe new file mode 100644 index 00000000..a7953f38 Binary files /dev/null and b/PROMS/WORD ADD-INs/PXMLAddIn Install/setup.exe differ diff --git a/PROMS/WORD ADD-INs/PXMLAddIn.dll b/PROMS/WORD ADD-INs/PXMLAddIn.dll new file mode 100644 index 00000000..1c75b5ac Binary files /dev/null and b/PROMS/WORD ADD-INs/PXMLAddIn.dll differ diff --git a/PROMS/WORD ADD-INs/PXMLAddIn.dll.manifest b/PROMS/WORD ADD-INs/PXMLAddIn.dll.manifest new file mode 100644 index 00000000..8cda252a --- /dev/null +++ b/PROMS/WORD ADD-INs/PXMLAddIn.dll.manifest @@ -0,0 +1,203 @@ + + + + PXMLAddIn + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + pPo/i4gW6PsXcEe7T9XOkIdZBQUdihI/5HD5157RqQ4= + + + + + + + + + + + + jLCTF8Mm6bD4PDN+rnzN6q0+ReXaNgPh68kMWgatFwI= + + + + + + + + + + + + DL/88SdFTtqqi7Qwxc6eqaFAXe5aYY4lrbYyIvlk4/c= + + + + + + + + + + + + + + + + + + + PXMLAddIn + PXMLAddIn + + + + + + +sV6pCg7/rrKPPSkr/MkV4+g8/cVC3SVjjA6zRjYv4sI=d95WInjSJb76LSnoXARYCPQdJVknoTBd2ijl19oS+QlNKOP6ERrSo3jFytUUJApHJc//VIazKHcFvvjSjG7gyvqi/ViJSIinaVPdPxfztEiWEkHJuLm+SIM08ggzm27UmxIoKhSt5FUaT59dD863e3DR10oBjt4Jhh9rpR2zwTs=1VYtkFvJh4LNgUqof6a1wBEpWB3gL9ExzZDRuBZko5CJS/J9VW/OMxutyMDin8lvef8UeEaYItk8UGmuWNUCSRj0HbO1XdJtNUFy0QC4HplKZ6dXcj2uK4KtrHL80dZQX9aNHhacq4fuZUdLEjqX+dp88ITfdRuyUL0DqMyfU/E=AQABCN=VLN\JeffvwEpV7uhPl2FRFW34CCAAWNv94dSWNB59CZRtqHvnfA=eAd7y3QKMAcolgM087+EJohgTFpcX9wcSQxvTWRC/0OLucPWa0VALERFiWHanX8yukHNz+nPPFQauXdSaTmtzXy+4IPnZM2zd31IFTJV78BpECzHuksR8hLKXZtntZ+bDnEwwXMOfo8zDyDefPIcox8d02BsOF2ThoJeShX8fXM=1VYtkFvJh4LNgUqof6a1wBEpWB3gL9ExzZDRuBZko5CJS/J9VW/OMxutyMDin8lvef8UeEaYItk8UGmuWNUCSRj0HbO1XdJtNUFy0QC4HplKZ6dXcj2uK4KtrHL80dZQX9aNHhacq4fuZUdLEjqX+dp88ITfdRuyUL0DqMyfU/E=AQABMIIBuTCCASKgAwIBAgIQF8ktG8KZs6xBtdrISQWuUjANBgkqhkiG9w0BAQsFADAbMRkwFwYDVQQDHhAAVgBMAE4AXABKAGUAZgBmMB4XDTIxMDMyOTE5MzcxMVoXDTIyMDMzMDAxMzcxMVowGzEZMBcGA1UEAx4QAFYATABOAFwASgBlAGYAZjCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA1VYtkFvJh4LNgUqof6a1wBEpWB3gL9ExzZDRuBZko5CJS/J9VW/OMxutyMDin8lvef8UeEaYItk8UGmuWNUCSRj0HbO1XdJtNUFy0QC4HplKZ6dXcj2uK4KtrHL80dZQX9aNHhacq4fuZUdLEjqX+dp88ITfdRuyUL0DqMyfU/ECAwEAATANBgkqhkiG9w0BAQsFAAOBgQBg8LhmNDNbi8PNUw/BMY9gbyc4KqhjCu5AcbgIFm6xlEqz8FMp7f0KNfK9Icuw6i4DesWuf/G155QXCxvkOtp0jPXbP84l9D/rccIoFhezBh//2YSPodtL/VF5cM17w+zxkr0RUZiqsbPnMP/qLeM5uRrUxfBqsF+Jp8BkmB4e4g== \ No newline at end of file diff --git a/PROMS/WORD ADD-INs/PXMLAddIn.pdb b/PROMS/WORD ADD-INs/PXMLAddIn.pdb new file mode 100644 index 00000000..b8eb40d7 Binary files /dev/null and b/PROMS/WORD ADD-INs/PXMLAddIn.pdb differ diff --git a/PROMS/WORD ADD-INs/PXMLAddIn.vsto b/PROMS/WORD ADD-INs/PXMLAddIn.vsto new file mode 100644 index 00000000..6613c813 --- /dev/null +++ b/PROMS/WORD ADD-INs/PXMLAddIn.vsto @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + rNWp769yjk5V+5gE6w38/fwFWncfriEmxgp3GBr7xRs= + + + +UHc9hu6u5WdgheZOdrrwkRcpB9n/IdG5eX5IOH8fEQc=MhgdStjxzXjWbLKGfGI9KNRdgDwJrF1ZfYDiZEm869BF1X3FGHYtWdyejSV8DHsPpxIYxtDT+EhADGSHsA4wSnUpx2WlJwHGFeNOa4JUoA7fTPuiF29EwgvDQVh0frPjPM/1IV3cz6E1oL/glhyLoM8QBdN6JD3TWVFAGTw4TrQ=1VYtkFvJh4LNgUqof6a1wBEpWB3gL9ExzZDRuBZko5CJS/J9VW/OMxutyMDin8lvef8UeEaYItk8UGmuWNUCSRj0HbO1XdJtNUFy0QC4HplKZ6dXcj2uK4KtrHL80dZQX9aNHhacq4fuZUdLEjqX+dp88ITfdRuyUL0DqMyfU/E=AQABCN=VLN\Jeff0yAWu7uQjwSGHEO7LcqESQc1BaPhvGQQC1Xnk7VXSzo=u+/sddS4E3kLt99TWofCHUXQU1XE5m0Q1IAJJ8aEVoBiZdICPi8ehf53q+rlrUHVG2nHtf/+ObFiTBETOwZ7Kx81MR7xiObuGQ+wimr+Ub5EE7Bi5IYovimxhVZCbs0nvmrDmW/qXc51Gqt9pV5/7F+1/aqZczMgatQEhIi8ExQ=1VYtkFvJh4LNgUqof6a1wBEpWB3gL9ExzZDRuBZko5CJS/J9VW/OMxutyMDin8lvef8UeEaYItk8UGmuWNUCSRj0HbO1XdJtNUFy0QC4HplKZ6dXcj2uK4KtrHL80dZQX9aNHhacq4fuZUdLEjqX+dp88ITfdRuyUL0DqMyfU/E=AQABMIIBuTCCASKgAwIBAgIQF8ktG8KZs6xBtdrISQWuUjANBgkqhkiG9w0BAQsFADAbMRkwFwYDVQQDHhAAVgBMAE4AXABKAGUAZgBmMB4XDTIxMDMyOTE5MzcxMVoXDTIyMDMzMDAxMzcxMVowGzEZMBcGA1UEAx4QAFYATABOAFwASgBlAGYAZjCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA1VYtkFvJh4LNgUqof6a1wBEpWB3gL9ExzZDRuBZko5CJS/J9VW/OMxutyMDin8lvef8UeEaYItk8UGmuWNUCSRj0HbO1XdJtNUFy0QC4HplKZ6dXcj2uK4KtrHL80dZQX9aNHhacq4fuZUdLEjqX+dp88ITfdRuyUL0DqMyfU/ECAwEAATANBgkqhkiG9w0BAQsFAAOBgQBg8LhmNDNbi8PNUw/BMY9gbyc4KqhjCu5AcbgIFm6xlEqz8FMp7f0KNfK9Icuw6i4DesWuf/G155QXCxvkOtp0jPXbP84l9D/rccIoFhezBh//2YSPodtL/VF5cM17w+zxkr0RUZiqsbPnMP/qLeM5uRrUxfBqsF+Jp8BkmB4e4g== \ No newline at end of file diff --git a/PROMS/WORD ADD-INs/PXMLAddIn/PXMLAddIn.sln b/PROMS/WORD ADD-INs/PXMLAddIn/PXMLAddIn.sln new file mode 100644 index 00000000..2233104c --- /dev/null +++ b/PROMS/WORD ADD-INs/PXMLAddIn/PXMLAddIn.sln @@ -0,0 +1,30 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.31112.23 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PXMLAddIn", "PXMLAddIn\PXMLAddIn.csproj", "{DCE30B53-C4DC-47BF-9274-E8CCEABECE2B}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{9B2CB26C-ADFF-42ED-B4F4-976C47F66957}" + ProjectSection(SolutionItems) = preProject + ..\FGAddIn\FGAddIn\FGAddIn_TemporaryKey.pfx = ..\FGAddIn\FGAddIn\FGAddIn_TemporaryKey.pfx + EndProjectSection +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {DCE30B53-C4DC-47BF-9274-E8CCEABECE2B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {DCE30B53-C4DC-47BF-9274-E8CCEABECE2B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {DCE30B53-C4DC-47BF-9274-E8CCEABECE2B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {DCE30B53-C4DC-47BF-9274-E8CCEABECE2B}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {1CE3B417-B869-4F7D-8C0E-3401B59B6F57} + EndGlobalSection +EndGlobal diff --git a/PROMS/WORD ADD-INs/PXMLAddIn/PXMLAddIn/Form1.Designer.cs b/PROMS/WORD ADD-INs/PXMLAddIn/PXMLAddIn/Form1.Designer.cs new file mode 100644 index 00000000..2de944d4 --- /dev/null +++ b/PROMS/WORD ADD-INs/PXMLAddIn/PXMLAddIn/Form1.Designer.cs @@ -0,0 +1,62 @@ + +namespace PXMLAddIn +{ + partial class Form1 + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.c1FlexGrid1 = new C1.Win.C1FlexGrid.C1FlexGrid(); + ((System.ComponentModel.ISupportInitialize)(this.c1FlexGrid1)).BeginInit(); + this.SuspendLayout(); + // + // c1FlexGrid1 + // + this.c1FlexGrid1.ColumnInfo = "10,1,0,0,0,95,Columns:"; + this.c1FlexGrid1.Location = new System.Drawing.Point(456, 254); + this.c1FlexGrid1.Name = "c1FlexGrid1"; + this.c1FlexGrid1.Rows.DefaultSize = 19; + this.c1FlexGrid1.Size = new System.Drawing.Size(240, 150); + this.c1FlexGrid1.TabIndex = 0; + // + // Form1 + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(800, 450); + this.Controls.Add(this.c1FlexGrid1); + this.Name = "Form1"; + this.Text = "Form1"; + ((System.ComponentModel.ISupportInitialize)(this.c1FlexGrid1)).EndInit(); + this.ResumeLayout(false); + + } + + #endregion + + private C1.Win.C1FlexGrid.C1FlexGrid c1FlexGrid1; + } +} \ No newline at end of file diff --git a/PROMS/WORD ADD-INs/PXMLAddIn/PXMLAddIn/Form1.cs b/PROMS/WORD ADD-INs/PXMLAddIn/PXMLAddIn/Form1.cs new file mode 100644 index 00000000..18a83324 --- /dev/null +++ b/PROMS/WORD ADD-INs/PXMLAddIn/PXMLAddIn/Form1.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace PXMLAddIn +{ + public partial class Form1 : Form + { + public Form1() + { + InitializeComponent(); + } + } +} diff --git a/PROMS/WORD ADD-INs/PXMLAddIn/PXMLAddIn/Form1.resx b/PROMS/WORD ADD-INs/PXMLAddIn/PXMLAddIn/Form1.resx new file mode 100644 index 00000000..1af7de15 --- /dev/null +++ b/PROMS/WORD ADD-INs/PXMLAddIn/PXMLAddIn/Form1.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/PROMS/WORD ADD-INs/PXMLAddIn/PXMLAddIn/MyRTB.cs b/PROMS/WORD ADD-INs/PXMLAddIn/PXMLAddIn/MyRTB.cs new file mode 100644 index 00000000..1b48e940 --- /dev/null +++ b/PROMS/WORD ADD-INs/PXMLAddIn/PXMLAddIn/MyRTB.cs @@ -0,0 +1,139 @@ +using System; +using System.ComponentModel; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; +using System.Runtime.InteropServices; +using System.Text.RegularExpressions; + +namespace System.Windows.Forms +{ + public partial class MyRTB : RichTextBox + { + public MyRTB() + { + InitializeComponent(); + } + + public MyRTB(IContainer container) + { + container.Add(this); + + InitializeComponent(); + } + private void InitializeComponent() + { + //throw new NotImplementedException(); + } + public static string StaticStripRtfCommands(string retval) + { + // replace \{ & \} with (![ & (!] respectively and then redo at end. The curly braces + // are rtf so were getting removed and/or not handled correctly. + retval = retval.Replace(@"\{", @" (!["); + retval = retval.Replace(@"\}", @" (!]"); + + // For hardspaces, the windows richtextbox does some 'quirky' things: + // A unicode representation of \u160? is sent INTO the rtb. Coming out, + // that \u160? was translated to a \~ (by the underlying windows rtb). + // Note that if the \~ is sent to the rtb, it is treated as a regular space, + // i.e. no longer a hardspace, and actually is converted to a regular space. + // SO, on the way out, convert any \~ to \u160? + //retval = retval.Replace(@"\~", @"\u160?"); + // convert \'99 to \u8482? this is for the trade mark symbol. For some reason RTF is automatically + // converting the unicode \u8482? to \'99, but once this is done, PROMS StepRTB (edit windows) do not show it + //retval = retval.Replace(@"\'99", @"\u8482?"); + + retval = RTFConvertedSymbolsToUnicode(retval); + + // remove carriage return/newlines after \par commands (these are introduced by rtb + // for hard returns, goes into rtb as \par and comes out as \par\r\n): + retval = sreg1.Replace(retval, "\\par "); + + + retval = retval.Replace("\\v0\r\n", "\\v0 "); // Replace Carriage Return and Newline after comment + retval = sreg2.Replace(retval, ""); // Strip Carriage Returns and Newlines + retval = sreg3.Replace(retval, "$1"); // Strip Opening and Closing Braces + retval = sreg4.Replace(retval, ""); // Strip Clauses - remove anything from curly braces + retval = sreg5.Replace(retval, ""); // Strip Clauses - remove anything from curly braces + retval = sreg6.Replace(retval, "$1 "); // add space after token if followed by token + //retval = sreg7.Replace(retval, new MatchEvaluator(StaticReplaceRTFClause)); // take backslash xyz and evaluates them + retval = sreg8.Replace(retval, "$1"); // remove space between tokens + retval = sreg9.Replace(retval, "$1"); // remove space before /r/n + + //retval = Regex.Replace(retval, @"\\par\r\n(?!\\)", "\\par "); + ////retval = Regex.Replace(retval, @"\\par\r\n(?=\\)", "\\par"); + + //retval = retval.Replace("\\v0\r\n", "\\v0 "); // Replace Carriage Return and Newline after comment + //retval = Regex.Replace(retval, @"[\r\n]", "", RegexOptions.Singleline); // Strip Carriage Returns and Newlines + //retval = Regex.Replace(retval, @"^\{(.*)\}$", "$1", RegexOptions.Singleline); // Strip Opening and Closing Braces + //retval = Regex.Replace(retval, @"\{[^{]*?\}", "", RegexOptions.Singleline); // Strip Clauses - remove anything from curly braces + //retval = Regex.Replace(retval, @"\{[^{]*?\}", "", RegexOptions.Singleline); // Strip Clauses - remove anything from curly braces + ////retval = Regex.Replace(retval, @"(\\[^ \\?\r\n\t]+)\\f[0-9] ", "$1 "); // remove font command - if next to another command, keep other command and space + //// OLD: The following two lines are replaced by the more generic replace above. + ////retval = Regex.Replace(retval, @"\\v\\f[0-9] ", "\\v "); // remove font command - if next to Comment keep space + ////retval = Regex.Replace(retval, @"\\line\\f[0-9] ", "\\line "); // remove font command - if next to Line keep space + ////retval = Regex.Replace(retval, @"\\f[0-9] ", ""); // remove font command with ending space + ////retval = Regex.Replace(retval, @"\\f[0-9]", ""); // remove font command without ending space + ////retval = Regex.Replace(retval, @"\\par ", "\r\n"); + //retval = Regex.Replace(retval, @"(\\[^' \\?\r\n\t]+)(?=\\)", "$1 "); // add space after token if followed by token + ////retval = Regex.Replace(retval, @"(\\[^ \\?\r\n\t]+)(\\)", "$1 $2"); // take backslash xyz and evaluates them + //retval = Regex.Replace(retval, @"(\\[^ \\?\r\n\t]+ )", new MatchEvaluator(StaticReplaceRTFClause)); // take backslash xyz and evaluates them + //retval = Regex.Replace(retval, @"(\\[^ \\?\r\n\t]+) (?=\\)", "$1"); // remove space between tokens + //retval = Regex.Replace(retval, @"(\\[^ \\?\r\n\t]+) (?=\r\n)", "$1"); // remove space before /r/n + + // remove a space if there is one as the first character or the last character + //if (retval[0] == ' ') retval = retval.Remove(0, 1); + //retval = retval.TrimEnd(' '); + // remove \r\n at end of string if the string has 2 or more characters + if (retval.Length > 1 && retval.Substring(retval.Length - 2, 2) == "\r\n") retval = retval.Remove(retval.Length - 2, 2); + // remove \par at end of string if the string has 4 or more characters + //if (retval.Length > 3 && retval.Substring(retval.Length - 4, 4) == @"\par") retval = retval.Remove(retval.Length - 4, 4); + // remove a space following \r\n + //retval = Regex.Replace(retval, "\r\n ", "\r\n"); + ////if there are still spaces following \r\n, then probable in a table - we need to put the space back + //retval = Regex.Replace(retval, "\r\n ", "\r\n "); + + if (retval.Length == 0) return ""; + if (retval.Length > 1 && retval.Substring(retval.Length - 2, 2) == @"\v") retval = retval.Remove(retval.Length - 2, 2); + //retval = RemoveRtfStyles(retval); + //if (itmInfo != null) + // retval = StaticRemoveRtfStyles(retval, itmInfo); + + retval = retval.Replace(@" (![", @"\{"); + retval = retval.Replace(@" (!]", @"\}"); + retval = retval.TrimEnd(' '); + + // the indent character was translated in the richtextbox, change it back: + if (retval.IndexOf(@"\'05") > -1) retval = retval.Replace(@"\'05", "\x05"); + return retval; + } + private static string RTFConvertedSymbolsToUnicode(string str) + { + string rtnStr = str; + // convert \~ to a hard spece. RTF is automatically converting \u160? to \~ but will then convert + // the \~ to a regular space! + rtnStr = rtnStr.Replace(@"\~", @"\u160?"); + rtnStr = rtnStr.Replace(@"\'a0", @"\u160?"); + // convert \'99 to \u8482? this is for the trade mark symbol. RTF is automatically + // converting the unicode \u8482? to \'99, but once this is done, PROMS StepRTB (edit windows) does not show it + rtnStr = rtnStr.Replace(@"\'99", @"\u8482?"); + // convert \'ae to \u174? this is for the registered symbol. RTF converts the unicode character to \'ae + rtnStr = rtnStr.Replace(@"\'ae", @"\u174?"); + // convert \'a9 to \u169? this is for the copyright symbol. RTF converts the unicode character to \'a9 + rtnStr = rtnStr.Replace(@"\'a9", @"\u169?"); + return rtnStr; + } + private static Regex sreg1 = new Regex(@"\\par\r\n(?!\\)"); + private static Regex sreg2 = new Regex(@"[\r\n]", RegexOptions.Singleline); // Strip Carriage Returns and Newlines + private static Regex sreg3 = new Regex(@"^\{(.*)\}$", RegexOptions.Singleline); // Strip Opening and Closing Braces + private static Regex sreg4 = new Regex(@"\{[^{]*?\}", RegexOptions.Singleline); // Strip Clauses - remove anything from curly braces + private static Regex sreg5 = new Regex(@"\{[^{]*?\}", RegexOptions.Singleline); // Strip Clauses - remove anything from curly braces + private static Regex sreg6 = new Regex(@"(\\[^' \\?\r\n\t]+)(?=\\)"); // add space after token if followed by token + private static Regex sreg7 = new Regex(@"(\\[^ \\?\r\n\t]+ )"); // take backslash xyz and evaluates them + private static Regex sreg8 = new Regex(@"(\\[^ \\?\r\n\t]+) (?=\\)"); // remove space between tokens + private static Regex sreg9 = new Regex(@"(\\[^ \\?\r\n\t]+) (?=\r\n)"); // remove space before /r/n + + } +} diff --git a/PROMS/WORD ADD-INs/PXMLAddIn/PXMLAddIn/PXML.cs b/PROMS/WORD ADD-INs/PXMLAddIn/PXMLAddIn/PXML.cs new file mode 100644 index 00000000..5130d656 --- /dev/null +++ b/PROMS/WORD ADD-INs/PXMLAddIn/PXMLAddIn/PXML.cs @@ -0,0 +1,325 @@ +#region Assembly Ionic.Zip, Version=1.9.1.8, Culture=neutral, PublicKeyToken=edbe51ad942a3f5c +// C:\Development\Proms\VEPROMS User Interface\bin\Debug\Ionic.Zip.dll +#endregion + +using Ionic.Zip; +using System; +using System.Runtime.InteropServices; +using Word = Microsoft.Office.Interop.Word; +using FlexGrid; +using System.IO; +using System.Windows.Forms; +using System.Text; + +namespace PXMLAddIn +{ + [ComVisible(true)] + + public interface IPXML + { + string GetFigure(Word.Selection sel); + Boolean GetNewGrid(int rows, int cols); + void SetColWidth(int index, int value); + void SetRowHeight(int index, int value); + void SetCellData(int r1, int c1, int r2, int c2, string value); + void SetCellStyle(int r1, int c1, int r2, int c2, string value); + void MergeCells(int r1, int c1, int r2, int c2); + string GetXML(); + void PasteData(int r1, int c1, int r2, int c2, string sHA); + string GetContent(string filename); + string GetRTF(string sHA); + Boolean GetNewZip(string fileName); + void ZipAddFile(string fileName, string folderName); + void ZipAddDirectory(string folderName); + } + + [ComVisible(true)] + [ClassInterface(ClassInterfaceType.None)] + public class PXML : IPXML + { + static ThisGrid FG; + static ZipFile ZF; + + public string GetFigure(Word.Selection sel) + { + PictureBox pb = new PictureBox(); + MemoryStream ms = new MemoryStream(); + sel.CopyAsPicture(); + if (Clipboard.ContainsImage()) + { + pb.Image = Clipboard.GetImage(); + pb.Image.Save(ms, System.Drawing.Imaging.ImageFormat.Png); + return Convert.ToBase64String(ms.ToArray()); + } + else + { + return ""; + } + } + + public Boolean GetNewGrid(int rows, int cols) + { + FG = new ThisGrid(); + FG.Clear(); + FG.Rows.Count = rows; + FG.Cols.Count = cols; + if (FG == null) + { return false; } + else + { + FG.Rows.Count = rows; + FG.Rows.Fixed = 0; + FG.Cols.Count = cols; + FG.Cols.Fixed = 0; + //FG.BorderStyle = C1.Win.C1FlexGrid.Util.BaseControls.BorderStyleEnum.FixedSingle; + return true; + } + } + public void SetColWidth(int index, int value) + { + if (index <= FG.Cols.Count) + { FG.Cols[index].Width = value; } + } + public void SetRowHeight(int index, int value) + { + if (index <= FG.Rows.Count) + { FG.Rows[index].Height = value; } + } + + public void SetCellData(int r1, int c1, int r2, int c2, string value) + { + C1.Win.C1FlexGrid.CellRange rng = FG.GetCellRange(r1, c1, r2, c2); + rng.Data = value; + } + public void SetCellStyle(int r1, int c1, int r2, int c2, string align) + { + C1.Win.C1FlexGrid.CellRange rng = FG.GetCellRange(r1, c1, r2, c2); + switch (align) + { + case "LeftTop": + ChangeCellAlign(rng, C1.Win.C1FlexGrid.TextAlignEnum.LeftTop); + break; + case "LeftCenter": + ChangeCellAlign(rng, C1.Win.C1FlexGrid.TextAlignEnum.LeftCenter); + break; + case "LeftBottom": + ChangeCellAlign(rng, C1.Win.C1FlexGrid.TextAlignEnum.LeftBottom); + break; + case "CenterTop": + ChangeCellAlign(rng, C1.Win.C1FlexGrid.TextAlignEnum.CenterTop); + break; + case "CenterCenter": + ChangeCellAlign(rng, C1.Win.C1FlexGrid.TextAlignEnum.CenterCenter); + break; + case "CenterBottom": + ChangeCellAlign(rng, C1.Win.C1FlexGrid.TextAlignEnum.CenterBottom); + break; + case "RightTop": + ChangeCellAlign(rng, C1.Win.C1FlexGrid.TextAlignEnum.RightTop); + break; + case "RightCenter": + ChangeCellAlign(rng, C1.Win.C1FlexGrid.TextAlignEnum.RightCenter); + break; + case "RightBottom": + ChangeCellAlign(rng, C1.Win.C1FlexGrid.TextAlignEnum.RightBottom); + break; + } + } + public void MergeCells(int r1, int c1, int r2, int c2) + { + if (r2 - r1 + c2 - c1 > 0) + { FG.MergedRanges.Add(r1, c1, r2, c2); } + } + + public string GetXML() + { + string retstr = null; + using (StringWriter sw = new StringWriter()) + { + FG.WriteXml(sw); + retstr = sw.GetStringBuilder().ToString(); + sw.Close(); + FG.Dispose(); + } + return retstr; + } + public void PasteData(int r1, int c1, int r2, int c2, string sHA) + { + string s; + s = GetRTF(sHA); + C1.Win.C1FlexGrid.CellRange rng = FG.GetCellRange(r1, c1, r2, c2); + FG.SetData(rng, s); + } + public string GetRTF(string sHA) + { + string retstr = null; + MyRTB rtb = new MyRTB(); + + //rtb.Paste(df); + rtb.Rtf = Clipboard.GetText(TextDataFormat.Rtf); + rtb.Text.Replace("(P)", "(\\u10004 ?)"); + rtb.SelectAll(); + switch (sHA) + { + case "Left": + rtb.SelectionAlignment = HorizontalAlignment.Left; + break; + case "Center": + rtb.SelectionAlignment = HorizontalAlignment.Center; + break; + case "Right": + rtb.SelectionAlignment = HorizontalAlignment.Right; + break; + } + string strp = rtb.Rtf.Replace("\\par\r\n", "!!!"); + strp = MyRTB.StaticStripRtfCommands(strp); + strp = strp.Remove(strp.LastIndexOf("!!!")); + StringBuilder sb = new StringBuilder(); + sb.Append(strp); + sb.Replace("!!!", "\\par"); + // clean up special characters + { + sb.Replace("\x1D", "-");// Hyphen + sb.Replace("\x1E", "-");// Hyphen + sb.Replace("\x2013", "-");// Hyphen + sb.Replace("\xa0", " ");// Space + sb.Replace("\x0b", " ");// Space Soft Return + sb.Replace("\x201C", "\"");// Space + sb.Replace("\x201D", "\"");// Space + sb.Replace("\x09INITIAL", "");// Space + sb.Replace("\x09_____", ""); // Tab Signoff + sb.Replace("(\f1 P\f0))", "(\f1\fs36\u8643?\f0\fs24 )"); // check mark within parenthesis + //sb.Replace("(P)", "(\\u10004?)"); // check mark within parenthesis + //sb.Replace("\\u9633?", "□"); //box + } + if (sb.Length > 0) + { + retstr = "{" + sb.ToString() + "\\par}"; + } + return retstr; + } + private string GetRTFFromClipBoard( string sHA) + { + string retstr = null; + MyRTB rtb = new MyRTB(); + rtb.Paste(); + rtb.SelectAll(); + switch (sHA) + { + case "Left": + rtb.SelectionAlignment = HorizontalAlignment.Left; + break; + case "Center": + rtb.SelectionAlignment = HorizontalAlignment.Center; + break; + case "Right": + rtb.SelectionAlignment = HorizontalAlignment.Right; + break; + } + string strp = rtb.Rtf.Replace("\\par\r\n", "!!!"); + strp = MyRTB.StaticStripRtfCommands(strp); + strp = strp.Remove(strp.LastIndexOf("!!!")); + StringBuilder sb = new StringBuilder(); + sb.Append(strp); + sb.Replace("!!!", "\\par"); + // clean up special characters + { + sb.Replace("\x1D", "-");// Hyphen + sb.Replace("\x1E", "-");// Hyphen + sb.Replace("\x2013", "-");// Hyphen + sb.Replace("\xa0", " ");// Space + sb.Replace("\x0b", " ");// Space Soft Return + sb.Replace("\x201C", "\"");// Space + sb.Replace("\x201D", "\"");// Space + sb.Replace("\x09INITIAL", "");// Space + sb.Replace("\x09_____", ""); // Tab Signoff + //sb.Replace("(P)", "(\\u10004?)"); // check mark within parenthesis + //sb.Replace("\\u9633?", "□"); //box + } + if (sb.Length > 0) + { + retstr = "{" + sb.ToString() + "}"; + } + return retstr; + } + private string GetBlankRTF(string sHA) + { + string retstr = null; + MyRTB rtb = new MyRTB(); + rtb.Text = ""; + rtb.SelectAll(); + switch (sHA) + { + case "Left": + rtb.SelectionAlignment = HorizontalAlignment.Left; + break; + case "Center": + rtb.SelectionAlignment = HorizontalAlignment.Center; + break; + case "Right": + rtb.SelectionAlignment = HorizontalAlignment.Right; + break; + } + string strp = rtb.Rtf; + StringBuilder sb = new StringBuilder(); + sb.Append(strp); + if (sb.Length > 0) + { + retstr = "{" + sb.ToString() + "}"; + } + return retstr; + } + public string GetContent(string filename) + { + FileStream fs = new FileStream(@filename, FileMode.Open, FileAccess.Read); + Byte[] buf = new Byte[fs.Length]; + fs.Read(buf, 0, buf.Length); + fs.Close(); + return Convert.ToBase64String(buf); + } + public void ChangeCellAlign(C1.Win.C1FlexGrid.CellRange cr, C1.Win.C1FlexGrid.TextAlignEnum newAlign) + { + for (int rw = cr.r1; rw <= cr.r2; rw++) + { + for (int col = cr.c1; col <= cr.c2; col++) + { + C1.Win.C1FlexGrid.CellRange tmp = FG.GetCellRange(rw, col, rw, col); + string StyleName = string.Format("R{0}C{1}Style", rw, col); + C1.Win.C1FlexGrid.CellStyle cs = null; + if (FG.Styles.Contains(StyleName)) + cs = FG.Styles[StyleName]; + else + cs = FG.Styles.Add(StyleName, tmp.Style); + cs.TextAlign = newAlign; + tmp.Style = cs; + } + } + } + public Boolean GetNewZip(string fileName) + { + ZF = new ZipFile(fileName, Encoding.UTF8); + if (ZF == null) + { return false; } + else + { + return true; + } + } + public void ZipAddFile(string fileName, string folderName) + { + if (ZF != null) + { + ZF.AddFile(fileName, folderName); + ZF.Save(); + } + } + public void ZipAddDirectory(string folderName) + { + if (ZF != null) + { + ZF.AddDirectory(folderName); + ZF.Save(); + } + } + } +} diff --git a/PROMS/WORD ADD-INs/PXMLAddIn/PXMLAddIn/PXMLAddIn.csproj b/PROMS/WORD ADD-INs/PXMLAddIn/PXMLAddIn/PXMLAddIn.csproj new file mode 100644 index 00000000..7fecb68f --- /dev/null +++ b/PROMS/WORD ADD-INs/PXMLAddIn/PXMLAddIn/PXMLAddIn.csproj @@ -0,0 +1,270 @@ + + + + + {BAA0C2D2-18E2-41B9-852F-F413020CAA33};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + Debug + AnyCPU + {DCE30B53-C4DC-47BF-9274-E8CCEABECE2B} + Library + false + PXMLAddIn + PXMLAddIn + v4.7.2 + VSTO40 + False + true + publish\ + + en + 1.0.0.1 + true + true + 7 + days + PXMLAddIn + + + PXMLAddIn + + 3 + + + + False + Microsoft .NET Framework 4.7.2 %28x86 and x64%29 + true + + + False + .NET Framework 3.5 SP1 + false + + + False + Microsoft Visual Studio 2010 Tools for Office Runtime %28x86 and x64%29 + true + + + + + Word + + + + true + full + false + bin\Debug\ + false + $(DefineConstants);DEBUG;TRACE + 4 + + + + pdbonly + true + bin\Release\ + false + $(DefineConstants);TRACE + 4 + + + + + + False + ..\..\..\..\..\..\Program Files (x86)\ComponentOne\WinForms Edition\bin\v2.0\C1.Win.C1FlexGrid.2.dll + + + ..\..\..\..\..\..\Development\Proms\VEPROMS User Interface\bin\Debug\Ionic.Zip.dll + + + + + + + + + + + + + + + False + + + False + + + False + + + False + + + False + + + + + True + + + + + False + true + + + False + true + + + False + + + + + + Component + + + Form + + + Form1.cs + + + + Code + + + Component + + + ThisGrid.cs + + + Form1.cs + + + + ResXFileCodeGenerator + Resources.Designer.cs + Designer + + + True + Resources.resx + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + True + Settings.settings + + + Code + + + + ThisAddIn.cs + + + ThisAddIn.Designer.xml + + + + + 10.0 + $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) + + + true + + + PXMLAddIn_TemporaryKey.pfx + + + 693E27D901924ADFA025D8D524648566A2D9F4A2 + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/PROMS/WORD ADD-INs/PXMLAddIn/PXMLAddIn/PXMLAddIn.csproj.user b/PROMS/WORD ADD-INs/PXMLAddIn/PXMLAddIn/PXMLAddIn.csproj.user new file mode 100644 index 00000000..86d5d7a6 --- /dev/null +++ b/PROMS/WORD ADD-INs/PXMLAddIn/PXMLAddIn/PXMLAddIn.csproj.user @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/PROMS/WORD ADD-INs/PXMLAddIn/PXMLAddIn/PXMLAddIn_TemporaryKey.pfx b/PROMS/WORD ADD-INs/PXMLAddIn/PXMLAddIn/PXMLAddIn_TemporaryKey.pfx new file mode 100644 index 00000000..43cf8a81 Binary files /dev/null and b/PROMS/WORD ADD-INs/PXMLAddIn/PXMLAddIn/PXMLAddIn_TemporaryKey.pfx differ diff --git a/PROMS/WORD ADD-INs/PXMLAddIn/PXMLAddIn/Properties/AssemblyInfo.cs b/PROMS/WORD ADD-INs/PXMLAddIn/PXMLAddIn/Properties/AssemblyInfo.cs new file mode 100644 index 00000000..69d9652e --- /dev/null +++ b/PROMS/WORD ADD-INs/PXMLAddIn/PXMLAddIn/Properties/AssemblyInfo.cs @@ -0,0 +1,38 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Security; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("PXMLAddIn")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("Windows User")] +[assembly: AssemblyProduct("PXMLAddIn")] +[assembly: AssemblyCopyright("Copyright © Windows User 2021")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("caf6a122-5739-460f-ac1a-379a90b1683d")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] + diff --git a/PROMS/WORD ADD-INs/PXMLAddIn/PXMLAddIn/Properties/Resources.Designer.cs b/PROMS/WORD ADD-INs/PXMLAddIn/PXMLAddIn/Properties/Resources.Designer.cs new file mode 100644 index 00000000..f7461680 --- /dev/null +++ b/PROMS/WORD ADD-INs/PXMLAddIn/PXMLAddIn/Properties/Resources.Designer.cs @@ -0,0 +1,62 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace PXMLAddIn.Properties { + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("PXMLAddIn.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + } +} diff --git a/PROMS/WORD ADD-INs/PXMLAddIn/PXMLAddIn/Properties/Resources.resx b/PROMS/WORD ADD-INs/PXMLAddIn/PXMLAddIn/Properties/Resources.resx new file mode 100644 index 00000000..af7dbebb --- /dev/null +++ b/PROMS/WORD ADD-INs/PXMLAddIn/PXMLAddIn/Properties/Resources.resx @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/PROMS/WORD ADD-INs/PXMLAddIn/PXMLAddIn/Properties/Settings.Designer.cs b/PROMS/WORD ADD-INs/PXMLAddIn/PXMLAddIn/Properties/Settings.Designer.cs new file mode 100644 index 00000000..66bb6c6b --- /dev/null +++ b/PROMS/WORD ADD-INs/PXMLAddIn/PXMLAddIn/Properties/Settings.Designer.cs @@ -0,0 +1,26 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace PXMLAddIn.Properties { + + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.0.0.0")] + internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { + + private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); + + public static Settings Default { + get { + return defaultInstance; + } + } + } +} diff --git a/PROMS/WORD ADD-INs/PXMLAddIn/PXMLAddIn/Properties/Settings.settings b/PROMS/WORD ADD-INs/PXMLAddIn/PXMLAddIn/Properties/Settings.settings new file mode 100644 index 00000000..39645652 --- /dev/null +++ b/PROMS/WORD ADD-INs/PXMLAddIn/PXMLAddIn/Properties/Settings.settings @@ -0,0 +1,7 @@ + + + + + + + diff --git a/PROMS/WORD ADD-INs/PXMLAddIn/PXMLAddIn/Properties/licenses.licx b/PROMS/WORD ADD-INs/PXMLAddIn/PXMLAddIn/Properties/licenses.licx new file mode 100644 index 00000000..886da4ee --- /dev/null +++ b/PROMS/WORD ADD-INs/PXMLAddIn/PXMLAddIn/Properties/licenses.licx @@ -0,0 +1 @@ +C1.Win.C1FlexGrid.C1FlexGrid, C1.Win.C1FlexGrid.2, Version=2.0.20202.438, Culture=neutral, PublicKeyToken=79882d576c6336da \ No newline at end of file diff --git a/PROMS/WORD ADD-INs/PXMLAddIn/PXMLAddIn/ThisAddIn.Designer.cs b/PROMS/WORD ADD-INs/PXMLAddIn/PXMLAddIn/ThisAddIn.Designer.cs new file mode 100644 index 00000000..f8aec60c --- /dev/null +++ b/PROMS/WORD ADD-INs/PXMLAddIn/PXMLAddIn/ThisAddIn.Designer.cs @@ -0,0 +1,237 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +#pragma warning disable 414 +namespace PXMLAddIn { + + + /// + [Microsoft.VisualStudio.Tools.Applications.Runtime.StartupObjectAttribute(0)] + [global::System.Security.Permissions.PermissionSetAttribute(global::System.Security.Permissions.SecurityAction.Demand, Name="FullTrust")] + public sealed partial class ThisAddIn : Microsoft.Office.Tools.AddInBase { + + internal Microsoft.Office.Tools.CustomTaskPaneCollection CustomTaskPanes; + + internal Microsoft.Office.Tools.SmartTagCollection VstoSmartTags; + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Tools.Office.ProgrammingModel.dll", "16.0.0.0")] + private global::System.Object missing = global::System.Type.Missing; + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Tools.Office.ProgrammingModel.dll", "16.0.0.0")] + internal Microsoft.Office.Interop.Word.Application Application; + + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Never)] + public ThisAddIn(global::Microsoft.Office.Tools.Word.ApplicationFactory factory, global::System.IServiceProvider serviceProvider) : + base(factory, serviceProvider, "AddIn", "ThisAddIn") { + Globals.Factory = factory; + } + + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Tools.Office.ProgrammingModel.dll", "16.0.0.0")] + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Never)] + protected override void Initialize() { + base.Initialize(); + this.Application = this.GetHostItem(typeof(Microsoft.Office.Interop.Word.Application), "Application"); + Globals.ThisAddIn = this; + global::System.Windows.Forms.Application.EnableVisualStyles(); + this.InitializeCachedData(); + this.InitializeControls(); + this.InitializeComponents(); + this.InitializeData(); + } + + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Tools.Office.ProgrammingModel.dll", "16.0.0.0")] + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Never)] + protected override void FinishInitialization() { + this.InternalStartup(); + this.OnStartup(); + } + + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Tools.Office.ProgrammingModel.dll", "16.0.0.0")] + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Never)] + protected override void InitializeDataBindings() { + this.BeginInitialization(); + this.BindToData(); + this.EndInitialization(); + } + + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Tools.Office.ProgrammingModel.dll", "16.0.0.0")] + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Never)] + private void InitializeCachedData() { + if ((this.DataHost == null)) { + return; + } + if (this.DataHost.IsCacheInitialized) { + this.DataHost.FillCachedData(this); + } + } + + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Tools.Office.ProgrammingModel.dll", "16.0.0.0")] + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Never)] + private void InitializeData() { + } + + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Tools.Office.ProgrammingModel.dll", "16.0.0.0")] + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Never)] + private void BindToData() { + } + + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + private void StartCaching(string MemberName) { + this.DataHost.StartCaching(this, MemberName); + } + + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + private void StopCaching(string MemberName) { + this.DataHost.StopCaching(this, MemberName); + } + + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + private bool IsCached(string MemberName) { + return this.DataHost.IsCached(this, MemberName); + } + + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Tools.Office.ProgrammingModel.dll", "16.0.0.0")] + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Never)] + private void BeginInitialization() { + this.BeginInit(); + this.CustomTaskPanes.BeginInit(); + this.VstoSmartTags.BeginInit(); + } + + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Tools.Office.ProgrammingModel.dll", "16.0.0.0")] + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Never)] + private void EndInitialization() { + this.VstoSmartTags.EndInit(); + this.CustomTaskPanes.EndInit(); + this.EndInit(); + } + + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Tools.Office.ProgrammingModel.dll", "16.0.0.0")] + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Never)] + private void InitializeControls() { + this.CustomTaskPanes = Globals.Factory.CreateCustomTaskPaneCollection(null, null, "CustomTaskPanes", "CustomTaskPanes", this); + this.VstoSmartTags = Globals.Factory.CreateSmartTagCollection(null, null, "VstoSmartTags", "VstoSmartTags", this); + } + + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Tools.Office.ProgrammingModel.dll", "16.0.0.0")] + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Never)] + private void InitializeComponents() { + } + + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + private bool NeedsFill(string MemberName) { + return this.DataHost.NeedsFill(this, MemberName); + } + + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Tools.Office.ProgrammingModel.dll", "16.0.0.0")] + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Never)] + protected override void OnShutdown() { + this.VstoSmartTags.Dispose(); + this.CustomTaskPanes.Dispose(); + base.OnShutdown(); + } + } + + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Tools.Office.ProgrammingModel.dll", "16.0.0.0")] + internal sealed partial class Globals { + + /// + private Globals() { + } + + private static ThisAddIn _ThisAddIn; + + private static global::Microsoft.Office.Tools.Word.ApplicationFactory _factory; + + private static ThisRibbonCollection _ThisRibbonCollection; + + internal static ThisAddIn ThisAddIn { + get { + return _ThisAddIn; + } + set { + if ((_ThisAddIn == null)) { + _ThisAddIn = value; + } + else { + throw new System.NotSupportedException(); + } + } + } + + internal static global::Microsoft.Office.Tools.Word.ApplicationFactory Factory { + get { + return _factory; + } + set { + if ((_factory == null)) { + _factory = value; + } + else { + throw new System.NotSupportedException(); + } + } + } + + internal static ThisRibbonCollection Ribbons { + get { + if ((_ThisRibbonCollection == null)) { + _ThisRibbonCollection = new ThisRibbonCollection(_factory.GetRibbonFactory()); + } + return _ThisRibbonCollection; + } + } + } + + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Tools.Office.ProgrammingModel.dll", "16.0.0.0")] + internal sealed partial class ThisRibbonCollection : Microsoft.Office.Tools.Ribbon.RibbonCollectionBase { + + /// + internal ThisRibbonCollection(global::Microsoft.Office.Tools.Ribbon.RibbonFactory factory) : + base(factory) { + } + } +} diff --git a/PROMS/WORD ADD-INs/PXMLAddIn/PXMLAddIn/ThisAddIn.Designer.xml b/PROMS/WORD ADD-INs/PXMLAddIn/PXMLAddIn/ThisAddIn.Designer.xml new file mode 100644 index 00000000..e852b438 --- /dev/null +++ b/PROMS/WORD ADD-INs/PXMLAddIn/PXMLAddIn/ThisAddIn.Designer.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/PROMS/WORD ADD-INs/PXMLAddIn/PXMLAddIn/ThisAddIn.cs b/PROMS/WORD ADD-INs/PXMLAddIn/PXMLAddIn/ThisAddIn.cs new file mode 100644 index 00000000..cb27eaca --- /dev/null +++ b/PROMS/WORD ADD-INs/PXMLAddIn/PXMLAddIn/ThisAddIn.cs @@ -0,0 +1,46 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Xml.Linq; +using Word = Microsoft.Office.Interop.Word; +using Office = Microsoft.Office.Core; +using Microsoft.Office.Tools.Word; + +namespace PXMLAddIn +{ + public partial class ThisAddIn + { + private void ThisAddIn_Startup(object sender, System.EventArgs e) + { + } + + private void ThisAddIn_Shutdown(object sender, System.EventArgs e) + { + } + + private PXML maker; + + protected override object RequestComAddInAutomationService() + { + if (maker == null) + maker = new PXML(); + + return maker; + } + + #region VSTO generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InternalStartup() + { + this.Startup += new System.EventHandler(ThisAddIn_Startup); + this.Shutdown += new System.EventHandler(ThisAddIn_Shutdown); + } + + #endregion + } +} diff --git a/PROMS/WORD ADD-INs/PXMLAddIn/PXMLAddIn/ThisGrid.cs b/PROMS/WORD ADD-INs/PXMLAddIn/PXMLAddIn/ThisGrid.cs new file mode 100644 index 00000000..9cfdae92 --- /dev/null +++ b/PROMS/WORD ADD-INs/PXMLAddIn/PXMLAddIn/ThisGrid.cs @@ -0,0 +1,30 @@ +using System; +using System.ComponentModel; + +namespace FlexGrid +{ + + public partial class ThisGrid : C1.Win.C1FlexGrid.C1FlexGrid + { + public const string ClassID = "73ED6A9D-4E4B-4521-823C-F4A5BC8DCB3C"; + public const string InterfaceID = "01A4D93F-C962-478D-9376-B50C52ECC554"; + public const string EventID = "AD4FB6C2-3E13-4527-8324-4D7ACF3AB67A"; + + public ThisGrid() + { + InitializeComponent(); + } + + public ThisGrid(IContainer container) + { + container.Add(this); + + InitializeComponent(); + } + private void InitializeComponent() + { + //throw new NotImplementedException(); + } + + } +} diff --git a/PROMS/WORD ADD-INs/PXMLAddIn/PXMLAddIn/ThisGrid.designer.cs b/PROMS/WORD ADD-INs/PXMLAddIn/PXMLAddIn/ThisGrid.designer.cs new file mode 100644 index 00000000..f87cb6fd --- /dev/null +++ b/PROMS/WORD ADD-INs/PXMLAddIn/PXMLAddIn/ThisGrid.designer.cs @@ -0,0 +1,37 @@ + +namespace W2PGrid +{ + partial class ThisGrid + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + //base.Dispose(disposing); + } + + #region Component Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + components = new System.ComponentModel.Container(); + } + + #endregion + } +} diff --git a/PROMS/WORD ADD-INs/PXMLAddIn/PXMLAddIn/bin/Debug/C1.Win.C1FlexGrid.2.dll b/PROMS/WORD ADD-INs/PXMLAddIn/PXMLAddIn/bin/Debug/C1.Win.C1FlexGrid.2.dll new file mode 100644 index 00000000..5283754f Binary files /dev/null and b/PROMS/WORD ADD-INs/PXMLAddIn/PXMLAddIn/bin/Debug/C1.Win.C1FlexGrid.2.dll differ diff --git a/PROMS/WORD ADD-INs/PXMLAddIn/PXMLAddIn/bin/Debug/C1.Win.C1FlexGrid.2.xml b/PROMS/WORD ADD-INs/PXMLAddIn/PXMLAddIn/bin/Debug/C1.Win.C1FlexGrid.2.xml new file mode 100644 index 00000000..34100237 --- /dev/null +++ b/PROMS/WORD ADD-INs/PXMLAddIn/PXMLAddIn/bin/Debug/C1.Win.C1FlexGrid.2.xml @@ -0,0 +1,12769 @@ + + + + C1.Win.C1FlexGrid.2 + + + + + Static class containing UI strings used by the designer. + + + + + Represents a filter that contains a and a + . + + + + + Gets the contained in this . + + + + + Gets the contained in this . + + + + + Gets or sets a value that determines whether the filter is active. + + + + + Resets the filter making it inactive. + + + + + Applies the filter to a value. + + Value to be filtered. + True if the satisfies the filter; False otherwise. + + + + Gets the editor used to modify the filter at run time. + + A that is used to edit the filter + at run time. + + + + Interface implemented by column filter objects. + + + + + Gets a value that determines whether the filter is active. + + + + + Resets the filter making it inactive. + + + + + Applies the filter to a value. + + Value to be filtered. + True if the satisfies the filter; + False otherwise. + + + + Gets the editor used to modify the filter at run time. + + A to be used to modify the filter at + run time. + The control returned must implement the + interface. + + + + Interface implemented by column filter editor controls. + + + + + Initializes the editor with parameters from a filter to be edited. + + + that contains the column to be filtered. + Index of the column that contains the values to be filtered. + + being edited. + + + + Applies changes to the filter being edited. + + + + + Gets a value that determines whether the containing form should remain + open even when it is deactivated. + + + This property allows custom editors to display modal dialogs. + + + + + Represents a filter based on a set of values. + + + + + Gets or sets an array with the values that should be included in the output. + + + Setting this property to null causes the filter to include all values in the output. + + + + + Gets or sets the limit count of displayed values in value filter. + + + + + Gets or sets a value that determines whether the filter is active. + + + + + Resets the filter making it inactive. + + + + + Applies the filter to a value. + + Value to be filtered. + True if the satisfies the filter; False otherwise. + + + + Gets the editor used to modify the filter at run time. + + A that is used to edit the filter at run time. + + + + Static class containing UI strings used by the designer. + + + + + Summary description for GridDesigner. + + + + + Gets the design time action lists supported by the component associated + with this designer. + + + + + Initializes the designer with the specified component. + + Component associated with the designer. + + + + Releases the resources associated with the designer. + + True to release all resources, false to release unmanaged resources only. + + + + Indicates whether a mouse click at the specified point should be handled by the control. + + Point indicating the mouse position, in screen coordinates. + True if the control should handle the click, false otherwise. + + + + Helper class that provides information about a currently active ComboBox editor. + + + + + Gets or sets the selected index in the currently active ComboBox editor. + + + If there's no active editor, or if the editor is not a ComboBox, + the value returned is -1. + + + + + Gets or sets the selected item in the currently active ComboBox editor. + + + If there's no active editor, or if the editor is not a ComboBox, + the value returned is null. + + + + + Gets the key that corresponds to the selected item in the currently + active ComboBox editor. + + + If there's no active editor, if the editor is not a , or if the cell + being edited does not have an associated DataMap, the value returned is null. + + + + + Gets the collection of items in the currently active ComboBox editor. + + + If there's no active editor, or if the editor is not a ComboBox, + the value returned is null. + + + + + Interface implemented by editors and used by the grid to host edit controls + on cells. + + + All built-in grid editors implement this interface, as do the controls in the + ComponentOne C1Input library. + If you want to use a third-party editor with the , consider + creating a derived class and implementing this interface. + Note that the methods in IC1EmbeddedEditor are called using reflection. + Controls do not need to implement the entire interface. Any public methods with matching + signatures (names, parameters, and return values) will be invoked by the grid. + The grid supplies default handlers for any methods not implemented by the control. + + + + + Called to initialize the editor content and styles. + + Contains the grid data that should be displayed in the editor. + Contains a dictionary with keys that correspond to style element names and values for the cell being edited. + + The dictionary contains the following keys: + + BackColor: Cell background color. + + ForeColor: Cell foreground color. + + Font: Cell font. + + Format: Cell format string (e.g. "#,##0.##"). + + ContentAlignment: Cell text alignment. + + Margins: Extra margins around the cell content (in pixels). + + Wrap: Whether word wrapping is enabled. + + + + + Gets the current value of the editor. + + The current value of the editor (any data type). + + + + Gets a value that determines if the editor's current contents are valid. + + True if the editor currently has valid content (e.g it contains + an EditMask and all required positions have been filled). + + + + + Called to update the editor's size and position. + + The bounds of the cell being edited, in client coordinates. + + This method is called during initialization and also when the grid scrolls. + + + + + Gets a value that determines whether a given key should finalize editing. + + Key to be tested. + True if the key should finish the edits and close the editor. + + If this method returns true, the grid copies the editor value to the cell and + exits edit mode. The key is then processed by the grid (unless the e.Handled + parameter is set to true). + For example, pressing the down arrow typically causes the grid to exit edit + mode and move the cursor to the next row. + The default handler returns true for the TAB, ENTER, and ESC keys. + It also handles the arrow keys for editors based on TextBox, ComboBox, + and DateTimePicker controls. + + + + + Formats a given value using a specified mask. + + Value to be formatted. + Formatting mask. + A string containing the formatted value. + The default implementation ignores the mask and returns value.ToString(). + + + + Gets the editor style, which determines the type of button that is displayed in + the cell before and during editing (DropDown, Modal, or None). + + + The default handler returns DropDown for ComboBoxes, DateTimePickers, and + UpDown controls. It returns None for other control types. + The UITypeEditorEditStyle enumeration is defined in the System.Drawing.Design + namespace. The available settings are DropDown, Modal, and None. + + + + + Interface that extends and can be used to implement multi-column data maps. + + + + + Gets the string that should be displayed in the grid while not in edit mode. + + Value to look up in the dictionary. + The string that should be displayed in the grid while not in edit mode. + + When the is used to populate a , + all columns are displayed when the combo is dropped down. When the combo is closed, only one + column can be displayed. This method returns that value. + + + + + Interface that extends and can be used to implement multi-column data maps. + + + + + Gets the string which is in given column of the dictionary. + + Value to look up in the dictionary. + >Column index in the dictionary. + The string that should be displayed in the grid while not in edit mode. + + + + Class that implements the and can be used as + a column DataMap to create multi-column combo editors. + + + The class can be used to implement simple string-based + data maps or bound data maps that get the data from a data source object. + + + The code below creates an unbound two-column data map and assigns it to a grid column: + + // create string-based MultiColumnDictionary and assign it to column + // note: this will automatically generate keys of type 'int' for each item, + // the key values will be stored in the grid. + string text = "Row1, Col1\tRow1, Col2|Row2, Col1\tRow2, Col3|Row2, Col1\tRow3, Col2"; + MultiColumnDictionary map = new MultiColumnDictionary(text, 0, true); + _flex.Cols[1].DataMap = map; + + The map consists of three items, each with two columns. Because the autoKeys + parameter was set to true in the map's constructor, the map will have unique integer keys for + each value,and those integers will be stored in the grid cells. If autoKeys + had been set to false, the strings themselves would be used as keys and stored in the grid + cells. + The code below creates a bound data map and assigns it to a grid column: + + // create data-based MultiColumnDictionary and assign it to column + // notes: the list will automatically be updated is the data source changes. + DataTable dt = GetDataTable("employees"); + string[] columnNames = new string[] { "FirstName", "LastName", "Country" }; + MultiColumnDictionary map = new MultiColumnDictionary(dt, "EmployeeID", columnNames, 1); + _flex.Cols[2].DataMap = map; + + This map is bound to an Employees DataTable. The keyColumn parameter is set + to "EmployeeID", causing this field to be used as a key. When the grid is edited, the values + stored in the cells will be the employee's ID. However, this value is never displayed be the grid. + The drop-down list will show the employee's first name, last name, and country, as specified by the + columnNames parameter. + When the list is closed, the grid will display the employee's last name, as specified + by the displayColumn parameter. + Note that this map is dynamically bound to the data source, so if the employees table is + modified, the editor list will reflect the changes automatically. + Note also that the usual combo editing features such as auto-search and double-click cycling + still work. + + + + + Initializes a new instance of an unbound class. + + String that contains the items, delimited by pipe characters ("|"). + Each item may contain multiple columns, delimited by tabs (vbTab or '\t'). + + This constructor causes the map to show all columns when the editor is dropped down and only the + first column when the editor is closed or inactive. + + + + + Initializes a new instance of an unbound class. + + String that contains the items. Items are delimited by pipe characters ("|"). + Each item may contain multiple columns, delimited by tabs (vbTab or '\t'). + Index of the column that is displayed in the grid. + True if keys are to be automatically generated, false if the items themselves are + to be used as keys. Note that in the latter case, duplicate items are not allowed. + + + + Initializes a new instance of a bound class. + + Data source object. + Name of the data source column that contains unique keys. + Array with the names of the columns that are included in the map. + Name of the column that is displayed in the grid. + + + + Initializes a new instance of a bound class. + + Data source object. + Name of the data source column that contains unique keys. + + This constructor causes the map to show all columns when the editor is dropped down and only the + first column when the editor is closed or inactive. + + + + + Initializes a new instance of a bound class. + + Data source object. + Name of the data source column that contains unique keys. + Array with the names of the columns that are included in the map. + Name of the column that is displayed in the grid. + + + + Initializes a new instance of a bound class. + + Data source object. + Name of the data source column that contains unique keys. + + + + Removes all entries from the . + + + + + Adds an entry with the specified key and value into the . + + + + + Gets or sets the value associated with the specified key + + The key of the value to get or set. + + + + Gets the string which is in given column of the dictionary. + + Value to look up in the dictionary. + >Column index in the dictionary. + The string that should be displayed in the grid while not in edit mode. + + + + Specifies how adjacent cells are merged for display. + + + + + Do not merge any cells. + + + + + Merge any adjacent cells with same contents. + + + + + Merge rows only if cells above are also merged. + + + + + Merge columns only if cells to the left are also merged. + + + + + Merge cells only if cells above or to the left are also merged. + + + + + Merge only fixed cells. This setting is useful for setting up complex + headers for the data and preventing the data itself from being merged. + + + + + Allow long entries to spill into empty adjacent cells. + + + + + Allow long entries in node rows to spill into empty adjacent cells. + + + + + Use collection to determine which cells are merged. + + + + + Use the setting specified for the property. + + + + + The C1FlexGrid control is a powerful, full-featured grid. + C1FlexGrid provides advanced features such as outline trees, cell merging, + masked editing, translated combo and image lists, owner-draw cells, and automatic + data aggregation. + + + C1FlexGrid can be used in bound mode, where it displays data from .NET + data sources, or in unbound mode, where the grid itself manages the data. + You can use C1FlexGrid to read and write Excel files (.Xls), or read and write + grid contents to and from Xml files. + Classes derived from should have a LicenseProvider + attribute so Visual Studio will embed the appropriate licensing information into + projects that use the derived control. + For example: + + [LicenseProvider(typeof(LicenseProvider))] + public class MyGrid : C1FlexGrid + { + // implementation + } + + + + + + Creates a new instance of the control. + + + + + Gets or sets how cells should be merged. + + + Merging cells allows you to display data in a clear, appealing way, + because it highlights groups of identical information. It also gives you + flexibility to build tables similar to the ones you can create in HTML or + using Microsoft Word, both of which support merged cells. + To create tables with merged cells, set the + property to a value other than , and + set the property of individual rows and + columns true for the rows and columns you wish to merge. After these + properties are set, the grid will automatically merge adjacent cells + that have the same contents. + Whenever the cell contents change, the grid updates the merging state. + + + The code below causes the grid to merge cells with the same data in column 1: + + flex.AllowMerging = AllowMergingEnum.Free; + flex.Cols[1].AllowMerging = true; // merge values in column 1 + + + + + Gets or sets how non-scrollable cells should be merged. + + + By default, this property is set to , which + causes fixed cells to be merged with the same setting as scrollable cells. + If you specify a different value for this property, you can use different merging + modes for fixed cells such as column headers than the setting used for scrollable cells. + + + + + Returns the merged range of cells that includes a given cell. + + Row index. + Column index. + Whether the range should be clipped to the visible area of the grid. + A object that contains the given cell. + + Cell merging is controlled by the property. + The method allows you to determine whether a cell is + merged with adjacent cells. + You can override the method to implement custom merging + logic. If you do this, make sure the merging method is consistent and efficient, since + it gets called frequently and affects the grid's appearance and behavior. + + + The code below checks the current cell after a selection to see if it is part + of a merged range: + + private void _flex_SelChange(object sender, System.EventArgs e) + { + CellRange rg = this._flex.GetMergedRange(_flex.Row, _flex.Col, false); + if (!rg.IsSingleCell) + { + Console.WriteLine("selection is merged: {0},{1}-{2},{3}", + rg.TopRow, rg.LeftCol, rg.BottomRow, rg.RightCol); + } + } + + The code below shows how you can override the method + to provide custom merging: + + public class CustomMerge : C1FlexGrid + { + public CustomMerge() + { + // allow free merging by default + AllowMerging = AllowMergingEnum.Free; + for (int r = 0; r < Rows.Count; r++) Rows[r].AllowMerging = true; + for (int c = 0; c < Cols.Count; c++) Cols[c].AllowMerging = true; + } + override public CellRange GetMergedRange(int row, int col, bool clip) + { + // merge cells in range (1,1)-(3,3) + if (row >= 1 && row <= 3 && col >= 1 && col <= 3) + return GetCellRange(1, 1, 3, 3); + + // don't merge anything else + return GetCellRange(row, col); + } + } + + + + + Returns the merged range of cells that includes a given cell. + + Row index. + Column index. + A object that contains the given cell. + + This method returns the entire range, including invisible cells. + + + + + Gets the that determines which grid + cells are merged when the property is set to + . + + + + + Reflects grid over its main diagonal. + + + The Transpose method also removes sorting and filtering for every columns. + + + + + Overridden to clear merged ranges. + + + + + Gets the state for a Windows XP theme while the mouse moves over a cell. + + + This method is for internal use. It allows inherited classes to customize the hot-tracking behavior. + + Row under the mouse. + Column under the mouse. + An integer representing the item state (2 for hot-tracking, 1 for normal). + + + + Gets a cell glyph to show in a cell. + + + This method is for internal use. It allows inherited classes to customize the display of the sorting glyphs. + + Row index. + Column index. + Cell rectangle + Glyph to display above the cell content. + Glyphs to display on the left of the cell. + Glyphs to display on the right of the cell. + True if any glyphs were assigned to the cell, false otherwise. + + + + Applies a value to a cell or cell range. + + + This method is for internal use. It allows inherited classes to customize the way data + coming from cell editors is applied to the cells. + + Row index. + Column index. + Data to be applied to the cell. + Whether the data should be coerced into the cell's data type. + + + + + + Applies a value to a cell or cell range. + + + This method is for internal use. It allows inherited classes to customize the way checkbox + data is applied to the cells. + + Row index. + Column index. + Value to apply to the cell. + + + + Invalidates a cell range, causing it to be repainted. + + Range to be invalidated. + + This method is rarely used by the programmer, since the grid automatically + performs invalidation as needed. + + + + + Gets a rectangle representing the coordinates of a cell, row, or column. + + + This method is for internal use. It allows inherited classes to customize the way cell geometry + is calculated. + + Row index (or -1 to get column bounds). + Column index (or -1 to get row bounds). + Whether the rectangle should be horizontally clipped to the grid's client area. + Whether the rectangle should be vertically clipped to the grid's client area. + A containing the display area for the row, column, or cell, in client + coordinates and accounting for scroll position. + + + + Gets a rectangle representing the coordinates of a cell editor. + + + This method is for internal use. It allows inherited classes to customize the way cell geometry + is calculated. + + Row index. + Column index. + Rectangle used to position the cell editor. + + + + Starts editing a cell in response to a key press. + + + This method is for internal use. It allows inherited classes to customize the editing process. + + Row index. + Column index. + Key that initiated the edit process. + Whether editing should start even in non-editable cells (e.g. fixed cells). + True if the editing process was started successfully, false otherwise. + + + + Starts editing a cell in response to a mouse action. + + + This method is for internal use. It allows inherited classes to customize the editing process. + + Row index. + Column index. + Mouse position in client coordinates. + Whether the action was a double-click. + True if the editing process was started successfully, false otherwise. + + + + Gets a value that determines if a cell contains the grid cursor. + + Row index. + Column index. + True if the cell contains the cursor, false otherwise. + + + + Gets a value that determines if a cell is part of the selection and should be highlighted. + + Row index. + Column index. + True if the cell should be highlighted, false otherwise. + + + + Gets a value that indicates what types of child nodes a row has. + + + This method is for internal use. It allows inherited classes to customize outline trees. + + Row index. + Column index. + Outline level. + Zero if the row has no children, 1 if it has regular data rows only, + 2 if it has child nodes, and 3 if it has data and child nodes. + + + + + Draws a grid row. + + A that contains a + object where the row will be drawn. + Index of the row to draw. + + This method is for internal use. It allows inherited classes to customize the grid appearance. + + + + + Draws a grid cell. + + A that contains a + object where the cell will be drawn. + Index of the cell's row. + Index of the cell's column. + The index of the last column painted (may be greater than + if columns are merged). + + This method is for internal use. It allows inherited classes to customize the grid appearance. + + + + + Draws a grid cell. + + + object where the cell will be drawn. + Index of the cell's row. + Index of the cell's column. + + that defines the cell position. + + This method is for internal use. It allows inherited classes to customize the grid appearance. + + + + + Moves or extends the current selection. + + + value that specifies the type of cursor movement. + Whether to extend the current selection. + + This method is for internal use. It allows inherited classes to customize the grid appearance. + + + + + Automatically size grid columns to fit the largest entry. + + + object used to measure the cell contents. + Index of the first row to be measured. + Index of the first column to be measured. + Index of the last row to be measured. + Index of the first column to be measured. + Extra space, in twips, to add to the largest entry. + + value that specifies auto sizing behavior. + + This method is for internal use. It allows inherited classes to customize the grid appearance. + + + + + Automatically size grid columns to fit the largest entry. + + + object used to measure the cell contents. + Index of the first row to be measured. + Index of the first column to be measured. + Index of the last row to be measured. + Index of the first column to be measured. + Extra space, in twips, to add to the largest entry. + + value that specifies auto-sizing behavior. + + This method is for internal use. It allows inherited classes to customize the grid appearance. + + + + + Raises the event. + + Object raising the event. + A that contains event data. + + + + Called when the grid contents scroll. + + + value that specifies the scroll direction. + + This method is for internal use. It allows inherited classes to customize the grid scrolling behavior. + + + + + Specifies whether the user should be able to resize rows and columns with the mouse. + + + + + The user may not resize rows or columns. + + + + + The user may resize columns with the mouse by dragging the edge of the column headers. + Double-clicking the edge of a column header automatically sizes the column to fit the widest entry. + + + + + The user may resize rows with the mouse by dragging the edge of the row headers. + Double-clicking the edge of a row header automatically sizes the row to fit the tallest entry. + + + + + The user may resize rows and columns with the mouse. + + + + + The user may change the default column width with the mouse. + Resizing any column will resize all columns that don't have a specific width assigned to them. + + + + + The user may change the default row height with the mouse. + Resizing any row will resize all rows that don't have a specific height assigned to them. + + + + + The user may change the default column width or row height with the mouse. + + + + + Specifies whether the user should be able to freeze rows and columns with the mouse. + + + + + The user may not freeze rows or columns. + + + + + The user may freeze columns by dragging the frozen region vertical boundary with the mouse. + + + + + The user may freeze rows by dragging the frozen region horizontal boundary with the mouse. + + + + + The user may freeze rows and columns by dragging the frozen region boundaries with the mouse. + + + + + Specifies whether the user should be able to drag rows and columns with the mouse. + + + + + The user may not drag rows or columns. + + + + + The user may drag columns with the mouse. + + + + + The user may drag rows with the mouse. + + + + + The user may drag rows and columns with the mouse. + + + + + Specifies whether the user should be able to sort columns with the mouse. + + + + + The user may not sort columns with the mouse. + + + + + The user may sort single columns by clicking on its header cell. + + + + + The user may sort a range of columns by clicking on the header cell + of the rightmost column in the range. + + + + + Specifies whether the grid should highlight the selected range. + + + + + Never highlight the selected range. + + + + + Always highlight the selected range. + + + + + Highlight the selected range when the control has focus. + + + + + Specifies the appearance of the focus rectangle. + + + + + No focus rectangle. + + + + + Show a light focus rectangle (dotted, 1-pixel wide). This is the default setting. + + + + + Show a heavy focus rectangle (dotted, 2-pixel wide). + + + + + Show a solid focus rectangle. The color of the rectangle is determined by the + BackColor property of the style. + + + + + Show a raised focus rectangle. + + + + + Show an inset focus rectangle. + + + + + Specifies options that control auto-sizing. + + + + + Default behavior. + + + + + All rows (or columns) in the range are set to the same size. + + + + + Ignore invisible rows (or columns) when auto-sizing. + + + + + Ignore merged cells when auto-sizing. + + + + + Specifies whether cells should be drawn entirely by the grid or with + help from custom drawing code. + + + + + Grid cells are drawn by the grid. + + + + + The grid fires the event to allow custom + cell drawing. + + + + + Specifies which elements of the cell should be drawn by the grid. + + + This enumeration is used when rendering owner-drawn cells. + If you set the property to , + the grid will fire the event to allow custom cell drawing. + The parameter passed to the event handler has a + method that allows you to use the standard + drawing routines for rendering parts of the cell. For example, you can paint a custom background + and use the standard drawing routines for the cell borders and content. + See the event for an example. + + + + + Draw the cell background. + + + + + Draw the cell border. + + + + + Draw the cell content (text, images, check boxes, etc). + + + + + Draw all cell elements (background, border, and contents). + + + + + Specifies when the grid should display combo buttons in cells. + + + + + Show buttons only while editing the cell. + + + + + Show buttons when the cell has the focus. This is the default setting for grid. + + + + + Always show buttons. + + + + + Never show buttons. + + + + + ShowButtons property of the column is inherited from the grid. This is default setting for column. Cannot be used with ShowButtons property of the grid. + + + + + Specifies options that customize the grid's editing behavior. + + + + + No special behavior. + + + + + Search for entries in lists as the user types. + + + + + Cycle to the next item on the list when the user double-clicks a cell. + + + + + Check and uncheck all check boxes in a selection simultaneously. + + + + + Use built-in numeric editor when editing numeric types. + + + + + Commit changes to data source only when changing rows or moving focus. + + + + + Exit editor if user presses the right arrow key at the end of the content + or the left arrow key at the start of the content. + + + + + Enter edit mode only in response to mouse or keyboard events. Setting this + flag to false causes the grid to enter edit mode when the control gets the + focus or when the user moves the cursor. + + + + + All of the above. + + + + + Specifies whether the control should use themes for displaying row or column headers. + + + + + Use themed headers when the property is set to XpThemes. + + + + + Do not use themed headers. + + + + + Use themed headers for row headers. + + + + + Use themed headers for column headers. + + + + + Use themed headers for row and column headers. + + + + + Use themed headers to indicate selected rows and columns when VisualStyle + is set to one of the Office styles. + + + + + Specifies options that customize scrollbar behavior. + + + + + Use the default scrolling behavior. + + + + + Keep scrollbars visible even when they are disabled. + + + + + Scroll by rows and columns (instead of by pixel). + + + + + Do not scroll the control contents until the user releases the scrollbar thumb. + + + + + Fire the event and display a tooltip next to + the vertical scrollbar while scrolling vertically. + + + + + Do not scroll the control to the first cell of merged range. + + + + + Specifies what parts of the grid should be copied to the clipboard when the + property is set to true. + + + + + Only the selected data is copied. + + + + + Copy the selected data and include the column headers. + + + + + Copy the selected data and include the row headers. + + + + + Copy the selected data and include row and column headers. + + + + + Do not copy any data to the clipboard. + + + + + Specifies the position of the sort glyphs within the column header cells. + + + + + Do not show sort glyphs. + + + + + Show sort glyphs on the right of the column header cells. + + + + + Show sort glyphs on the top of the column header cells. + + + + + Show sort glyphs on the top of the column header cells if filtering + is enabled, and on the right otherwise. + + + + + Base class for the control. + + + + + Releases all resources used by the . + + True to release both managed and unmanaged resources; + False to release only unmanaged resources. + + + + Signals the object that initialization is starting. + + + + + Signals the object that initialization is complete. + + + + + Occurs when the filter localizes a string in the user interface. + + + The control automatically localizes the + column filter based on the system's current culture and in the setting + of the property. + This event allows you to customize the filter strings or to + implement localization to languages that are not supported by the grid's + built-in localization mechanism. + To modify the content of any of the filter's UI elements, handle + this event and set the e.Value parameter to the text you would + like to display. + + + The example below shows how you can change the strings in the filter + UI based on the string value and on the name of the controls being + localized: + + void Initialize() + { + // enable filtering + _flex.AllowFiltering = true; + + // set GetLocalizedString handler + _flex.GetLocalizedString += _flex_GetLocalizedString; + } + void _flex_GetLocalizedString(object sender, C1.Win.C1FlexGrid.GetLocalizedStringEventArgs e) + { + // customize item based on text value + if (e.Value == "(Select All)") + { + e.Value = "(Select Everything)"; + } + + // customize item based on component name + switch (e.ComponentName) + { + case "_btnApplyFilter": + e.Value = "OK"; + break; + case "_btnClearFilter": + e.Value = "Reset"; + break; + case "_btnCancel": + e.Value = "Close"; + break; + } + } + + + + + Raises the event. + + + that contains the event data. + + + + Creates a new accessibility object for the control. + + A new for the control. + + + + Retrieves the specified . + + Row index of the accessibility object to return. + The for the specified row. + + + + Raises the event. + + An that contains the event data. + + + + Gets the default size of the control. + + + + + Fires when the grid or its contents change. + + + This is a general event that fires before more specific events. + For example, if the user drags a column with the mouse, the control fires the + , , and + events. + The GridChanged event allows you to create a centralized handler + for all types of grid events. It does not provide detailed arguments for + every event, nor the option of canceling user actions. + + + + + Raises the event. + + + + + Fires before the event is handled by the grid. + + + This event fires before the grid processes the event, and + gives the program a chance to customize the behavior of the control and optionally + cancel the default handling of the mouse. + + + The code below handles the event to detect clicks + on row headers and provide OLE drag and drop functionality. + + void _flex_BeforeMouseDown(object sender, C1.Win.C1FlexGrid.BeforeMouseDownEventArgs e) + { + // start dragging when the user clicks the row headers + HitTestInfo hti = _flex.HitTest(e.X, e.Y); + if (hti.Type == HitTestTypeEnum.RowHeader) + { + e.Cancel = true; // cancel default handling + HandleRowDragDrop(hti.Row); // handle row drag/drop + } + } + + + + + Raises the event. + + + + + Fires before the DoubleClick event is handled by the grid. + + + This event fires before the grid processes the event, and + gives the program a chance to customize the behavior of the control and optionally + cancel the default handling of the mouse. + + + The code below handles the event to detect double-clicks + on cells in a specific column and provide a custom edit dialog instead of using the + built-in editor. + + void _flex_BeforeDoubleClick(object sender, C1.Win.C1FlexGrid.BeforeMouseDownEventArgs e) + { + // detect double-clicks on column "Customer" + HitTestInfo hti = _flex.HitTest(e.X, e.Y); + if (hti.Type == HitTestTypeEnum.Cell && _flex[hti.Column].Name == "Customer") + { + e.Cancel = true; // cancel default handling + ShowCustomEditDialog(hti.Row, hti.Column); // handle row drag/drop + } + } + + + + + Fires when the user starts dragging a row. + + + This event only fires when the user drags a row using the mouse. + It does not fire when a row is moved using the method. + You can prevent specific rows from being dragged by the user by setting their + property to false. + + + + + Raises the event. + + A that contains the event data. + + + + Fires as the user drags a row to a new position. + + + This event only fires when the user drags a row using the mouse. + It does not fire when a row is moved using the method. + You can prevent specific rows from being dragged by the user by setting their + property to false. + + + + + Raises the event. + + A that contains the event data. + + + + Fires after the user finishes dragging a row. + + + This event only fires when the user drags a row using the mouse. + It does not fire when a row is moved using the method. + You can prevent specific rows from being dragged by the user by setting their + property to false. + + + + + Raises the event. + + A that contains event data. + + + + Fires when the user starts dragging a column. + + + This event only fires when the user drags a column using the mouse. + It is does not fire when a column is moved using the method. + You can prevent specific columns from being dragged by the user by setting their + property to false. + + + + + Raises the event. + + A that contains event data. + + + + Fires as the user drags a column to a new position. + + + This event only fires when the user drags a column using the mouse. + It does not fire when a row is moved using the method. + You can prevent specific columns from being dragged by the user by setting their + property to false. + + + + + Raises the event. + + A that contains the event data. + + + + Fires after the user finishes dragging a column. + + + This event only fires when the user drags a column using the mouse. + It does not fire when a column is moved using the method. + You can prevent specific columns from being dragged by the user by setting their + property to false. + + + + + Raises the event. + + A that contains event data. + + + + Fires before a column is sorted by a click on a column header. + + + This event only fires if the sorting was caused by a click on a column header. It does not fire + before sorting with the method. + This event is useful when you want to prevent the user from sorting certain columns or to specify + custom sorting orders for specific columns. You may do so by modifying the value of the + parameter. + + + + + Raises the event. + + A that contains event data. + + + + Fires after a column is sorted by a click on a column header. + + + This event only fires if the sorting was caused by a click on a column header cell (see the + property). It does not fire after sorting with the method. + This event is useful if you want to update user interface elements to reflect the new sorting. + To prevent certain columns from being sorted, or to alter their default sorting order, use the + or handle the event. + + + + + Raises the event. + + A that contains event data. + + + + Fires before a row is automatically resized by a double-click on a row header. + + + + + Raises the event. + + A that contains event data. + + + + Fires before a column is automatically resized by a double-click on a column header. + + + + + Raises the event. + + A that contains event data. + + + + Fires before a row is resized by dragging the row header. + + + Use the grid's property to determine whether users + are allowed to resize rows, columns, or both. + and + objects also have an property + that allows you to prevent specific rows and columns from being resized. + + + + Raises the event. + + A that contains event data. + + + + Fires after a row is resized by dragging the row header. + + + This event is fired after a row is resized by the user, by dragging the edge + of the row header cell with the mouse (see the property). + It is not fired when a row is resized by assigning a new value to the + property. + + + + + Raises the event. + + A that contains event data. + + + + Fires before a column is resized by dragging the column header. + + + + + Raises the event. + + A that contains event data. + + + + Fires after a column is resized by dragging the column header. + + + This event is fired after a column is resized by the user, by dragging the edge + of the column header cell with the mouse (see the property). + It is not fired when a column is resized by assigning a new value to the + property. + + + + + Raises the event. + + A that contains event data. + + + + Fires before rows are frozen by dragging the frozen row divider. + + + Use the property to enable or disable row and column freezing. + + + + + Raises the event. + + A that contains event data. + + + + Fires after rows are frozen by dragging the frozen row divider. + + + Use the property to enable or disable row and column freezing. + + + + + Raises the event. + + A that contains event data. + + + + Fires before columns are frozen by dragging the frozen column divider. + + + Use the property to enable or disable row and column freezing. + + + + + Raises the event. + + A that contains event data. + + + + Fires after columns are frozen by dragging the frozen column divider. + + + Use the property to enable or disable row and column freezing. + + + + + Raises the event. + + A that contains event data. + + + + Fires when the mouse enters a cell. + + + Many applications track mouse movement and react to the cell that is currently + under the mouse. This can be done using the event, but that + is not very efficient since the event fires many times while the mouse is over the + same cell. + The MouseEnterCell event allows you to implement cell tracking + efficiently, since it only fires once until the mouse leaves the cell. + + + The code below tracks mouse movement and highlights the cell under the mouse: + + void Form1_Load(object sender, EventArgs e) + { + // create style for tracking cell under the mouse + CellStyle cs = _flex.Styles.Add("track"); + cs.BackColor = Color.Gold; + } + void _flex_MouseEnterCell(object sender, RowColEventArgs e) + { + // apply tracking style when mouse enters the cell + _flex.SetCellStyle(e.Row, e.Col, _flex.Styles["track"]); + } + void _flex_MouseLeaveCell(object sender, RowColEventArgs e) + { + // remove tracking style when mouse leaves the cell + _flex.SetCellStyle(e.Row, e.Col, (CellStyle)null); + } + + + + + Raises the event. + + + that contains the event data. + + + + Fires when the mouse leaves a cell. + + + + + Raises the event. + + + that contains the event data. + + + + Fires before the grid scrolls. + + + + + Raises the event. + + A that contains event data. + + + + Fires after the grid scrolls. + + + This event allows you to prevent the user from scrolling the grid while an operation + is being performed on the current selection. + + + The code below prevents the grid from scrolling while the grid is in edit mode. + + void _flex_BeforeScroll(object sender, C1.Win.C1FlexGrid.RangeEventArgs e) + { + if (_flex.Editor != null) + e.Cancel = true; + } + + + + + Raises the event. + + A object that contains event data. + + + + Fires before the vertical ScrollTip is displayed. + + + This event fires only if the ShowScrollTips flag is set in the property. + It allows you to specify the text that will be displayed in the scroll tip. + + + The code below uses the event to display a scroll tip showing the value of the + first cell that will become visible when the user stops scrolling. + + _flex.ScrollOptions = ScrollFlags.DelayedScroll | ScrollFlags.ShowScrollTips; + void _flex_ShowScrollTip(object sender, ToolTipEventArgs e) + { + e.ToolTipText = string.Format("row {0}", e.Row); + } + + + + + Raises the event. + + A object that contains event data. + + + + Fires before the current cell changes ( and properties). + + + This event fires before the or properties change, either as a + result of user actions or through code. It allows you to prevent the selection of certain cells, + thus creating "protected" ranges on a grid. + + fires only when the or + properties are about to change. To detect extended selections, you also need to handle the + event. + + + + + Raises the event. + + A that contains event data. + + + + Fires after the current cell changes ( and properties). + + + This event fires before the or properties change, either as a + result of user actions (mouse or keyboard) or through code. It allows you to display additional information + about the currently selected row, column, or cell. + To perform validation or prevent certain cells from being selected, use the + and events instead. + + + + + Raises the event. + + A that contains event data. + + + + Fires before the selection changes (, , , properties). + + + This event fires before the and properties change, either as a result + of user actions or through code. It allows you to prevent the selection of certain cells, thus creating + "protected" ranges on a grid. + To prevent the selection of a range, you also need to handle the event, which + is fired before the Row and Col properties change. + + + + + Raises the event. + + A that contains event data. + + + + Fires after the selection changes (, , , + properties). + + + This event is fired after the or properties change, either as + a result of user actions (mouse or keyboard) or through code. + This event is useful if you want to display additional information about the current selection. To + perform validation or prevent certain cells from being selected, use the and + events instead. + + + + + Raises the event. + + A that contains event data. + + + + Fires after the current cell changes ( and properties). + + + + fires when the or properties change, either + as a result of user actions (mouse or keyboard) or through code. + This event does not fire when the selection changes ( or properties) + but the active cell (, ) remains the same. In this case, the + event fires instead. + + + + + Raises the event. + + A that contains event data. + + + + Fires after the selection changes (, , , + properties). + + + + fires after the , , , + or properties change, either as a result of user actions (mouse or keyboard) + or through code. + This event also fires while the user extends the selection with the mouse. + + + + + Raises the event. + + An that contains event data. + + + + Fires before the current cell changes ( and properties). + + + This event fires before the cursor leaves the current cell, either as a result of user actions + (mouse or keyboard), or through code. + + + + + Raises the event. + + An that contains event data. + + + + Fires after the current cell changes ( and properties). + + + This event fires after the cursor enters a cell, either as a result of user actions (mouse or keyboard), + or through code. + + + + + Raises the event. + + An that contains event data. + + + + Fires before the grid enters edit mode, and also when the cell that has the + focus needs to be painted. + + + This event doesn't fire only when the grid is about to enter edit mode. + It also fires while painting cells, in order to support drawing the editor's + drop-down buttons. + The event fires only when the grid is about to enter + edit mode. + + + + + Raises the event. + + A that contains event data. + + + + Fires before the control enters edit mode. + + + This event fires before the control enters edit mode. It allows you to prevent + editing by setting the Cancel parameter to true, or to supply a list of choices + for a combo list using the property, or an edit mask using the + property. + If the choices or the mask are the same for a whole column, you may set them more + efficiently using the and + properties for the object. In this case, there's no need to handle + the StartEdit event at all. + The grid also exposes a event. The difference between + the two is that BeforeEdit fires when the grid paints the cell that has the focus + (so it can determine whether the cell has a drop-down button). BeforeEdit fires + more often than StartEdit, and does not always indicate that the grid is actually + entering edit mode. + + + + + Raises the event. + + A that contains event data. + + + + Fires after a cell has been edited. + + + This event does not fire if the user cancels the edits by pressing the ESC key. + The event fires whenever the grid leaves edit mode, + even if the edits were canceled. + + + + + Raises the event. + + A that contains event data. + + + + Fires after the control leaves edit mode. + + + + + Raises the event. + + A that contains event data. + + + + Fires after the user clicks a cell button. + + + This event fires when the user clicks an edit button on a cell. Typically, + this event is used to pop up a custom editor for the cell (for example, dialogs for + selecting colors, dates, files, pictures, and so on). + By default, cell edit buttons are displayed on the right side of a cell, + with an ellipsis caption ("..."). They are similar to the buttons displayed in the + PropertyGrid control, next to Image properties. You may customize + the button's appearance by assigning a picture to the property. + To create an edit button on a cell, you must set the + property to true and set the property (on the grid or on specific + columns) to an ellipsis ("..."). + + + + + Raises the event. + + A that contains event data. + + + + Fires after a cell editor has been initialized by the grid, to allow additional custom initialization. + + + This event can be used to customize the behavior of the cell editor by setting properties + on the editor control. + For example, the code below checks to see if the editor being used is a TextBox, and then + sets the editor's CharacterCasing and MaxLength properties. + + void _flex_SetupEditor(object sender, RowColEventArgs e) + { + TextBox tb = _flex.Editor as TextBox; + if (tb != null) + { + if (_flex.Cols[e.Col].Name == "ID") + tb.MaxLength = 4; + else + tb.MaxLength = 32000; + } + } + + + + + + Raises the event. + + A that contains event data. + + + + Fires before the control exits cell edit mode, while the editor is still active. + + + When this event fires, the contents of the editor have not been applied to the + grid. You can validate the editor contents and cancel the edits if necessary. + To validate the editor contents, check the value contained in the Editor.Text + property. If the value is invalid for the cell, set the Cancel parameter to true + and the grid will remain in edit mode until the user types a valid entry. + + For example, the code below checks to make sure the value entered is an integer + between 0 and 100: + + void _flex_ValidateEdit(object sender, ValidateEditEventArgs e) + { + if (_flex.Cols[e.Col].Name = "Score") + { + try + { + int value = int.Parse(_flex.Editor.Text); + if (value >= 0 && value <= 50) + return; // accept edits + } + catch {} + + // error or invalid range, refuse edits + e.Cancel = true; + } + } + + + + + + Raises the event. + + A that contains event data. + + + + Fires after a checkbox in a cell is checked or unchecked by the user. + + + + + Raises the event. + + A that contains event data. + + + + Fires in edit mode, after the contents of the editor change. + + + This event fires while the grid is in edit mode and the contents of the editor change. + This may be caused by the user typing into the editor or selecting a new item in a + drop down list. + When this event fires, the new editor content has not been applied to the grid cell yet. + You may check the new content using the property. + + + The code below shows a message when the text being edited contains more than 10 characters: + + void _flex_ChangeEdit(object sender, EventArgs e) + { + // get text in editor + string text = _flex.Editor.Text; + + // show message if it's too long + statusStrip1.Text = text.Length > 10 + ? "This text seems too long..." + : "This text looks OK..."; + } + + + + + Raises the event. + + An that contains event data. + + + + Fires in edit mode, when the dropdown portion of an editor opens. + + + + + Raises the event. + + A that contains event data. + + + + Fires in edit mode, when the dropdown portion of an editor closes. + + + + + Raises the event. + + A that contains event data. + + + + Fires in edit mode, when the user presses a key. + + + The KeyDownEdit event corresponds to the event, + except it fires when the grid is in edit mode (in this case, the control that received the + key is the editor, not the grid itself). + The editor has three modes: text, drop-down combo, or drop-down list. The mode used is + determined by the properties in the grid and column objects. + While editing with the text editor or with a drop-down combo, you may set or retrieve + the contents of the editor by retrieving the editor control with the + property and casting it to the proper type. + + + + + Raises the event. + + A that contains event data. + + + + Fires in edit mode, when the user releases a key. + + + The event corresponds to the + event, except it fires when the grid is in edit mode (in this case, the control that + receives the key is the editor, not the grid itself). + The editor has three modes: text, drop-down combo, or drop-down list. The mode + used is determined by the properties in the grid and column objects. + While editing with the text editor or with a drop-down combo, you may set or retrieve + the contents of the editor by retrieving the editor control with the + property and casting it to the proper type. + + + + + Raises the event. + + A that contains event data. + + + + Fires in edit mode, when the user presses a character key. + + + The event corresponds to the + event, except it fires when the + grid is in edit mode (in this case, the control that receives the + key is the editor, not the grid itself). + The editor has three modes: text, drop-down combo, or drop-down list. + The mode used is determined by the properties in the + grid and column objects. + While editing with the text editor or with a drop-down combo, you may set + or retrieve the contents of the editor by retrieving the editor control with the + property and casting it to the proper type. + + + + + Raises the event. + + A that contains event data. + + + + Fires after the contents of a cell have changed. + + + This event allows you to perform processing whenever the contents of a cell + change, regardless of how they were changed (for example, a user typed data into + the cell, data got loaded from a database, or data was assigned to the grid through code). + This event can be used to provide conditional formatting and dynamic data summaries, + which get updated automatically whenever the data changes. + This event fires in bound and unbound modes. In some bound more scenarios, the + data source object may inform the grid that some data in the current row changed, without + specifying which column changed. In this case, the Col parameter will be set to -1. + Event handlers should be prepared to handle this situation without throwing exceptions. + + + + + Raises the event. + + A that contains event data. + + + + Fires after any data source change notifications. + + + When the grid is used in bound mode, any changes to the data source cause the + grid to fire the event. This event is the ideal place + to put code that updates the grid with data-dependent elements such as subtotals and + outline trees. + + Note: The delegate is defined in + the System.ComponentModel namespace. + + + + + Raises the event. + + A that contains event data. + + + + Fires after the data source reports an error condition. + + + + + Raises the event. + + A that contains event data. + + + + Fires when the grid needs to retrieve data for an unbound cell. + + + This event fires in bound mode when the grid contains unbound columns. + Unbound columns are columns that have the Name property set to values + that do not map to columns in the data source. The information in unbound columns + must be provided by the application, by setting the Value property of the + parameter. + The class supports calculated columns that in many + situations can be used instead of unbound columns. + + + + + Raises the event. + + An that contains event data. + + + + Fires when the grid needs to store data in an unbound cell. + + + This event fires in bound mode when the grid contains unbound columns. + Unbound columns are columns that have the Name property set to values + that do not map to columns in the data source. The information in unbound columns + must be provided by the application using the event. + In most cases, unbound columns are read-only, and you don't need to handle this event. + However, if a value is assigned to an unbound cell, either through editing or programmatically, + the grid fires this event to allow the application to store the value using whatever mechanism + is appropriate. + + + + + Raises the event. + + An that contains event data. + + + + Fires after a data-binding operation has finished. + + + + + Raises the event. + + + that contains the event data. + + + + Fires when the value of the property changes. + + + + + Raises the event. + + + that contains the event data. + + + + Fires when the value of the property changes. + + + + + Raises the event. + + + that contains the event data. + + + + Fires before a node row is collapsed or expanded. + + + + + Raises the event. + + A that contains event data. + + + + Fires after a node row is collapsed or expanded. + + + The and events + fire before and after node rows are expanded or collapsed. You can determine + whether the node is being collapsed or expanded by checking the value of the + node's its property. + These events allow you to populate outlines on demand, so you only need + to create the rows that will actually be shown to the user. For example, if + you are using the grid to display a directory tree, it would take a long time + to read each directory on the disk in order to populate the tree. + + + + + Raises the event. + + A that contains event data. + + + + Fires before the grid draws a cell, when the property is set to . + + + The OwnerDrawCell event only fires when the property is + set to . + You can use this event to customize the appearance of any cell in the grid. + The event allows three main types of customization: + + + + + + Change the value of the Text and Image parameters to modify the values displayed + by the grid. You can use this type of customization to replace password strings with asterisks, + for example. + + + + + + Change the Style property to display the cell using a different style than the one + selected by the grid by default. You can use this type of customization to provide conditional + formatting, for example. + + + + + + Use the Graphics and Bounds parameters and draw the cell yourself. When drawing + cells this way, you may call the member to force + the grid to draw specific parts of the cell, while your code draws other parts. For example, + you could paint a custom background and then call DrawCell to have the grid paint the cell + border and contents. + + + + The OwnerDrawCell event also fires when the grid auto sizes rows or columns (see the + and methods). This is done because the + grid needs to measure the cell using the same text, image, and style parameters that are used to + render it. In these cases, the Measuring parameter is set to true and the Bounds + rectangle is empty. + + + + + Raises the event. + + An that contains event data. + + + + Fires while the control is being printed to provide control over page breaks. + + + This event is fired while the control is being printed with the + method to provide control over page breaks. + Set the Cancel parameter to true to indicate that the given Row should + not be printed at the top of a page. In this case, the control will move the break point up + and fire the event again until it finds a valid break point. Note that you can only prevent + page breaks, not force them. + + + + + Raises the event. + + A that contains event data. + + + + Fires before the grid starts printing. + + + + + Raises the event. + + A that contains event data. + + + + Fires after the grid finishes printing. + + + This event is typically used to update the user interface and provide + feedback while printing the grid. + Use the method to print the grid and specify the document + name, common printing options, headers and footers. + Use the property to specify less common printing + options such as header and footer fonts, page margins, orientation, and so on. + + + + + Raises the event. + + A that contains event data. + + + + Fires after the grid finishes printing a page. + + + This event is typically used to provide feedback while printing the grid, + and to offer the user a cancel button that can be used to stop the printing process. + You can also use this event to add custom elements to the printed pages. + Use the method to print the grid and specify the document name, + common printing options, headers and footers. + Use the property to specify less common printing options + such as header and footer fonts, page margins, orientation, and so on. + + + + + Raises the event. + + A that contains event data. + + + + Fires before the grid starts an automatic OLE drag operation. + + + + + Raises the event. + + A that contains event data. + + + + Fires before a new row is added by the user. + + + This event only fires when is set to true and + the user creates a new empty row by moving the cursor into the last row on the grid. + It does not fire when a new row is added to the grid programmatically or when a + row is added to the grid's data source. + You can use this event to cancel the creation of new rows by setting the + Cancel parameter to true. In this case, the cursor does not move into + the new row. + + + + + Raises the event. + + A that contains event data. + + + + Fires after a new row is added by the user. + + + This event only fires when property is set to true + and the user creates a new empty row by moving the cursor into the last row on the + grid. + It does not fire when a new row is added to the grid programmatically or + through the grid's data source. + You can use this event to initialize the new rows. + When a new row is created this way, it is initially empty, and the user may + cancel the row by moving the cursor out of the new row before making any edits. + In this case, the grid fires the event and the new + (empty) row is removed. + + + + + Raises the event. + + A that contains event data. + + + + Fires when the cursor leaves the new row without making any changes to it. + + + For details, see the event. + + + + + Raises the event. + + A that contains event data. + + + + Fires before a row is deleted by the user. + + + This event only fires when is set to true and the + user deletes one or more rows by selecting them and pressing the DEL key. + It does not fire when rows are removed from the grid programmatically or through + the grid's data source. + You can use this event to cancel the deletion of the rows by setting the + Cancel parameter to true. + + + + + Raises the event. + + A that contains event data. + + + + Fires after one or more rows are deleted by the user. + + + This event only fires when property is set to True + and the user deletes one or more rows by pressing the DEL key. It does not fire + when rows are removed from the grid programmatically or through the grid's data source. + When this event fires, the rows have already been removed from the grid, so the + Row parameter is always set to E. + + + + + Raises the event. + + A that contains event data. + + + + Fires when is set to true and the control needs error information for a cell. + + + + + Raises the event. + + A that contains event data. + + + + Fires when is set to true and the control needs error information for a row. + + + + + Raises the event. + + A that contains event data. + + + + Fires before each subtotal row is added to the grid. + + + Subtotal rows are added when the method is invoked. + The event handler may prevent the grid from adding a particular row, or it + may customize the caption, style, and aggregate value used in the new subtotal row. + + + + + Raises the event. + + + that contains the event data. + + + + Fires after each subtotal row has been added to the grid. + + + Subtotal rows are added when the method is invoked. + + + + + Raises the event. + + + that contains the event data. + + + + Fires before the column filters are applied to the grid. + + + + + Raises the event. + + + that contains the event data. + + + + Fires after the column filters have been applied to the grid. + + + + + Raises the event. + + + that contains the event data. + + + + Gets or sets the data in a grid cell. + + + This is one of the indexers you can use to get or set the data stored in grid cells. + You can index cells using the row and column indices or using the row + index and column name. + Using integer indices is more efficient, because the grid doesn't have to + look up the column. Using column names is more flexible, because references + remain valid even if the user moves columns to a new position. + When assigning a value to a cell, the grid tries to convert it into the type + specified for the column (see the property). If the + grid can't convert the value, it fires the event and the + cell retains its original value. + + + The example below creates a column and assigns it a name, then sets the value of + a cell using the column index and retrieves the value using the column name: + + // create a column, assign it a name and get the new index + Column myCol = flex.Cols.Add(); + myCol.Name = "address"; + myCol.DataType = typeof(string); + int colIndex = myCol.Index; + + // assign a value to a cell using cell coordinates: + flex[1, colIndex] = "555, Broadway"; + + // get the value using the column name + string address = (string)flex[1, "address"]; + MessageBox.Show("The address is " + address); + + + + + Gets or sets the data in a grid cell. + + + This is one of the indexers you can use to get or set the data stored in grid cells. + You can index cells using the row and column indices or using the row index and column name. + + + + + Gets a custom associated with a cell. + + Row index. + Column name. + + object associated with the cell, + or null if the cell doesn't have a custom style. + + If the cell doesn't have a custom style, the grid paints it using one of the + built-in styles. The built-in style is selected based on the cell position + and state (fixed, scrollable, highlighted, etc). To retrieve the style that + will be used to paint the cell (custom or built-in) use the method. + + + + + Gets a custom associated with a cell. + + Row index. + Column index. + + object associated with the cell, + or null if the cell doesn't have a custom style. + + If the cell doesn't have a custom style, the grid paints it using one of the + built-in styles. The built-in style is selected based on the cell position + and state (fixed, scrollable, highlighted, etc). To retrieve the style that + will be used to paint the cell (custom or built-in) use the method. + + + + + Assigns a custom to a cell. + + Row index. + Column name. + The to associate with the cell. + + The method is useful if you want to assign a new style + to a single cell. You can also reset the cell style by setting it to null (Nothing, in VB). + To apply a custom cell style to an entire row or column, set the row or column's + properties. + To apply a custom style to a range cells, use a object. + For example: + + CellRange rg = _flex.GetCellRange(3, 3, 10, 10); + rg.Style = _flex.Styles["MyRangeStyle"]; + + + + + + Assigns a custom to a cell. + + Row index. + Column index + The to associate with the cell. + + The method is useful if you want to assign a new style + to a single cell. You can also reset the cell style by setting it to null (Nothing, in VB). + To apply a custom cell style to an entire row or column, set the row or column's + properties. + To apply a custom style to a range cells, use a object. + For example: + + CellRange rg = _flex.GetCellRange(3, 3, 10, 10); + rg.Style = _flex.Styles["MyRangeStyle"]; + + + + + + Assigns a custom to a cell. + + Row index. + Column index + Name of the new style. + + + + Gets the style used to render a cell. + + Row index. + Column index + + object used to display the cell. + + The object returned may be a composite with elements from several + styles. For example, a cell with the focus is painted with a style that contains elements + from the , a custom style associated with the cell, + row, and column (if available), and the style. + + + + + Gets the image displayed in a grid cell. + + Row index. + Column name. + An object previously assigned to the cell using the + method. + + + + Gets the image displayed in a grid cell. + + Row index. + Column index. + An object previously assigned to the cell using the + method. + + + + Sets the image displayed in a grid cell. + + Row index. + Column name. + An object containing an image to display in the cell. + + In addition to the usual cell contents, you can display images in cells. + There are two methods for showing images in cells: + 1. You can use the and methods to + assign images directly to the cells. In this case, the cell contents and the image are + independent. To update the image, you need to call again. + 2. You can use the property to associate images with + specific cell values. In this case, images are updated automatically whenever the cell + contents change. The property allows you to specify whether + the control should display the images in addition to or instead of the cell text. + + + + + Sets the image displayed in a grid cell. + + Row index. + Column index. + An object containing an image to display in the cell. + + In addition to the usual cell contents, you can display images in cells. + There are two methods for showing images in cells: + 1. You can use the and methods to + assign images directly to the cells. In this case, the cell contents and the image are + independent. To update the image, you need to call again. + 2. You can use the property to associate images with + specific cell values. In this case, images are updated automatically whenever the cell + contents change. The property allows you to specify whether + the control should display the images in addition to or instead of the cell text. + + + + + Gets or sets whether the user is allowed to resize rows and columns with the mouse. + + + To resize rows or columns, the mouse must be over the fixed area of the grid, and + close to a border between rows or columns. The mouse pointer will change into a sizing + pointer and the user can drag the row or column to change the row height or column width. + If a group of columns is selected (from first to last row) and the user resizes one + of them, all selected columns are resized. The same applies to rows. + If column sizing is allowed, users may double-click the resizing area to resize a + column so it will automatically fit the longest entry. + Rows with zero height and columns with zero width can't be resized by the user. + If you want to make them very small but still resizable, set their height or width to + one pixel, not to zero. + The and events fire + before resizing starts, and may be used to prevent resizing of specific rows and columns. + The and events fire after + resizing, and may be used to validate the user's action and to update the display. + + + + + Gets or sets whether the user is allowed to freeze rows and columns with the mouse. + + + Frozen cells remain on the screen when the user scrolls the control + (like fixed cells), but they are selectable and editable (like scrollable cells). + They are painted using the style. + To freeze rows or columns at runtime, the mouse must be near the edge of the + frozen area. The mouse pointer will then change into a 'freeze' pointer (looks like + a padlock) and the user can drag the frozen boundary to a new row or column. + + + + + Gets or sets whether the user is allowed to drag rows and columns with the mouse. + + + Row dragging may not work in bound mode. This is because some data sources + do not allow absolute positioning of rows. + ADO.NET DataTable object in particular do not support this. + Column dragging is supported for any data source, and row dragging is always + supported in unbound mode. + You can prevent specific rows and columns from being dragged by setting + their property to false. + + + + + Gets or sets when to highlight selected cells. + + + You can customize the appearance of highlighted cells by modifying the + property. + + + + + Gets or sets the type of focus rectangle to display. + + + If the focus rectangle is drawn, then the current cell is painted using + the style, which by default looks like a regular + scrollable cell (as in most spreadsheets and grids). + If the focus rectangle is hidden (using the setting), + the current cell is painted using the style. + + + + + Gets or sets whether the user is allowed to edit grid contents. + + + If you set to false, editing is disabled for the + entire grid. + To enable editing on some rows and columns, set to true + for the grid and set the or + properties to false for the rows and columns that should not be editable. + You can also disable editing of specific cells by handling the + event and setting the Cancel event parameter to true. + + + + + Gets or sets when to display combo buttons in cells. + + + By default, the grid will show editing buttons in cells only when they + have the focus. This is the same behavior used by the + control. + If you set to , + the grid will display buttons on any cells that have associated lists, even if they + don't have the focus. + For details on how to associate lists with cells, see the , + , and properties. + + + + + Gets or sets whether the grid displays a record selector image on the first fixed column. + + + + The record selector is a small triangle similar to the one used in Access and most data grids. + + + + + + Gets or sets whether the grid should display sorting glyphs (a triangle) on the headers of sorted columns. + + + + + Gets or sets a value that determines the position of the sort glyphs within column header cells. + + + + + Gets or sets whether the grid should display error information in cells and rows. + + + Setting this property to true causes the grid to display error information in cells and + rows. Error information is displayed as error icons in the cells or row headers. Moving the + mouse over the error icons show tooltips containing an error description. + The error information may be supplied directly by data sources that implement the + interface (for example, the DataTable class implements this + interface). + If the grid is bound to a data source that doesn't support , + you can provide error information using the and + events. + + + + + Gets or sets whether the grid should display labels over cells whose contents are partially hidden. + + + + + Gets or sets whether the user is allowed to sort columns using the mouse. + + + When the grid is used in bound mode, the sorting is performed by the + object. If the data source object does not support sorting, + this property has no effect. + In unbound mode, you can also sort data using the method. + + + + + Gets or sets whether the last column should be extended to fill the control. + + + This property only affects painting. It does not modify the + property of the last column. + + + + + Gets or sets the row that contains the cursor. + + + Use the and properties to make a cell current or to find + out which row or column contains the current cell. Columns and rows are + numbered from zero, beginning at the top for rows and at the left for columns. + The property may be set to -1 to hide the selection, to a value + between zero and Rows.Fixed-1 to select a cell in a fixed row, or to a value between + Rows.Fixed and Rows.Count-1 to select a cell in a scrollable row. + Setting the Row and Col properties automatically collapses the selection to a + single cell, resetting the and properties. + To specify a block selection, you must set Row and Col, then RowSel and ColSel. Alternatively, + you can use the method to select an arbitrary range with a single statement. + Setting the Row and Col properties does not ensure that the current cell is visible. + To do that, use the method. + + + + + Gets or sets the column that contains the cursor. + + + Use the and properties to make a cell current or to find + out which row or column contains the current cell. Columns and rows are + numbered from zero, beginning at the top for rows and at the left for columns. + The property may be set to -1 to hide the selection, to a value + between zero and Cols.Fixed-1 to select a cell in a fixed column, or to a value between + Cols.Fixed and Cols.Count-1 to select a cell in a scrollable column. + Setting the Row and Col properties automatically collapses the selection to a + single cell, resetting the and properties. + To specify a block selection, you must set Row and Col, then RowSel and ColSel. Alternatively, + you can use the method to select an arbitrary range with a single statement. + Setting the Row and Col properties does not ensure that the current cell is visible. + To do that, use the method. + + + + + Gets or sets the last row in the current selection. + + + Use the and properties to modify a + selection or to determine which cells are currently selected. Columns and rows are + numbered from zero, beginning at the top for rows and at the left for columns. + Setting the and properties automatically + collapses the selection to a single cell, resetting the RowSel and ColSel properties. + Therefore, to specify a block selection, you must Row and Col, then RowSel and ColSel. + Alternatively, you may use the method to select a range with a + single statement. + If the property is set to , + you should use the property on individual row objects to + select and deselect rows. + When a range is selected, the value of may be greater than or + less than , and may be greater than or less than . + This is inconvenient when you need to set up bounds for loops. In these cases, you can + use the property to retrieve a normalized + object, where r1 <= r2 and c1 <= c2. + See the property for an example. + + + + + Gets or sets the last column in the current selection. + + + Use the and properties to modify a + selection or to determine which cells are currently selected. Columns and rows are + numbered from zero, beginning at the top for rows and at the left for columns. + Setting the and properties automatically + collapses the selection to a single cell, resetting the RowSel and ColSel properties. + Therefore, to specify a block selection, you must Row and Col, then RowSel and ColSel. + Alternatively, you may use the method to select a range with a + single statement. + When a range is selected, the value of may be greater than or + less than , and may be greater than or less than . + This is inconvenient when you need to set up bounds for loops. In these cases, you can + use the property to retrieve a normalized + object, where r1 <= r2 and c1 <= c2. + + + The code below loops though the cells in the current selection: + + CellRange rg = flex.Selection; + for (int r = rg.r1; r <= rg.r2; r++) + for (int c = rg.c1; c <= rg.c2; c++) + Console.WriteLine("the value at {0} {1} is {2}", r, c, flex[r, c]); + + + + + Gets the collection of objects in the grid. + + + The property returns a reference to the list of rows + that make up the grid. With this reference, you can add, remove, move, + and count the rows. For more information on the tasks that can be performed + with this collection, see the object. + This property is read-only. The grid creates and manages the row collection for you. + Upgrade Note: In the VSFlexGrid ActiveX control, the Rows and FixedRows properties + corresponded to the number of rows and fixed rows on the grid. In C1FlexGrid, use Rows.Count + and Rows.Fixed. + + + + + Gets the collection of objects in the grid. + + + The property returns a reference to the list of columns + that make up the grid. With this reference, you can add, remove, move, + and count the columns. For more information on the tasks that can be performed + with this collection, see the object. + This property is read-only. The grid creates and manages the column collection for you. + Upgrade Note: In the VSFlexGrid ActiveX control, the Cols and FixedCols properties + corresponded to the number of columns and fixed columns on the grid. In C1FlexGrid, use + Cols.Count and Cols.Fixed instead. + + + + + Gets or sets the first visible column in the scrollable area. + + + Setting the property causes the grid to scroll horizontally + so that the given column becomes the leftmost visible column. This is often useful when + you want to synchronize two or more grids so that when one of them scrolls, the other + scrolls as well. To scroll vertically, use the property. + When setting this property, the largest possible column number is the total + number of columns minus the number of columns that will fit the display. Attempting + to set to a greater value will cause the grid to set it to the + largest possible value (no error will occur). + The value returned by the and properties + may correspond to partially visible rows or columns. + Use the and properties to scroll using + cells as units. Use the property to scroll the grid using + pixel units. + To ensure that a given cell is visible, use the method. + + + + + Gets or sets the first visible row in the scrollable area. + + + Setting the property causes the grid to scroll vertically + so that the given row becomes the topmost visible row. This is often useful when + you want to synchronize two or more grids so that when one of them scrolls, the other + scrolls as well. To scroll horizontally, use the property. + When setting this property, the largest possible row number is the total + number of rows minus the number of rows that will fit the display. Attempting + to set to a greater value will cause the grid to set it to the + largest possible value (no error will occur). + The value returned by the and properties + may correspond to partially visible rows or columns. + Use the and properties to scroll using + cells as units. Use the property to scroll the grid using + pixel units. + To ensure that a given cell is visible, use the method. + + + + + Gets the last visible column in the scrollable area. + + + The index returned may correspond to a column that is only partially visible. + This property is read-only. To scroll the contents of the grid, see the + , , and properties. + To ensure that a cell is visible, use the method. + + + + + Gets the last visible row in the scrollable area. + + + The index returned may correspond to a row that is only partially visible. + This property is read-only. To scroll the contents of the grid, see the + , , and properties. + To ensure that a cell is visible, use the method. + + + + + Assigns a value to a grid cell. + + Row index. + Column index. + Value to assign to the cell. + Whether the value should be converted to the column's data type. + True if the value was assigned to the cell. + + If is set to true and the value can't be converted into + the proper data type, the grid will fire the event and the + cell will retain its original value. + Using with set to true is equivalent + to setting the grid's indexer. For example, the following lines of code are equivalent: + + flex.SetData(1, 1, "Hello", true); + flex[1, 1] = "Hello"; // same thing + + + + + + Assigns a value to a range of cells. + + + that specifies the cells that will be assigned a new value. + Value that will be assigned to all cells in the range. + Whether the value should be converted to the column's data type. + True if the value was assigned to all cells in the destination range. + + + + Assigns a value to a grid cell, coercing the value into the cell's specified DataType. + + Row index. + Column index. + Value to assign to the cell. + True if the value was assigned to the cell, false if the value could not be + assigned (usually because it could not be converted to the appropriate type). + + + + Assigns a value to a range of cells, coercing the value into each cell's specified DataType. + + + that specifies the cells that will be assigned a new value. + Value that will be assigned to all cells in the range. + True if the value was assigned to all cells in the destination range, false if + the value could not be assigned to all cells in the range (usually because it could not be + converted to the appropriate type). + + + + Assigns a value to a grid cell. + + Row index. + Column name. + Value to assign to the cell. + Whether the value should be converted to the column's data type. + True if the value was assigned to the cell, False otherwise. + + If is set to true and the value can't be converted into + the proper data type, the grid will fire the event and the + cell will retain its original value. + Using with set to true is equivalent + to setting the grid's indexer. For example, the following lines of code are equivalent: + + flex.SetData(1, "ColName", "Hello", true); + flex[1, "ColName"] = "Hello"; // same thing + + + + + + Assigns a value to a grid cell, coercing the value into the cell's specified data type. + + Row index. + Column name. + Value to assign to the cell. + True if the value was assigned to the cell, False otherwise. + + + + Assigns a value to a grid cell, optionally coercing the value into the cell's specified data type. + + Row index. + Column index. + Data to be applied to the cell. + Whether to coerce the value into the cell's specified data type. + True if the value was assigned to the cell, False otherwise. + + + + Gets the value of a grid cell. + + Row index. + Column index. + The value of the cell. + + The method returns the raw data stored in a specific grid cell. + It is equivalent to using the grid's indexer. For example: + + object foo = flex.GetData(1, 1); + object bar = flex[1, 1]; // same thing + + The data displayed on the grid might be different from the raw data, depending on + the setting of the and properties. + To obtain the display value (which is always a string), use the + method instead. + + + + + Gets the value of a grid cell, taking into account the value returned by the method. + + Row index. + Column index. + Whether to take into account the value of the method. + + + + + + Gets the value of a grid cell. + + Row index. + Column name. + The value of the cell. + + + + Gets user data associated with a cell. + + Row index. + Column index. + Object associated with the cell. + + The user data is not used internally by the grid. It is reserved for additional data that you may want to + associate with a cell. + + + + + Gets user data associated with a cell. + + Row index. + Column name. + Object associated with the cell. + + The user data is not used internally by the grid. It is reserved for additional data that you may want to + associate with a cell. + + + + + Assigns user data to a cell. + + Row index. + Column index. + User data to assign to the cell. + + The user data is not used internally by the grid. It is reserved for + additional data that you may want to associate with a cell. + + + + + Assigns user data to a cell. + + Row index. + Column name. + User data to assign to the cell. + + The user data is not used internally by the grid. It is reserved for additional data that you may want to + associate with a cell. + + + + + Gets the value in a grid cell, formatted as a string. + + Row index. + Column index. + A string containing the data displayed in the given grid cell. + + + + Gets the value in a grid cell, formatted as a string. + + Row index. + Column name. + A string containing the data displayed in the given grid cell. + + + + Gets the value in a grid cell, formatted as a string, and the image or checkbox in the cell. + + Row index. + Column index. + Returns the image in the cell. + Returns the checkbox value in the cell. + A string containing the data displayed in the given grid cell. + + This method provides a way to retrieve all the data that is displayed in a cell with a single call. + The image returned in the parameter may be an image assigned to the + cell using the method, a mapped value obtained through an , + or an image stored as cell data (when the cell's is set to Image). + The value returned in the parameter is the value + returned by the method. + + + + + Gets the value in a grid cell, formatted as a string, and the image or checkbox in the cell. + + Row index. + Column name. + Returns the image in the cell. + Returns the checkbox value in the cell. + A string containing the data displayed in the given grid cell. + + This method provides a way to retrieve all the data that is displayed in a cell with a single call. + The image returned in the parameter may be an image assigned to the + cell using the method, a mapped value obtained through an , + or an image stored as cell data (when the cell's is set to Image). + The value returned in the parameter is the value + returned by the method. + + + + + Gets or sets the grid's selection behavior. + + + In most selection modes, you can obtain the current selection using the + property. + When is set to , + however, the selection may consist of a non-continuous range of rows. In this case, + you can check the selection state of individual rows using the + property or obtain a collection of selected rows using the property. + + + + + Selects a range of cells. + + + that specifies the cells that will be selected. + Whether to scroll the new selection into view. + + + + Selects a range of cells and scrolls it into view. + + + that specifies the cells that will be selected. + + + + Selects a range of cells. + + New value for the property. + New value for the property. + New value for the property. + New value for the property. + Whether to scroll the new selection into view. + + Using the method is equivalent to setting the , + , , and properties. + + + + + Selects a range of cells and scrolls it into view. + + New value for the property. + New value for the property. + New value for the property. + New value for the property. + + Using the method is equivalent to setting the , + , , and properties. + + + + + Selects a cell. + + New value for the property. + New value for the property. + Whether to scroll the new selection into view. + + Using the method is equivalent to setting the and properties. + + + + + Selects a cell and scrolls it into view. + + New value for the property. + New value for the property. + + Using the method is equivalent to setting the and properties. + + + + + Sorts the grid contents based on a column. + + + value that specifies the sort direction and options. + Column to sort on. + + Sorting works differently depending on whether the grid is bound to a data source or not. + In bound mode, the grid passes the sort request to the underlying data source object. In this case, + the sort settings remain in effect as the grid data changes. Editing values in the sort column will cause + the data source to re-sort the data, and grid will show the changes automatically. This is equivalent to + setting the property on a object for example. + In unbound mode, the Sort method sorts the data that is currently stored in the grid. Changing + the data after it has been sorted will not automatically update the sort. + When the grid is bound to a new data source, it inherits the sort settings currently applied to the + new data source object. Because of this, calling Sort immediately before setting the + property has no effect on the grid. + In unbound mode, the grid uses a stable sorting algorithm. This means that the sorting keeps the + relative order of records when the sorting key is the same. For example, if you sort a list of files by + name, then by extension, the list will still be sorted by name within each extension group. + The grid recognizes two types of row: regular rows which contain data, and node rows which are used + to group data. The Sort method only sorts regular rows; it does not affect node rows at all. + To sort nodes, use the method in the property or the + method in the class. + + + + + Sorts the grid contents based on a column range. + + + value that specifies the sort direction and options. + First column in the range. + Last column in the range. + + When you sort multiple columns, the same sorting options are applied to each column, + starting from the leftmost column in the range and proceeding to the right. + To sort multiple columns using a different sorting order for each, you can either + call the method multiple times or set each column's + property and call the method including the + flag in the parameter. + + + + + Sorts a range of cells in the grid. + + + value that specifies the sort direction and options. + + object that specifies the range of cells to sort. + + When you sort multiple columns, the same sorting options are applied to each column, + starting from the leftmost column in the range and proceeding to the right. + To sort multiple columns using a different sorting order for each, you can either + call the method multiple times or set each column's + property and call the method including the + flag in the flags parameter. + + + + + Sorts a group of rows using the specified comparer. + + First row in the sort range. + Number of rows in the sort range. + An object that compares objects. + + The interface has a single method called that + takes two objects as arguments (in this case, they will be objects) and + returns -1, 0, or +1. For more details, see the documentation for . + Custom sorting can only be used when the grid is in unbound mode. + + + + + Sorts the grid using the specified comparer. + + An object that compares objects. + + The interface has a single method called that + takes two objects as arguments (in this case, they will be objects) and + returns -1, 0, or +1. For more details, see the documentation for . + Custom sorting can only be used when the grid is in unbound mode. + + + + + Shows the sorting glyph on a column header. + + + value that specifies the glyph to display. + Column index. + + This method is useful if you want to perform custom sorting and need control over the appearance + and position of the sorting glyph (the little triangle that appears on the header of sorted columns). + + + + + Gets the selected range in normalized form. + + + The range returned corresponds to the current selection, defined by the , , + , and properties. + The range is normalized, so range.r1 <= range.r2 and range.c1 <= range.c2. This makes + it easy to loop through the selection. For example: + + int total = 0; + CellRange rg = flex.Selection; + for (int r = rg.r1; r <= rg.r2; r++) + for (int c = rg.c1; c <= rg.c2; c++) + total += (int)flex[r,c]; + Console.WriteLine("The total is: {0}", total); + + + + + Gets a object that contains the cell at coordinates , . + + + To get a object that spans the entire selection, use the property. + + + + + Scrolls a cell into view. + + Row index. + Column index. + + This method does not affect the current selection. To move the cursor to a specific cell + and optionally bring it into view, use the method. + + + + + Invalidates the control. + + + + + Invalidates a cell, causing it to be repainted. + + Row index. + Column index. + + This method is rarely used by the programmer, since the grid automatically performs invalidation as needed. + + + + + Invalidates a cell range, causing it to be repainted. + + Top row in the range. + Left column in the range. + Bottom row in the range. + Right column in the range. + + + + Invalidates a cell range, causing it to be repainted. + + + that will be invalidated. + + This method is rarely used by the programmer, since the grid automatically + performs invalidation as needed. + + + + + Gets the collection of cell styles defined in the grid. + + + The property enables you to obtain a reference to the list of + styles that are currently defined in the grid. With this reference, you can add, remove, + and count the styles. For more information on the tasks that can be performed with this + collection, see the class reference topics. For information + on cell formatting, see the reference topics. + This property is read-only. The grid creates and manages the collection for you. + Upgrade Note: The VSFlexGrid ActiveX control had many properties that affected the way + the grid was displayed (e.g. BackColor, BackColorAlternate, BackColorBkg, BackColorFixed, + BackColorFrozen, BackColorSel, and so on). The C1FlexGrid control replaces all these + properties with a collection of objects. This makes the object + model simpler, more consistent, and more powerful. You can change the built-in styles or + define your own, and assign them to rows, columns, or arbitrary cell ranges. + + + + + Gets or sets whether the grid should move the cursor searching for entries as the user types. + + + If is on, the grid will search the current column as the user + types, automatically moving the cursor and highlighting matches using the style. + The search is case-insensitive. The search is canceled when the user presses the ESC key or + moves the selection with the mouse or cursor keys. + When the user stops typing for about a second, the search buffer is reset. This amount of + time can be changed by setting the property. + If is on and is set to true, the user + will need to hit ENTER, or F2 to start editing cells. Other keys are used for searching. + + + + + Gets or sets the delay (in seconds) before the buffer is reset. + + + See the property for details. + + + + + Gets or sets the action to be performed when the user presses the ENTER key. + + + By default, the grid will move the selection down to the next visible row when the + user presses the ENTER key. If the grid is editable, pressing ENTER will cause the grid + to enter edit mode, and pressing ENTER while in edit mode will cause the cursor to move down. + This property allows you to modify this behavior and disable cell navigation with the + ENTER key, or cause it to move the selection to the next column instead of row. + Note that the and as + settings have the same effect when applied to this property. Pressing the ENTER key will + move the selection within the grid, but will not move the focus to the next control on the form. + + + + + Gets or sets the action to be performed when the user presses the TAB key. + + + By default, the grid will ignore the TAB key and it will be handled by the form, moving the focus to + the next control in the tab order. If you set the property to a value + other than , the grid will trap the TAB key and use it for navigating cells. + + + + + Gets or sets the image to be used in cell buttons. + + + This property allows you to customize the appearance of cell buttons. For details on how to + create and handle cell buttons, see the event. + If you want to use a single picture for all cell buttons on the grid, assign the picture to the + property at design time. To change pictures depending on the row, column, or cell + being edited, set the picture in response to the event. + The pictures used for cell buttons should fit within the button (larger pictures are truncated). + They should also be transparent, so the button face can be seen through the empty parts of the picture. + For best results, use small icons (16 x 16 pixels) and draw the picture in the upper left 12 x 12 + rectangle within the icon. + + + + + Gets the index of the row under the cursor. + + + The and properties are often useful when + handling the event, to provide custom mouse handling. + They are also useful when handling mouse events that do not change the selection and for + detecting clicks on the fixed areas of the grid. + Typical uses for these properties include displaying help information or tooltips when + the user moves the mouse over a selection, and the implementation of manual drag-and-drop + manipulation of OLE objects. + + and return -1 if the mouse is not over + any rows or columns. + To obtain more detailed hit-testing information, use the method. + + + + + Gets the index of the column under the cursor. + + + The and properties are often useful when + handling the event, to provide custom mouse handling. + They are also useful when handling mouse events that do not change the selection and for + detecting clicks on the fixed areas of the grid. + Typical uses for these properties include displaying help information or tooltips when + the user moves the mouse over a selection, and the implementation of manual drag-and-drop + manipulation of OLE objects. + + and return -1 if the mouse is not over + any rows or columns. + To obtain more detailed hit-testing information, use the method. + + + + + Returns information about the control at a specified point on the control surface. + + The horizontal position of the client coordinate. + The vertical position of the client coordinate. + A object that contains information about the point. + + This method is especially useful when handling the event. + It allows you to determine whether the mouse is over a specific cell, grid buttons, + resizing elements, etc. + + + The code below shows hit test information whenever the user clicks the mouse: + + void _flex_BeforeMouseDown(object sender, BeforeMouseDownEventArgs e) + { + HitTestInfo hti = _flex.HitTest(e.X, e.Y); + Console.WriteLine("at {0},{1}: row {2} col {3} type {4}", + hti.X, hti.Y, hti.Row, hti.Column, hti.Type); + } + + + + + Returns information about the control at a specified point on the control surface. + + + in client coordinates. + A object that contains information about the point. + + This method is especially useful when handling the event. + It allows you to determine whether the mouse is over a specific cell, grid buttons, + resizing elements, etc. + + + + + Returns information about the control at the current mouse position. + + A object that contains information about the point. + + + + Gets a object with the coordinates of the cell within the control. + + Row index. + Column index. + Whether to scroll the cell into view before calculating the rectangle. + A object with the coordinates of the cell, in pixels and + relative to the control's client area. + + This property is useful if you need to implement custom editors or other elements that need + to be positioned over cells. + + + + + Gets a object with the coordinates of the cell within the control. + + Row index. + Column index. + + This property is useful if you need to implement custom editors or other elements that need + to be positioned over cells. + This method does not ensure the cell is visible. + + + + + Finds a row that contains a specified string. + + String to look for. + Index of the row where the search should start. + Column that contains the data to be searched. + Whether the search should be case-sensitive. + Whether a full match is required. If this parameter is set to false, searching for "John" may return a row that contains "Johnson". + Whether the search should stop at the bottom of the grid or wrap around and restart from the first scrollable row. + The index of the row that contains the string, or -1 if the string is not found. + + To allow users to search for data as they type, use the property. + + + + + Finds a row that contains a specified value in a given column. + + Object to look for. + Index of the row where the search should start. + Column to be searched. + Whether the search should stop at the bottom of the grid or wrap around and restart from the first scrollable row. + The index of the row that contains the data, or -1 if the object is not found. + + + + Finds a row that contains a specified value in a given column using a RegularExpression. + + The regular expression pattern to match. + Index of the row where the search should start. + Column that contains the data to be searched. + Whether the search should stop at the bottom of the grid or wrap around and restart from the first scrollable row. + The index of the row that matches the pattern, or -1 if no matches were found. + + The parameter specifies a regular expression pattern + expressed in the usual syntax. + The regular expression syntax supports character classes, ranges, repeat counts, + alternate matches, and more. Please refer to the .NET documentation for details and examples. + + + + + Gets or sets whether the grid should paint its contents. + + + This property is deprecated. Use the and + methods instead. + + + + + Maintains performance by preventing the control from updating itself until + the method is called. + + + The and methods are used to + optimize the performance of the grid. Call before making + extensive changes, and call when done to suspend repainting. + This will reduce flicker and increase performance. This optimization is especially + effective when adding large numbers of rows to the grid, because it needs to + recalculate ranges and update scrollbars each time a row is added. + + + The code below shows how to add a large number of rows to the grid efficiently. + Note how the method is called inside a 'finally' block + to ensure repainting is properly restored. + + void UpdateGrid(C1FlexGrid flex) + { + try + { + flex.BeginUpdate(); // suspend painting to avoid flicker + flex.Rows.Count = 1; + for (int i = 1; i < 10000; i++) + flex.AddItem("Row " + i.ToString()); + } + finally + { + flex.EndUpdate(); // always restore painting + } + } + + + + + Resumes updating the control after calls to the method. + + + + + Gets or sets whether the control should fire the event. + + + If you set this property to , the grid will + fire the event whenever a cell needs to be painted. + You can handle the event and customize the way each cell is painted, either by changing + the cell contents and style, or by taking over the painting and doing it yourself. + For more details and examples, see the event. + + + + + Gets or sets whether the control should use an off-screen buffer when painting to reduce flicker. + + + This property is set to true by default, and rarely needs to be changed. + Setting to false may increase performance of applications + running under terminal server software. + + + + + Gets or sets the characters used as row and column separators in clip strings. + + For details and an example, see the property. + + + + Gets or sets the contents of the selected range. + + + The string assigned to (or returned by) the property may contain + multiple cells. By default, tab characters (\t) indicate column breaks, and carriage return + characters (\n) indicate row breaks. + The default row and column delimiters may be changed using the property. + When a string is assigned to the property, only the selected + cells are affected. If there are more cells in the selected region than are described in the + clip string, the remaining cells are ignored. If there are more cells described in the clip + string than in the selected region, the extra portion of the clip string is ignored. Empty + entries in the string will clear existing cell contents. + To get or set a clip string for an arbitrary range, use a object. + The value returned is affected by the setting of the + property. + + + The code below puts text into a selected area two rows high and two columns wide. + + // build clip string + string s = "r1 c1\tr1 c2\nr2 c1\tr2 c2"; + + // select a 2 x 2 range and apply clip string to selection + flex.Select(2, 2, 4, 4); + flex.Clip = s; + + + + + Clears a range. + + + value that specifies the elements to clear. + Range to clear. + + + + Clears a range. + + + value that specifies the elements to clear. + Top row in the range. + Left column in the range. + Bottom row in the range. + Right column in the range. + + + + Clears a cell. + + + value that specifies the elements to clear. + Row index. + Column index. + + + + Clears the grid. + + + value that specifies the elements to clear. + + The method does not affect the number of rows and columns on the grid, + and can't be used to clear data when the grid is bound to a data source. + + + + + Clears the grid. + + + This method removes all data, styles, and user data from all cells, rows, and columns on the grid. + The method does not affect the number of rows and columns on the grid, + and can't be used to clear data when the grid is bound to a data source. + + + + + Gets a object that can be used to format and manipulate a cell. + + Row index. + Column index. + A object that can be used to format and manipulate the cell. + + + + Gets a object that can be used to format and manipulate a range. + + Top row in the range. + Left column in the range. + Bottom row in the range. + Right column in the range. + A object that can be used to format and manipulate the range. + + The object provides access to properties of the cells in the range. + For example, the code below sets the style of a range: + + CellRange rg = flex.GetCellRange(5, 5, 20, 8); + rg.Style = flex.Styles["MyStyle"]; + + Note: is a class, not a struct. Because of this, you have to + assign the value to a variable and then use the variable. For example, the following code + will not compile: + + // this does not compile + flex.GetCellRange(5, 5, 20, 8).Style = flex.Styles["MyStyle"]; + + + + + + Creates an image of the entire grid. + + An object containing a metafile image of the grid. + + Use this method to copy grid images to the clipboard so you can paste them into + documents or other applications. + + + The code below creates an image of a grid range and saves it to a PNG file that can be + included in other documents such as web pages: + + Image img = flex.CreateImage(0,0,10,5); + img.Save(@"c:\temp\grid.png", System.Drawing.Imaging.ImageFormat.Png); + + + + + Creates an image of a portion of the grid. + + Top row in the range. + Left column in the range. + Bottom row in the range. + Right column in the range. + An object containing a metafile image of the grid. + + The image returned includes any fixed and frozen cells in addition to the specified range. + + + + + Creates an image of a portion of the grid. + + + that specifies which cells should be included in the image. + An object containing a metafile image of the grid. + + The image returned includes any fixed and frozen cells in addition to the specified range. + + + + + Creates an image of a portion of the grid. + + Top row in the range. + Left column in the range. + Bottom row in the range. + Right column in the range. + + value that determines the type of metafile to create. + An object containing a metafile image of the grid. + + The image returned includes any fixed and frozen cells in addition to the specified range. + + + + + Creates an image of a portion of the grid. + + + that specifies which cells should be included in the image. + + value that determines the type of metafile to create. + An object containing a metafile image of the grid. + + The image returned includes any fixed and frozen cells in addition to the specified range. + + + + + Draws a grid cell. + + + object where the cell will be drawn. + Index of the cell's row. + Index of the cell's column. + + that defines the cell position. + + This method is for internal use. It allows inherited classes to customize the grid appearance. + + + + + Gets or sets a reference to the cell editor that is currently active. + + + The property returns a reference to the cell editor that is + currently active. This may be one of the built-in editors (a TextBox, a ComboBox, or a + DateTimePicker control), a custom editor, or null (if the grid is not in edit mode). + You can use this property to programmatically access the editor, or to find out + if the grid is in edit mode. + If you don't want to use the grid's built-in editors, you can use any other control + instead. To do this, either associate the external editor with a specific grid row, column, + or using the property, which you can + get and set at any time. + Alternatively, you can handle the event and assign any control + directly to the property. (Note that the grid's Editor property can only + be assigned while handling the event, and is automatically reset to + null when the grid exits edit mode.) + Any control can be used as an external editor, but to achieve complete integration with + the grid, the external editor should implement the IC1EmbeddedEditor interface. Some controls + implement this interface natively and don't require any extra code to be used as grid editors + (like the ones in the C1Input library). Most, however, will require you to implement at least + a few of the methods in IC1EmbeddedEditor. + For examples of custom editors, please see Using Custom Editors and Creating Custom Editors + in this documentation, or visit our on-line sample library at https://www.grapecity.com/en/samples + and download the "CustomEditors" sample. + + + The code below uses the event to customize the current editor + by setting two properties. + + void _flex_SetupEditor(object sender, C1.Win.C1FlexGrid.RowColEventArgs e) + { + TextBox tb = _flex.Editor as TextBox; + if (tb != null) + { + tb.CharacterCasing = CharacterCasing.Upper; + tb.MaxLength = 12; + } + } + + + + + If True then empty strings from editor are interpreted as null values. + + + + + Gets or sets the list of items to be used by the drop-down editor. + + + The property specifies the type of editor to be used when + editing a cell. You may use a text box, drop-down list, drop-down combo, or an edit button + to pop up custom editor forms. + To use the property, set the property + to true and respond to the event by setting the + property to a string that describes the type of editing you want to use for that cell. + The options are described below: + 1. To edit the cell using a regular text box, set the property to an empty string. + For example: + flex.ComboList = string.Empty; + 2. To edit the cell using a drop-down list, set the property to a string containing the + available options, separated by pipe characters. For example: + flex.ComboList = "Item 1|Item 2|Item 3"; + 3. To edit the cell using a drop-down combo, set the property to a string containing the + available options, separated by pipe characters ("|") and starting with a pipe character. For example: + flex.ComboList = "|Item 1|Item 2|Item 3"; + 4. To display an edit button, set the property to a string containing an ellipsis ("..."). + Edit buttons look like regular push buttons, aligned to the right of the cell, with an ellipsis as a caption. + When the user clicks on the edit button, the grid fires the CellButtonClick event. In this case, the user can't + edit the cell contents directly. For example: + flex.ComboList = "..."; + 5. To display an edit button next to an editable cell, set the property to a string + containing a pipe and an ellipsis ("|..."). In this case, you get a regular edit button but the user can also edit the + cell contents directly. For example: + flex.ComboList = "|..."; + The property is especially useful in cases where different rows in + the same column may contain different types of data (for example a control such as the PropertyGrid). + In this case, the property allows you to adjust the type of editing you + want to provide depending on the current row. + If all rows in the column contain the same type of data, use the Column's + property instead. This way, the grid will automatically select the list depending on the column + being edited and you don't need to handle any events. + Note that the ComboList allows you to specify lists of strings only. Cells will store and display + these strings. If you want to store a certain type of data and display values associated with that data, see + the property. The DataMap property allows you to store values in the cells + (for example a CustomerID) and display strings associated with that data (for example the customer name). + + + The code below handles the event and assigns a value to the + property so that the grid displays buttons on every other row. + + void _flex_BeforeEdit(object sender, RowColEventArgs e) + { + _flex.ComboList = string.Empty; + if (e.Row % 2 == 0) _flex.ComboList = "..."; + } + + + + + Gets or sets the input mask to use when editing cells. + + + The specifies an input mask for automatic input formatting and + validation. The mask syntax is similar to the one used by the Microsoft MaskedEdit ActiveX + control and by Microsoft Access and is described below. + Set the property in response to the event, + in the same way you would set the property. + If the same mask is used to edit all values in a column, use the column's + property. This simplifies your code because you don't need to handle the event. + When the user is done editing a cell with a mask, the event fires. + The event parameter will be set to true if the mask was not filled + out properly, so in most cases you don't have to implement the handler. The default behavior ensures that + only valid data will be entered. + The string is composed of the following symbols: + + + 1) Wildcards + 0 digit + 9 digit or space + # digit, space, or sign + L letter + ? letter or space + A letter or digit + a letter, digit, or space + & any character + + + 2) Localized characters + . localized decimal separator + , localized thousand separator + : localized time separator + / localized date separator + + + 3) Command characters + \ next character is taken as a literal + > translate letters to uppercase + < translate letters to lowercase + + + 4) Placeholder specification + ; next character is used as a placeholder (the default is an underscore) + + + The code below sets the edit mask so the user can enter a phone number, with optional + area code, and a state in uppercase letters. The space-holder used is an asterisk ("*"). + + flex.EditMask = "(###) 000-0000 St\ate\: >LL;*"; + + + + + Puts the grid in edit mode and starts editing a cell. + + Row index. + Column index. + Initial character to be sent to the editor. + True if the grid entered edit mode successfully, false otherwise. + + + + Puts the grid in edit mode and starts editing a cell. + + Row index. + Column index. + True if the grid entered edit mode successfully, false otherwise. + + + + Puts the grid in edit mode and starts editing the current cell. + + True if the grid entered edit mode successfully, false otherwise. + + If the property is set to true, the control goes into + edit mode automatically when the user presses the edit key (F2), the space bar, or + any printable character. You may use the method to force + the control into cell-editing mode. + The method forces the control into editing mode even + if is set to False. You may also use it to allow editing of + fixed cells. + + + The code below uses the method to keep the grid in edit mode + while the user moves the selection (like the .NET DataGrid control): + + void _flex_RowColChange(object sender, System.EventArgs e) + { + _flex.StartEditing(); + } + + + + + Finishes editing the current cell and takes the grid out of edit mode. + + True if the grid left edit mode successfully, false otherwise. + + + + Finishes editing the current cell and takes the grid out of edit mode, + optionally canceling the edits. + + Whether to cancel the current edits and revert the cell to its original value. + True if the grid left edit mode successfully, false otherwise. + + If the cancel parameter is set to false, the grid tries to apply the edits, + and fires the , , and events as usual. + If validation fails, the grid stays in edit mode (and returns false). + If the cancel parameter is set to true, the original cell value is restored and the + grid is guaranteed to leave the edit mode. In this case, only the event fires. + To determine whether the grid is in edit mode, check whether the property is null. + + + + + Starts editing a cell in response to a key press. + + + This method is for internal use. It allows inherited classes to customize the editing process. + + Row index. + Column index. + Key that initiated the edit process. + Whether editing should start even in non-editable cells (e.g. fixed cells). + True if the editing process was started successfully, false otherwise. + + + + Starts editing a cell in response to a mouse action. + + + This method is for internal use. It allows inherited classes to customize the editing process. + + Row index. + Column index. + Mouse position in client coordinates. + Whether the action was a double-click. + True if the editing process was started successfully, false otherwise. + + + + Gets a reference to the object that controls the appearance + of the outline tree in the grid. + + + The can group data hierarchically and display it with a + collapsible tree similar to the one in the Microsoft TreeView control. + The object is used to specify the position and appearance + of the outline tree. + For details on create outlines, see the method and + the property. + + + + + Gets an array containing all zero-level + rows on the grid. + + + + + Gets or sets the specific list in a object that the grid should display. + + + If a contains multiple sources of data, you should set the + property to one of the sources. + For example, if the DataSource is a contains three tables named Customers, + Orders, and OrderDetails, you must specify one of the tables to bind to. + If the contains only one , you may set the + DataMember property to an empty string. + You can use the method to set the + and properties at the same time. + + + + + Gets or sets the data source for the grid. + + + Any object that implements the or + interfaces can be used as a data source. + Specifically, the following ADO.NET data sources are valid: DataTable, DataView, + DataSet, and DataViewManager. + The following ComponentOne DataObjects components are also valid data sources: + C1ExpressTable, C1ExpressVew, C1ExpressConnection, C1DataView, C1DataTableSource, and C1DataSet. + If the reference contains more than one table, you must + also set the property a string that specifies the table to bind to. + For example, if the DataSource is a DataSet or DataViewManager that contains three tables named + Customers, Orders, and OrderDetails, you must specify one of the tables to bind to. + You can use the method to set the + and properties simultaneously. + You can also assign another object to the + property. In this case, the controls will share the same grid model, including the data, display styles, + selection, etc. This can be used to implement split views, where different controls display different + parts of the same data. + + + + + Sets the and properties. + + The new data source object. + The table to bind to within the data source object. + + + + Sets the and properties, + optionally keeping the current column layout. + + The new data source object. + The table to bind to within the data source object. + Whether the current column layout should be preserved or re-generated + automatically based on the data source schema. + + + + Gets or sets whether column widths are automatically adjusted when data is loaded. + + + This property works when the control is bound to a . + If is set to true, the control automatically resizes its + columns to fit the widest entry every time new data is read from the data source. + If the data source contains a large number of rows and columns, the automatic + resizing may take a relatively long time. In these cases, you should consider setting + to false and setting the column widths directly in code. + You may also use the method to adjust the column widths + automatically. + + + + + Gets or sets whether columns are automatically created when the grid is bound to a data source. + + + By default, assigning a new to the grid resets the column collection + to reflect the data source schema. If you set to false, the + existing column layout will be preserved. + + + + + Calculates aggregate statistics for a range. + + + value that specifies the type of aggregate to calculate. + + object that contains the values to be aggregated. + + value that specifies aggregation options. + A that represents the aggregate value. + + + + Calculates aggregate statistics for a range. + + + value that specifies the type of aggregate to calculate. + Top row in the range. + Left column in the range. + Bottom row in the range. + Right column in the range. + + value that specifies aggregation options. + A that represents the aggregate value. + + + + Calculates aggregate statistics for the current selection. + + + value that specifies the type of aggregate to calculate. + + value that specifies aggregation options. + A that represents the aggregate value. + + + + Calculates aggregate statistics for the current selection. + + + value that specifies the type of aggregate to calculate. + A that represents the aggregate value. + + The code below method to calculate aggregate statistics + for the current selection. Whenever the selection changes, new aggregates are + calculated and written to the console. + + void flex_SelChange(object sender, System.EventArgs e) + { + string fmt = "Count {0:0}, Sum {1:#,##0.00}, " + + "Avg {2:#,##0.00}, Stdev {3:#,##0.00}"; + Console.WriteLine(fmt, + flex.Aggregate(AggregateEnum.Count), + flex.Aggregate(AggregateEnum.Sum), + flex.Aggregate(AggregateEnum.Average), + flex.Aggregate(AggregateEnum.Std)); + } + + + + + Calculates aggregate statistics for a range. + + + value that specifies the type of aggregate to calculate. + + object that contains the values to be aggregated. + A that represents the aggregate value. + + + + Calculates aggregate statistics for a range. + + + value that specifies the type of aggregate to calculate. + Top row in the range. + Left column in the range. + Bottom row in the range. + Right column in the range. + A that represents the aggregate value. + + + + Groups rows based on cell contents and calculates aggregate values. + + + value that specifies the type of aggregate to calculate. + Outline level to assign to the new subtotal rows. This parameter allows the creation of multi-level subtotals and affects the display of the outline tree. + First column in the range used to detect group breaks. + Last column in the range used to detect group breaks. + Column that contains values to be aggregated (usually numeric). + Text to insert in the subtotal rows. + + The method inserts rows containing aggregate values. These new rows are set + to behave as tree nodes so they can be collapsed and expanded to display a dynamic hierarchical + outline. + You can control the appearance and behavior of the outline tree using the property. + The node rows added by the method have their property + automatically set to one of the Styles.Subtotal* styles. You can use the + collection to modify the appearance of all subtotal rows on the grid. + To create an outline tree manually, insert node rows using the method, + or convert regular rows into nodes by setting the property to true for the + node rows. Then use the property to set the outline level for the new + nodes. + + + The code below assumes a grid with four columns: "Product", "Region", "Employee", and "Sales". + The code groups on the first two columns, calculating total sales for each product and for + each region within each product. + If the user drags a column to a new position, the tree is automatically rebuilt to show + the new grouping (by Employee, Region, etc). + + void UpdateTotals() + { + // no repainting until we're done + _flex.Redraw = false; + + // clear old subtotals, if any + _flex.Subtotal(AggregateEnum.Clear); + + // sort the grid on the columns that will be grouped + _flex.Sort(SortFlags.Ascending, 0, 3); + + // show outline tree on column 0 + _flex.Tree.Column = 0; + + // get a grand total (use -1 instead of column index) + _flex.Subtotal(AggregateEnum.Sum, -1, -1, 3, "Grand Total"); + + // total on column 0 (initially Product) + _flex.Subtotal(AggregateEnum.Sum, 0, 0, 3); + + // total on column 1 (initially Region) + _flex.Subtotal(AggregateEnum.Sum, 1, 1, 3); + + // show outline level 1 + _flex.Tree.Show(1); + + // restore painting + _flex.Redraw = true; + } + void _flex_AfterDragColumn(object sender, C1.Win.C1FlexGrid.DragRowColEventArgs e) + { + UpdateTotals(); // user moved a column, update totals + } + + + + + + Groups rows based on cell contents and calculates aggregate values. + + + value that specifies the type of aggregate to calculate. + Outline level to assign to the new subtotal rows. This parameter allows the creation of multi-level subtotals and affects the display of the outline tree. + Column used to detect group breaks. + Column that contains values to be aggregated (usually numeric). + Text to insert in the subtotal rows. + + + + Groups rows based on cell contents and calculates aggregate values. + + + value that specifies the type of aggregate to calculate. + Outline level to assign to the new subtotal rows. This parameter allows the creation of multi-level subtotals and affects the display of the outline tree. + Column used to detect group breaks. + Column that contains values to be aggregated (usually numeric). + + + + Groups rows based on cell contents and calculates aggregate values. + + + value that specifies the type of aggregate to calculate. + + This version of the method does not take any column parameters, + and is useful only for clearing the subtotals. For example: + + flex.Subtotal(AggregateEnum.Clear); // clear all subtotals + + + + + Groups rows based on cell contents and calculates aggregate values. + + + value that specifies the type of aggregate to calculate. + Outline level to assign to the new subtotal rows. This parameter allows the creation of multi-level subtotals and affects the display of the outline tree. + Name of the first column in the range used to detect group breaks. + Name of the last column in the range used to detect group breaks. + Name of the column that contains values to be aggregated (usually numeric). + Text to insert in the subtotal rows. + + This is a variant of the method + that takes column names instead of indices. + + + + + Groups rows based on cell contents and calculates aggregate values. + + + value that specifies the type of aggregate to calculate. + Outline level to assign to the new subtotal rows. This parameter allows the creation of multi-level subtotals and affects the display of the outline tree. + Name column used to detect group breaks. + Name of the column that contains values to be aggregated (usually numeric). + Text to insert in the subtotal rows. + + This is a variant of the method + that takes column names instead of indices. + + + + + Groups rows based on cell contents and calculates aggregate values. + + + value that specifies the type of aggregate to calculate. + Outline level to assign to the new subtotal rows. This parameter allows the creation of multi-level subtotals and affects the display of the outline tree. + Name column used to detect group breaks. + Name of the column that contains values to be aggregated (usually numeric). + + This is a variant of the method + that takes column names instead of indices. + + + + + Gets or sets whether node rows appear above or below the data. + + + This property determines how the outline tree is drawn, and it also determines + whether the method should add subtotal rows (which are node rows) + above or below the data being summarized. + Changing this property clears any existing nodes. + + + + + Adds a row to the grid and populates the new row with data. + + String containing the data for the new row. Items are separated by tab characters + by default. You can change the separator character using the property. + A reference to the new row. + + You can also add and remove rows using the collection. The + method provides a concise syntax for creating the row, populating it with data, and then adding it to the grid. + Before using to add a large number of rows to the grid, remember to set the + property to false. When finished adding the rows, set back to + its original value. This will significantly improve performance. + + + The code below adds 300 rows to the grid. + + // suspend painting to improve performance + bool redraw = flex.Redraw; + flex.Redraw = false; + + // append 100 rows, using tabs as separators + flex.ClipSeparators = "\t\n"; + for (int i = 0; i < 100; i++) + flex.AddItem("\tcol1\tcol2\tcol3"); + + // add 100 rows at the top, using pipes as separators + flex.ClipSeparators = "|;"; + for (int i = 0; i < 100; i++) + flex.AddItem("|col1|col2|col3", 0); + + // append 100 rows at the bottom, using an object array + object[] items = { "col1", "col2", "col3" }; + for (int i = 0; i < 100; i++) + flex.AddItem(items, flex.Rows.Count, flex.Cols.Fixed); + + // restore painting + flex.Redraw = redraw; + + + + + Adds a row to the grid and populates the new row with data. + + Array of objects that will be assigned to the new row. + A reference to the new row. + + + + Adds a row to the grid at a specified position and populates the new row with data. + + String containing the data for the new row. Items are separated by tab characters + by default. You can change the separator character using the property. + Position where the new row will be inserted. + A reference to the new row. + + + + Adds a row to the grid at a specified position and populates the new row with data. + + Array of objects that will be assigned to the new row. + Position where the new row will be inserted. + First column to populate with the items in the + array. This parameter is usually set to the index of the first scrollable column. + A reference to the new row. + + + + Removes the last row from the grid. + + + You can also add and remove rows using the collection. + The method is provided for consistency, since the grid + also has an method. + + + + + Removes a row at a specified position from the grid. + + Index of the row to be removed. + + + + Prints the grid, optionally showing a page setup or print preview dialog. + + The document name, which appears on the progress dialogs and on the print job windows. + Flags that select printing options. + True if the grid was printed, false if the user canceled the operation before printing started. + + Use the property to set up options such as page orientation + and margins, header and footer fonts, etc. + The method returns true if the user started the printing process. If the user clicks cancel while + the grid is printing, the method returns true (some pages may be printed anyway depending on the + printer settings). To detect canceled jobs, handle the event and check the + value of the e.Cancel parameter. + + + + + Prints the grid, optionally showing a page setup or print preview dialog. + + The document name, which appears on the progress dialogs and on the print job windows. + Flags that select printing options. + String that appears on the top of every page. + String that appears on the bottom of every page. + True if the grid was printed, false if the user canceled the operation. + + The header and footer strings may contain up to three tab-delimited sections, which are + aligned to the left, center, and right of the page. The strings may also contain placeholders + that are replaced with the current page number and total number of pages ("{0}" and "{1}"). + Use the property to set up options such as page orientation + and margins, header and footer fonts, etc. + + + + + Prints the grid, optionally showing a page setup or print preview dialog. + + The document name, which appears on the progress dialogs and on the print job windows. + True if the grid was printed, false if the user canceled the operation. + + Use the property to set up options such as page orientation + and margins, header and footer fonts, etc. + + + + + Gets a object that specifies printing parameters for the grid. + + + Use the method to print the grid and specify the document name, + common printing options, headers and footers. + Use the property to specify less common printing options + such as header and footer fonts, page margins, and page orientation. + + + + + Gets or sets a value that determines if the control can accept data that the user drags onto it. + + + This property allows you to use the control as a target for OLE drag-drop operations. + If set to (the default value), the control does not act as a drop target. + If set to , the control fires the standard drag-drop events + and the programmer is responsible for handling them. The main events involved are and + . These events are provided by the standard System.Windows.Forms.Control object. + If set to , the control handles the and + events automatically by performing the following actions: + 1) Query the data object for data in text or filename formats. + 2) Scroll if the user drags an object near the edges of the control. + 3) Paste the contents of the data object when the user drops valid data on the control. + Note: This property replaces and extends the property provided by the + base object. + + + + + Gets or sets a value that determines if the user can drag data from the control. + + + This property allows you to use the control as a source for OLE drag-drop operations. If + set to any of the automatic settings, the control provides the following services: + 1) Detect when the mouse is near the edge of a selected cell or range and display the + OLE drag cursor. + 2) If the user clicks the mouse while the OLE drag cursor is displayed, initiate a + drag operation with a data object containing the current selection. + In manual mode, the programmer is responsible for starting drag-drop operations using + the method. + + + + + Saves the grid contents to a file. + + Name of the file to save, including the path. + File format to use. + Options to use when saving the file. + + to use when saving the file. + + Grids saved to CSV and other text files include data only (no formatting information is saved). + Grids saved to Excel files include data and formatting information. Images are not saved. + Grids can also be persisted to Xml format using the and methods. + + + + + Saves the grid contents to a file. + + Name of the file to save, including the path. + File format to use. + Options to use when saving the file. + + + + Saves the grid contents to a file. + + Name of the file to save, including the path. + File format to use. + + + + Loads the grid from a file. + + Name of the file to load, including the path. + File format to use. + Options to use when loading the file. + + to use when saving the file. + + This method loads grid from a file previously saved with the method. + Formats supported include comma-delimited text files (CSV format), tab-delimited + text files, and Microsoft Excel files (.XLS). + When loading text files, rows and columns are added to the grid if needed to + accommodate the file contents. Text files contain only data and no formatting information. + When loading Excel files, the grid retrieves the first worksheet from the specified + workbook file. The method allows you to specify which worksheet should be loaded. + You can use the + method allows you to retrieve a list of the worksheets stored in an XLS file. + The grid can save and load data and formatting information from XLS files. + Grids can also be persisted to Xml format using the and methods. + + + + + Loads the grid from a file. + + Name of the file to load, including the path. + File format to use. + Options to use when loading the file. + + + + Loads the grid from a file. + + Name of the file to load, including the path. + File format to use. + + + + Saves the grid contents to a Microsoft Excel (.XLS) file. + + Name of the file to save, including the path. + Name of the sheet to add to the Excel workbook. + Options to use when saving the file. + + to use when saving the file. + + If the specified file exists, the control will add or replace a single worksheet in it. + Existing sheets will be preserved if possible. + The worksheet to add or replace is identified by the parameter. + If the specified file is in use by another application (usually Excel), the method will fail. + This method does not require Microsoft Excel to be installed on the machine. + + + + + Saves the grid contents to a Microsoft Excel (.XLS) file. + + Name of the file to save, including the path. + Name of the sheet to add to the Excel workbook. + Options to use when saving the file. + + If the specified file exists, the control will add or replace a single worksheet in it. + Existing sheets will be preserved if possible. + The worksheet to add or replace is identified by the parameter. + If the specified file is in use by another application (usually Excel), the method will fail. + This method does not require Microsoft Excel to be installed on the machine. + + + + + Saves the grid contents to a Microsoft Excel (.XLS) file. + + Name of the file to save, including the path. + Name of the sheet to add to the Excel workbook. + + + + Saves the grid contents to a Microsoft Excel (.XLS) file. + + Name of the file to save, including the path. + + + + + + Saves the grid contents to a Microsoft Excel (.XLS) file. + + Name of the file to save, including the path. + + + + Loads the grid from a Microsoft Excel (.XLS) file. + + Name of the file to load, including the path. + Name of the worksheet to load. + Options to use when loading the file. + + Use the method to obtain a list of the worksheets + in an XLS file. + + + + + Loads the grid from a Microsoft Excel (.XLS) file. + + Name of the file to load, including the path. + Name of the worksheet to load. + + Use the method to obtain a list of the worksheets + in an XLS file. + + + + + Loads the grid from the first worksheet in a Microsoft Excel (.XLS) file. + + Name of the file to load, including the path. + Options to use when loading the file. + + + + Loads the grid from the first worksheet in a Microsoft Excel (.XLS) file. + + Name of the file to load, including the path. + + + + Gets a list with the names of the worksheets in a Microsoft Excel (.XLS) file. + + Name of the Excel file, including the path. + An array containing the names of the worksheets defined in the file. + + This method is used to obtain a list of sheet names that can later be used to load and + save specific sheets using the and methods. + + + The code below loads all sheets in an Excel workbook into a collection of grids in a + TabControl: + + // clear tabControl + tabControl.TabPages.Clear(); + + // load sheet names + string fileName = "c:\book1.xls"; + string[] sheets = _flexGrid.LoadExcelSheetNames(fileName); + + // load each sheet + foreach (string sheetName in sheets) + { + // create a new grid for this sheet + C1FlexGrid flex = new C1FlexGrid(); + flex.Dock = DockStyle.Fill; + + // load sheet into new grid + flex.LoadExcel(fileName, sheetName); + + // add grid to the tabControl + TabPage page = new TabPage(); + page.Controls.Add(flex); + page.Text = sheetName; + tabControl.TabPages.Add(page); + } + + + + + Gets or sets whether the grid should display a new row template after the last data row. + + + If the user enters data into the new row template, a new row is automatically added to the grid. + This property works in bound mode (if the data source supports adding new rows) and also in + unbound mode. + Note that if this property is set to true, the Rows.Count property will return a value + that includes the new row template. If you set the Rows.Count property, the grid will set the + number of data rows and will automatically add the new row template. For example: + + flex.AllowAddNew = true; + flex.Rows.Count = 10; + Console.WriteLine("Row count is {0}.", _flex.Rows.Count); + Row count is 11. + + + + + + Gets or sets whether the grid should monitor the keyboard and handle the DEL key. + + + If this property is set to true, the user can delete rows by selecting them and then pressing + the DEL key. + This property works in bound mode (if the data source supports deleting rows) and in unbound mode. + + + + + Gets the collection of control glyphs (images used to show sorting, check boxes, etc). + + + The property returns a collection with an indexer + of type . This collection allows you to get or set the images used to + indicate column sorting, collapsed and expanded outline groups, check boxes, cursors, + error information, etc. + Note: Setting a glyph to null restores the default (built-in) image. If you want to make a glyph + invisible, set it to a small blank image instead. + + + For example, the code below causes the grid to use custom images to display the column sorting order + (instead of the built-in hollow triangles): + + flex.Glyphs[GlyphEnum.Ascending] = imgAscending; + flex.Glyphs[GlyphEnum.Descending] = imgDescending; + + + + + Gets or sets whether the grid should handle the clipboard keys and automatically + perform cut, copy, paste, and delete operations. + + + Setting this property to true causes the grid to monitor the keyboard for the + following clipboard keys: + Copy: CTRL-INS, CTRL-C + Cut: CTRL-X, SHIFT-DEL + Paste: CTRL-V, SHIFT-INS + Delete: DEL + Cut, paste, and delete actions are performed only if the + property is set to true. + If you want to handle only a subset of the supported keys, add a handler to the + event and set the Handled parameter to true to disable some of the keys. + Automatic clipboard operations only affect the grid data. Styles and images are + not copied, pasted, or deleted. + Values copied to the clipboard are affected by the setting of the + property. + + + + + Gets or sets a custom comparer object used by the grid to perform grouping, + merging, and searching operations. + + + The grid has a default implementation that is used to compare + cells and determine if their contents are equivalent. This implementation is used when merging, + grouping, or searching for values (see the property and the + and methods). + The default implementation is case-sensitive and takes leading and trailing blanks into account. + If you want to merge cells using a case-insensitive comparison or trimming blanks, + write a custom class that implements the interface and assign an + instance of it to the grid's property. + Setting this property to null (Nothing in Visual Basic) restores the default behavior. + + + The code below replaces the built-in comparer with a . + This causes the method to group items that differ only in case into the + same groups: + + // use case-insensitive comparer + flex.CustomComparer = new CaseInsensitiveComparer(); + + // add groups ignoring case + flex.Subtotal(AggregateEnum.Sum, 0, groupOn, totalOn); + + // restore default (case-sensitive) comparer + flex.CustomComparer = null; + + + + + Gets or sets an flags that affect the grid's editing behavior. + + + The default value for this property is , which enables + all editing options. See the enumeration for a list of + options available. + + + + + Gets a value that determines if a cell contains the grid cursor. + + Row index. + Column index. + True if the cell contains the cursor, false otherwise. + + + + Gets a value that determines if a cell belongs to a fixed row or column. + + Row index. + Column index. + True if the cell is fixed, false otherwise. + + + + Gets a value that determines if a cell is selected. + + Row index. + Column index. + True if the cell is selected, false otherwise. + + + + Gets a value that determines if a pair of cell coordinates are valid. + + Row index. + Column index. + True if the cell coordinates are valid, false otherwise. + + + + Gets a value that determines if a cell is part of the selection and should be highlighted. + + Row index. + Column index. + True if the cell should be highlighted, false otherwise. + + + + Gets a value that determines whether the cell contents are displayed as a checkbox. + + Row index. + Column index. + True if the cell contents should be displayed as a checkbox, false otherwise. + + Boolean values are displayed as check boxes unless one of the following conditions is true: + 1) The cell has an associated . In this case the values specified + in the DataMap are displayed instead of check boxes. + 2) The cell has a multi-part string (such as "yes;no"). In this case + the Format is used instead of check boxes. + 3) The cell belongs to a subtotal row and does not contain a Boolean value. + + + + + Specifies whether text rendering should be compatible with previous releases of WinForms. + + + This property determines whether the control should render text using the + class (compatible with previous versions), or the new class + (available in .NET 2.0 and later). + The class supports complex scripts and Uniscribe APIs, making + it better suited for some international applications. + However, the class seems to render about 25% slower than the + traditional method. + You may want to try both modes and select the one that matches the appearance of other + controls and forms in your application. + + + + + Gets a object that provides easy access to properties of the currently + active ComboBox editor. + + + The object can be used to get and set properties on the currently + active ComboBox editor without casting the property. + If no editor is active, or if the editor is not a , these properties + return null or -1, and cannot be set. + + + The code below shows two equivalent ways of accessing the selected index of the currently active ComboBox editor: + + // with the ComboBoxEditor property: + Console.WriteLine("The current combo index is {0}", + _flex.ComboBoxEditor.SelectedIndex); + + // without the ComboBoxEditor property: + ComboBox cb = _flex.Editor as ComboBox; + int index = (cb != null) ? cb.SelectedIndex : -1; + Console.WriteLine("The current combo index is {0}", + index); + + + + + Gets or sets a value that specifies the grid scrolling behavior. + + + + + Gets or sets flag that specify entering edit mode of cell after exiting from previous cell with arrow keys or tab key. + + + + + Gets or sets an C1SuperErrorProvider object used to indicate error state of the control. + + + + + Saves the grid contents to an Xml document. + + Name of the file to save, including the path. + + The grid serializes all its contents into the Xml document, including the + data stored in the cells, row and column properties, styles, images, etc. + Objects of custom types stored in the grid are also serialized as long as + they have an associated that provides conversions to + and from string. + The method has several overloads that allow you to + save several grids into a single Xml document, along with other information stored + in the Xml document. + + + The code below saves a grid into an Xml file: + + // save a grid into am Xml file + flex.WriteXml(fileName); + + The code below saves two grids into an Xml file, then reads them back in reverse order: + + // prepare XmlTextWriter + XmlTextWriter w = new XmlTextWriter(fileName, new UTF8Encoding(false)); + w.Formatting = Formatting.Indented; + w.WriteStartDocument(); + w.WriteStartElement("Grids"); + + // save first grid + w.WriteStartElement(c1FlexGrid1.Name); + c1FlexGrid1.WriteXml(w); + w.WriteEndElement(); + + // save second grid + w.WriteStartElement(c1FlexGrid2.Name); + c1FlexGrid2.WriteXml(w); + w.WriteEndElement(); + + // close document + w.WriteEndElement(); + w.Close(); + + // load document from file + XmlDocument doc = new XmlDocument(); + doc.Load(fileName); + XmlNode n = doc.SelectSingleNode("Grids"); + + // load grids in reverse order + c1FlexGrid2.ReadXml(n.ChildNodes[0]); + c1FlexGrid1.ReadXml(n.ChildNodes[1]); + + + + + Saves the grid contents to an Xml document. + + The where the document is saved. + + + + Saves the grid contents to an Xml document. + + The where the document is saved. + + + + Saves the grid contents to an Xml document. + + The where the document is saved. + + + + Loads the grid from an Xml document. + + Name of the file to load, including the path. + + + + Loads the grid from an Xml document. + + + object to use for loading the grid. + + + + Loads the grid from an Xml document. + + + object to use for loading the grid. + + + + Loads the grid from an Xml document. + + + object to use for loading the grid. + + + + Loads the grid from an Xml document. + + + object to use for loading the grid. + + + + Loads the grid from an Xml document. + + + object to use for loading the grid. + + + + Raises the event. + + Object raising the event. + A that contains event data. + + + + Gets a rectangle that defines the scrollable portion of the control. + + + The value returned corresponds to the control's client area minus any fixed + and frozen rows and columns. + + + + + Builds a rectangle that defines the scrollable portion of the control for a given pair of scroll offsets. + + Horizontal scroll offset. + Vertical scroll offset. + A that defines the scrollable portion of the control. + + This method is for internal use. It allows derived classes to customize the control scrolling behavior. + + + + + Raises the event. + + An that contains the event data. + + + + Raises the event. + + An that contains the event data. + + + + Raises the event. + + An that contains the event data. + + + + Raises the event. + + A that contains the event data. + + + + Paints the control background. + + A that contains information about the control to paint. + + + + Called when the control receives a WM_THEMECHANGED message. + + + The WM_THEMECHANGED message is broadcast to every window following a + theme change event. Examples of theme change events are the activation of a + theme, the deactivation of a theme, or a transition from one theme to another. + + + + + Gets or sets the background color for the control. + + + This is the color used to paint the background of the scrollable cells, also defined by the + cell style. + + + + + Gets or sets the foreground color for the control. + + + This is the color used to paint the text in scrollable cells, also defined by the + cell style. + + + + + Raises the event. + + An that contains the event data. + + + + Raises the event. + + An that contains the event data. + + + + Raises the event. + + An that contains the event data. + + + + Calculates the new position of a scrollbar in response to a user command. + + Scroll command (SB_LINEUP, etc). + True for the vertical scrollbar, false for the horizontal scrollbar. + Current scrollbar position. + Scrollbar thumb position. + The new position for the scrollbar. + + Derived classes may override this method to customize the scrolling behavior. + + + + + Raises the event. + + A that contains the event data. + + + + Raises the event. + + + that contains the event data. + + + + Fires when a row is losing focus and needs to be validated. + + + This event is analogous to the event. + Use this event to perform validation on all the values of a row. + If the row does not pass validation, set the property to true. + Canceling this event prevents the event from occurring, + and also prevents the user from leaving the invalid row. + + + + + Raises the event. + + A that contains the event data. + + + + Fires after a row lost focus and has been validated. + + + This event is analogous to the event. + Use this event to perform post-processing on a row of values. + + + + + Raises the event. + + A that contains the event data. + + + + Moves or extends the current selection. + + + value that specifies the type of cursor movement. + Whether to extend the current selection. + + This method is for internal use. It allows inherited classes to customize the grid appearance. + + + + + Moves or extends the selection from a given cell. + + + value that specifies the type of cursor movement. + Whether to extend the current selection. + Row index for the initial selection. + Column index for the initial selection. + + This method is for internal use. It allows inherited classes to customize the grid appearance. + + + + + Gets a value that indicates what types of child nodes a row has. + + + This method is for internal use. It allows inherited classes to customize outline trees. + + Row index. + Column index. + Outline level. + Zero if the row has no children, 1 if it has regular data rows only, + 2 if it has child nodes, and 3 if it has data and child nodes. + + + + + Gets a rectangle representing the coordinates of a cell, row, or column. + + + This method is for internal use. It allows inherited classes to customize the way cell geometry + is calculated. + + Row index (or -1 to get column bounds). + Column index (or -1 to get row bounds). + Whether the rectangle should be horizontally clipped to the grid's client area. + Whether the rectangle should be vertically clipped to the grid's client area. + A containing the display area for the row, column, or cell, + in client coordinates and accounting for scroll position. + + + + Gets a rectangle representing the coordinates of a cell, row, or column. + + + This method is for internal use. It allows inherited classes to customize the way cell geometry + is calculated. + + Row index (or -1 to get column bounds). + Column index (or -1 to get row bounds). + A containing the display area for the row, column, or cell, + in client coordinates and accounting for scroll position. + + + + Gets a rectangle representing the coordinates of a cell editor. + + + This method is for internal use. It allows inherited classes to customize the way cell geometry + is calculated. + + Row index. + Column index. + Rectangle used to position the cell editor. + + + + Draws a grid row. + + A that contains a + object where the row will be drawn. + Index of the row to draw. + + This method is for internal use. It allows inherited classes to customize the grid appearance. + + + + + Draws a grid cell. + + A that contains a + object where the cell will be drawn. + Index of the cell's row. + Index of the cell's column. + The index of the last column painted (may be greater than + if columns are merged). + + This method is for internal use. It allows inherited classes to customize the grid appearance. + + + + + Gets the state for a Windows Xp theme while the mouse moves over a cell. + + + This method is for internal use. It allows inherited classes to customize the + hot-tracking behavior. + + Row under the mouse. + Column under the mouse. + An integer representing the item state (2 for hot-tracking, 1 for normal). + + + + Gets a cell glyph to show in a cell. + + + This method is for internal use. It allows inherited classes to customize the display of the sorting glyphs. + + Row index. + Column index. + Cell rectangle + Glyph to display above the cell content. + Glyphs to display on the left of the cell. + Glyphs to display on the right of the cell. + True if any glyphs were assigned to the cell, false otherwise. + + + + Gets the state of the checkbox in a grid cell. + + Row index. + Column index. + One of the values in the enumeration. + + By default, the grid displays values in Boolean columns as check boxes (the column's + data type determined by the property). If you don't want Boolean + values displayed as check boxes, set the column's property to a + string containing the values that should be displayed for True and False values, separated by + a semi-colon. For example: + + flex.Cols["CheckBoxes"].DataType = typeof(bool); + flex.Cols["yesNo"].DataType = typeof(bool); + flex.Cols["yesNo"].Format := "Yes;No"; + + In unbound mode, you can use the and + methods to add check boxes to any cells. The check boxes will be displayed along with any text in + the cell, and you can set their position using the column's property. + There are two types of check boxes: Boolean and tri-state. Boolean check boxes toggle between + the and states. Tri-state check + boxes cycle through the settings , , + and . + For example, the code below creates a Boolean checkbox in cell (3,3) and a tri-state checkbox + in cell (4,3): + + flex.SetCellCheck(3, 3, CheckEnum.Unchecked) // Boolean; + flex.SetCellCheck(4, 3, CheckEnum.TSUnchecked) // tri-state; + + + + + + Sets the state of the checkbox in a grid cell. + + Row index. + Column index. + + value to assign to the cell. + + For details and examples, see the method. + + + + + Applies a value to a cell or cell range. + + + This method is for internal use. It allows inherited classes to customize the way checkbox + data is applied to the cells when cells are edited. + + Row index. + Column index. + Value to apply to the cell. + + + + Adjusts the width of a column range to fit the data in a cell range. + + Top row in the range. + Left column in the range. + Bottom row in the range. + Right column in the range. + Amount of extra space, in pixels, to add to the column widths. + Flags that control auto-sizing options. + + By default, the method measures every cell in each column, + taking into account the cell contents and style. + If the grid has a large number of rows, you can improve performance by using the + and parameters to specify a row range. + You can include only a few hundred rows in the process, and add some extra spacing for safety. + + + + + Adjusts the width of all columns to fit the data. + + + + + Adjusts the width of columns in a range to fit the data. + + Left column in the range. + Right column in the range. + Amount of extra space, in pixels, to add to the column widths. + + + + Adjusts the width of all columns fit the data. + + Amount of extra space, in pixels, to add to the column widths. + + + + Adjusts the width of a column to fit the data. + + Column index. + + This method measures every cell in the column, taking into account the cell contents and style. + If the grid has a large number of rows, consider using the + method instead, because it allows you to specify a smaller set of rows and columns to measure. + + + + + Adjusts the width of a column to fit the data. + + Column index. + Amount of extra space, in pixels, to add to the column widths. + + This method measures every cell in the column, taking into account the cell contents and style. + If the grid has a large number of rows, consider using the + method instead, because it allows you to specify a smaller set of rows and columns to measure. + + + + + Adjusts the height of a row range to fit the data in a cell range. + + Top row in the range. + Left column in the range. + Bottom row in the range. + Right column in the range. + Amount of extra space, in pixels, to add to the column widths. + Flags that control auto-sizing options. + + + + Adjusts the height of all rows to fit the data. + + + + + Adjusts the height of a row to fit the data. + + Row index. + + + + Automatically size grid columns to fit the largest entry. + + + object used to measure the cell contents. + Index of the first row to be measured. + Index of the first column to be measured. + Index of the last row to be measured. + Index of the first column to be measured. + Extra space, in twips, to add to the largest entry. + + value that specifies auto-sizing behavior. + + This method is for internal use. It allows inherited classes to customize the grid appearance. + + + + + Automatically size grid columns to fit the largest entry. + + + object used to measure the cell contents. + Index of the first row to be measured. + Index of the first column to be measured. + Index of the last row to be measured. + Index of the first column to be measured. + Extra space, in twips, to add to the largest entry. + + value that specifies auto-sizing behavior. + + This method is for internal use. It allows inherited classes to customize the grid appearance. + + + + + Gets a reference to the column that defines the current sort applied to the grid. + + + The grid may be sorted by a call to the method, by a user clicking + a column header, or as a result of sorting applied directly to the object that is being + used as the grid's . + To determine the current sort direction, use the sorted column's + property. + If the grid is not currently sorted, this property returns null. + + + + + Gets or sets whether the control should use Xp themes for displaying row or column headers. + + + This property only has an effect if the application is themed. To enable themes for + an application, you can either call the Application.EnableVisualStyles method or use + a manifest file. Please refer to MSDN for details. + Setting the property to BorderStyleEnum.XpThemes + automatically sets this property to ShowThemedHeadersEnum.Both. + + + + + Raises the event. + + An that contains the event data. + + + + Raises the event. + + An that contains the event data. + + + + Raises the event. + + An that contains the event data. + + + + Raises the event. + + An that contains the event data. + + + + Determines whether the specified key is a regular input key or a special + key that requires preprocessing. + + One of the values. + True if the specified key is a regular input key, False otherwise. + + + + Determines if a character is an input character that the control recognizes. + + The character to test. + True if the character should be sent directly to the control and not preprocessed, False otherwise. + + + + Raises the event. + + A that contains the event data. + + + + Raises the event. + + A that contains the event data. + + + + Raises the event. + + An that contains the event data. + + + + Raises the event. + + A that contains the event data. + + + + Raises the event. + + A that contains the event data. + + + + Raises the event. + + A that contains the event data. + + + + Raises the event. + + An that contains the event data. + + + + Called when the grid contents scroll. + + + value that specifies the scroll direction. + + This method is for internal use. It allows inherited classes to customize the grid scrolling behavior. + + + + + Called when the grid contents scroll vertically, to update the value of the scroll tip. + + New value for the vertical scroll bar. + + This method processes the new scroll position and calls . + + + + + Raises the event. + + A that contains event data. + + + + Raises the event. + + A that contains event data. + + + + Raises the event. + + A that contains event data. + + + + Gets or sets a value that determines the overall appearance of the control. + + + This property allows you to quickly customize the appearance of the grid so + it matches the appearance of your application. + The settings available include System, various Microsoft Office color + schemes, and Custom, which relies on the control's standard styles and + appearance properties. + + + + + Gets a value that determines whether the + property is set explicitly and should be persisted. + + True if the property was explicitly set by the user. + + + + Resets the value of the ambient property. + + + + + Method invoked when the property changes. + + + + + Gets or sets a used to customize the look and + feel of the control. + + + + + Gets the current . + + + + + + + Gets or sets a string that is displayed over the new row template + when the property is set to true. + + + + + Gets or sets what parts of the grid are copied to the clipboard when the + property is set to true. + + + + + Copies the current selection to the clipboard. + + + + + Cuts the content of the current selection to the clipboard. + + + This command copies the current selection to the clipboard, then deletes + the editable content within the selection. + + + + + Pastes the content of the clipboard onto the current selection. + + + + + Gets or sets whether the user is allowed to filter the data. + + + When this property is set to true, the grid displays filter icons + on the column headers. Users may click the icons to define filters to be + applied to the data. + When a filter is applied, the grid hides rows that don't match the + filter by setting their property to false. The + filter is not applied to the data source. + You may specify the type of filter to use for each individual column + by setting the columns property. + You may also create custom filters by creating classes the implement + the interface and assigning instances of that + class to the column's property. + + + + + Gets or sets a value that determines whether the filter should ignore diacritics + (accents) when comparing values. + + + By default, the filter compares values as they appear in the data source. + For example, if you are looking for values that contain the string "fac", you + will find "factory" but not "façade". + If you set this property to true, the filter will remove any diacritics + before performing the comparisons. In this case, looking for the string "fac" + will return both "factory" and "façade". + This property is especially useful in applications localized for languages + that contain many accents, such as French, Spanish, Portuguese, etc. + + + + + Gets or sets an XML string containing the current filter state. + + + + + Applies all column filters to the data on the grid. + + + + + Edits the filter associated with a given column. + + Index of the column whose filter should be edited. + + + + Edits the filter associated with a given column. + + + whose filter should be edited. + + + + Clears the filter associated with a given column. + + Index of the column whose filter should be cleared. + + + + Clears the filter associated with a given column. + + + whose filter should be cleared. + + + + Clears all column filters. + + + + + Applies search to the data on the grid. + + Words which will be searched. + Defines will search results be highlighted or not. + Defines will search results be filtered or not. + Defines will perform search through only visible columns or not. + + + + Applies search to the data on the grid. + + Words which will be searched. + Defines will search results be highlighted or not. + Defines will search results be filtered or not. + + + + Applies search to the data on the grid. + + Words which will be searched. + + + + Gets or sets the language to use when localizing the column filters. + + + + + Specifies how grid columns should be sorted. + + + This enumeration contains flags that can be combined to customize the sorting process. + + + For example, the code below sorts two grid columns ignoring case. + + // C# + SortFlags order = SortFlags.Ascending | SortFlags.IgnoreCase; + _flex.Sort(order, col1, col2); + + ' VB + Dim order As SortFlags = SortFlags.Ascending Or SortFlags.IgnoreCase + _flex.Sort(order, col1, col2) + + + + + Do not sort. This setting is useful for skipping certain columns when sorting column ranges. + + + + + Sort in ascending order. + + + + + Sort in descending order. + + + + + Sort using the string representation of the data. In this mode, "100" appears before "2". + + + + + Ignore case when sorting strings. + + + + + Use the flags stored in the property of individual objects. + + + + + Specifies which elements of the grid should be cleared by the method. + + + This enumeration contains flags that can be combined to customize the sorting process. + + + + + Clear cell content, including data, images, and check boxes if any. + + + + + Clear custom styles assigned to cells. + + + + + Clear user data associated with cells. + + + + + All of the above. + + + + + Specifies the type of checkbox to draw in a cell. + + + There are two types of check boxes: regular and tri-state. + Regular check boxes are used to display simple Boolean values. + They cycle through settings Checked and Unchecked when clicked with the mouse. + Tri-state check boxes are used to display values that may be true, false, or + indeterminate (grayed). They cycle through settings TSChecked, TSGrayed, and + TSUnchecked when clicked with the mouse. + Visually, Checked and Unchecked look the same as TSChecked and TSUnchecked. + + + + + No check box. + + + + + Check box with a check mark in it. + + + + + Empty check box. + + + + + Check box in undefined state. + + + + + Tri-state check box with a check mark in it. + + + + + Tri-state empty check box. + + + + + Tri-state check box in undefined state. + + + + + Specifies the type of aggregate function to calculate with the and + methods. + + + + + No aggregate. This setting is used with the method to create an + outline tree without any numerical aggregates. + + + + + Clear existing aggregates. This setting is used with the method + to clear any existing subtotals, usually before calculating new subtotals. + + + + + Returns the sum of all values in the range. + + + + + Percent of grand total. This setting is used with the method to + calculate the percentage of the grand total represented by each sub group. (This setting can't + be used with the method). + + + + + Returns the count of non-empty cells in a range. + + + + + Returns the average value of the non-empty cells in a range. + + + + + Returns the maximum value in a range. + + + + + Returns the minimum value in a range. + + + + + Returns the sample standard deviation of the values in a range (uses the formula based on n-1). + + + + + Returns the sample variance of the values in a range (uses the formula based on n-1). + + + + + Returns the population standard deviation of the values in a range (uses the formula based on n). + + + + + Returns the population variance of the values in a range (uses the formula based on n). + + + + + Specifies options to use when calculating aggregates with the method. + + + + + Default setting. Include all rows and use numerical values only. + + + + + Exclude node rows from aggregate. This option is useful when the grid contains subtotal rows, + which are marked as nodes and contain values that are subtotals and should thus be excluded + from aggregates. + + + + + Calculate aggregates for dates instead of numerical values. Only a few aggregate functions + are meaningful for dates: count, maximum, and minimum. + + + + + Calculate aggregates for Boolean values. This flag causes the value True to be interpreted as one, + and False as zero. This option is useful for counting the number of checked check boxes in a range. + + + + + Exclude hidden rows and columns from the aggregate. + + + + + Exclude collapsed rows from the aggregate. + + + + + Exclude hidden rows from the aggregate. + + + + + Specifies whether subtotals rows created with the method should be + inserted above or below the data they refer to. + + + + + Subtotal rows are inserted above the data (tree-style). + + + + + Subtotal rows are inserted below the data (spreadsheet-style). + + + + + Specifies the type of change that occurred when the controls fires the + event. + + + + + No action. + + + + + The number of grid rows or columns has changed. + + + + + The number of fixed grid rows or columns has changed. + + + + + A style definition has changed. + + + + + A style has been applied to a range. + + + + + The grid has been invalidated and will be repainted. + + + + + The value in a cell has changed. + + + + + A range has been invalidated and will be repainted. + + + + + The grid will be repainted. + + + + + A tree node is about to be collapsed or expanded. + + + + + A tree node has just been collapsed or expanded. + + + + + A tree node will be scrolled into view. + + + + + A tree node will be selected. + + + + + A row has been moved into a new position. + + + + + A row has been added to the grid. + + + + + A row has been removed from the grid. + + + + + A row has been selected or de-selected. + + + + + A column has been moved into a new position. + + + + + A column has been added to the grid. + + + + + A column has been removed from the grid. + + + + + A column has been selected or de-selected. + + + + + The selection is about to change. + + + + + The selection has just changed. + + + + + Represents the method that will handle the event. + + + + + Provides data for the event handler. + + + + + The type of action that caused the event to fire. + + + + + Range of cells affected by the event. + + + + + Range of cells affected by the event. + + + + + Range of cells affected by the event. + + + + + Range of cells affected by the event. + + + + + Represents cell ranges, allowing the caller to set properties for multiple cells + with a single statement. + + + The structure does not have a public constructor. To create a + object, use the method. + Note that is a structure, not a class. This means the object is used as a value, + not as a reference. If you pass a to a method and change the object within that method, + the original value is not modified. + Ranges are defined by two rows and two columns (, , , and + ). These values do not have to be in order ( may be smaller or greater than + ). To obtain the values in order, use the method or the , + , , and properties. + + + + + Gets or sets the range's first row index. + + + + + Gets or sets the range's first column index. + + + + + Gets or sets the range's last row index. + + + + + Gets or sets the range's last column index. + + + + + Gets a value that indicates if the range contains a single cell. + + + + + Gets a value that indicates if the range contains valid row and column indices. + + + This property returns true if the range coordinates are valid. The range is valid + if both r1 and r2 are between 0 Rows.Count-1, both c1 and c2 are between 0 and + Cols.Count-1. + + + + + Determines whether the range contains a given row. + + Index of the row to check. + True if the range contains the row, False otherwise. + + + + Determines whether the range contains a given column. + + Index of the column to check. + True if the range contains the column, False otherwise. + + + + Determines whether the range contains a given cell. + + Index of the row to check. + Index of the column to check. + True if the range contains the cell, False otherwise. + + + + Gets the index of the top row in the range. + + + + + Gets the index of the bottom row in the range. + + + + + Gets the index of the left column in the range. + + + + + Gets the index of the right column in the range. + + + + + Normalizes the range so that is the , + is the , + is the , + and is the . + + + + + Gets or sets the data stored in the range. + + + When getting, this property returns the value in the first cell of + the range (r1, c1). When setting, it stores the given value in every + cell within the range. + + + + + Gets the value in cell (, ), formatted as a string. + + + This property is similar to the property, except Clip + returns a tab-delimited string containing data in the entire range, and DataDisplay + returns the contents of the first cell only (r1, c1). + + + + + Gets or sets the style used to display every cell in the range. + + + Getting or setting the range style ensures that every cell in the range has + the same style. If the range does not contain any cells with custom styles, + this property returns null. + + + The code below creates a structure and uses it to + apply a custom style to the entire range. + + // create a style + CellStyle cs = _flex.Styles.Add("red"); + cs.BackColor = Color.Red; + + // create a cell range and assign it a style + CellRange rg = _flex.GetCellRange(1, 1, 5, 5); + rg.Style = cs; + + + + + Gets or sets the style used to display every cell in the range, creating a new style if necessary. + + + This property never returns null. If the range does not have a style assigned to it, a new style + will be created automatically. + + + The code below creates a structure and uses it to apply a custom style to + the entire range. + + // create a cell range + CellRange rg = _flex.GetCellRange(1, 1, 5, 5); + + // make sure range is red + rg.StyleNew.BackColor = Color.Red; + + + + + Gets the style used to render cell (, ). + + + This property never returns null. It will return the custom style assigned to the + first cell in the range, to the cell's row, column, or a built-in style. + + + + + Gets or sets the state of the checkbox in the range. + + + When getting, this property returns the checkbox value that corresponds to cell + (, ). When setting, it applies the new value to all + cells in the range. + + + + + Gets or sets the assigned to cells in the range. + + + When getting, this property returns the assigned to cell + (, ). When setting, it applies the new value to all + cells in the range. + + + + + Gets or sets arbitrary used data assigned to cells in the range. + + + When getting, this property returns the user data assigned to cell + (, ). When setting, it applies the new value to all + cells in the range. + + + + + Gets or sets a string containing the values of all cells in the range. + + + The cell values are delimited by characters specified by the + property. + By default, columns are separated by tabs (\t or vbTab) and rows by line breaks (\n or vbCr). + + + + + Clears selected elements from the range. + + + value that specifies which elements + should be cleared. + + + + Gets a string representation for this object. + + A string representation for this object. + + + + Collection of objects. + + + + + Initializes a new instance of a . + + Grid that owns the collection. + + + + Gets or sets the object at a specified index. + + + + + Gets the number of objects in the collection. + + + + + Adds a new object to the collection. + + Top row in the range. + Left column in the range. + Bottom row in the range. + Right column in the range. + The index of the object in the collection. + + + + Adds a new object to the collection. + + Object to add to the collection. + The index of the object in the collection. + + + + Adds a new object to the collection, optionally + removing other overlapping ranges from the collection. + + Top row in the range. + Left column in the range. + Bottom row in the range. + Right column in the range. + Whether to remove overlapping + ranges from the collection before adding the new range. + The index of the object in the collection. + + + + Adds a new object to the collection, optionally + removing other overlapping ranges from the collection. + + Object to add to the collection. + Whether to remove overlapping + ranges from the collection before adding the new range. + The index of the object in the collection. + + + + Removes all objects from the collection. + + + + + Determines whether a object is a member of the collection. + + Object to locate in the collection. + True if the object is a member of the collection, false otherwise. + + + + Gets the index of a object in the collection. + + Object to locate in the collection. + The index of the object in the collection, or -1 if the object is not a member of the collection. + + + + Gets the index of the first object in the collection that contains the specified row and column. + + Index of the row contained in the range. + Index of the column contained in the range. + The index of the object in the collection, or -1 if no range could be found containing the specified row and column. + + + + Inserts a object in the collection at a specified index. + + + + + + + + + Removes a object from the collection. + + Object to remove from the collection. + + + + Removed the object at a specified index from the collection. + + Index of the object to remove from the collection. + + + + Represents a filter based on one or two logical conditions. + + + + + Initializes a new instance of a . + + + + + Gets the first filter condition. + + + + + Gets the second filter condition. + + + + + Gets or sets whether the filter conditions should be combined + with an 'And' or with an 'Or' operator. + + + + + Creates a clone of this . + + A clone of this . + + + + Gets or sets a value that determines whether the filter is active. + + + + + Resets the filter making it inactive. + + + + + Applies the filter to a value. + + Value to be filtered. + True if the satisfies the filter; + False otherwise. + + + + Gets the editor used to modify the filter at run time. + + A that is used to modify the filter at run time. + + + + Represents operators used in filter conditions. + + + + + Disables the operator. + + + + + Return true if the value equals the operator parameter. + + + + + Return true if the value does not equal the operator parameter. + + + + + Return true if the value is greater than the operator parameter. + + + + + Return true if the value is less than the operator parameter. + + + + + Return true if the value is greater than or equal to the operator parameter. + + + + + Return true if the value is less than or equal to the operator parameter. + + + + + Return true if the string representation of the value contains the operator parameter. + + + + + Return true if the string representation of the value does not contain the operator parameter. + + + + + Return true if the string representation of the value begins with the operator parameter. + + + + + Return true if the string representation of the value ends with the operator parameter. + + + + + Represents a condition within a . + + + Each contains up to two conditions that + can be combined with 'And' or 'Or' operators. + + + + + Gets a value that indicates whether the condition is active. + + + + + Gets or sets the operator used by this condition. + + + + + Gets or sets the parameter used by this condition. + + + + + Clears this condition by setting the to 'None' + and the to null. + + + + + Applies the condition to a given value. + + Value to test. + True if the value satisfies the condition, false otherwise. + + + + Specifies the behavior of the control as an OLE drag-drop target. + + + + + The control can't be used as a drop target. + + + + + The control fires drag-drop events that can be handled to provide drop target functionality. + + + + + The control automatically handles dropping of text or filename data. + + + + + Specifies the behavior of the control as an OLE drag-drop source. + + + + + The control does not provide any drag support. The caller can still initiate drag-drop operations + using the method. + + + + + The control provides automatic dragging of data. If the mouse hovers near the edges of the selected range, + the cursor will change and allow the user to move or copy data (pressing the CTRL key to copy). + + + + + Same as Automatic, except the data is always copied (never moved). + + + + + Same as Automatic, except the data is always moved (never copied). + + + + + Represents the method that will handle the event. + + Object that fired the event. + + object that contains the event data. + + + + Provides data for the event. + + + + + Gets which mouse button was pressed. + + + + + Gets the number of times the mouse button was pressed and released. + + + + + Gets the x-coordinate of a mouse click. + + + + + Gets the y-coordinate of a mouse click. + + + + + Gets a signed count of the number of detents the mouse wheel has rotated. A detent is one notch of the mouse wheel. + + + + + Gets or sets a value indicating whether the event should be canceled. + + + + + Initializes a new instance of the BeforeMouseDownEventArgs class. + + + with mouse event information. + + + + Initializes a new instance of the BeforeMouseDownEventArgs class. + + Control that will fire the event. + + value that indicates which button was pressed. + Number of times the button was pressed and released. + + + + Represents the method that will handle the , , and events. + + Object that fired the event. + + object that contains the event data. + + + + Provides data for the , , + , and events. + + + + + Gets the original index of the row that was dragged by the user. + + + + + Gets the original index of the column that was dragged by the user. + + + + + Gets the new index of the column or row that was dragged by the user. + + + + + Gets or sets a value indicating whether the drag operation should be canceled. + + + + + Initializes a new instance of the DragRowColEventArgs class. + + The original index of the row that was dragged by the user. + The original index of the column that was dragged by the user. + The new index of the column or row. + + + + Represents the method that will handle the and + events. + + Object that fired the event. + + object that contains the event data. + + + + Provides data for the and events. + + + + + Gets the column that is being sorted. + + + + + Gets or sets a value that determines the sorting order. + + + + + Gets or sets a value indicating whether the drag operation should be canceled. + + + Setting this parameter to true cancels the built-in sort operation and leaves the sorting glyph unchanged. + + + + + Gets or sets a value indicating whether the drag operation has been handled by the event handler. + + + Setting this parameter to true cancels the built-in sort but updates the sorting glyph as if the + sort had been performed. This is useful when the event handler performs custom sorting. + + + + + Initializes a new instance of the SortColEventArgs class. + + The column that is being sorted. + + value that determines the sorting order. + + + + Represents the method that will handle the , + , , + , , + , , + , , + , , + , and events. + + Object that fired the event. + + object that contains the event data. + + + + Provides data for the , , + , , + , , + , , + , , + , , and + events. + + + + + Gets the index of the row that caused the event. + + + This value may be set to -1 if the event was caused by a column. + + + + + Gets the index of the column that caused the event. + + + This value may be set to -1 if the event was caused by a row. + + + + + Gets or sets a value indicating whether the operation should be canceled. + + + + + Initializes a new instance of the RowColEventArgs class. + + Index of the row that caused the event. + Index of the column that caused the event. + + + + Represents the method that will handle the , + , , + , , and + events. + + Object that fired the event. + + object that contains the event data. + + + + Provides data for the , , + , , + , and events. + + + + + Gets the range selected before the event. + + + + + Gets the range that will be selected after the event. + + + + + Gets or sets a value indicating whether the new selection should be canceled. + + + + + Initializes a new instance of the RangeEventArgs class. + + The range selected before the event. + The range that will be selected after the event. + + + + Represents the method that will handle the event. + + Object that fired the event. + + object that contains the event data. + + + + Provides data for the event. + + + + + Gets or sets the text to be displayed in the tooltip. + + + + + Initializes a new instance of the ToolTipEventArgs class. + + Index of the row that caused the event. + Index of the column that caused the event. + Text to display in the ToolTip + + + + Represents the method that will handle the and + events. + + + + + Provides data for the and events. + + + + + Gets the row index of the cell being edited when the key was pressed. + + + + + Gets the column index of the cell being edited when the key was pressed. + + + + + Gets the integer representation of the property. + + + + + Gets the key code for the event, which will be one of the values. + + + + + Gets the key code for the key that was pressed, combined with modifier flags that indicate which + combination of CTRL, SHIFT, and ALT keys were pressed at the same time. + + + + + Gets the modifier flags, as defined in Keys. This indicates which combination of modifier keys + (CTRL, SHIFT, and ALT) were pressed. + + + + + Gets a value indicating whether the ALT key was pressed. + + + + + Gets a value indicating whether the CTRL key was pressed. + + + + + Gets a value indicating whether the SHIFT key was pressed. + + + + + Gets or sets a value indicating whether the event was handled and should be ignored by the control. + + + + + Initializes a new instance of the KeyEditEventArgs class. + + The row index of the cell being edited when the key was pressed. + The column index of the cell being edited when the key was pressed. + A object containing the keyboard data. + + + + Represents the method that will handle the event. + + + + + Provides data for the event. + + + + + Gets the row index of the cell being edited when the key was pressed. + + + + + Gets the column index of the cell being edited when the key was pressed. + + + + + Gets the character corresponding to the key pressed. + + + + + Gets or sets a value indicating whether the event was handled and should be ignored by the control. + + + + + Initializes a new instance of the KeyPressEditEventArgs class. + + The row index of the cell being edited when the key was pressed. + The column index of the cell being edited when the key was pressed. + The character corresponding to the key pressed. + + + + Represents the method that will handle the event. + + + + + Provides data for the event. + + + + + Gets the row index of the cell being edited. + + + + + Gets the column index of the cell being edited. + + + + + If the cell contains a checkbox, the new checkbox state about to be applied to the cell. + + + + + Gets or sets a value indicating whether the edit operation should be canceled. + + + If this parameter is set to true, the edits are considered invalid. The editor will remain open + and the current cell selected until the user provides a valid entry or cancels the edit operation + by pressing the ESC key. + + + + + Initializes a new instance of the ValidateEditEventArgs class. + + The row index of the cell being edited. + The column index of the cell being edited. + The new checkbox state about to be applied to the cell, if any. + + + + Represents the method that will handle the event. + + + + + Provides data for the event. + + + + + Gets the row index of the cell where the error was detected. + + + + + Gets the column index of the cell where the error was detected. + + + + + Gets the object that contains information about the error. + + + + + Gets or sets a value indicating whether the error situation has been handled by the control. + + + If this value is set to False, the grid will throw the exception. + + + + + Initializes a new instance of the GridErrorEventArgs class. + + The row index of the cell where the error was detected. + The column index of the cell where the error was detected. + The object that contains information about the error. + Whether the error was handled internally and no exception should be thrown. + + + + Represents the method that will handle the and + events. + + + + + Provides data for the and + events. + + + + + Gets the index of the row that may contain errors. + + + + + Gets the index of the column that may contain errors (or -1 if checking for row errors). + + + + + Gets or sets a message that describes the error. + + + + + Initializes a new instance of the class. + + The row index when error information is needed for a cell or row. + The column index when error information is needed for a cell or row. + + + + Represents the method that will handle the event. + + + + + Provides data for the event. + + + + + Initializes a new instance of the OwnerDrawCellEventArgs class. + + The control that contains the cell being painted. + The object where the cell will be painted. + The row index of the cell being painted. + The column index of the cell being painted. + The that will be used to paint the cell. + The bounds of the cell being painted. + The text that will be displayed in the cell. + The image that will be displayed in the cell. + + + + Gets the object used to draw the cell. Use this object to draw custom elements in the cell. + + + + + Get the row index of the cell being painted. + + + + + Get the column index of the cell being painted. + + + + + Sets or sets the object used to paint the cell. + + + This parameter is often used to provide dynamic formatting based on cell contents. For example, + if the cell contains a value outside a given range, the event handler may assign a new style to + this parameter. + Although it is legal to modify the members of the parameter in this + event, this is not recommended, since the change will affect other cells that may be using this style. + + + The code below uses the event to highlight cells that + indicate low stock levels. + + // create style used to display low-stock items + CellStyle cs = _flex.Styles.Add("Critical"); + cs.BackColor = Color.Red; + + private void _flex_OwnerDrawCell(object sender, C1.Win.C1FlexGrid.OwnerDrawCellEventArgs e) + { + // ignore fixed cells + if (e.Row < _flex.Rows.Fixed || e.Col < _flex.Cols.Fixed) + return; + + // apply custom style if reorder level is critical + if (_flex.Cols[e.Col].Name == "UnitsInStock") + { + // change the style by applying the "Critical" style to the Style parameter + // (do not change the e.Style.BackColor property directly since that would + // affect other cells that use this style) + if ((short)_flex[e.Row, "UnitsInStock"] < (short)_flex[e.Row, "ReorderLevel"]) + e.Style = _flex.Styles["Critical"]; + } + } + + + + + Get the rectangle where the cell will be painted (in client coordinates). + + + + + Gets or sets the text that will be displayed in the cell. + + + Changing this value is an easy way to modify the text displayed in a cell without any custom drawing code. + + + + + Gets or sets the image that will be displayed in the cell. + + + Changing this value is an easy way to modify the image displayed in a cell without any custom drawing code. + + + + + Gets a value that determines if the event was fired only to measure the cell. + + + This occurs while auto-sizing rows and columns, since the event handler may change the + value displayed in the cell while handling this event. + + + + + Gets or sets whether the event has finished drawing the cell. + + + If this parameter is set to true, the grid assumes the call has been painted by the event handler. If it + is set to false, the grid will paint the cell when the event returns. + Note that calling the method automatically sets this parameter to true. + + + + + Causes the grid to paint parts of the cell (background, foreground, border, etc.) + + + that specifies the parts of the cell. + + This method is typically called in handlers when the code + intends to draw some elements of the cell but not everything. + For example, the code may want to draw a custom border only. In this case, it could call + e.DrawCell(DrawCellFlags.Background | DrawCellFlags.Content) to draw the cell background and content, + and later draw the custom border. + Or the code could want to draw a custom marker in a cell (like a note indicator in Excel). In this case, it + should call e.DrawCell() to draw the entire cell, and later add the note marker (little red triangle + on the top right corner of the cell). + If the owner-draw code draws the entire cell (including the background), then there's no need to call + e.DrawCell at all. + + + + + Causes the grid to paint the whole cell. + + + + + Represents the method that will handle the and + events. + + + object that raised the event. + + that contains the event data. + + + + Provides data for the and + events. + + + + + Gets the row index for the cell that has an unbound value. + + + + + Gets the column index for the cell that has an unbound value. + + + + + Gets or sets the unbound value that should be displayed in the cell. + + + + + Initializes a new instance of the UnboundValueEventArgs class. + + Row index for the cell that has an unbound value. + Column index for the cell that has an unbound value. + Unbound value that should be displayed in the cell. + + + + Represents the method that will handle the and + events. + + + object that raised the event. + + that contains the event data. + + + + Provides data for the and events. + + + + + Gets the value that specifies the type of aggregate to calculate.. + + + + + Outline level to assign to the new subtotal rows. + + + + + Gets the index of the first column in the range used to detect group breaks. + + + + + Gets the index of the last column in the range used to detect group breaks. + + + + + Gets the index of the column that contains values being aggregated. + + + + + Gets or sets the text to insert in the new subtotal row. + + + + + Gets the index of the new subtotal row. + + + + + Gets a value that determines whether the subtotal row is a new row or the + subtotal is being added to an existing subtotal row. + + + + + Gets the index of the top row in the group. + + + + + Gets the index of the bottom row in the group. + + + + + Gets or sets the calculated aggregate value for the group. + + + + + Gets or sets the to be applied to the new subotal row. + + + + + Whether to cancel the creation of the new subtotal row. + + + + + Initializes a new instance of a object. + + + value that specifies the type of aggregate to calculate. + Outline level to assign to the new subtotal rows. This parameter allows the creation of multi-level subtotals and affects the display of the outline tree. + First column in the range used to detect group breaks. + Last column in the range used to detect group breaks. + Column that contains values being aggregated. + Text to insert in the new subtotal row. + Index of the new subtotal row. + Whether the subtotal row is a new row or the subtotal is being added to an existing subtotal row. + Index of the top row in the group. + Index of the bottom row in the group. + Calculated aggregate value for the group. + + to be applied to the new subotal row. + + + + Represents the method that will handle the event. + + + object that raised the event. + + that contains the event data. + + + + Provides data for the event. + + + + + Gets or sets the value of the localized string. + + + + + Gets the name of the component being localized. + + + + + Parent of the component being localized. + + + + + Component being localized. + + + + + Initializes a new instance of a . + + Value to be localized. + Name of the component being localized. + Parent of the component being localized. + Component being localized. + + + + Specifies the type of filter to be used for a . + + + + + Filter column using a . + + + + + Filter column by values using a . + + + + + Filter column by conditions using a . + + + + + Filter column using a filter specified by the caller. + + + + + Do not provide a filter for this column. + + + + + Specifies a type of glyph (image) used by the grid to convey information about a row, column, or cell. + + + + + Indicates column sorted in ascending order (default is hollow triangle pointing up). + + + + + Indicates column sorted in descending order (default is hollow triangle pointing down). + + + + + Checkbox in checked state. + + + + + Checkbox in unchecked state. + + + + + Checkbox in gray (undefined) state. + + + + + Collapsed tree node (default is plus sign). + + + + + Expanded tree node (default is minus sign). + + + + + Indicates current record (default is black triangle pointing right). + + + + + Indicates row being added to data source (default is asterisk). + + + + + Indicates row or cell error (default is red exclamation sign). + + + + + Indicates that a column has a drop-down filter editor. + + + + + Indicates that a column has a filter currently active. + + + + + Represents a collection of glyphs (images) indexed by glyph type ( type). + + + The collection contains the images used by the grid to indicate column + sorting direction, collapsed and expanded outline groups, check boxes, cursors, error information, etc. + You can use the property get or set these images. + + + + + Gets or sets the glyph for a particular value. + + + Setting a glyph to null causes the grid to use the default image for the glyph. To suppress + a glyph, assign it a small transparent image. + + + + Specifies where the grid should start searching for cells when using the + property. + + + + + No auto-searching. + + + + + Search from the first scrollable row. + + + + + Search from the current row. + + + + + Specifies the action to perform when the ENTER and TAB keys are pressed. + + + + + No special action (allow system to handle the key). For example, the TAB key is normally + used to cycle through the controls on a form. + + + + + Move to the next row. + + + + + Move to the next column. At the end of the row, wrap to the start of the next row. + + + + + Same as MoveAcross, but move the focus to the next control in the tab order when + the last cell in the grid is reached. + This setting applies only to the property; + when used with it behaves like MoveAcross. + + + + + Type of grid element at a specific point on the control. + + + + + The point is in the grid's empty area. + + + + + The point is on a grid cell. (The cell coordinates are stored in the + and properties). + + + + + The point is on a fixed row, over a column. + + + + + The point is near the right edge of a fixed cell, in the column resizing area. + + + + + The point is near the right edge of the last frozen column, in the column freezing area. + + + + + The point is on a fixed column, next to a row. + + + + + The point is near the bottom edge of a fixed cell, in the row resizing area. + + + + + The point is near the bottom edge of the last frozen row, in the row freezing area. + + + + + The point is on a check box. + + + + + The point is on an edit button (drop down, popup editors). + + + + + The point is on the outline bar (visible when the grid's property + has a that contains the flag). + + + + + The point is on the collapse/expand button on an outline tree (visible when the grid's + property contains the flag). + + + + + The point is on the filter icon on a column header cell. + + + + + Contains information, such as the row and column indexes, about a specific coordinate pair + in the control. + + + Use the method to obtain a value. + + + + + Get the index of the row at the point being tested (if the point does not correspond to a cell, it returns -1). + + + + + Get the index of the column at the point being tested (if the point does not correspond to a cell, it returns -1). + + + + + The point on the control surface, in pixels. + + + + + The X coordinate of a point on the control surface, in pixels. + + + + + The Y coordinate of a point on the control surface, in pixels. + + + + + Gets a that describes the type of element described by a . + + + This property allows you to determine whether the point corresponds to a grid cell or + to special elements such as row and column headers, resizing areas, and so on. + + + + Specifies a node with respect to another given node. + + + This enumeration is used with the method. + + + + + The node's top-level parent. + + + + + The node's immediate parent. + + + + + The node's first child. + + + + + The node's last child. + + + + + The node's first sibling (node with same level and same parent). + + + + + The node's last sibling. + + + + + The node's next sibling. + + + + + The node's previous sibling. + + + + + The node's first visible sibling. + + + + + The node's last visible sibling. + + + + + The node's next visible sibling. + + + + + The node's previous visible sibling. + + + + + The node's first visible child. + + + + + Specifies the destination of nodes when they are moved with the method. + + + + + Move the node one level in, deeper into the outline. + + + + + Move the node one level out, towards the root. + + + + + Move the node to the position before its previous sibling. + + + + + Move the node to the position after its next sibling. + + + + + Move the node to the position before its first sibling. + + + + + Move the node to the position after its last sibling. + + + + + Make the node a child of the specified node. + + + + + The class encapsulates properties and methods used for manipulating node rows + (collapsing, expanding, moving, and sorting them). + + + You can create node rows using the method or by setting the + property to true. + + + + + Gets or sets the outline level for this node. + + + Higher levels mean deeper nesting. Set the level to zero to create root nodes, + or set the level to negative values to create nodes that do not appear on the outline tree. + + + + + Gets or sets whether this node is collapsed. + + + + + Gets or sets whether this node is expanded. + + + + + Gets the number of child nodes under this node. + + + Only immediate children are included in the count. Grand-children are not included. + + + + + Gets or sets the image on this node row at the column that contains the outline tree. + + + + + Gets or sets the associated with this node row. + + + + + Gets or sets the data on this node row at the column that contains the outline tree. + + + + + Gets or sets the checkbox value associated with this node. + + + + + Returns a reference to the object that corresponds to this node. + + + + + Returns a CellRange object containing this row and all its child rows. + + A CellRange object containing this row and all its child rows. + + The object returned includes all columns. + + + + + Returns a reference to a node located at a given position relative to this node. + + A value from the enumeration that specifies + the position relative to this node. + A node object. + + If the node requested does not exist, returns null (for example, + the root node does not have a previous sibling). + + + + + Gets the parent node of this node. + + + + + Gets the previous sibling node. + + + + + Gets the previous visible sibling node. + + + + + Gets the next sibling node. + + + + + Gets the next visible sibling node. + + + + + Gets the first child node. + + + + + Gets the first visible child node. + + + + + Gets the last child node. + + + + + Gets the first sibling node. + + + + + Gets the last sibling node. + + + + + Gets the index of this node in the collection. + + + + + Gets an array containing the children of this node. + + + + + Gets whether any child of node is visible. + + + + + Creates a node row at a specified position relative to this node. + + A value from the enumeration that specifies + where the new node will be added with respect to this node (e.g. Child, Sibling). + Value of the property for the new node. + Value of the property for the new node. + Value of the property for the new node. + A reference to the new added to the grid. + + + + Creates a node row at a specified position relative to this node. + + A value from the enumeration that specifies + where the new node will be added with respect to this node (e.g. Child, Sibling). + Value of the property for the new node. + A reference to the new added to the grid. + + + + Removes this node row and all its child rows (nodes and data) from the grid. + + + + + Moves a node to a new position. + + A value from the enumeration that specifies + where the node will be moved with respect to its current position. + + object to use as a target when the + parameter is set to . + Returns true if the method was successful, false otherwise. + + + + Moves a node to a new position. + + A value from the enumeration that specifies where + the node will be moved with respect to its current position. + Returns true if the method was successful, false otherwise. + + + + Ensures that this node is visible, expanding its parent nodes and scrolling it into view if necessary. + + + + + Selects the node. + + + This method sets the control's property. + + + + + Sorts this node's child nodes in the specified order. + + One or more values from the enumeration that specify + the type of sorting to be applied (e.g. ascending, descending, case-sensitive, etc). + Start of a range of columns to sort. + End of a range of columns to sort. + + The grid recognizes two types of row: regular rows which contain data, and node rows which are used + to group data. This method only sorts the row nodes; it does not reorder the data rows within each node. + To sort the data rows, use the grid's method instead. + + + + + Sorts this node's child nodes in the specified order. + + One or more values from the enumeration that specify + the type of sorting to be applied (e.g. ascending, descending, case-sensitive, etc). + + The grid recognizes two types of row: regular rows which contain data, and node rows which are used + to group data. This method only sorts the row nodes; it does not reorder the data rows within each node. + To sort the data rows, use the grid's method instead. + + + + + Sorts this node's child nodes using a given object to determine the node order. + + An object that implements the interface used + to compare objects. This can be used to provide custom sorting. + + The grid recognizes two types of row: regular rows which contain data, and node rows which are used + to group data. This method only sorts the row nodes; it does not reorder the data rows within each node. + To sort the data rows, use the grid's method instead. + + + + + Contains flags that specify printing options to use with the method. + + + + + Print the grid in actual (screen size). If the grid is too wide to fit on a page, columns spill onto + separate pages. If the grid is too tall to fit on a page, rows spill onto additional pages. + + + + + Scale the grid so its width will fit on a single page. If the grid is too tall to fit on a page, + rows spill onto additional pages. + + + + + Scale the grid so it will fit on a single page (rows and columns). + + + + + Show a page setup dialog before printing so the user can select paper size, orientation, and margins. + + + + + Show a print setup dialog before printing so the user can select the printer to use. + + + + + Show a print preview dialog before printing so the user can inspect the document before printing it. + + + + + Show highlighted selection while printing. + + + + + Extend the last column on each printed page. + + + + + Represents a class that encapsulates the control printing functionality, including page and printer + settings, headers, and footers. + + + See also the method. + + + + + Gets the object that specifies page and printer settings. + + + The class is part of the .NET framework, defined in the + System.Drawing.Printing namespace. It contains properties that specify printer and page settings for the document. + + + + + Specifies the font to use for rendering page headers. + + + See also the property. + + + + + Specifies the font to use for rendering page footers. + + + See also the property. + + + + + Gets the number of the page being printed (the first page is numbered one). + + + Applications typically use this property to provide user feedback while printing grids. + + + + + Gets the total number of the pages in the print document. + + + The value returned is accurate only while the document is printing. Before or after + a document is done printing, this property returns zero. + + + + + Gets a reference to the used to display the grid's print preview. + + + Use this property to customize the size and position of the preview dialog when printing the grid + with the option. + + + The code below uses the PrintPreviewDialog property to display the preview dialog with a + custom caption and in a maximized state: + + Form dlg = _flex.PrintParameters.PrintPreviewDialog as Form; + dlg.Text = "Custom Caption"; + dlg.StartPosition = FormStartPosition.Manual; + dlg.WindowState = FormWindowState.Maximized; + _flex.PrintGrid("test", PrintGridFlags.ShowPreviewDialog); + + + + + Gets or sets the flags that specify printing options to use with the + method. See the enumeration for details. + + + + + Gets or sets a string that contains the page headers. + + + The string may be divided by tab characters into up to three sections. The sections are then + left, center, and right-aligned at the top of each page. + The string may contain placeholders "{0}" and "{1}" which are replaced with the current + page number and total page count. + Use the property to select the font used to render the header. + + + The code below specifies a right-aligned header with a "Page n of m" display using a 10-point Tahoma font. + + _flex.Header = "\t\tPage {0} of {1}"; + _flex.HeaderFont = new Font("Tahoma", 10); + _flex.PrintGrid("Header"); + + + + + Gets or sets a string that contains the page footers. + + + The string may be divided by tab characters into up to three sections. The sections are then + left, center, and right-aligned at the top of each page. + The string may contain placeholders "{0}" and "{1}" which are replaced with the current + page number and total page count. + Use the property to select the font used to render the footer. + + + + + Represents an object that renders a into a + paged . + + + This class may be used to print multiple grids, along with other + custom content, into an existing object. + To use it, create one PrintDocumentGridRenderer for each + grid you want to print. Then handle the document events and call the + event for the renderers until the value of the + property equals . + + The code below renders two grids into a : + + // print two grids into an existing PrintDocument + private void button1_Click(object sender, EventArgs e) + { + using (var dlg = new PrintPreviewDialog()) + { + dlg.Document = this.printDocument1; + dlg.ShowDialog(this); + } + } + + // event handlers for the PrintDocument object on the form + PrintDocumentGridRenderer _g1, _g2; + void printDocument1_BeginPrint(object sender, System.Drawing.Printing.PrintEventArgs e) + { + // create and configure grid renderer for the first grid + _g1 = new PrintDocumentGridRenderer(c1FlexGrid1); + _g1.Options = PrintGridFlags.FitToPageWidth | PrintGridFlags.ExtendLastCol; + + // create and configure grid renderer for the second grid + _g2 = new PrintDocumentGridRenderer(c1FlexGrid2); + _g2.Options = PrintGridFlags.FitToPageWidth | PrintGridFlags.ExtendLastCol; + } + void printDocument1_PrintPage(object sender, System.Drawing.Printing.PrintPageEventArgs e) + { + // render first grid + if (_g1.CurrentPage < _g1.PageCount) + { + _g1.PrintPage(e); + e.HasMorePages = true; + } + + // render second grid + else if (_g2.CurrentPage < _g2.PageCount) + { + _g2.PrintPage(e); + e.HasMorePages = _g2.CurrentPage < _g2.PageCount; + } + } + + + + + + Initializes a new instance of a . + + + that will be painted by + this renderer. + + + + Gets or sets the flags that specify printing options to use with the + method. See the enumeration for details. + + + + + Gets the index of the page being rendered. + + + + + Gets the total number of pages in the document. + + + + + Gets or sets the Y coordinate of the first block of cells rendered on + the document. + + + + + Renders the current page into the document. + + + that provides parameters for rendering the page. + + + + Renders a specific page into the document. + + + that provides parameters for rendering the page. + Index of the page to print. + + This method is used to render specific ranges of pages within the document. + + + + + Calculates the zoom factor and page breaks in the document. + + + that contains the page information. + + + + Base class for grid rows and columns ( and classes). + + + + + Initializes a new instance of the class. + + + + + Gets or sets whether a Row or Column is visible. + + + This property returns true even if the row or column has been scrolled out of view. + To determine whether a row is currently within view, check the + and properties. + To determine whether a column is currently within view, check the + and properties. + + + + + Gets whether this row is collapsed. + + + Rows are collapsed when one of their parent nodes is collapsed. + Collapsed rows are not visible to the user even if their + property is set to true. + + + + + Gets whether this row is currently visible to the user. + + + This property returns true if the property + is set to true and the row is collapsed ( + property returns false). + + + + + Gets or sets whether this row or column is selected. + + + Use this property to get or set the selection state for individual rows when the grid's + property is set to . + + + + + Gets or sets user data associated with this row or column. + + + The UserData value is not used internally by the grid. It is reserved for additional data that + the application may associate with rows or columns. + + + + + Gets or sets whether the user can drag this row or column with the mouse. + + + The grid object also has an property. + If dragging is disabled at the grid level, the user will not be able to drag any rows or columns. + If dragging is allowed by the grid's property, then + dragging of individual rows and columns can still be disabled by setting this property to false. + + + + + Gets or sets whether the user can resize this row or column with the mouse. + + + To resize rows or columns, the mouse must be over the fixed area of the grid, and close to a border + between rows or columns. The mouse pointer will then change into a sizing pointer and the user can drag + the row or column to change the row height or column width. + If a group of columns is selected (from first to last row) and the user resizes one of them, all + selected columns are resized. The same applies to rows. + If column sizing is allowed, users may double-click the resizing area to resize a column so it will + automatically fit the longest entry. + Rows with zero height and columns with zero width can't be resized by the user. If you want to make + them very small but still resizable, set their height or width to one pixel, not to zero. + The and + events fire before resizing starts, and may be used to prevent resizing of specific rows and columns. + The and + fire after resizing, and may be used to validate the user's action and to update the display. + + + + + Specifies whether adjacent cells with similar contents will be merged. + + + Merging cells allows you to display data in a clear, appealing way because it highlights groups of identical + information. It also gives you flexibility to build tables similar to the ones you can create in HTML or using + Microsoft Word, both of which support merged cells. + To create tables with merged cells, you must set the property to a value other + than , and then set the property of individual + rows and columns true for the rows and columns you wish to merge. + After these properties are set, the grid will automatically merge adjacent cells that have the same + contents. Whenever the cell contents change, the grid updates the merging state. + + + + + Gets or sets whether cells on this row or column can be edited by the user. + + + The grid object also has an property. + If editing is disabled at the grid level, the user will not be able to edit any cells. + If editing is allowed by the grid's property, then + editing of individual rows and columns can still be disabled by setting this property to false. + + + + + Gets or sets the type of object stored in this row or column. + + + By default, the column's DataType property is set to , which allows you to store + any data values in the column. + If you set a row or column's DataType to a specific type, the grid will try to convert any values assigned + to cells in that column to the specified data type. If the conversion fails, the grid will fire a + event and the cell value will not be changed. + + The DataType property affects how values are stored internally in the grid, how they are sorted, and the + type of control that is used to edit the values in the column. For example, a + control is used to edit values in columns, and check boxes are used to display and edit + values in Boolean columns. + If you want to store times (not dates) in a column, you can still use the DateTime type, but you should + use a that displays only the time, not the date. + + + + + + Gets or sets a string that specifies how to format the data on this column. + + + The Format property affects how values are formatted for display, not the values stored internally. + To retrieve the formatted value of a cell, use the property. + The Format string has the same semantics as the format argument in the .NET + method. For details and a complete set of examples, see the .NET documentation. + + + + + Gets or sets the input mask to use when editing cells on this column. + + + The grid also has an property that applies to the entire grid. + For details and mask syntax, refer to that property. + + + + + Gets the index of this row or column in its parent collection. + + + This property returns -1 if the row or column is not a member of the collection. + + + + + Gets or sets a custom associated with this row or column. + + + If the row or column does not have a custom style, this property returns null. + + + + + Gets or sets a custom associated with this row or column, creating a new + style if necessary. + + + This property never returns null. If this element does not have a custom style, a new one will be + created automatically and returned. + + + The code below sets a column's background color to red. + + // get the style associated with column 1 (create a new one if necessary) + CellStyle cs = _flex.Cols[1].StyleNew.BackColor; + + // set the new style's back color to red + cs.BackColor = Color.Red; + + + + + Gets the style used to display this row or column. + + + This property never returns null. If the row or column has a custom style, this property returns that style. + Otherwise, it returns the stock style used to display the row (e.g., Normal, Alternate, Fixed, Frozen). + + + + + Gets the stock used to paint fixed cells in this row or column. + + + + + Gets the custom style associated with fixed cells on this row or column, creating a new one of necessary. + + + If the row or column has a custom style associated with its fixed cells, this property returns that style. + Otherwise, it creates a new , assigns it to the row or column, and returns a reference + to the new style. + + + + + Gets the style used to display fixed cells on this row or column. + + + If the row or column has a custom style associated with its fixed cells, this property returns that style. + Otherwise, it returns the stock style used to display the column (e.g., Normal, Fixed). + + + + + Gets or sets a value that determines how text is aligned in + scrollable cells on this row or column. + + + This property gets or sets the alignment value specified by the + object associated with the column. + + + + + Gets or sets a value that determines how text is aligned in + fixed cells on this row or column. + + + This property gets or sets the alignment value specified by the + object associated with the fixed cells in the row or column. + + + + + Gets or sets an value that determines how images are aligned in + scrollable cells on this row or column. + + + This property gets or sets the alignment value specified by the + object associated with the column. + + + + + Gets or sets an value that determines how images are aligned in + fixed cells on this row or column. + + + + + Gets or sets an object used to translate data values into images for this row or column. + + + Use this property to associate data values in this row or column with images. For example, if a column contains + country names, you can use this property to display the corresponding flags. + Use the property to determine whether the image is displayed instead of or in + addition to the cell text. + + + + + Gets or sets a value that determines whether images found in this row or column's should + be displayed instead of or in addition to the cell text. + + + + + Gets or sets an object used to translate data values into display values + for this row or column. + + + The DataMap property allows you to implement "translated" rows or columns. In translated rows or columns, + the grid does not display the values stored in the cells. Instead, it looks up those values in the column's + DataMap and displays the mapped value. + The grid also uses the DataMap value to populate drop-down lists when the column is editable. + Note that the DataMap property has no effect when the property is also + set. Using both properties on a single row or column is legal, but it effectively disables the DataMap. + + + + + Gets or sets a list of items to be used by the drop-down editor. + + + The ComboList property specifies the type of editor to be used when editing a cell. You may use a text box, + drop-down list, drop-down combo, or an edit button to pop up custom editor forms. + To use the ComboList property, set the property to True, and + set the ComboList property to a string that describes the type of editing you want to use for that cell. + The options are described below: + 1. To edit the cell using a regular text box, set the ComboList property to an empty string (""). + 2. To edit the cell using a drop-down list, set the ComboList property to a string containing the available + options, separated by pipe characters (for example "option 1| option 2"). + 3. To edit the cell using a drop-down combo, set the ComboList property to a string containing the + available options, separated by pipe characters and starting with a pipe character (for example "|option 1|option 2"). + 4. To display an edit button, set the ComboList property to a string containing an ellipsis ("..."). + Edit buttons look like regular push buttons, aligned to the right of the cell, with an ellipsis as a caption. + When the user clicks on the edit button, the grid fires the event. + In this case, the user can't edit the cell contents directly. + 5. To display an edit button next to an editable cell, set the ComboList property to a string containing a + pipe and an ellipsis ("|..."). In this case, you get a regular edit button but the user can also edit the cell + contents directly. + Note that the ComboList property has precedence over the property. + Using both properties on a single row or column is legal, but it effectively disables the DataMap. + + + + + Gets or sets the custom editor used to edit cells in this column. + + + The grid provides several built-in editors that are automatically selected based on the properties of the + cell being edited. + This property allows you to use external editors when editing values in a given column. Any control + can be used as an external editor, but to achieve complete integration with the grid, the external editor should + implement the interface. + You can associate external editors with columns at design time (using the grid's Column Editor) or at run + time, by setting this property. + + + The code below creates a C1DateEdit control and assigns it to the property of a grid + column. The control will be used to edit cells on this column instead of the default + control. + All controls in the C1Input library implement the interface and can be + used as grid editors without any extra code. + + // create C1DateEdit control (included with C1Input) + C1DateEdit dateEdit = new C1DateEdit(); + + // use the new control as an editor for a grid column + _flex.Cols[1].DataType = typeof(DateTime); + _flex.Cols[1].Editor = c1DateEdit; + + + + + + Clears the contents of the row or column. + + + value specifying which elements of the row or + column should be cleared. + + Use this method to reset column properties to their default values (width, visibility, style, + user data, and so on). This method only clears the column object itself, it does not clear + the contents of the cells in the column. + + + + + Moves this row or column to a new position in the collection. + + An integer specifying the new position. + + + + Gets a reference to the control that owns this row or column. + + + + + Invalidates an individual row or column, causing it to be repainted. + + + + + Class that represents a grid row. + + + This class does not have a public constructor. You can add and remove rows using methods + in the grid's property, which exposes the row collection. + + + + + Gets or sets the cell value specified by the column index in this row. + + + + + Gets or sets the cell value specified by the column name in this row. + + + + + Gets the position of the top of this row, in pixels, relative to the grid. + + + The value returned is the sum of row heights from the top of the grid until this row, and + does not account for the scroll position. To account for the scroll position, this value should + be adjusted using the grid's + property. + To retrieve the size and position of a cell, use the method. + + + + + Gets the position of the bottom of this row, in pixels, relative to the grid. + + + The value returned corresponds to the sum of the and properties. + + + + + Gets or sets the height of this row, in pixels (the value -1 represents the default row height). + + + Setting this property to -1 causes the grid to use the default row height for this row + (see the property). + Height returns the height assigned to the row even if the row is invisible, and returns -1 + if the row has the default height. To obtain the actual display height of a row, use the + property. + + + + + Gets or sets the display height for this row, in pixels. + + + HeightDisplay returns zero if the row is invisible, and returns the actual display height + even if the property is set to -1 (which stands for default row height). + + + + + Gets the index of this row in the collection. + + + This property returns -1 if the is not a member of the collection. + See also the and properties. + + + + + Gets the index of this row in the collection. + + + This property is similar to the property, except it throws an exception + if the is not a member of the collection. + + + + + Gets the index of this row in the collection, excluding fixed and node rows. + + + This property returns -1 if the row is a fixed or node row. + If the grid is bound to a data source, the return value can be used as an indexer into the grid's data + source to obtain a reference to the item bound to the row. + You can also obtain the underlying data object directly using the row's property. + + + + + Gets or sets the text of the first fixed cell in the row. + + + + + Indicates the row is a placeholder for adding new rows to the grid. + + + This property returns true for the last row on the grid when the + property is set to true. This is the row that has an asterisk glyph on the first fixed column. + + + + + Gets the object that provides data for this row. + + + The type of object returned depends on the type of DataSource assigned to the grid. For example, + if the grid is bound to a object, then this property will return the + specific object that is bound to this row. + This property returns null if the grid is unbound, or if the row is a fixed or node row that doesn't + correspond to any objects in the grid's data source. + For an example, see the event. + + + + + Clears this row. + + + value specifying which elements of the row should be cleared. + + Use this method to reset row properties to their default values (height, visibility, style, user data, etc.). + + + + + Moves a row to a new position in the collection. + + An integer specifying the row's new position. + + + + Gets or sets whether this row is a node row in an outline. + + + This property determines whether the row behaves as a node in an outline tree. + You can use to create custom outline trees, or use the grid's + method to create outline trees automatically. + + + + + Gets the object associated with this row. + + + If the row is a node (see the property), this property returns a + object that can be used to collapse or expand the node, set its level within + the outline tree, etc. + If the row is not a node, this property gets the row's parent node. + + + + + Gets or sets whether this row is selected. + + + Use this property to get or set the selection status for individual rows when the grid's + property is set to . + + + + + Invalidates this row, causing it to be repainted. + + + + + Class that represents a grid column. + + + This class does not have a public constructor. You can add and remove + columns using methods in the grid's + property, which exposes the column collection. + + + + + Gets or sets the cell value specified by the row index in this column. + + + + + Gets the position of the left of this column, in pixels, relative to the grid. + + + The value returned is the sum of column widths from the left of the grid until this column, and + does not account for the scroll position. To account for the scroll position, this value should + be adjusted using the grid's + property. + To retrieve the size and position of a cell, use the method. + + + + + Gets the position of the right of this column, in pixels, relative to the grid. + + + The value returned corresponds to the sum of the and properties. + + + + + Gets or sets the width of this column, in pixels (the value -1 represents the default column width). + + + Setting this property to -1 causes the grid to use the default column width for this column + (see the property). + + Width returns the width assigned to the column even if the row is invisible, and + returns -1 if the row has the default height. To obtain the actual display width of a column, + use the property. + + + + + Gets or sets the display width for this column, in pixels. + + + WidthDisplay returns zero if the column is invisible, and returns the actual display width + even if the property is set to -1 (which stands for default column width). + + + + + Gets the index of this column in the collection. + + + This property is similar to the property, except it throws an exception + if the is not a member of the collection. + + + + + Gets the position of the column in the data source object. + + + This property returns -1 for fixed and unbound columns. + + + + + Gets or sets that cells in the will accept null value or null will be replaced by default value in unbound mode. + + + This property works only if IsValueType member of property + equals to True and for type . + If value was changed to False then all null values in the will be + replaced by defaults of current . + + + + + Gets or sets whether this column can be sorted by clicking on the column header. + + + The grid has an property that determines whether columns can be + sorted with the mouse. The AllowSorting property of the objects can be used to prevent + the user from sorting specific columns. + + + + + Gets or sets this type of filter to use for this column. + + + The grid has an property that determines whether + columns can be filtered by the user. If that property is set to true, then filters are created + automatically for each column based on the setting of the column's + property. + The grid provides condition and value filters. Condition filters allow users to specify + conditions such as 'value > 10'. Value filters allow users to select values that should be displayed + from a list of values present in the data source. All filters can be customized in code as shown + in the examples below. + + + The code below customizes the filters for two columns. The "ShipRegion" column is initialized to + show only two states, AK and CA. The "UnitPrice" column is initialized to show only items with + unit price greater than $30. After the column filters have been initialized, the code calls the + method to apply the filters. + + // initialize "ShipRegion" column filter to show only two values: "AK" and "CA" + var col = _flex.Cols["ShipRegion"]; + col.AllowFiltering = AllowFiltering.ByValue; + var vf = col.Filter as ValueFilter; + vf.ShowValues = new object[] { "AK", "CA" }; + + // initialize "UnitPrice" column filter to show only values greater than $30 + col = _flex.Cols["UnitPrice"]; + col.AllowFiltering = AllowFiltering.ByCondition; + var cf = col.Filter as ConditionFilter; + cf.Condition1.Operator = ConditionOperator.GreaterThan; + cf.Condition1.Parameter = 30; + + // apply both column filters to the data + _flex.ApplyFilters(); + + + + + Gets or sets the responsible for filtering this column. + + + + + Gets the that is currently filtering this column. + + + + + Gets or sets the name of this column. + + + The name can be used as an index in the property indexer. + When the grid is bound to a DataSource, the column names are set automatically to the names + of columns in the data source, and are used for binding. + + + + + Specifies how this column should be sorted when the method is called + with a flag. + + + Use this property when you want to sort multiple columns in different orders. For example, you could + set the Sort property to for columns 1, 2, and 3, and to + for columns 4, 5, and 6. + You would then call the grid's method with the sort parameter + set to to perform the sort using the order specified for each column. + + + + + Gets the index of this column in the collection. + + Returns -1 if the column is not a member of the collection. + + + + Gets or sets whether this column is selected. + + + + + Invalidates this column, causing it to be repainted. + + + + + Gets or sets the text of the column's header cell. + + + + + Clears this . + + + value specifying which elements of the + should be cleared. + + + + Moves a to a new position in the collection. + + An integer specifying the column's new position. + + + + Gets or sets when to display combo buttons in cells. + + + By default, the column will show editing buttons in cells only when they + have the focus. This is the same behavior used by the + control. + If you set to , + the column will display buttons on any cells that have associated lists, even if they + don't have the focus. + For details on how to associate lists with cells, see the , + , and properties. + + + + + Base class for grid row and column collections ( + and classes). + + + + + Gets or sets the number of rows or columns in the collection. + + + + + Gets or sets the number of fixed rows or columns in the collection. + + + + + Gets or sets the number of frozen rows or columns in the collection. + + + Use the property to determine whether + the user can freeze rows or columns with the mouse. + + + + + Moves a row or column to a new position in the collection. + + Index of row or column to be moved. + New position. + + + + Moves a range of rows or columns to a new position in the collection. + + The index of the first row or column in the range to be moved. + The number of rows or columns that will be moved. + New position. + + + + Determines whether the collection contains a given row or column. + + Row or column items to be detected. + True if the row or column is a member of the collection, False otherwise. + + + + Gets or sets the minimum size for rows and columns in the collection. + + + The MinSize property limits the minimum size of rows or columns when they are resized by the user or + adjusted to fit the contents with the or + method. + + + + + Gets or sets the maximum size for rows and columns in the collection. + + + The MaxSize property limits the maximum size of rows or columns when they are resized by the user or + adjusted to fit the contents with the or + method. + Setting this property to zero disables it. + + + + + Gets or sets the default size of the rows or columns in the collection (in pixels). + + + This value is set automatically when the grid's property changes. + The default size is used when the row's Height property or columns Width property is set to -1. + + + + + Gets a reference to the control that owns this collection. + + + + + Gets the index of the previous visible row or column. + + Index of the original row or column. + Index of the previous visible row or column. + + + + Gets the index of the next visible row or column. + + Index of the original row or column. + Index of the next visible row or column. + + + + Updates the position of rows or columns. + + + + + Collection of grid objects. + + + + + Gets the at the specified index. + + + Use the object returned by this method to set attributes such as row + height, visibility, style, selected state, and so on. + + + + + Gets or sets the number of rows in the collection. + + + You can add or remove rows by assigning a new value to this property, or you can use the + , , , and methods. + + + + + Gets or sets the index of the row used to display the sorting and filtering glyphs. + + + The default value is -1, which causes the sorting and filtering glyphs to be shown + on the last fixed row. If you set this property to a value larger than the number + of fixed rows, then the glyphs will not be displayed. + + + + + Gets or sets the number of fixed rows in the collection. + + + + + Gets a collection of objects that are currently selected. + + + This property is especially useful when the grid's property + is set to . + + + The code below removes all selected rows from the grid. + Note that foreach loops can't be used to modify the collections being iterated over. This example + works because the collection is being enumerated while the + collection is being modified. + + // delete all selected rows + foreach (Row r in _flex.Rows.Selected) + { + _flex.Rows.Remove(r); + } + + + + + + Appends a new object to the collection. + + + The Add method appends a new row to the collection. To insert a row at a specific position, + use the method. + + A reference to the that was added to the collection. + + + + Appends a given number of objects to the collection. + + Number of rows to add to the collection. + + + + Adds a new object to the collection at a specified position. + + The position where the new row will be inserted. + A reference to the that was added to the collection. + + + + Adds a new row to the row collection at a specified position. + + The position where the new node row will be inserted. + Outline level for the new node row. + A reference to the that was added to the collection. + + This method is especially useful when the grid is bound to a data source, because in this + case you can't change the value of the property. When the grid + is unbound, you can add rows and turn them into nodes later using the property. + + + + + Appends a new row to the row collection. + + Outline level for the new node row. + A reference to the that was added to the collection. + + + + Adds a range of rows to the collection at a specified position. + + The position where the new range will be inserted. + The number of rows to add. + + + + Removes a object from the collection. + + The index of the row to remove from the collection. + A reference to the that was removed from the collection. + + + + Removes a object from the collection. + + The row to be removed. + A reference to the that was removed from the collection. + + + + Removes a range of rows from the collection. + + The index of the first row to remove from the collection. + The number of rows to remove from the collection. + + + + Move a object to a new position in the collection. + + Index of row to be moved. + New position for the row. + + + + Moves a range of rows to a new position in the collection. + + The index of the first row in the range that will be moved. + The number of rows that will be moved. + New position for the first row in the range. + + + + Updates the position and data index of each row in this collection. + + + + + Collection of grid objects. + + + + + Gets the at the specified index. + + + + + Gets the that has the specified column name. + + + You can use the object returned by this method to set + attributes such as column height, visibility, style, selected state, and so on. + This indexer looks for a column with the specified . + The column name is set automatically for you when the grid is bound to a database, + or it may be set using code. + + + + + Gets a value that determines whether the collection contains a with the given name. + + Column name to look for (case-insensitive). + True if the collection contains a column with the given name, False otherwise. + + + + Gets the index of the with the specified name. + + Column name to look for (case-insensitive). + Index of the column that has the given name in this collection, or -1 if the collection + does not contain a column with the given name. + + + + Gets the index of the with the specified name. The search starts at a specified index. + + Column name to look for (case-insensitive). + The search starting index. + Index of the column that has the given name in this collection, or -1 if the collection + does not contain a column with the given name. + + + + Gets the index of the with the specified name, optionally + throwing an exception if the column is not found. + + Column name to look for (case-insensitive). + Whether to throw and exception if the column cannot be found. + Index of the column that has the given name in this collection, or -1 if the collection + does not contain a column with the given name. + If the parameter is set to true and + a column named cannot be found, the control throws + an . This makes it easier to write + compact code that relies on column names. + + The example below uses the IndexOf method to convert column names into + indices. Note that if the column names are invalid, the exception will be thrown + by the IndexOf method (column not found) rather than in the following + method, where it would not be as clear (invalid index). + + int columnIndex = _flex.Cols.IndexOf("total"); + _flex.AutoSizeCol(columnIndex); + + + + + Gets the index of the with the specified name, optionally + throwing an exception if the column is not found. The search starts at a specified index. + + Column name to look for (case-insensitive). + Whether to throw and exception if the column cannot be found. + The search starting index. + Index of the column that has the given name in this collection, or -1 if the collection + does not contain a column with the given name. + If the parameter is set to true and + a column named cannot be found, the control throws + an . This makes it easier to write + compact code that relies on column names. + + The example below uses the IndexOf method to convert column names into + indices. Note that if the column names are invalid, the exception will be thrown + by the IndexOf method (column not found) rather than in the following + method, where it would not be as clear (invalid index). + + int columnIndex = _flex.Cols.IndexOf("total"); + _flex.AutoSizeCol(columnIndex); + + + + + Gets or sets the number of objects in this collection. + + + You can add or remove columns by assigning a new value to this property, or you can use the + , , , and methods. + + + + + Gets or sets the number of fixed columns in this collection. + + + + + Appends a new object to this collection. + + A reference to the that was added to the collection. + + + + Appends a given number of objects to the collection. + + Number of columns to add to the collection. + + This method adds the new columns to the end of the collection. To insert columns at specific + positions, use the or methods. + + + + + Adds a new object to this collection at a specified position. + + The position where the new column will be inserted. + A reference to the that was inserted to the collection. + + + + Adds a range of objects to the collection at a specified position. + + The position where the new range will be inserted. + The number of columns to add. + + + + Removes a object from the collection. + + The index of the column to remove from the collection. + A reference to the that was removed from the collection. + + + + Removes a object from the collection. + + The column to remove. + A reference to the that was removed from the collection. + + + + Removes a object from the collection. + + Name of the column to remove. + A reference to the that was removed from the collection. + + + + Removes a range of objects from the collection. + + The index of the first column to remove from the collection. + The number of columns to remove from the collection. + + + + Moves a object to a new position in the collection. + + Index of the column to be moved. + New position for the column. + + + + Moves a range of objects to a new position in the collection. + + The index of the first column in the range that will be moved. + The number of columns that will be moved. + New position for the first column in the range. + + + + Gets a collection of objects that are currently selected. + + + + + Gets a string build a string that contains a complete description of + the column collection, suitable for persisting the control state. + + Whether to include default values in the description. + A string that describes the column collection. + + + + Parses a string containg a description of the column collection (usually obtained + by calling the method) and applies it to a grid. + + Grid that receives the column collection. + String that contains the column collection definition. + True if the column definition was applied successfully. + + + + Specifies the type of file to save or load with the + and methods. + + + + + Text file, cells separated with commas. + + + + + Text file, cells separated with tabs. + + + + + Text file, cells separated with the character specified by the + property. + + + + + Microsoft Excel files (Xls/biff-8 or OpenXml formats). + + + + + Specifies options for use with the and + methods. + + + + + Use default settings. + + + + + Include fixed cells when loading or saving the grid. + + + + + Save only visible rows and columns. + + + + + Save only selected rows. + + + + + Save values as displayed (including formatting and mapping where available). + This flag has no effect when saving text files, which always contain values as displayed. + + + + + Save merged ranges when exporting to Excel with the method. + This flag has no effect when saving text files, it only affects Excel output. + + + + + Load merged ranges when importing from Excel with the method. + This flag has no effect when loading text files, it only affects Excel input. + + + + + Save and load merged ranges when exporting to or importing from Excel with the + and methods. + + + + + Do not freeze rows and columns when exporting to or importing from Excel with the + and methods. + + + + + Load or save file in OpenXml (Office 2007) format. + + + + + Save nodes as Excel groups when exporting to Excel. + + + + + Specifies the type of selection provided by the grid. + + + + + The user can select continuous blocks of cells using the keyboard and the mouse. + Clicking on header cells selects entire rows and columns. + + + + + The user can select only a single cell at a time. + + + + + The user can select continuous blocks of cells using the keyboard and the mouse. + Clicking on header cells does not affect the selection. + + + + + The user can select a single row at a time. + + + + + The user can select a range of contiguous rows at a time. + + + + + The user can select a single column at a time. + + + + + The user can select a range of contiguous columns at a time. + + + + + The user can select non-contiguous rows using control-click. + + + + + This enumeration is for internal use only. + + + + + No movement. + + + + + One cell left, then wrap to previous row. + + + + + One cell right, then wrap to next row. + + + + + One cell up. + + + + + One cell down. + + + + + One cell left. + + + + + One cell right. + + + + + Page up. + + + + + Page down. + + + + + Page left. + + + + + Page right. + + + + + Top cell. + + + + + Bottom cell. + + + + + Leftmost cell. + + + + + Rightmost cell. + + + + + Enumeration used to retrieve objects from the + collection. + + + Cell styles can be retrieved from the collection using the + indexer or the style name. Built-in styles can also be obtained directly through read-only properties. + + + The code below shows three ways to obtain a reference to a grid's default style: + + // s1, s2, and s3 are all references to the grid's Normal style: + CellStyle s1 = _flex.Styles[CellStyleEnum.Normal]; + CellStyle s2 = _flex.Styles["Normal"]; + CellStyle s3 = _flex.Styles.Normal; + + + + + Style used to render scrollable normal cells. + + + This is the parent style for most cells. Setting the control's BackColor, + ForeColor, or Font properties automatically sets the corresponding properties + on the Normal style. + If you change any properties in the Normal style, the changes will be reflected + in all styles that do not explicitly override those properties. + + + + + Style used to render scrollable cells in even-numbered rows. + + + + + Style used to render fixed cells. + + + + + Style used to render cells that are selected and highlighted. + + + + + Style used to render the cell that has the focus. + + + + + Style used to render cells being edited. + + + + + Style used to render cells that are being selected as the user types (see the property). + + + + + Style used to render cells that are frozen (editable and selectable, but not scrollable). + + + + + Style used to render cells that are frozen (editable and selectable, but not scrollable) in even-numbered rows. + + + + + Style used to render the last row on the grid when the property is set to true. + + + + + Style used to render the area of the grid where there are no cells. + + + + + Style used to render selected column headers. + + + + + Style used to render selected row headers. + + + + + Style automatically assigned to grand total nodes created with the method. + + + + + Style automatically assigned to level-0 nodes created with the method. + + + + + Style automatically assigned to level-1 nodes created with the method. + + + + + Style automatically assigned to level-2 nodes created with the method. + + + + + Style automatically assigned to level-3 nodes created with the method. + + + + + Style automatically assigned to level-4 nodes created with the method. + + + + + Style automatically assigned to level-5 nodes created with the method. + + + + + Style used to paint the filter editors. + + + + + Constant that indicates the first custom style. + + + + + Specifies how text is aligned in a grid cell. + + + + + Text is horizontally aligned to the left and vertically aligned to the top of the cell. + + + + + Text is horizontally aligned to the left and vertically aligned to the center of the cell. + + + + + Text is horizontally aligned to the left and vertically aligned to the bottom of the cell. + + + + + Text is horizontally aligned to the center and vertically aligned to the top of the cell. + + + + + Text is horizontally aligned to the center and vertically aligned to the center of the cell. + + + + + Text is horizontally aligned to the center and vertically aligned to the bottom of the cell. + + + + + Text is horizontally aligned to the right and vertically aligned to the top of the cell. + + + + + Text is horizontally aligned to the right and vertically aligned to the center of the cell. + + + + + Text is horizontally aligned to the right and vertically aligned to the bottom of the cell. + + + + + Numbers are aligned to the right, other values to the left, and vertically aligned to the top. + + + + + Numbers are aligned to the right, other values to the left, and vertically aligned to the center. + + + + + Numbers are aligned to the right, other values to the left, and vertically aligned to the bottom. + + + + + Specifies a 3D effect to use when rendering cell text. + + + + + No 3D effect. + + + + + Text is drawn with a shadow offset by one pixel to the right and below the text. + + + + + Text is drawn with a shadow offset by one pixel to the left and above the text. + + + + + Specifies how images are aligns in grid cells. + + + + + Image is horizontally aligned to the left and vertically aligned to the top of the cell. + + + + + Image is horizontally aligned to the left and vertically aligned to the center of the cell. + + + + + Image is horizontally aligned to the left and vertically aligned to the bottom of the cell. + + + + + Image is horizontally aligned to the center and vertically aligned to the top of the cell. + + + + + Image is horizontally aligned to the center and vertically aligned to the center of the cell. + + + + + Image is horizontally aligned to the center and vertically aligned to the bottom of the cell. + + + + + Image is horizontally aligned to the right and vertically aligned to the top of the cell. + + + + + Image is horizontally aligned to the right and vertically aligned to the center of the cell. + + + + + Image is horizontally aligned to the right and vertically aligned to the bottom of the cell. + + + + + Image is scaled to fit the maximum area within the cell while preserving the original aspect ratio. + + + + + Image is stretched to cover the whole cell. + + + + + Image is tiled to cover the whole cell. + + + + + Image is not displayed. + + + + + Image is split into a grid, corner parts are copied and center is stretched to cover the cell. + + + This tiling mode preserves the corners and borders of the source image, and is designed to be + used with the property. + + + + + Specifies whether a style should display the cell text, image, both, or none. + + + + + Display text only (no image). + + + + + Display image only (no text). + + + + + Display the text over the image. + + + + + Display the text next to the image. + + + + + Nothing (cell stays blank). + + + + + Specifies the direction to use when rendering text in a grid cell. + + + + + Text is rendered in the horizontal direction. + + + + + Text is rendered from the bottom of the cell to the top. + + + + + Text is rendered from the top of the cell to the bottom. + + + + + Specifies the type of cell border to display. + + + + + No border. + + + + + Solid flat border. + + + + + Double border. + + + + + Raised border. + + + + + Inset border. + + + + + Groove border. + + + + + Fillet border. + + + + + Dotted border. + + + + + Specifies the direction of cell borders. + + + + + Draw cell borders in both directions. + + + + + Draw cell borders only in the horizontal direction. + + + + + Draw cell borders only in the vertical direction. + + + + + Contains flags that specify which style elements are defined in a object. + + + This enumeration can be used to inspect styles and determine which elements it defines, and it + can also be used to clear specific elements from the style. + Any elements not defined in the style are inherited from the parent style. + + + + + No elements are defined. + + + + + The style defines a font. + + + + + The style defines a background color. + + + + + The style defines a foreground color. + + + + + The style defines margins. + + + + + The style defines borders. + + + + + The style defines the text alignment. + + + + + The style defines a 3D effect for the text. + + + + + The style defines the image alignment. + + + + + The style defines the spacing between images and text. + + + + + The style defines how long strings are trimmed to fit within cells. + + + + + The style defines whether long strings are allowed to wrap within cells. + + + + + The style defines whether to display text and/or images, in the cells. + + + + + The style defines a format string used to convert data into strings. + + + + + The style defines an edit mask used to constrain values entered in the cells. + + + + + The style defines a list of choices used to populate drop down editors. + + + + + The style defines an used to associate cell data with images. + + + + + The style defines the of values contained in the cells. + + + + + The style defines an used to associate cell data with display values. + + + + + The style defines whether text should be rendered horizontally or vertically. + + + + + The style defines an external control to be used as an editor for the cells. + + + + + The style contains arbitrary user data (not used by the control). + + + + + The style specifies a background image. + + + + + The style specifies a background image alignment. + + + + + The style defines a background color of found text. + + + + + All style elements. + + + + + Collection of objects defined for a grid. + + + + + Gets the default style used to paint scrollable cells. + + + + + Gets the style used to paint scrollable cells in alternate rows. + + + This style is empty by default, so all scrollable cells are rendered using the style. + + + + + Gets the style used to paint fixed cells. + + + + + Gets the style used to paint selected column headers. + + + + + Gets the style used to paint selected column headers. + + + + + Gets the style used to paint highlighted selected cells. + + + Use the property to determine whether cells should be + highlighted when the control does not have the focus. + Use the property to determine what types of selection + are allowed. + + + + + Gets the style used to paint the current cell when the control has focus. + + + This style is empty by default, so focused cells are rendered using the style. + + + + + Gets the style used to paint the cell being edited. + + + This style is empty by default, so cells being edited are rendered using the style. + + + + + Gets the style used to paint the cell selected while auto-searching. + + + Use the property to enable auto-searching. + + + + + Gets the style used to paint frozen cells (frozen cells are editable and selectable, but not scrollable). + + + + + Gets the style used to paint frozen cells (frozen cells are editable and selectable, but not scrollable) in alternate rows. + + + This style is empty by default, so frozen cells are rendered using the style. + + + + + Gets the style used to paint cells in the new row template at the bottom of the grid. + + + The new row template is only present when the property is set to true. + + + + + Gets the style used to paint the area of the grid below and to the right of all the cells. + + + Only the and elements of + this style are used. They define the appearance of the space between the last cell and the edges of + the control. + The value defines the color of the lines drawn around the + edge of the sheet and between frozen and scrollable cells. + + + + + Gets the style used to paint the column filter editors. + + + This style is only used if the grid's property + is set to true. + + + + + Gets a by index. + + + + + Gets a built-in by style type. + + + + + Gets a by name. + + + If the specified name doesn't exist, this indexer returns null. + + + + + Gets the number of objects in the collection. + + + + + Adds a new object to the collection. + + Name of the new style. + Base style, used to initialize the properties of the new style. + The new object. + + If a style with the given name already exists, the existing style is returned and no + exception is thrown. + + + + + Adds new object to the collection. + + Name of the new style. + Name of the base style, used to initialize the properties of the new style. + The new object. + + + + Adds a new empty object to the collection. + + Name of the new style. + The new object. + + + + Removes a custom style from the collection. + + Index of the style to be removed. + + Built-in styles can't be removed. + + + + + Removes a custom style from the collection. + + Name of the style to be removed. + + Built-in styles can't be removed. + + + + + Removes a custom style from the collection. + + Style to be removed from the collection. + + Built-in styles can't be removed. + + + + + Clear all styles (even those in use) and reset the built-in styles. + + + The Clear method also removes any custom styles assigned to rows, columns, + and cells. + + + + + Clear all unused styles. + + + Unused styles are unnamed styles that were created and are no longer assigned to + any grid elements. + + + + + Checks whether the collection contains a given style. + + Name of the style to look for. + True if the collection contains a style called , false otherwise. + + + + Gets the index of a style in the collection. + + Style object to look for. + Index of the style in the collection, or -1 if the style is not a member of the collection. + + + + Builds and returns a compact string representation of the style collection. + + Whether styles with no attributes should be included. + A compact string representation of the style collection. + + This method is used internally to implement design-time persistence. + It can also be used for implementing 'skins', by saving the current styles into + a collection and later applying them to the grid using the method. + + + + + Parses a string containing style definitions. + + String containing style definitions. + True if the string was parsed successfully, false otherwise. + + The style definition string is usually obtained from a call to method. + The new definitions are merged with the current ones. To completely replace the styles, + call the method before parsing the new styles. + + + + + The class encapsulates properties that control the appearance of grid cells. + This information includes the background and foreground colors, font, text and image alignment, etc. + + + The property exposes a collection of grid styles, and has + methods for creating and removing styles from the grid. + You can create and define styles at design time, but right-clicking the grid and selecting the + "Edit Styles" menu option. + Styles follow a hierarchical model similar to styles in Microsoft Word or in cascading style sheets. + Every property in a object may be left unassigned, in which case the value is + inherited from a parent style. The parent style is usually the built-in + style. + To determine which elements are defined in a particular style, use the + property. + When you modify the properties of a object, all cells that use that style + are automatically repainted to reflect the changes. + Styles may be assigned to , , and + objects, as shown in the example below. + + + The example below creates three objects and assigns them to grid rows, columns, + and cell ranges. + + // create style with red background + CellStyle cs = _flex.Styles.Add("red"); + Style.BackColor = Color.Red; + + // create style with green background + cs = _flex.Styles.Add("green"); + Style.BackColor = Color.Green; + + // create style with bold font + cs = _flex.Styles.Add("bold"); + Style.Font = new Font("Tahoma", 8, FontStyle.Bold); + + // assign red style to a column + _flex.Cols[3].Style = _flex.Styles["red"]; + + // assign green style to a row + _flex.Rows[3].Style = _flex.Styles["green"]; + + // assign bold style to a cell range + CellRange rg = _flex.GetCellRange(2, 2, 4, 4); + rg.Style = _flex.Styles["bold"]; + After running this code, the third column of the grid will be painted with a red background. The + third row will be painted with a green background. The cell at the intersection will be painted + in red, because column styles have priority over row styles. The remaining style elements for these + cells (font, alignment, etc) are not defined in the new styles and are automatically inherited from + the parent style ().The cells around the intersection will have a bold font. The style that defines the bold font + does not specify a background color, so that element is inherited from the parent style, which may be + the "red", "green", or "normal" styles. + + + + Gets or sets the style name. + + + Style names must be unique. Setting a style name to the name of an already existing + style will throw an exception. + Style names must have one or more characters and may not include curly braces ('{' and '}'). + + + + + Gets or sets the color used to paint the cell background. + + + + + Gets or sets the color of the text in the cell. + + + + + Gets or sets the color of the text in the cell. + + + + + Gets or sets the font used to paint text in the cell. + + + Setting the control's Font property automatically sets the Font + property of the Normal style. + + + + Gets or sets the margins between the edges of the cell and its contents, in pixels. + + + + + Gets or sets whether long strings should automatically wrap within the cell. + + + This property determines whether the grid should automatically break + long strings that contain spaces and display them in multiple lines. + String that contain hard line breaks (vbCrLf or "\n\r") are always + displayed in multiple lines. + + + + + Gets or sets how long strings are trimmed to fit the cell. + + + + + Gets or sets the text alignment. + + + + + Gets or sets the 3D effect used to paint text. + + + + + Gets or sets the text direction. + + + Cells containing vertical text can wrap and be auto sized as usual. + + + + + Gets or sets the image alignment. + + + + + Gets or sets the space between images and text in a cell, in pixels. + + + + + Gets or sets whether to show images, text, or both. + + + + + Gets or sets the format string used to display values. + + + + + Gets or sets the mask string used to edit values. + + + + + Gets or sets a pipe-delimited list of valid values. + + + If the cell is editable, this list of values is used to populate the drop-down + used to edit the cell. + If the list starts with a pipe character, then the list is not exclusive and the + user may type values that are not on the list. + If the list contains three periods ("..."), then a button is displayed in the + cell. When the user presses the button, the grid fires the + event. + If the list contains a pipe followed by three periods ("|..."), then a button is + displayed in the cell as before, and the user may also type into the cell. + See also the property for an alternate way of specifying + valid values for a cell. + + + + + Gets or sets an used to associate cell values with images. + + + + + Gets or sets an used to associate cell values with display values. + + + If the cell is editable, this list of values is used to populate the drop-down + used to edit the cell. In this case, the order of the items in the + combo list is determined by the order of the elements in the dictionary. + The most common dictionary class, , uses arbitrary order. + If you want control over the item order, use a different dictionary class such as + . + The C1FlexGrid assembly also includes a class, + which can be used to create multi-column and data-bound dictionaries. + + + + + Gets or sets the data type for the style. + + + When the grid is bound to a data source, this property is set automatically based on the + data schema. + This property is used to coerce values assigned to cells into the proper type. + + + + + Gets the CellBorder object associated with this style. + + + + + Gets or sets the custom editor used to edit cells that have this style. + + + The grid provides several built-in editors that are automatically + selected based on the properties of the cell being edited. + This property allows you to use external editors when editing values + that have a given . Any control can be used as an + external editor, but to achieve complete integration with the grid, the + external editor should implement the interface. + For details, see the property. + + + + + Gets or sets arbitrary user data associated with this style. + + + This data is not used by the control, and can be used to store any data that is + useful to the application. + + + + + Gets or sets the style's background image. + + + This property works with to determine + whether and how background images are rendered in cells. + + + + + Gets or sets the a value that determines how the style will scale and + position background image. + + + This property works with to determine + whether and how background images are rendered in cells. + + + + + Gets or sets which elements are defined in this style. + + + Elements that are not defined in a particular style are automatically + inherited from the ancestor style (usually the Normal style). + For example, if you create a custom style that defines the + property, all other elements (back color, + alignment, and so on) are inherited from the ancestor style, which may + be the Normal style or another custom style assigned to a row or + column. + + + + + Clears selected elements from this style. + + + + + Clears all elements in this style. + + + + + Copies all elements defined in a source style to this style. + + + This method is used to create styles preserving existing style elements + such as or . + + + The code below changes a column so it looks like a fixed column, without + modifying the column's data type, alignment, etc. + + // create a new style + CellStyle cs = _flex.Styles.Add("newStyle"); + + // set data type, alignment + cs.DataType = typeof(int); + cs.TextAlign = TextAlignEnum.CenterCenter; + + // copy remaining elements from "Fixed" style + cs.MergeWith(_flex.Styles.Fixed); + + // assign new style to grid column + _flex.Cols[col].Style = cs; + + + + + Returns a compact string representation of this . + + A string containing the settings of all style elements defined in this CellStyle. + + This method is used to persist grid styles and can be used to define and save 'skins'. + See the and + methods. + The string returned contains definitions only for the style elements that are defined by this + . Elements inherited from other styles are not included. To build a string containing + specific elements, use the method instead. + + + The code below creates a style with a custom font and background color and builds a string that represents + the new style. Then it uses the string to initialize a second style. + + // create style with custom font and back color + CellStyle cs = _flex.Styles.Add("s1"); + cs.Font = new Font("Arial", 12, FontStyle.Bold); + cs.BackColor = Color.Beige; + + // save style definition into a string + string styleDef = cs.BuildString(); + + // use string to initialize another style + CellStyle csNew = _flex.Styles.Add("s2"); + csNew.ParseString(styleDef); + + // compare styles + Debug.Assert(csNew.Font.Equals(cs.Font)); + Debug.Assert(csNew.BackColor.Equals(cs.BackColor)); + + + + + Returns a string representation of this . + + + that specifies which style elements should be included in the string. + A string containing the settings of the specified style elements. + + This method is used to persist grid styles and can be used to define and save 'skins'. + See the and + methods. + + + The code below shows the effect of specifying different values for the parameter. It builds + one compact string containing only the elements actually defined in a style, and another including all style elements. + + // build compact and a long style definition strings + string s1 = _flex.Styles.Fixed.BuildString(); + string s2 = _flex.Styles.Fixed.BuildString(StyleElementFlags.All); + + // show both style definitions + Console.WriteLine("{0}: {1}", s1.Length, s1); + Console.WriteLine("{0}: {1}", s2.Length, s2); + + + + + Rebuilds this style based on a description contained in a string. + + True if the string was successfully parsed, false otherwise. + + This method is used to persist grid styles and can be used to define and save 'skins'. + See the and + methods. + + + + + Renders a string and an image into a object using this style. + + + object to render into. + Area where the element will be displayed. + Text to render. + Image to render. + Combination of that determines which elements will be rendered. + + This method allows using objects to render objects outside the grid. It can be + useful when implementing owner-drawn applications and style editors for example. + + + + + Renders a string and an image into a object using this style. + + + object to render into. + Area where the element will be displayed. + Text to render. + Image to render. + + + + Renders a string and an image into a object using this style. + + + object to render into. + Area where the element will be displayed. + Text to render. + + + + Renders a string and an image into a object using this style. + + + object to render into. + Area where the element will be displayed. + Image to render. + + + + Gets the element used for rendering + strings when the + property is set to true. + + + + + Gets the content portion of a cell's rectangle. + + Cell rectangle. + A rectangle that represents the content portion of a cell, discounting the + area taken up by the cell borders. + + + + Gets the text portion of a cell's rectangle. + + Cell rectangle. + Image that shares the cell space with the text. + A rectangle that represents the text portion of a cell, discounting the + area taken up by the cell borders, padding, and images. + + + + Gets the image portion of a cell's rectangle. + + Cell rectangle. + Image to be displayed on the cell. + A rectangle that represents the image portion of a cell, discounting the + area taken up by the cell borders and padding. + + + + Determines whether two objects are equal. + + Style to compare with this style. + True if the two styles are equal, false otherwise. + + + + Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table. + + A hash code for the style instance. + + + + The class encapsulates properties that control the appearance of borders in + objects. + + + + + Gets or sets the border style. + + + + + Gets or sets the border direction. + + + + + Gets or sets the border color (except for 3D borders). + + + 3D borders are always drawn using the system colors defined for highlights and shadows. + + + + + Gets or sets the border width (except for 3D borders). + + + 3D borders are always one or two pixels wide. + + + + + Specifies the appearance of the outline tree. + + + + + Do not show the outline tree. + + + + + Show tree lines next to node rows. + + + + + Show expand/collapse symbols on node rows. + + + + + Show outline buttons across the top fixed row. + + + + + Show tree lines next to all rows (nodes and data). + + + + + Combination of , , and + . + + + + + Combination of and . + + + + + Combination of , , + and . + + + + + Combination of , , and + . + + + + + The GridTree class encapsulates properties that specify the appearance, position, and behavior of the outline tree. + + + Each grid has a single GridTree object, which can be obtained using the property. + + + + + Resets the object. + + + + + Gets or sets the color of the lines in the outline tree. + + + See also the property. + + + + + Gets or sets the line style used to draw the outline tree. + + + By default, this property is set to DashStyle.Dot, which causes the tree + to be drawn with dotted lines. You can change the value of this property to draw the + tree using solid lines instead. + + + + + Gets or sets the style of the outline tree. + + + Use the Style property to determine whether the outline tree should include lines connecting + the nodes and buttons for collapsing and expanding the nodes. See the + enumeration for details. + Use the property to determine where the grid will show the outline tree. + + + + + Gets or sets the index of the column where the outline tree is displayed. + + By default, this property is set to -1, which causes the tree to be hidden. + + + + Gets or sets the indentation, in pixels, of each tree level. + + + If you set the Indent property to a value that is too narrow to fit the and + images, the grid will adjust it to fit the images. + + + + Gets or sets the image displayed next to collapsed nodes. + + + Setting this property to null resets it and causes the grid to use the default image (a plus sign). + To hide the images, use the property. + + + + + Gets or sets the image displayed next to expanded nodes. + + + Setting this property to null resets it and causes the grid to use the default image (a minus sign). + To hide the images, use the property. + + + + + If True then the collapse/expand button will not be displayed if all children of node are invisible. + + + + + Expands all nodes up to the specified level, collapses others. + + The level to show. Any nodes with higher than this + will be collapsed, others will be expanded. + + + + Gets the level of the deepest node in the outline. + + + This property can be used with methods that take an outline level as + a parameter (for example, and ). + + + + + Sorts all nodes at the given level. + + Level of the nodes to sort. + + value that controls sort direction and options. + Start of the range of columns to sort. + End of the range of columns to sort. + + The grid recognizes two types of row: regular rows which contain data, and node rows which are used + to group data. This method only sorts the row nodes; it does not reorder the data rows within each node. + To sort the data rows, use the grid's method instead. + + + + + Sorts all nodes at the given level using the specified comparer. + + Level of the nodes to sort. + An object that compares objects. + + + + Static class containing UI strings used by the designer. + + + + + StyleContext contains a base Style definition and a list of + named Styles. It provides the following services: + - Style management (create, edit, and remove Styles) + - Style inheritance mechanism + - Rendering and measuring methods + + + + + Style contains a collection of arbitrary attributes, + represented by a name/object entry, a reference to a parent + Style, and a reference to the containing StyleContext. + + + + + Specifies the type of border to be drawn around the control. + + + + + No border. + + + + + A single-line border. + + + + + A three-dimensional border. + + + + + A light sunken border. + + + + + A border drawn using XP themes. + + + + + Base class for controls that support auto-scrolling behavior. + + + This class is similar to , but provides + extra customization, better scroll notification, and support for scroll tracking. + + + + + Creates a new instance of a class. + + + + + Gets or sets which scroll bars should appear on the control. + + + Scroll bars are displayed only if the contents of the control extend beyond its + client area. For example, if is set to , + a horizontal scroll bar is displayed only if the control is not wide enough to display all + columns at once. + Even when it has no scrollbars, the control will still scroll to keep the selection visible. + If you want to prevent scrolling, handle the event and + set its parameter to true. + You can force the control to display scrollbars at all times with the + property. + You can determine which scrollbars are currently visible with the + property. + + + + + + + Gets or sets the location of the auto-scroll position. + + + Use the property to get or set the scroll position using pixel coordinates. + Use the and properties to get or + set the scroll position using cell coordinates. + + + This code binds two grids (_flexLeft and _flexRight) together and synchronizes their scrolling in the vertical + direction (the user can scroll the grids independently in the horizontal direction). + + // bind grids together + _flexRight.DataSource = _flexLeft; + _flexLeft.ScrollBars = ScrollBars.Horizontal; + + // synchronize vertical scrolling + // (this handles the AfterScroll event for both grids) + void flex_AfterScroll(object sender, C1.Win.C1FlexGrid.RangeEventArgs e) + { + // update sender grid (could be _flexLeft or _flexRight) + C1FlexGrid.C1FlexGrid src = ((C1FlexGrid)sender); + src.Update(); + + // get new vertical position from sender grid + int y = src.ScrollPosition.Y; + + // apply new vertical position to the other grid + if (src.Equals == _flexLeft) + { + _flexRight.ScrollPosition = new Point(_flexRight.ScrollPosition.X, y); + } + else + { + _flexLeft.ScrollPosition = new Point(_flexLeft.ScrollPosition.X, y); + } + } + + + + + Gets or sets the type of border around the control. + + + + + Gets a value that indicates which scrollbars are currently visible. + + + + + + + Maintains performance by preventing the control from updating itself until + the method is called. + + + + + Resumes updating the control after calls to the method. + + + + + Called when the control receives a WM_THEMECHANGED message. + + + The WM_THEMECHANGED message is broadcast to every window following a + theme change event. Examples of theme change events are the activation of a + theme, the deactivation of a theme, or a transition from one theme to another. + + + + + Called when the control receives a WM_IME_STARTCOMPOSITION message. + + + The WM_IME_STARTCOMPOSITION message is sent immediately before the IME generates + the composition string as a result of a keystroke. The message is a notification to + an IME window to open its composition window. An application should process this + message if it displays composition characters itself. + + + + + Called after the control scrolls (see the property). + + + value that indicates the scroll direction. + + + + Called before the controls displays a scroll tip. + + New value for the vertical scrollbar. + + + + Gets a rectangle that defines the scrollable portion of the control. + + + + + Builds a rectangle that defines the scrollable portion of the control for a given pair of scroll offsets. + + Horizontal scroll offset. + Vertical scroll offset. + A that defines the scrollable portion of the control. + + This method is for internal use. It allows derived classes to customize the control scrolling behavior. + + + + + Raises the event. + + A that contains the event data. + + + + Raises the event. + + An that contains the event data. + + + + Raises the event. + + A that contains the event data. + + + + Raises the event. + + An that contains the event data. + + + + Calculates the new position of a scrollbar in response to a user command. + + Scroll command (SB_LINEUP, etc). + True for the vertical scrollbar, false for the horizontal scrollbar. + Current scrollbar position. + Scrollbar thumb position. + The new position for the scrollbar. + + Derived classes may override this method to customize the scrolling behavior. + + + + + Specifies a visual style to use when rendering the control. + + + + + Do not use any visual styles. Render the control using the styles and properties only. + + + + + Render the control with an appearance based on the current system settings. + + + + + Render the control with an appearance based on the Office 2007 Blue color scheme. + + + + + Render the control with an appearance based on the Office 2007 Silver color scheme. + + + + + Render the control with an appearance based on the Office 2007 Black color scheme. + + + + + Render the control with an appearance based on the Office 2010 Blue color scheme. + + + + + Render the control with an appearance based on the Office 2010 Silver color scheme. + + + + + Render the control with an appearance based on the Office 2010 Black color scheme. + + + + + Represents an abstract base class for custom grid renderers. + + + To create custom grid renderers, inherit from this class, override the appropriate + virtual methods and properties, and assign an instance of your class to the grid's + property. + + + + + Represents the type of cell being rendered. + + + + + A normal scrollable cell. + + + + + The top left fixed cell. + + + + + A column header cell. + + + + + A selected column header cell. + + + + + A column header cell currently under the mouse. + + + + + A selected column header cell currently under the mouse. + + + + + A row header cell. + + + + + A selected row header cell. + + + + + A row header cell currently under the mouse. + + + + + A selected row header cell currently under the mouse. + + + + + A selected normal cell. + + + + + The cell that contains the cursor. + + + + + Initializes a new instance of a . + + + + + Gets a value that determines whether this renderer tracks the selection to paint + highlighted column and row headers. + + + + + Gets a value that determines whether this renderer renders hot cells + differently than normal cells. + + + Hot cells are cells currently under the mouse. If a renderer tracks the mouse, + then it will be called as the mouse moves over the grid. + + + + + Gets the foreground color of header cells in the normal state. + + + + + Draws a grid cell of any type. + + + that contains the cell being drawn. + + that provides information about the cell being drawn. + + This method determines the type of cell being drawn and then calls the + method passing the type of cell to be drawn. + + + + + Draws a single grid cell of a specific type. + + + that contains the cell being drawn. + + that provides information about the cell being drawn. + + value that determines the type of cell being drawn. + + + + Gets a object used to paint the cell background for a specific cell type. + + + that contains the cell being drawn. + + value that determines the type of cell being drawn. + A that represents the bounds of the cell being drawn. + A object used to render the cell background. + + The parameter can be used to create or select complex brushes such as + gradient or tiled image brushes. + + + + + Gets a object used to paint the cell borders. + + + value that determines the type of cell being drawn. + A object used to paint the cell borders. + + + + Represents the base abstract class for Office2007 style renderers. + + + The easiest way to create a new high-quality renderer is to derive from + this class and provide a constructor that initializes the 25 colors that + define the renderer. + + + + + Initializes a new instance of a . + + Background color for highlighted cells. + Color of the border around the top left fixed cell. + Color of the background for the top left fixed cell. + First color of the gradient background for the image in the top left fixed cell. + Second color of the gradient background for the image in the top left fixed cell. + First color of the gradient background for column headers. + Second color of the gradient background for column headers. + Color of the border around column headers. + First color of the gradient background for selected column headers. + Second color of the gradient background for selected column headers. + Color of the border around selected column headers. + First color of the gradient background for hot column headers. + Second color of the gradient background for hot column headers. + Color of the border around hot column headers. + First color of the gradient background for selected hot column headers. + Second color of the gradient background for selected hot column headers. + Color of the border around hot selected column headers. + Color of the background for row headers. + Color of the border around row headers. + Color of the background for selected row headers. + Color of the border around selected row headers. + Color of the background for hot row headers. + Color of the border around hot row headers. + Color of the background for hot selected row headers. + Color of the border around selected hot row headers. + + + + Initializes a new instance of a using + a specified color palette. + + Array with 25 colors to be used as a palette. + + + + Gets or sets the color used to paint the background of highlighted cells. + + + + + Gets a value that determines whether this renderer renders hot cells + differently than normal cells. + + + Hot cells are cells currently under the mouse. If a renderer tracks the mouse, + then it will be called as the mouse moves over the grid. + + + + + Gets a value that determines whether this renderer tracks the selection to paint + highlighted column and row headers. + + + + + Gets the background brush for a cell. + + + that contains the cell. + + value that describes the type of cell being rendered. + + that defines the cell bounds. + A used to paint the cell. + + + + Gets a pen used to paint the cell borders. + + + that describes the type of cell being rendered. + A used to paint the cell borders. + + + + Draws a single grid cell of a specific type. + + + that contains the cell being drawn. + + that provides information about the cell being drawn. + + value that determines the type of cell being drawn. + + + + that implements the Office2007 Blue visual style. + + + + + Initializes a new instance of a . + + + + + that implements the Office2007 Silver visual style. + + + + + Initializes a new instance of a . + + + + + that implements the Office2007 Black visual style. + + + + + Initializes a new instance of a . + + + + + that implements the Office2010 Blue visual style. + + + + + Initializes a new instance of a . + + + + + that implements the Office2010 Silver visual style. + + + + + Initializes a new instance of a . + + + + + that implements the Office2010 Black visual style. + + + + + Initializes a new instance of a . + + + + + Gets the foreground color of header cells in the normal state. + + + + + that implements the System visual style. + + + + + Gets a value that determines whether this renderer renders hot cells + differently than normal cells. + + + Hot cells are cells currently under the mouse. If a renderer tracks the mouse, + then it will be called as the mouse moves over the grid. + + + + + Gets a value that determines whether this renderer tracks the selection to paint + highlighted column and row headers. + + + + + Draws a single grid cell of a specific type. + + + that contains the cell being drawn. + + that provides information about the cell being drawn. + + value that determines the type of cell being drawn. + + + + Static class containing UI strings used by the designer. + + + + + Specifies the language to be used for localizing the control. + + + + + Localize the control to the language specified by the CurrentUICulture. + + + + + Localize the control to Arabic. + + + + + Localize the control to Czech. + + + + + Localize the control to Danish. + + + + + Localize the control to Dutch. + + + + + Localize the control to English. + + + + + Localize the control to Finnish. + + + + + Localize the control to French. + + + + + Localize the control to German. + + + + + Localize the control to Greek. + + + + + Localize the control to Hebrew. + + + + + Localize the control to Italian. + + + + + Localize the control to Japanese. + + + + + Localize the control to Norwegian. + + + + + Localize the control to Polish. + + + + + Localize the control to Portuguese. + + + + + Localize the control to Russian. + + + + + Localize the control to Slovak. + + + + + Localize the control to Spanish. + + + + + Localize the control to Swedish. + + + + + Localize the control to Chinese (simplified, PRC and Singapore). + + + + + Localize the control to Turkish. + + + + + Localize the control to Persian (Farsi). + + + + + Localize the control to Korean. + + + + + Localize the control to Chinese (traditional, Taiwan, Hong Kong, and Macao). + + + + + Localize the control to Hungarian. + + + + \ No newline at end of file diff --git a/PROMS/WORD ADD-INs/PXMLAddIn/PXMLAddIn/bin/Debug/Ionic.Zip.dll b/PROMS/WORD ADD-INs/PXMLAddIn/PXMLAddIn/bin/Debug/Ionic.Zip.dll new file mode 100644 index 00000000..1dc03384 Binary files /dev/null and b/PROMS/WORD ADD-INs/PXMLAddIn/PXMLAddIn/bin/Debug/Ionic.Zip.dll differ diff --git a/PROMS/WORD ADD-INs/PXMLAddIn/PXMLAddIn/bin/Debug/Microsoft.Office.Tools.Common.v4.0.Utilities.dll b/PROMS/WORD ADD-INs/PXMLAddIn/PXMLAddIn/bin/Debug/Microsoft.Office.Tools.Common.v4.0.Utilities.dll new file mode 100644 index 00000000..03a6ef84 Binary files /dev/null and b/PROMS/WORD ADD-INs/PXMLAddIn/PXMLAddIn/bin/Debug/Microsoft.Office.Tools.Common.v4.0.Utilities.dll differ diff --git a/PROMS/WORD ADD-INs/PXMLAddIn/PXMLAddIn/bin/Debug/PXMLAddIn.dll b/PROMS/WORD ADD-INs/PXMLAddIn/PXMLAddIn/bin/Debug/PXMLAddIn.dll new file mode 100644 index 00000000..867538f4 Binary files /dev/null and b/PROMS/WORD ADD-INs/PXMLAddIn/PXMLAddIn/bin/Debug/PXMLAddIn.dll differ diff --git a/PROMS/WORD ADD-INs/PXMLAddIn/PXMLAddIn/bin/Debug/PXMLAddIn.dll.manifest b/PROMS/WORD ADD-INs/PXMLAddIn/PXMLAddIn/bin/Debug/PXMLAddIn.dll.manifest new file mode 100644 index 00000000..25a9b2e8 --- /dev/null +++ b/PROMS/WORD ADD-INs/PXMLAddIn/PXMLAddIn/bin/Debug/PXMLAddIn.dll.manifest @@ -0,0 +1,215 @@ + + + + PXMLAddIn + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + pPo/i4gW6PsXcEe7T9XOkIdZBQUdihI/5HD5157RqQ4= + + + + + + + + + + + + F7sMm+RSiaK+VqX1po7JiR13kriG4AVLyG1X/oTQHIk= + + + + + + + + + + + + jLCTF8Mm6bD4PDN+rnzN6q0+ReXaNgPh68kMWgatFwI= + + + + + + + + + + + + UfNCd+Ugej3gfa1m7l6Ww79oPpZSgljF3pw9vb5bhEE= + + + + + + + + + + + + + + + + + + + PXMLAddIn + PXMLAddIn + + + + + + +Nhlgup7Dh6SdQt2vkQlwsFevFZPutOx5zfwKf5xUFk8=WEilCD2qLaURNHfAVlHuHFjUSloA8awPrlRZnWT6LzhGtrwTDehy/YDnSKXtzxPCxmPoNnjIlATBeCHMGNv51GqPg7rj8+8DmH5+gRHLiKLchXOiFkiwWqcUut1SkgMsmP4rqwyborLjbg+uD1C9xyBNr4QOVChMwnOU4m4ke8A=1VYtkFvJh4LNgUqof6a1wBEpWB3gL9ExzZDRuBZko5CJS/J9VW/OMxutyMDin8lvef8UeEaYItk8UGmuWNUCSRj0HbO1XdJtNUFy0QC4HplKZ6dXcj2uK4KtrHL80dZQX9aNHhacq4fuZUdLEjqX+dp88ITfdRuyUL0DqMyfU/E=AQABCN=VLN\JeffY+bg/aMVWNGmL1I+zCJ3oKOzJvBye2xHTIlgOoqjmhU=x/Uh+Yel1aAwYyJ/vFDoJlv+t3kbcViDnbKiKOodhgDx0d/00F85/dI1yYJ8hiAI/RwWLI1xOL7pxHx1asbTbli3Qs+idzgA0WrqBbxFA4LQiHTYLRy3Iw0cUtv96F0m94BpQYlfTKnhCDzNjqzvRoy/jHJ9+HUpxhG9EDrMnj0=1VYtkFvJh4LNgUqof6a1wBEpWB3gL9ExzZDRuBZko5CJS/J9VW/OMxutyMDin8lvef8UeEaYItk8UGmuWNUCSRj0HbO1XdJtNUFy0QC4HplKZ6dXcj2uK4KtrHL80dZQX9aNHhacq4fuZUdLEjqX+dp88ITfdRuyUL0DqMyfU/E=AQABMIIBuTCCASKgAwIBAgIQF8ktG8KZs6xBtdrISQWuUjANBgkqhkiG9w0BAQsFADAbMRkwFwYDVQQDHhAAVgBMAE4AXABKAGUAZgBmMB4XDTIxMDMyOTE5MzcxMVoXDTIyMDMzMDAxMzcxMVowGzEZMBcGA1UEAx4QAFYATABOAFwASgBlAGYAZjCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA1VYtkFvJh4LNgUqof6a1wBEpWB3gL9ExzZDRuBZko5CJS/J9VW/OMxutyMDin8lvef8UeEaYItk8UGmuWNUCSRj0HbO1XdJtNUFy0QC4HplKZ6dXcj2uK4KtrHL80dZQX9aNHhacq4fuZUdLEjqX+dp88ITfdRuyUL0DqMyfU/ECAwEAATANBgkqhkiG9w0BAQsFAAOBgQBg8LhmNDNbi8PNUw/BMY9gbyc4KqhjCu5AcbgIFm6xlEqz8FMp7f0KNfK9Icuw6i4DesWuf/G155QXCxvkOtp0jPXbP84l9D/rccIoFhezBh//2YSPodtL/VF5cM17w+zxkr0RUZiqsbPnMP/qLeM5uRrUxfBqsF+Jp8BkmB4e4g== \ No newline at end of file diff --git a/PROMS/WORD ADD-INs/PXMLAddIn/PXMLAddIn/bin/Debug/PXMLAddIn.pdb b/PROMS/WORD ADD-INs/PXMLAddIn/PXMLAddIn/bin/Debug/PXMLAddIn.pdb new file mode 100644 index 00000000..1b55e7ef Binary files /dev/null and b/PROMS/WORD ADD-INs/PXMLAddIn/PXMLAddIn/bin/Debug/PXMLAddIn.pdb differ diff --git a/PROMS/WORD ADD-INs/PXMLAddIn/PXMLAddIn/bin/Debug/PXMLAddIn.vsto b/PROMS/WORD ADD-INs/PXMLAddIn/PXMLAddIn/bin/Debug/PXMLAddIn.vsto new file mode 100644 index 00000000..7892be7f --- /dev/null +++ b/PROMS/WORD ADD-INs/PXMLAddIn/PXMLAddIn/bin/Debug/PXMLAddIn.vsto @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + 2LhO+clGQ6tvf9w/EUPveUotvbee1UbM14HYIw1tcjc= + + + +cpjmfLOJuDVUSABf0HEaFnt12GA5vQC/cUOrURqG9xg=TSUG4FWBLw+WHw5SYtyEQ1F5HSpArMuuZABSCRbmTHQcOedIE31FBMBSKzEYSYL7t+JaXffvEI7atVWrIp+GYrWSO3hyENhT7CQinfqZcJA8LVIwzfrbKBZ0Ti6myPpqe3hNgz26dfZBq4sTj3oWcWdnmsPxrZcajZuPO4IcWHg=1VYtkFvJh4LNgUqof6a1wBEpWB3gL9ExzZDRuBZko5CJS/J9VW/OMxutyMDin8lvef8UeEaYItk8UGmuWNUCSRj0HbO1XdJtNUFy0QC4HplKZ6dXcj2uK4KtrHL80dZQX9aNHhacq4fuZUdLEjqX+dp88ITfdRuyUL0DqMyfU/E=AQABCN=VLN\Jeffb9wjVpWrJLtBvEVFZozXPiyj48sbyIq94Cr36JzYO4M=beDtX15Vcy4yHRkwdq64glQPhEF9Zid0vaaOOzKpU1dkU7v0FDyHJKUCt0HO6jcqy1vGQmTA7BfXA0ldq4OGLljyrRgadZfJSFnSvwPkUgxRTHI4dUREt378A4AXKo3cDzk0RIvOrldJRUaaI/Ej8zvQw2WyJLvvhsNo9X+5hvU=1VYtkFvJh4LNgUqof6a1wBEpWB3gL9ExzZDRuBZko5CJS/J9VW/OMxutyMDin8lvef8UeEaYItk8UGmuWNUCSRj0HbO1XdJtNUFy0QC4HplKZ6dXcj2uK4KtrHL80dZQX9aNHhacq4fuZUdLEjqX+dp88ITfdRuyUL0DqMyfU/E=AQABMIIBuTCCASKgAwIBAgIQF8ktG8KZs6xBtdrISQWuUjANBgkqhkiG9w0BAQsFADAbMRkwFwYDVQQDHhAAVgBMAE4AXABKAGUAZgBmMB4XDTIxMDMyOTE5MzcxMVoXDTIyMDMzMDAxMzcxMVowGzEZMBcGA1UEAx4QAFYATABOAFwASgBlAGYAZjCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA1VYtkFvJh4LNgUqof6a1wBEpWB3gL9ExzZDRuBZko5CJS/J9VW/OMxutyMDin8lvef8UeEaYItk8UGmuWNUCSRj0HbO1XdJtNUFy0QC4HplKZ6dXcj2uK4KtrHL80dZQX9aNHhacq4fuZUdLEjqX+dp88ITfdRuyUL0DqMyfU/ECAwEAATANBgkqhkiG9w0BAQsFAAOBgQBg8LhmNDNbi8PNUw/BMY9gbyc4KqhjCu5AcbgIFm6xlEqz8FMp7f0KNfK9Icuw6i4DesWuf/G155QXCxvkOtp0jPXbP84l9D/rccIoFhezBh//2YSPodtL/VF5cM17w+zxkr0RUZiqsbPnMP/qLeM5uRrUxfBqsF+Jp8BkmB4e4g== \ No newline at end of file diff --git a/PROMS/WORD ADD-INs/PXMLAddIn/PXMLAddIn/obj/Debug/.NETFramework,Version=v4.7.2.AssemblyAttributes.cs b/PROMS/WORD ADD-INs/PXMLAddIn/PXMLAddIn/obj/Debug/.NETFramework,Version=v4.7.2.AssemblyAttributes.cs new file mode 100644 index 00000000..3871b184 --- /dev/null +++ b/PROMS/WORD ADD-INs/PXMLAddIn/PXMLAddIn/obj/Debug/.NETFramework,Version=v4.7.2.AssemblyAttributes.cs @@ -0,0 +1,4 @@ +// +using System; +using System.Reflection; +[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")] diff --git a/PROMS/WORD ADD-INs/PXMLAddIn/PXMLAddIn/obj/Debug/DesignTimeResolveAssemblyReferences.cache b/PROMS/WORD ADD-INs/PXMLAddIn/PXMLAddIn/obj/Debug/DesignTimeResolveAssemblyReferences.cache new file mode 100644 index 00000000..32472c00 Binary files /dev/null and b/PROMS/WORD ADD-INs/PXMLAddIn/PXMLAddIn/obj/Debug/DesignTimeResolveAssemblyReferences.cache differ diff --git a/PROMS/WORD ADD-INs/PXMLAddIn/PXMLAddIn/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/PROMS/WORD ADD-INs/PXMLAddIn/PXMLAddIn/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache new file mode 100644 index 00000000..73ae6bcb Binary files /dev/null and b/PROMS/WORD ADD-INs/PXMLAddIn/PXMLAddIn/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/PROMS/WORD ADD-INs/PXMLAddIn/PXMLAddIn/obj/Debug/PXMLAddIn.Form1.resources b/PROMS/WORD ADD-INs/PXMLAddIn/PXMLAddIn/obj/Debug/PXMLAddIn.Form1.resources new file mode 100644 index 00000000..6c05a977 Binary files /dev/null and b/PROMS/WORD ADD-INs/PXMLAddIn/PXMLAddIn/obj/Debug/PXMLAddIn.Form1.resources differ diff --git a/PROMS/WORD ADD-INs/PXMLAddIn/PXMLAddIn/obj/Debug/PXMLAddIn.Properties.Resources.resources b/PROMS/WORD ADD-INs/PXMLAddIn/PXMLAddIn/obj/Debug/PXMLAddIn.Properties.Resources.resources new file mode 100644 index 00000000..6c05a977 Binary files /dev/null and b/PROMS/WORD ADD-INs/PXMLAddIn/PXMLAddIn/obj/Debug/PXMLAddIn.Properties.Resources.resources differ diff --git a/PROMS/WORD ADD-INs/PXMLAddIn/PXMLAddIn/obj/Debug/PXMLAddIn.csproj.CopyComplete b/PROMS/WORD ADD-INs/PXMLAddIn/PXMLAddIn/obj/Debug/PXMLAddIn.csproj.CopyComplete new file mode 100644 index 00000000..e69de29b diff --git a/PROMS/WORD ADD-INs/PXMLAddIn/PXMLAddIn/obj/Debug/PXMLAddIn.csproj.CoreCompileInputs.cache b/PROMS/WORD ADD-INs/PXMLAddIn/PXMLAddIn/obj/Debug/PXMLAddIn.csproj.CoreCompileInputs.cache new file mode 100644 index 00000000..177da882 --- /dev/null +++ b/PROMS/WORD ADD-INs/PXMLAddIn/PXMLAddIn/obj/Debug/PXMLAddIn.csproj.CoreCompileInputs.cache @@ -0,0 +1 @@ +a43c739803a12959a666060decc3eb0f9ff5bb15 diff --git a/PROMS/WORD ADD-INs/PXMLAddIn/PXMLAddIn/obj/Debug/PXMLAddIn.csproj.FileListAbsolute.txt b/PROMS/WORD ADD-INs/PXMLAddIn/PXMLAddIn/obj/Debug/PXMLAddIn.csproj.FileListAbsolute.txt new file mode 100644 index 00000000..faaec5a5 --- /dev/null +++ b/PROMS/WORD ADD-INs/PXMLAddIn/PXMLAddIn/obj/Debug/PXMLAddIn.csproj.FileListAbsolute.txt @@ -0,0 +1,16 @@ +C:\Users\Jeff.VLN\source\repos\PXMLAddIn\PXMLAddIn\obj\Debug\PXMLAddIn.Properties.Resources.resources +C:\Users\Jeff.VLN\source\repos\PXMLAddIn\PXMLAddIn\obj\Debug\PXMLAddIn.csproj.GenerateResource.cache +C:\Users\Jeff.VLN\source\repos\PXMLAddIn\PXMLAddIn\obj\Debug\PXMLAddIn.csproj.CoreCompileInputs.cache +C:\Users\Jeff.VLN\source\repos\PXMLAddIn\PXMLAddIn\bin\Debug\PXMLAddIn.dll +C:\Users\Jeff.VLN\source\repos\PXMLAddIn\PXMLAddIn\bin\Debug\PXMLAddIn.pdb +C:\Users\Jeff.VLN\source\repos\PXMLAddIn\PXMLAddIn\bin\Debug\PXMLAddIn.dll.manifest +C:\Users\Jeff.VLN\source\repos\PXMLAddIn\PXMLAddIn\bin\Debug\PXMLAddIn.vsto +C:\Users\Jeff.VLN\source\repos\PXMLAddIn\PXMLAddIn\bin\Debug\Microsoft.Office.Tools.Common.v4.0.Utilities.dll +C:\Users\Jeff.VLN\source\repos\PXMLAddIn\PXMLAddIn\obj\Debug\PXMLAddIn.csproj.CopyComplete +C:\Users\Jeff.VLN\source\repos\PXMLAddIn\PXMLAddIn\obj\Debug\PXMLAddIn.dll +C:\Users\Jeff.VLN\source\repos\PXMLAddIn\PXMLAddIn\obj\Debug\PXMLAddIn.pdb +C:\Users\Jeff.VLN\source\repos\PXMLAddIn\PXMLAddIn\bin\Debug\C1.Win.C1FlexGrid.2.dll +C:\Users\Jeff.VLN\source\repos\PXMLAddIn\PXMLAddIn\bin\Debug\C1.Win.C1FlexGrid.2.xml +C:\Users\Jeff.VLN\source\repos\PXMLAddIn\PXMLAddIn\obj\Debug\PXMLAddIn.Form1.resources +C:\Users\Jeff.VLN\source\repos\PXMLAddIn\PXMLAddIn\obj\Debug\PXMLAddIn.dll.licenses +C:\Users\Jeff.VLN\source\repos\PXMLAddIn\PXMLAddIn\bin\Debug\Ionic.Zip.dll diff --git a/PROMS/WORD ADD-INs/PXMLAddIn/PXMLAddIn/obj/Debug/PXMLAddIn.csproj.GenerateResource.cache b/PROMS/WORD ADD-INs/PXMLAddIn/PXMLAddIn/obj/Debug/PXMLAddIn.csproj.GenerateResource.cache new file mode 100644 index 00000000..43ca777b Binary files /dev/null and b/PROMS/WORD ADD-INs/PXMLAddIn/PXMLAddIn/obj/Debug/PXMLAddIn.csproj.GenerateResource.cache differ diff --git a/PROMS/WORD ADD-INs/PXMLAddIn/PXMLAddIn/obj/Debug/PXMLAddIn.dll b/PROMS/WORD ADD-INs/PXMLAddIn/PXMLAddIn/obj/Debug/PXMLAddIn.dll new file mode 100644 index 00000000..867538f4 Binary files /dev/null and b/PROMS/WORD ADD-INs/PXMLAddIn/PXMLAddIn/obj/Debug/PXMLAddIn.dll differ diff --git a/PROMS/WORD ADD-INs/PXMLAddIn/PXMLAddIn/obj/Debug/PXMLAddIn.pdb b/PROMS/WORD ADD-INs/PXMLAddIn/PXMLAddIn/obj/Debug/PXMLAddIn.pdb new file mode 100644 index 00000000..1b55e7ef Binary files /dev/null and b/PROMS/WORD ADD-INs/PXMLAddIn/PXMLAddIn/obj/Debug/PXMLAddIn.pdb differ diff --git a/PROMS/WORD ADD-INs/PXMLAddIn/PXMLAddIn/obj/Debug/pxmladdin.dll.licenses b/PROMS/WORD ADD-INs/PXMLAddIn/PXMLAddIn/obj/Debug/pxmladdin.dll.licenses new file mode 100644 index 00000000..2c5003f3 Binary files /dev/null and b/PROMS/WORD ADD-INs/PXMLAddIn/PXMLAddIn/obj/Debug/pxmladdin.dll.licenses differ diff --git a/PROMS/WORD ADD-INs/PXMLAddIn/PXMLAddIn/publish/Application Files/PXMLAddIn_1_0_0_0/C1.Win.C1FlexGrid.2.dll.deploy b/PROMS/WORD ADD-INs/PXMLAddIn/PXMLAddIn/publish/Application Files/PXMLAddIn_1_0_0_0/C1.Win.C1FlexGrid.2.dll.deploy new file mode 100644 index 00000000..5283754f Binary files /dev/null and b/PROMS/WORD ADD-INs/PXMLAddIn/PXMLAddIn/publish/Application Files/PXMLAddIn_1_0_0_0/C1.Win.C1FlexGrid.2.dll.deploy differ diff --git a/PROMS/WORD ADD-INs/PXMLAddIn/PXMLAddIn/publish/Application Files/PXMLAddIn_1_0_0_0/Microsoft.Office.Tools.Common.v4.0.Utilities.dll.deploy b/PROMS/WORD ADD-INs/PXMLAddIn/PXMLAddIn/publish/Application Files/PXMLAddIn_1_0_0_0/Microsoft.Office.Tools.Common.v4.0.Utilities.dll.deploy new file mode 100644 index 00000000..03a6ef84 Binary files /dev/null and b/PROMS/WORD ADD-INs/PXMLAddIn/PXMLAddIn/publish/Application Files/PXMLAddIn_1_0_0_0/Microsoft.Office.Tools.Common.v4.0.Utilities.dll.deploy differ diff --git a/PROMS/WORD ADD-INs/PXMLAddIn/PXMLAddIn/publish/Application Files/PXMLAddIn_1_0_0_0/PXMLAddIn.dll.deploy b/PROMS/WORD ADD-INs/PXMLAddIn/PXMLAddIn/publish/Application Files/PXMLAddIn_1_0_0_0/PXMLAddIn.dll.deploy new file mode 100644 index 00000000..5bbda0e8 Binary files /dev/null and b/PROMS/WORD ADD-INs/PXMLAddIn/PXMLAddIn/publish/Application Files/PXMLAddIn_1_0_0_0/PXMLAddIn.dll.deploy differ diff --git a/PROMS/WORD ADD-INs/PXMLAddIn/PXMLAddIn/publish/Application Files/PXMLAddIn_1_0_0_0/PXMLAddIn.dll.manifest b/PROMS/WORD ADD-INs/PXMLAddIn/PXMLAddIn/publish/Application Files/PXMLAddIn_1_0_0_0/PXMLAddIn.dll.manifest new file mode 100644 index 00000000..80f45f7f --- /dev/null +++ b/PROMS/WORD ADD-INs/PXMLAddIn/PXMLAddIn/publish/Application Files/PXMLAddIn_1_0_0_0/PXMLAddIn.dll.manifest @@ -0,0 +1,203 @@ + + + + PXMLAddIn + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + pPo/i4gW6PsXcEe7T9XOkIdZBQUdihI/5HD5157RqQ4= + + + + + + + + + + + + jLCTF8Mm6bD4PDN+rnzN6q0+ReXaNgPh68kMWgatFwI= + + + + + + + + + + + + LbvMaYUKt9dpSpKOgbXmQq/NoBetO7UrHzwDxz7MTNc= + + + + + + + + + + + + + + + + + + + PXMLAddIn + PXMLAddIn + + + + + + +EGFxcYO8hluGyNbqMjfOA5/69tOmjrGHGrNNA3kaLvw=gTlbvNdhhKDro7Ld+/z4eGu3hYpwol/nCnkWrTBf3i4ynGzSCGiN66X56LXv2brgCokgx9AURPQP37Bk4M/qxoWQZVKuZ/FWSg87ojdRMONxExWXSsDWQPV7jVuN2/FHXeYaBP2QjWB70ePrK0RuZ5uN8XZPShUbzy0swZW0aC8=1VYtkFvJh4LNgUqof6a1wBEpWB3gL9ExzZDRuBZko5CJS/J9VW/OMxutyMDin8lvef8UeEaYItk8UGmuWNUCSRj0HbO1XdJtNUFy0QC4HplKZ6dXcj2uK4KtrHL80dZQX9aNHhacq4fuZUdLEjqX+dp88ITfdRuyUL0DqMyfU/E=AQABCN=VLN\Jeffapzco6xn/AE0S2eO4tPVwtzPbQe4psrO2U1a9ukyrnM=mLq7cO1/fV62XFpz12oueCQMMU9qrkff0VEtDcjjjg3+RTAAvBSqD1ivZKAKhi/bYzcZTMniNbF+wuLOvKaCd5Y6paAPnpzJIYXoh6ocz5ZkjfiJ7w9Y6xGZSvIFTtzpf82IyN6HfZJ5eTudD9KZ+rZ8Pk20lJdtpxRlEJK21uQ=1VYtkFvJh4LNgUqof6a1wBEpWB3gL9ExzZDRuBZko5CJS/J9VW/OMxutyMDin8lvef8UeEaYItk8UGmuWNUCSRj0HbO1XdJtNUFy0QC4HplKZ6dXcj2uK4KtrHL80dZQX9aNHhacq4fuZUdLEjqX+dp88ITfdRuyUL0DqMyfU/E=AQABMIIBuTCCASKgAwIBAgIQF8ktG8KZs6xBtdrISQWuUjANBgkqhkiG9w0BAQsFADAbMRkwFwYDVQQDHhAAVgBMAE4AXABKAGUAZgBmMB4XDTIxMDMyOTE5MzcxMVoXDTIyMDMzMDAxMzcxMVowGzEZMBcGA1UEAx4QAFYATABOAFwASgBlAGYAZjCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA1VYtkFvJh4LNgUqof6a1wBEpWB3gL9ExzZDRuBZko5CJS/J9VW/OMxutyMDin8lvef8UeEaYItk8UGmuWNUCSRj0HbO1XdJtNUFy0QC4HplKZ6dXcj2uK4KtrHL80dZQX9aNHhacq4fuZUdLEjqX+dp88ITfdRuyUL0DqMyfU/ECAwEAATANBgkqhkiG9w0BAQsFAAOBgQBg8LhmNDNbi8PNUw/BMY9gbyc4KqhjCu5AcbgIFm6xlEqz8FMp7f0KNfK9Icuw6i4DesWuf/G155QXCxvkOtp0jPXbP84l9D/rccIoFhezBh//2YSPodtL/VF5cM17w+zxkr0RUZiqsbPnMP/qLeM5uRrUxfBqsF+Jp8BkmB4e4g== \ No newline at end of file diff --git a/PROMS/WORD ADD-INs/PXMLAddIn/PXMLAddIn/publish/Application Files/PXMLAddIn_1_0_0_0/PXMLAddIn.vsto b/PROMS/WORD ADD-INs/PXMLAddIn/PXMLAddIn/publish/Application Files/PXMLAddIn_1_0_0_0/PXMLAddIn.vsto new file mode 100644 index 00000000..506b5f08 --- /dev/null +++ b/PROMS/WORD ADD-INs/PXMLAddIn/PXMLAddIn/publish/Application Files/PXMLAddIn_1_0_0_0/PXMLAddIn.vsto @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + th4/ucY68THr4LcheSPOyFpECz6e6gz7ShcJKu5giHY= + + + +Pi7V5RPHi7f+Zdw4W8ncHXYCGy89f6pHu66XLg48MPI=BB5hr5rMlbGxPj1BZx5AEto4udx/wLg7cNY4vRedLjM8iH6yibgXiXop+m2yCezELWW2CNWhCuAoyyYUYWWc/jfRwWTAmavYMlBO9mUTKJXXw8gpmGt9ac2ppCw2tcR6OWaYxgkLjFnBJXT6DK1Tz0oHKBKJ7GOS8//AqLjkYXo=1VYtkFvJh4LNgUqof6a1wBEpWB3gL9ExzZDRuBZko5CJS/J9VW/OMxutyMDin8lvef8UeEaYItk8UGmuWNUCSRj0HbO1XdJtNUFy0QC4HplKZ6dXcj2uK4KtrHL80dZQX9aNHhacq4fuZUdLEjqX+dp88ITfdRuyUL0DqMyfU/E=AQABCN=VLN\Jeff2juU1utcMQ+/Lw91mHcxzMINDpPM4iy2ERRWrwbWw5k=nQR4UZUvVY3YntgD4XVreYa2gcfti2YFfZL9IgI/R75syyJc+MFFV2d1UzYt1WTlnjQupVCq20w/7cSjU7YQPGl6uVZyun9ThwVkQd0zg+WqSlcfWBL8D1hlt82gGAEFk3Mkr8wa+yqr6gk5slfzM+ZAGC20k22JvU8zmh1zI+c=1VYtkFvJh4LNgUqof6a1wBEpWB3gL9ExzZDRuBZko5CJS/J9VW/OMxutyMDin8lvef8UeEaYItk8UGmuWNUCSRj0HbO1XdJtNUFy0QC4HplKZ6dXcj2uK4KtrHL80dZQX9aNHhacq4fuZUdLEjqX+dp88ITfdRuyUL0DqMyfU/E=AQABMIIBuTCCASKgAwIBAgIQF8ktG8KZs6xBtdrISQWuUjANBgkqhkiG9w0BAQsFADAbMRkwFwYDVQQDHhAAVgBMAE4AXABKAGUAZgBmMB4XDTIxMDMyOTE5MzcxMVoXDTIyMDMzMDAxMzcxMVowGzEZMBcGA1UEAx4QAFYATABOAFwASgBlAGYAZjCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA1VYtkFvJh4LNgUqof6a1wBEpWB3gL9ExzZDRuBZko5CJS/J9VW/OMxutyMDin8lvef8UeEaYItk8UGmuWNUCSRj0HbO1XdJtNUFy0QC4HplKZ6dXcj2uK4KtrHL80dZQX9aNHhacq4fuZUdLEjqX+dp88ITfdRuyUL0DqMyfU/ECAwEAATANBgkqhkiG9w0BAQsFAAOBgQBg8LhmNDNbi8PNUw/BMY9gbyc4KqhjCu5AcbgIFm6xlEqz8FMp7f0KNfK9Icuw6i4DesWuf/G155QXCxvkOtp0jPXbP84l9D/rccIoFhezBh//2YSPodtL/VF5cM17w+zxkr0RUZiqsbPnMP/qLeM5uRrUxfBqsF+Jp8BkmB4e4g== \ No newline at end of file diff --git a/PROMS/WORD ADD-INs/PXMLAddIn/PXMLAddIn/publish/PXMLAddIn.vsto b/PROMS/WORD ADD-INs/PXMLAddIn/PXMLAddIn/publish/PXMLAddIn.vsto new file mode 100644 index 00000000..506b5f08 --- /dev/null +++ b/PROMS/WORD ADD-INs/PXMLAddIn/PXMLAddIn/publish/PXMLAddIn.vsto @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + th4/ucY68THr4LcheSPOyFpECz6e6gz7ShcJKu5giHY= + + + +Pi7V5RPHi7f+Zdw4W8ncHXYCGy89f6pHu66XLg48MPI=BB5hr5rMlbGxPj1BZx5AEto4udx/wLg7cNY4vRedLjM8iH6yibgXiXop+m2yCezELWW2CNWhCuAoyyYUYWWc/jfRwWTAmavYMlBO9mUTKJXXw8gpmGt9ac2ppCw2tcR6OWaYxgkLjFnBJXT6DK1Tz0oHKBKJ7GOS8//AqLjkYXo=1VYtkFvJh4LNgUqof6a1wBEpWB3gL9ExzZDRuBZko5CJS/J9VW/OMxutyMDin8lvef8UeEaYItk8UGmuWNUCSRj0HbO1XdJtNUFy0QC4HplKZ6dXcj2uK4KtrHL80dZQX9aNHhacq4fuZUdLEjqX+dp88ITfdRuyUL0DqMyfU/E=AQABCN=VLN\Jeff2juU1utcMQ+/Lw91mHcxzMINDpPM4iy2ERRWrwbWw5k=nQR4UZUvVY3YntgD4XVreYa2gcfti2YFfZL9IgI/R75syyJc+MFFV2d1UzYt1WTlnjQupVCq20w/7cSjU7YQPGl6uVZyun9ThwVkQd0zg+WqSlcfWBL8D1hlt82gGAEFk3Mkr8wa+yqr6gk5slfzM+ZAGC20k22JvU8zmh1zI+c=1VYtkFvJh4LNgUqof6a1wBEpWB3gL9ExzZDRuBZko5CJS/J9VW/OMxutyMDin8lvef8UeEaYItk8UGmuWNUCSRj0HbO1XdJtNUFy0QC4HplKZ6dXcj2uK4KtrHL80dZQX9aNHhacq4fuZUdLEjqX+dp88ITfdRuyUL0DqMyfU/E=AQABMIIBuTCCASKgAwIBAgIQF8ktG8KZs6xBtdrISQWuUjANBgkqhkiG9w0BAQsFADAbMRkwFwYDVQQDHhAAVgBMAE4AXABKAGUAZgBmMB4XDTIxMDMyOTE5MzcxMVoXDTIyMDMzMDAxMzcxMVowGzEZMBcGA1UEAx4QAFYATABOAFwASgBlAGYAZjCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA1VYtkFvJh4LNgUqof6a1wBEpWB3gL9ExzZDRuBZko5CJS/J9VW/OMxutyMDin8lvef8UeEaYItk8UGmuWNUCSRj0HbO1XdJtNUFy0QC4HplKZ6dXcj2uK4KtrHL80dZQX9aNHhacq4fuZUdLEjqX+dp88ITfdRuyUL0DqMyfU/ECAwEAATANBgkqhkiG9w0BAQsFAAOBgQBg8LhmNDNbi8PNUw/BMY9gbyc4KqhjCu5AcbgIFm6xlEqz8FMp7f0KNfK9Icuw6i4DesWuf/G155QXCxvkOtp0jPXbP84l9D/rccIoFhezBh//2YSPodtL/VF5cM17w+zxkr0RUZiqsbPnMP/qLeM5uRrUxfBqsF+Jp8BkmB4e4g== \ No newline at end of file diff --git a/PROMS/WORD ADD-INs/PXMLAddIn/PXMLAddIn/publish/setup.exe b/PROMS/WORD ADD-INs/PXMLAddIn/PXMLAddIn/publish/setup.exe new file mode 100644 index 00000000..a7953f38 Binary files /dev/null and b/PROMS/WORD ADD-INs/PXMLAddIn/PXMLAddIn/publish/setup.exe differ diff --git a/PROMS/WORD ADD-INs/VSTOWordAdaptor.dll b/PROMS/WORD ADD-INs/VSTOWordAdaptor.dll new file mode 100644 index 00000000..62291035 Binary files /dev/null and b/PROMS/WORD ADD-INs/VSTOWordAdaptor.dll differ diff --git a/PROMS/WORD ADD-INs/W2PAddIn/W2PAddIn.sln b/PROMS/WORD ADD-INs/W2PAddIn/W2PAddIn.sln new file mode 100644 index 00000000..7486c3ec --- /dev/null +++ b/PROMS/WORD ADD-INs/W2PAddIn/W2PAddIn.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.31112.23 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "W2PAddIn", "W2PAddIn\W2PAddIn.vbproj", "{8116F31D-7220-4519-8648-93546FA7259C}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {8116F31D-7220-4519-8648-93546FA7259C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8116F31D-7220-4519-8648-93546FA7259C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8116F31D-7220-4519-8648-93546FA7259C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8116F31D-7220-4519-8648-93546FA7259C}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {387B559D-1A71-41FD-B380-D16FD3A5DB6B} + EndGlobalSection +EndGlobal diff --git a/PROMS/WORD ADD-INs/W2PAddIn/W2PAddIn/Cmt.vb b/PROMS/WORD ADD-INs/W2PAddIn/W2PAddIn/Cmt.vb new file mode 100644 index 00000000..03a31762 --- /dev/null +++ b/PROMS/WORD ADD-INs/W2PAddIn/W2PAddIn/Cmt.vb @@ -0,0 +1,392 @@ +Option Explicit On + +Module Cmt + 'Private App As Word.Application + Public Function AddColor(sType As String) As Boolean + 'Highlight the current selection in a manner which identifies what the selection is + Dim bReturn As Boolean + + bReturn = True 'default return value + With App.Selection.Range + App.Selection.Font.Color = Word.WdColor.wdColorBlack + If UCase(sType) Like "STEP*" Then + .HighlightColorIndex = Word.WdColorIndex.wdBrightGreen + ElseIf UCase(sType) Like "NOTES*" Then + .HighlightColorIndex = Word.WdColorIndex.wdAuto + ElseIf UCase(sType) Like "NOTE*" Then + .HighlightColorIndex = Word.WdColorIndex.wdBrightGreen + ElseIf UCase(sType) Like "CAUTIONS*" Then + .HighlightColorIndex = Word.WdColorIndex.wdAuto + ElseIf UCase(sType) Like "CAUTION*" Then + .HighlightColorIndex = Word.WdColorIndex.wdBrightGreen + ElseIf UCase(sType) Like "IGNORE" Then + .HighlightColorIndex = Word.WdColorIndex.wdGray50 + ElseIf UCase(sType) Like "SECTION*" Then + .HighlightColorIndex = Word.WdColorIndex.wdRed + ElseIf UCase(sType) Like "FIGURE*" Then + .HighlightColorIndex = Word.WdColorIndex.wdYellow + ElseIf UCase(sType) Like "EQUATION*" Then + .HighlightColorIndex = Word.WdColorIndex.wdYellow + ElseIf UCase(sType) Like "TABLE*" Then + .HighlightColorIndex = Word.WdColorIndex.wdYellow + Else + 'don't know what this is so return false + bReturn = False + End If + End With + + AddColor = bReturn + + End Function + + Public Function GetCmtValue(Cmt As Word.Comment, sParam As String) As String + Dim sReturn As String + + sReturn = "" + + If Not Cmt Is Nothing Then + With Cmt.Range + If UCase(Cmt.Author) Like "STEP*" Then + Select Case LCase(sParam) + Case "level" + sReturn = Right(Cmt.Author, 1) + Case "style" + sReturn = .Paragraphs(2).Range.Text & " " & .Paragraphs(1).Range.Text + Case "checkoff" + sReturn = Replace(.Paragraphs(4).Range.Text, Chr(13), "") + End Select + Else + Select Case UCase(Cmt.Author) + Case "SECTION" + Select Case LCase(sParam) + Case "style" + sReturn = Replace(.Paragraphs(2).Range.Text, Chr(13), "") + Case "type" + sReturn = Replace(.Paragraphs(3).Range.Text, Chr(13), "") + Case "number" + sReturn = Replace(.Paragraphs(4).Range.Text, Chr(13), "") + Case "title" + sReturn = Replace(.Paragraphs(5).Range.Text, Chr(13), "") + Case "id" + sReturn = Replace(.Paragraphs(6).Range.Text, Chr(13), "") + End Select + Case "CAUTION" + Select Case LCase(sParam) + Case "style" + sReturn = .Paragraphs(2).Range.Text & " " & .Paragraphs(1).Range.Text + End Select + Case "NOTE" + Select Case LCase(sParam) + Case "style" + sReturn = .Paragraphs(2).Range.Text & " " & .Paragraphs(1).Range.Text + End Select + Case "TABLE" + Select Case LCase(sParam) + Case "style" + sReturn = .Paragraphs(2).Range.Text & " " & .Paragraphs(1).Range.Text + End Select + Case "FIGURE" + Select Case LCase(sParam) + Case "style" + sReturn = .Paragraphs(2).Range.Text & " " & .Paragraphs(1).Range.Text + End Select + Case "EQUATION" + Select Case LCase(sParam) + Case "style" + sReturn = .Paragraphs(2).Range.Text & " " & .Paragraphs(1).Range.Text + End Select + End Select + End If + End With + End If + + GetCmtValue = sReturn + + End Function + + Public Sub ModifyComment(ByRef Cmt As Word.Comment, ByVal sMsg As String) + Dim rng As Word.Range + Dim sAuthor As String + + sAuthor = Cmt.Author + Cmt.Scope.Select() + Cmt.Delete() + + With App.Selection + rng = .Range + Cmt = App.ActiveDocument.Comments.Add(Range:= .Range, Text:=sMsg) + Cmt.Author = sAuthor + rng.Select() + End With + + End Sub + + Public Sub MoveComment(ByVal CmtType As String, ByVal Direction As String) + Dim bMoved As Boolean + Dim sAuthor As String + Dim sMsg As String + Dim sScope As String + Dim Cmt As Word.Comment + Dim rng As Word.Range + Dim lColor As Long + Dim lHighlight As Long + + If App.Selection.Comments.Count > 0 Then + Cmt = App.Selection.Comments(1) + sAuthor = Cmt.Author + If InStr(sAuthor, CmtType) > 0 Then + sMsg = Cmt.Range.Text + rng = Cmt.Scope + lColor = rng.Font.Color + lHighlight = rng.HighlightColorIndex + + If Not rng.Font.Italic = False Then + 'make sure to capture the entire paragraph + sScope = rng.Text + rng.Expand(Unit:=Word.WdUnits.wdParagraph) + 'delete original comment + Cmt.Delete() + rng.Delete() + 'position range to new location and add paragraph + If LCase(Direction) = "up" Then + rng.Move(Unit:=Word.WdUnits.wdParagraph, Count:=-1) + rng.InsertParagraphBefore() + rng = rng.Paragraphs.First.Range + Else + rng.Move(Unit:=Word.WdUnits.wdParagraph, Count:=1) + rng.InsertParagraphAfter() + rng = rng.Paragraphs.Last.Range + End If + 'fill new paraagraph with original comment scope + rng.ParagraphFormat.Style = App.ActiveDocument.Styles("Normal").NameLocal + rng.InsertBefore(sScope) + rng.Font.Italic = True + 'attach comment to new paragraph + Cmt = App.ActiveDocument.Comments.Add(Range:=rng, Text:=sMsg) + Cmt.Author = sAuthor + rng.Font.Color = lColor + rng.HighlightColorIndex = lHighlight + rng.Select() + Else + If LCase(Direction) = "up" Then + bMoved = MovePrevious + Else + bMoved = MoveNext + End If + + If bMoved = True Then + rng.Font.Color = Word.WdColor.wdColorAutomatic + rng.HighlightColorIndex = Word.WdColorIndex.wdAuto + rng = App.Selection.Range + Cmt.Delete() + Cmt = App.ActiveDocument.Comments.Add(Range:=rng, Text:=sMsg) + Cmt.Author = sAuthor + rng.Font.Color = lColor + rng.HighlightColorIndex = lHighlight + rng.Select() + End If + End If + End If + End If + End Sub + + Public Function GetComment(rng As Word.Range) As Word.Range + 'returns the content of the first comment + 'associated with the range provided + Dim rReturn As Word.Range + Dim r As Word.Range + Dim Cmt As Word.Comment + + rReturn = Nothing + If rng.Information(Word.WdInformation.wdInCommentPane) = True Then + rReturn = rng.Comments(1).Range + Else + r = App.ActiveDocument.Range(rng.Start, rng.Start) + For Each Cmt In App.ActiveDocument.Comments + If r.InRange(Cmt.Scope) Then + rReturn = Cmt.Range + Exit For + End If + Next Cmt + End If + + GetComment = rReturn + + End Function + + Public Function GoToComment(Optional LimitToPara As Boolean = True) As Boolean + 'move selection to comment associated with current selection + 'return true if selection is in comment + Dim rng As Word.Range + Dim bReturn As Boolean + + If App.Selection.Information(Word.WdInformation.wdInCommentPane) = False Then + bReturn = False + rng = GetComment(App.Selection.Range) + If Not rng Is Nothing Then + rng.Select() + bReturn = True + End If + Else + bReturn = True + End If + + GoToComment = bReturn + + End Function + + Public Function MoveToNextComment(Optional sAuthor As String = "") As Word.Comment + Dim rng As Word.Range + Dim Cmt As Word.Comment + Dim cReturn As Word.Comment + Dim bSelectCmt As Boolean + Dim I As Integer + + cReturn = Nothing + + If sAuthor <> "" Then + If App.Selection.Comments.Count > 0 Then + Cmt = App.Selection.Comments(1) + sAuthor = Cmt.Author + End If + End If + + If App.Selection.Information(Word.WdInformation.wdInCommentPane) Then + bSelectCmt = True + App.Selection.Comments(1).Scope.Select() + Else + bSelectCmt = False + End If + + If App.Selection.End < App.ActiveDocument.Content.End Then + rng = App.ActiveDocument.Range(App.Selection.End, App.ActiveDocument.Content.End) + With rng.Paragraphs + For I = 1 To .Count + If .Item(I).Range.Comments.Count > 0 Then + Cmt = .Item(I).Range.Comments(1) + If (sAuthor = Cmt.Author) Or (sAuthor = "") Then + If bSelectCmt = True Then + Cmt.Range.Select() + Else + Cmt.Scope.Select() + End If + cReturn = Cmt + Exit For + End If + End If + Next I + End With + End If + + MoveToNextComment = cReturn + + End Function + + Public Sub InsertComment(ByVal sAuthor As String, Optional sMsg As String = "") + Dim Cmt As Word.Comment + Dim rng As Word.Range + + On Error GoTo Err_InsertComment + RemoveComments() + sAuthor = Trim(sAuthor) + If AddColor(sAuthor) = True Then + With App.Selection + rng = .Range + Cmt = App.ActiveDocument.Comments.Add(Range:= .Range, Text:=sMsg) + Cmt.Author = sAuthor + End With + rng.Select + End If + +Bye_InsertComment: + Exit Sub + +Err_InsertComment: + Err.Clear() + Resume Bye_InsertComment + + End Sub + + Public Sub RemoveComments(Optional ByVal AskFirst As Boolean = False, Optional CmtType As String = "") + Dim rng As Word.Range + Dim rStart As Word.Range + Dim rEnd As Word.Range + Dim Cmt As Word.Comment + Dim sMsg As String + Dim I As Integer + + If App.Selection.Information(Word.WdInformation.wdInCommentPane) = True Then + Cmt = App.Selection.Comments(1) + If CmtType <> "" Then + If Cmt.Author Like CmtType & "*" Then + Cmt.Scope.Select() + DeleteComment(Cmt) + End If + Else + Cmt.Scope.Select() + DeleteComment(Cmt) + End If + Else + If AskFirst = True Then + If App.Selection.Range.Paragraphs.Count > 1 Then + sMsg = "Do you wish to delete all Comments within the current selection?" + If MsgBox(sMsg, vbYesNo + vbQuestion + vbDefaultButton1, "Remove Comments") = vbYes Then + AskFirst = False + End If + Else + AskFirst = False + End If + End If + If AskFirst = False Then + With App.Selection + rng = .Range + .MoveEndWhile(Cset:=Chr(13), Count:=Word.WdConstants.wdBackward) + If .Information(Word.WdInformation.wdWithInTable) Then + .End = .End - 1 + End If + 'locate start and end points of the selection + rStart = App.ActiveDocument.Range(.Start, .Start) + rEnd = App.ActiveDocument.Range(.End, .End) + End With + + For I = App.ActiveDocument.Comments.Count To 1 Step -1 + Cmt = App.ActiveDocument.Comments(I) + If Cmt.Scope.InRange(rng) Or rng.InRange(Cmt.Scope) Or rStart.InRange(Cmt.Scope) Or rEnd.InRange(Cmt.Scope) Then + If CmtType <> "" Then + If Cmt.Author Like CmtType & "*" Then + DeleteComment(Cmt) + End If + Else + DeleteComment(Cmt) + End If + End If + Next I + rng.Select + End If + End If + + End Sub + + Public Sub DeleteComment(ByRef Cmt As Word.Comment) + Dim rng As Word.Range + Dim I As Integer + + rng = Cmt.Scope + Cmt.Delete() + + With rng + If Not .Font.Italic = False Then + For I = .Paragraphs.Count To 1 Step -1 + .Paragraphs(I).Range.Delete + Next I + Else + For I = .Paragraphs.Count To 1 Step -1 + .Paragraphs(I).Range.Font.ColorIndex = Word.WdColorIndex.wdAuto + .Paragraphs(I).Range.HighlightColorIndex = Word.WdColorIndex.wdAuto + Next I + End If + End With + + End Sub + +End Module diff --git a/PROMS/WORD ADD-INs/W2PAddIn/W2PAddIn/My Project/AssemblyInfo.vb b/PROMS/WORD ADD-INs/W2PAddIn/W2PAddIn/My Project/AssemblyInfo.vb new file mode 100644 index 00000000..f1ad11f0 --- /dev/null +++ b/PROMS/WORD ADD-INs/W2PAddIn/W2PAddIn/My Project/AssemblyInfo.vb @@ -0,0 +1,45 @@ +Imports System +Imports System.Reflection +Imports System.Runtime.InteropServices +Imports System.Security + +' General Information about an assembly is controlled through the following +' set of attributes. Change these attribute values to modify the information +' associated with an assembly. + +' Review the values of the assembly attributes + + + + + + + + +' Setting ComVisible to false makes the types in this assembly not visible +' to COM components. If you need to access a type in this assembly from +' COM, set the ComVisible attribute to true on that type. + + +'The following GUID is for the ID of the typelib if this project is exposed to COM + + +' Version information for an assembly consists of the following four values: +' +' Major Version +' Minor Version +' Build Number +' Revision +' +' You can specify all the values or you can default the Build and Revision Numbers +' by using the '*' as shown below: +' + + + + +Friend Module DesignTimeConstants + Public Const RibbonTypeSerializer As String = "Microsoft.VisualStudio.Tools.Office.Ribbon.Serialization.RibbonTypeCodeDomSerializer, Microsoft.VisualStudio.Tools.Office.Designer, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" + Public Const RibbonBaseTypeSerializer As String = "System.ComponentModel.Design.Serialization.TypeCodeDomSerializer, System.Design" + Public Const RibbonDesigner As String = "Microsoft.VisualStudio.Tools.Office.Ribbon.Design.RibbonDesigner, Microsoft.VisualStudio.Tools.Office.Designer, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" +End Module diff --git a/PROMS/WORD ADD-INs/W2PAddIn/W2PAddIn/My Project/Resources.Designer.vb b/PROMS/WORD ADD-INs/W2PAddIn/W2PAddIn/My Project/Resources.Designer.vb new file mode 100644 index 00000000..615b9ec4 --- /dev/null +++ b/PROMS/WORD ADD-INs/W2PAddIn/W2PAddIn/My Project/Resources.Designer.vb @@ -0,0 +1,63 @@ +'------------------------------------------------------------------------------ +' +' This code was generated by a tool. +' Runtime Version:4.0.30319.42000 +' +' Changes to this file may cause incorrect behavior and will be lost if +' the code is regenerated. +' +'------------------------------------------------------------------------------ + +Option Strict On +Option Explicit On + +Imports System + +Namespace My.Resources + + 'This class was auto-generated by the StronglyTypedResourceBuilder + 'class via a tool like ResGen or Visual Studio. + 'To add or remove a member, edit your .ResX file then rerun ResGen + 'with the /str option, or rebuild your VS project. + ''' + ''' A strongly-typed resource class, for looking up localized strings, etc. + ''' + _ + Friend Module Resources + + Private resourceMan As Global.System.Resources.ResourceManager + + Private resourceCulture As Global.System.Globalization.CultureInfo + + ''' + ''' Returns the cached ResourceManager instance used by this class. + ''' + _ + Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager + Get + If Object.ReferenceEquals(resourceMan, Nothing) Then + Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager("W2PAddIn.Resources", GetType(Resources).Assembly) + resourceMan = temp + End If + Return resourceMan + End Get + End Property + + ''' + ''' Overrides the current thread's CurrentUICulture property for all + ''' resource lookups using this strongly typed resource class. + ''' + _ + Friend Property Culture() As Global.System.Globalization.CultureInfo + Get + Return resourceCulture + End Get + Set + resourceCulture = value + End Set + End Property + End Module +End Namespace diff --git a/PROMS/WORD ADD-INs/W2PAddIn/W2PAddIn/My Project/Resources.resx b/PROMS/WORD ADD-INs/W2PAddIn/W2PAddIn/My Project/Resources.resx new file mode 100644 index 00000000..af7dbebb --- /dev/null +++ b/PROMS/WORD ADD-INs/W2PAddIn/W2PAddIn/My Project/Resources.resx @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/PROMS/WORD ADD-INs/W2PAddIn/W2PAddIn/My Project/Settings.Designer.vb b/PROMS/WORD ADD-INs/W2PAddIn/W2PAddIn/My Project/Settings.Designer.vb new file mode 100644 index 00000000..6506a1e3 --- /dev/null +++ b/PROMS/WORD ADD-INs/W2PAddIn/W2PAddIn/My Project/Settings.Designer.vb @@ -0,0 +1,71 @@ +'------------------------------------------------------------------------------ +' +' This code was generated by a tool. +' Runtime Version:4.0.30319.42000 +' +' Changes to this file may cause incorrect behavior and will be lost if +' the code is regenerated. +' +'------------------------------------------------------------------------------ + +Option Strict On +Option Explicit On + + + + _ +Partial Friend NotInheritable Class MySettings + Inherits Global.System.Configuration.ApplicationSettingsBase + + Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings()), MySettings) + +#Region "My.Settings Auto-Save Functionality" +#If _MyType = "WindowsForms" Then + Private Shared addedHandler As Boolean + + Private Shared addedHandlerLockObject As New Object + + _ + Private Shared Sub AutoSaveSettings(ByVal sender As Global.System.Object, ByVal e As Global.System.EventArgs) + If My.Application.SaveMySettingsOnExit Then + My.Settings.Save() + End If + End Sub +#End If +#End Region + + Public Shared ReadOnly Property [Default]() As MySettings + Get + +#If _MyType = "WindowsForms" Then + If Not addedHandler Then + SyncLock addedHandlerLockObject + If Not addedHandler Then + AddHandler My.Application.Shutdown, AddressOf AutoSaveSettings + addedHandler = True + End If + End SyncLock + End If +#End If + Return defaultInstance + End Get + End Property +End Class + +Namespace My + + _ + Friend Module MySettingsProperty + + _ + Friend ReadOnly Property Settings() As Global.W2PAddIn.MySettings + Get + Return Global.W2PAddIn.MySettings.Default + End Get + End Property + End Module +End Namespace diff --git a/PROMS/WORD ADD-INs/W2PAddIn/W2PAddIn/My Project/Settings.settings b/PROMS/WORD ADD-INs/W2PAddIn/W2PAddIn/My Project/Settings.settings new file mode 100644 index 00000000..85b890b3 --- /dev/null +++ b/PROMS/WORD ADD-INs/W2PAddIn/W2PAddIn/My Project/Settings.settings @@ -0,0 +1,7 @@ + + + + + + + diff --git a/PROMS/WORD ADD-INs/W2PAddIn/W2PAddIn/Ribbon1.vb b/PROMS/WORD ADD-INs/W2PAddIn/W2PAddIn/Ribbon1.vb new file mode 100644 index 00000000..f89c19de --- /dev/null +++ b/PROMS/WORD ADD-INs/W2PAddIn/W2PAddIn/Ribbon1.vb @@ -0,0 +1,941 @@ +'TODO: Follow these steps to enable the Ribbon (XML) item: + +'1: Copy the following code block into the ThisAddin, ThisWorkbook, or ThisDocument class. + +'Protected Overrides Function CreateRibbonExtensibilityObject() As Microsoft.Office.Core.IRibbonExtensibility +' Return New Ribbon1() +'End Function + +'2. Create callback methods in the "Ribbon Callbacks" region of this class to handle user +' actions, such as clicking a button. Note: if you have exported this Ribbon from the +' Ribbon designer, move your code from the event handlers to the callback methods and +' modify the code to work with the Ribbon extensibility (RibbonX) programming model. + +'3. Assign attributes to the control tags in the Ribbon XML file to identify the appropriate callback methods in your code. + +'For more information, see the Ribbon XML documentation in the Visual Studio Tools for Office Help. + +Imports Microsoft.Office.Core +Imports Word = Microsoft.Office.Interop.Word + + +Public Class Ribbon1 + Implements Office.IRibbonExtensibility + + Private ribbon As Office.IRibbonUI + 'Private App As Word.Application + 'Public Path2Setup As String + Private MyFormat As String + + Public Sub New() + End Sub + + Public Function GetCustomUI(ByVal ribbonID As String) As String Implements Office.IRibbonExtensibility.GetCustomUI + Return GetResourceText("W2PAddIn.Ribbon1.xml") + End Function + +#Region "Ribbon Callbacks" + 'Create callback methods here. For more information about adding callback methods, visit https://go.microsoft.com/fwlink/?LinkID=271226 + Public Sub Ribbon_Load(ByVal ribbonUI As Office.IRibbonUI) + Me.ribbon = ribbonUI + End Sub + + Public Sub BtnSearch(ByVal ctl As IRibbonControl) + 'perform initial search for document elements + Dim sMsg As String + + sMsg = "This action will search for procedure elements and mark them with Comments. This may take some time." + sMsg = sMsg & vbCrLf & "Do you wish to continue?" + + If MsgBox(sMsg, vbOKCancel + vbQuestion + vbDefaultButton1, "Search For Procedure Elements") = vbOK Then + 'FindItems + PreSearchCleanup + FindShapes + FindSteps + FindStuff + 'FindShapes + 'FindSections + App.ActiveDocument.Paragraphs(1).Range.Select() + App.StatusBar = "Seach - Done" + + MsgBox("Search Complete", vbOKOnly, "Search For Procedure Elements") + + End If + + End Sub + + + Public Sub BtnDecrease(ByVal ctl As IRibbonControl) + Dim rng As Word.Range + Dim rCmt As Word.Range + Dim para As Word.Paragraph + Dim sAuthor As String + Dim vLevel As Object + + rng = App.Selection.Range + For Each para In rng.Paragraphs + rCmt = GetComment(para.Range) + If Not rCmt Is Nothing Then + sAuthor = rCmt.Comments(1).Author + If sAuthor Like "STEP*" Then + vLevel = Mid(sAuthor, 6, 1) + If vLevel > 2 Then + ThisLevel = vLevel - 1 + Else + ThisLevel = 2 + End If + rCmt.Comments(1).Author = "STEP " & ThisLevel + End If + End If + Next para + rng.Select() + + End Sub + + Public Sub BtnIgnore(ByVal ctl As IRibbonControl) + 'RemoveComments + InsertComment("IGNORE") + End Sub + + Public Sub BtnIncrease(ByVal ctl As IRibbonControl) + Dim rng As Word.Range + Dim rCmt As Word.Range + Dim para As Word.Paragraph + Dim sAuthor As String + Dim vLevel As Object + + rng = App.Selection.Range + For Each para In rng.Paragraphs + rCmt = GetComment(para.Range) + If Not rCmt Is Nothing Then + sAuthor = rCmt.Comments(1).Author + If sAuthor Like "STEP*" Then + vLevel = Mid(sAuthor, 6, 1) + If vLevel < 9 Then + ThisLevel = vLevel + 1 + Else + ThisLevel = 9 + End If + rCmt.Comments(1).Author = "STEP " & ThisLevel + End If + End If + Next para + rng.Select() + + End Sub + + Public Sub BtnNote(ByVal ctl As IRibbonControl) + 'mark selected text as a note + 'RemoveComments + InsertComment("NOTE") + End Sub + + Public Sub BtnNext(ByVal ctl As IRibbonControl) + If MoveNext = True Then + GetSection + If InStr(LCase(ThisSection.Type), "word") + App.Selection.Comments.Count = 0 Then + WhatIsThis + End If + End If + End Sub + + Public Sub BtnPrevious(ByVal ctl As IRibbonControl) + If MovePrevious = True Then + GetSection + If InStr(LCase(ThisSection.Type), "word") + App.Selection.Comments.Count = 0 Then + WhatIsThis + End If + End If + End Sub + + Public Sub BtnCaution(ByVal ctl As IRibbonControl) + 'mark selected text as a note + 'RemoveComments + InsertComment("CAUTION") + End Sub + + Public Sub BtnTable(ByVal ctl As IRibbonControl) + 'mark selected table as a table + App.Selection.Tables(1).Select() + 'RemoveComments + InsertComment("TABLE") + End Sub + + Public Sub BtnTitle(ByVal ctl As IRibbonControl) + 'mark selected text as a section title + 'RemoveComments + InsertComment("SECTION TITLE") + End Sub + + Public Sub BtnFigure(ByVal ctl As IRibbonControl) + 'mark selected shape as a figure + App.Selection.InlineShapes(1).Select() + 'RemoveComments + InsertComment("FIGURE") + End Sub + + Public Sub BtnDelete(ByVal ctl As IRibbonControl) + 'remove all comments from the current selection + RemoveComments(True) + End Sub + + Public Sub BtnFindSections(ByVal ctl As IRibbonControl) + FindSections + App.StatusBar = "Find Sections - Done" + If Not Me.ribbon Is Nothing Then + Me.ribbon.Invalidate() + End If + End Sub + + Public Sub btnMergeSections(ByVal ctl As IRibbonControl) + MergeSections + App.StatusBar = "Merge Sections - Done" + If Not Me.ribbon Is Nothing Then + Me.ribbon.Invalidate() + End If + End Sub + + Public Sub BtnSection(ByVal ctl As IRibbonControl) + 'RemoveComments + 'InsertComment "SECTION", ThisSection.Name & vbCrLf & ThisSection.Description & vbCrLf & ThisSection.Type + If Len(App.Selection.Text) < 2 Then + App.Selection.InsertBefore("SECTION") + End If + FlagSection(ThisSection) + If Not Me.ribbon Is Nothing Then + Me.ribbon.Invalidate() + End If + End Sub + + Public Sub BtnSecMoveUp(ByVal ctl As IRibbonControl) + MoveComment("SECTION", "Up") + End Sub + + Public Sub BtnSecMoveDown(ByVal ctl As IRibbonControl) + MoveComment("SECTION", "Down") + End Sub + + Public Sub BtnSecGoNext(ByVal ctl As IRibbonControl) + App.Selection.GoTo(What:=Word.WdGoToItem.wdGoToComment, Which:=Word.WdGoToDirection.wdGoToNext, Name:="SECTION") + End Sub + + Public Sub BtnSecGoPrevious(ByVal ctl As IRibbonControl) + App.Selection.GoTo(What:=Word.WdGoToItem.wdGoToComment, Which:=Word.WdGoToDirection.wdGoToPrevious, Name:="SECTION") + End Sub + + Public Sub BtnXMLMake(ByVal ctl As IRibbonControl) + MakePromsXML + End Sub + + Public Sub BtnXMLView(ByVal ctl As IRibbonControl) + frmXML.Show + End Sub + + Public Sub BtnPXML(ByVal ctl As IRibbonControl) + MakeImportFile + End Sub + + Public Sub BtnPSI(ByVal ctl As IRibbonControl) + frmProperties.Show + End Sub + + Public Sub OnGetScreentip(ByVal ctl As IRibbonControl, ByRef text As Object) + Dim sText As String + + Select Case ctl.Id + Case "btnReset" + sText = "Remove all comments and markups in this document" + Case "btnSearch" + sText = "Locate and markup the elements of this document" + Case "boxTitle" + sText = "Enter title for this section of the document" + Case "btnSection" + sText = "Mark selected location in the document as a Section" + Case "btnDelete" + sText = "Remove all comments and markups from the selected portion of this document" + Case "cbIdent" + sText = "Step identifier such as number or bullet" + Case "cbSeparator" + sText = "Separator between steps at this level" + Case "cbLevel" + sText = "Indentation level for the selected step" + Case "btnDecrease" + sText = "Move this step's indentation level to the left" + Case "btnIncrease" + sText = "Move this step's indentation level to the right" + Case "btnMakeXML" + sText = "Create PROMS Import File" + Case "btnImport2PROMS" + sText = "Under Development" + Case "cbSetup" + sText = "File containing setup parameters" + Case "cbSection" + sText = "Mark the selected text as the start of a Section" + Case "btnTitle" + sText = "Mark the selected text as the Title of this procedure section" + Case "mnuCaution" + sText = "Mark the selected text as a Caution" + Case "mnuEquation" + sText = "Mark the selected text as an Equation" + Case "mnuFigure" + sText = "Mark the selected shape as a Figure" + Case "mnuNote" + sText = "Mark the selected text as a Note" + Case "mnuStep" + sText = "Mark the selected text as a Step" + Case "mnuTable" + sText = "Mark the selected table as a Table" + Case Else + sText = "" + End Select + + text = sText + End Sub + + Public Sub OnGetItemCount(ByVal ctl As IRibbonControl, ByRef Count As Object) + + Select Case ctl.Id + Case "cbLevel" + Count = 9 + Case "cbIdent" + GetIdents + Count = UBound(Idents) + 1 + Case "cbSeparator" + GetSeparators + Count = UBound(Separators) + 1 + Case "cbSetup" + SetupFiles = GetSetupFiles + Count = UBound(SetupFiles) + 1 + Case "cbSection" + GetSections + Count = UBound(VESections) + 1 + End Select + End Sub + + Public Sub OnGetItemLabel(ByVal ctl As IRibbonControl, ByVal Index As Integer, ByRef Label As Object) + Select Case ctl.Id + Case "cbLevel" + Label = CStr(Index + 1) + Case "cbIdent" + Label = Idents(Index) + Case "cbSeparator" + Label = Separators(Index) + Case "cbSetup" + Label = SetupFiles(Index) + Case "cbSection" + Label = VESections(Index).name + End Select + End Sub + + Public Sub OnGetContent(ByVal ctl As IRibbonControl, ByRef content As Object) + Dim sXML As String + Dim sName As String + Dim I As Integer + Dim J As Integer + + sXML = "" + + Select Case ctl.Id + Case "mnuReset" + sXML = MakeMenuReset() + Case "mnuSection", "CTmnuSection" + GetSections + sXML = MakeMenuSection() + Case "mnuStep", "CTmnuStep" + GetSteps(ThisSection.FmtFile) + sXML = MakeMenuStep() + Case "mnuNote", "CTmnuNote" + GetSteps(ThisSection.FmtFile) + sXML = MakeMenuNCTF("Note") + Case "mnuCaution", "CTmnuCaution" + GetSteps(ThisSection.FmtFile) + sXML = MakeMenuNCTF("Caution") + Case "mnuTable", "CTmnuTable" + GetSteps(ThisSection.FmtFile) + sXML = MakeMenuNCTF("Table") + Case "mnuFigure", "CTmnuFigure" + GetSteps(ThisSection.FmtFile) + sXML = MakeMenuNCTF("Figure") + Case "mnuEquation", "CTmnuEquation" + sXML = MakeMenuEquation() + Case "mnuCheckoff", "CTmnuCheckoff" + GetCheckoffs(ThisSection.FmtFile) + sXML = MakeMenuCheckoff() + End Select + + content = sXML + End Sub + + Private Function MakeMenuSection() As String + Dim Cmt As Word.Comment + Dim sID As String + Dim sNumber As String + Dim sTitle As String + Dim sLabel As String + Dim sNew As String + Dim sXML As String + Dim bAttUseNumbers As Boolean + Dim bSecFound() As Boolean + Dim I As Integer + Dim iAtt As Integer + Dim iSec As Integer + + iSec = 1 + iAtt = 1 + ReDim bSecFound(UBound(VESections)) + bAttUseNumbers = False + If GetNodeValue("//AttUseNumbers") = "True" Then + bAttUseNumbers = True + End If + + sXML = "" + For Each Cmt In App.ActiveDocument.Comments + If Cmt.Author = "SECTION" Then + 'existing section found + With Cmt.Range + If .Paragraphs.Count > 5 Then + sNumber = Replace(.Paragraphs(4).Range.Text, Chr(13), "") + sTitle = Replace(.Paragraphs(5).Range.Text, Chr(13), "") + sID = Replace(.Paragraphs(6).Range.Text, Chr(13), "") + If IsNumeric(sID) Then + I = CInt(sID) + bSecFound(I) = Not VESections(I).IsMultiple + 'If VESections(I).IsMultiple And (VESections(I).MergeStyle = "") Then + If InStr(1, LCase(sNumber), "attachment") + InStr(1, LCase(sNumber), "appendix") > 0 Then + If bAttUseNumbers Then + sNumber = sNumber & " " & iAtt + Else + sNumber = sNumber & " " & Chr(64 + iAtt) + End If + iAtt = iAtt + 1 + End If + sLabel = Trim(sNumber & " " & sTitle) + sXML = sXML & "" + sXML = sXML & "" + Else + sXML = sXML & "" + + MakeMenuSection = sXML + + End Function + + Private Function MakeMenuStep() As String + Dim sXML As String + Dim I As Integer + Dim J As Integer + + sXML = "" + sXML = sXML & "" + For I = 0 To UBound(VESteps) + With VESteps(I) + If .Type = "HLS" Then + sXML = sXML & "" + sXML = sXML & "" + sXML = sXML & "" + For I = 0 To UBound(VESteps) + With VESteps(I) + If .Type = "Substep" Then + sXML = sXML & "" + For J = 2 To 9 + sXML = sXML & "" + End If + End With + Next I + sXML = sXML & "" + sXML = sXML & "" + + MakeMenuStep = sXML + End Function + + Private Function MakeMenuNCTF(ByVal sType As String) As String + Dim sXML As String + Dim I As Integer + + sXML = "" + For I = 0 To UBound(VESteps) + With VESteps(I) + If InStr(LCase(.Type), LCase(sType)) > 0 Then + sXML = sXML & "" + + MakeMenuNCTF = sXML + End Function + + Private Function MakeMenuTable() As String + Dim sXML As String + + sXML = "" + sXML = sXML & "" + + MakeMenuTable = sXML + + End Function + + Private Function MakeMenuFigure() As String + Dim sXML As String + + sXML = "" + sXML = sXML & "" + sXML = sXML & "" + sXML = sXML & "" + sXML = sXML & "" + sXML = sXML & "" + sXML = sXML & "" + + MakeMenuFigure = sXML + + End Function + + Private Function MakeMenuEquation() As String + Dim sXML As String + + sXML = "" + sXML = sXML & "" + sXML = sXML & "" + sXML = sXML & "" + sXML = sXML & "" + sXML = sXML & "" + sXML = sXML & "" + + MakeMenuEquation = sXML + + End Function + + Private Function MakeMenuReset() As String + Dim sXML As String + + sXML = "" + sXML = sXML & "" + + MakeMenuReset = sXML + + End Function + Private Function MakeMenuCheckoff() As String + Dim sXML As String + Dim sName As String + Dim I As Integer + + sXML = "" + For I = 0 To UBound(VECheckoffs) + With VECheckoffs(I) + If .Menu <> "" Then + sName = "CO_" & .FmtFile & "(" & .ID & ")" + sXML = sXML & "" + sXML = sXML & "" + End If + End With + Next I + sXML = sXML & "" + + MakeMenuCheckoff = sXML + + End Function + + Public Sub OnChange(ByVal ctl As IRibbonControl, ByRef text As Object) + Dim I As Integer + + Select Case ctl.Id + Case "cbLevel" + ThisLevel = text + Case "cbIdent" + ThisIdent = text + Case "cbSeparator" + ThisSeparator = text + Case "cbSetup" + ClearDocProperties + ThisSetup = text + DocPropertySave(App.ActiveDocument, "SetupFile", ThisSetup) + LoadSetup + ChangeSetup + ThisSection = VESections(0) + UpdateRibbon + Case "cbSection" + For I = 0 To UBound(VESections) + If VESections(I).name = text Then + ThisSection = VESections(I) + ThisSectionID = I + Exit For + End If + Next I + End Select + End Sub + + Public Sub OnAction_Step(ByVal ctl As IRibbonControl) + Dim rng As Word.Range + Dim sID As String + Dim I As Integer + Dim iCount As Integer + + sID = Replace(ctl.Id, "btnStep", "") + If IsNumeric(Left(sID, 1)) Then + ThisLevel = Left(sID, 1) + End If + + sID = Mid(sID, 2) + + 'RemoveComments False + With App.Selection + If .Information(Word.WdInformation.wdInCommentPane) Then + .Comments(1).Scope.Select() + End If + + rng = .Range + iCount = .Paragraphs.Count + For I = 1 To iCount + .Paragraphs(I).Range.Select() + .End = .End - 1 + FlagStep(sID) + Next I + rng.Select() + End With + + End Sub + Public Sub OnAction_SectionNew(ByVal ctl As IRibbonControl) + Dim sSecNum As String + + 'strip off common button text to reveal section number + sSecNum = Replace(ctl.Id, "btnSecNew", "") + If IsNumeric(sSecNum) Then + 'RemoveComments + With App.Selection + If Len(App.Selection.Text) < 2 Then + .InsertParagraphBefore() + .Paragraphs(1).Range.Select() + .InsertBefore("SECTION") + .Font.Italic = True + End If + End With + ThisSection = VESections(CInt(sSecNum)) + FlagSection ThisSection + End If + + End Sub + + Public Sub OnAction_SectionGoTo(ByVal ctl As IRibbonControl) + Dim sCmtIndex As String + + 'strip off common button text to reveal section number + sCmtIndex = Replace(ctl.Id, "btnSecGoTo", "") + If IsNumeric(sCmtIndex) Then + App.ActiveDocument.Comments(CInt(sCmtIndex)).Scope.Select() + End If + End Sub + + Public Sub OnAction_SectionTitle(ByVal ctl As IRibbonControl) + Dim Cmt As Word.Comment + Dim rng As Word.Range + Dim sCmtIndex As String + Dim sOld As String + Dim sNew As String + + 'strip off common button text to reveal section number + sCmtIndex = Replace(ctl.Id, "btnSecTitle", "") + If IsNumeric(sCmtIndex) Then + Cmt = App.ActiveDocument.Comments(CInt(sCmtIndex)) + With Cmt.Range + sOld = Replace(.Paragraphs(5).Range.Text, Chr(13), "") + If sOld = "" Then + sOld = Replace(App.Selection.Text, Chr(13), "") + End If + sNew = InputBox("Title", "Change Title", sOld) + If sNew <> "" Then + rng = .Paragraphs(5).Range + rng.End = rng.End - 1 + rng.Text = sNew + Cmt.Scope.Select() + End If + End With + End If + Me.ribbon.Invalidate() + + End Sub + + Public Sub OnAction_Caution(ByVal ctl As IRibbonControl) + Dim sID As String + Dim I As Integer + + I = Len(ctl.Id) + + While I > 0 And IsNumeric(Mid(ctl.Id, I, 1)) + sID = Mid(ctl.Id, I) + I = I - 1 + End While + + ThisIdent = "CAUTION" + FlagStep(sID) + + End Sub + Public Sub OnAction_Note(ByVal ctl As IRibbonControl) + Dim sID As String + Dim I As Integer + + I = Len(ctl.Id) + + While I > 0 And IsNumeric(Mid(ctl.Id, I, 1)) + sID = Mid(ctl.Id, I) + I = I - 1 + End While + + ThisIdent = "NOTE" + FlagStep(sID) + + End Sub + Public Sub OnAction_Table(ByVal ctl As IRibbonControl) + Dim sID As String + Dim I As Integer + + I = Len(ctl.Id) + + While I > 0 And IsNumeric(Mid(ctl.Id, I, 1)) + sID = Mid(ctl.Id, I) + I = I - 1 + End While + + FlagTable(sID) + + End Sub + Public Sub OnAction_Figure(ByVal ctl As IRibbonControl) + Dim sID As String + Dim I As Integer + + I = Len(ctl.Id) + + While I > 0 And IsNumeric(Mid(ctl.Id, I, 1)) + sID = Mid(ctl.Id, I) + I = I - 1 + End While + + FlagFigure(sID) + + End Sub + Public Sub OnAction_Equation(ByVal ctl As IRibbonControl) + Dim sMsg As String + + Select Case ctl.Id + Case "ECWB" + sMsg = "Centered With Border" + Case "ECWOB" + sMsg = "Centered Without Border" + Case "ELWB" + sMsg = "Left With Border" + Case "ELWOB" + sMsg = "Left Without Border" + End Select + + 'RemoveComments False + InsertComment("EQUATION", sMsg) + End Sub + Public Sub OnAction_Reset(ByVal ctl As IRibbonControl) + Dim rng As Word.Range + Dim I As Integer + + + rng = App.Selection.Range + App.ActiveDocument.Content.Select() + + Select Case ctl.Id + Case "ResetSections" + RemoveComments(False, "SECTION") + Case "ResetSteps" + For I = 9 To 1 Step -1 + RemoveComments(False, "STEP " & I) + Next I + Case "ResetNotes" + RemoveComments(False, "NOTE") + Case "ResetCautions" + RemoveComments(False, "CAUTION") + Case "ResetTables" + RemoveComments(False, "TABLE") + Case "ResetFigures" + RemoveComments(False, "FIGURE") + Case "ResetEquations" + RemoveComments(False, "EQUATION") + Case "ResetIgnored" + RemoveComments(False, "IGNORE") + Case "ResetAll" + RemoveComments(True) + End Select + + rng.Select() + + End Sub + Public Sub OnAction_Checkoff(ByVal ctl As IRibbonControl) + Dim rng As Word.Range + Dim Cmt As Word.Comment + Dim sID As String + Dim sFmtFile As String + Dim sTag As String + Dim I As Integer + Dim J As Integer + + 'ensure VECheckoffs have been loaded + On Error Resume Next + I = UBound(VECheckoffs) + If Err.Number <> 0 Then + GetCheckoffs(ThisSection.FmtFile) + Err.Clear() + End If + On Error GoTo 0 + + If ctl.Id Like "btnMark*" Then + sID = Replace(ctl.Id, "btnMarkCO", "") + sFmtFile = VECheckoffs(CInt(sID)).FmtFile + sTag = "CO_" & sFmtFile & "(" & sID & ")" + + If App.Selection.Information(Word.WdInformation.wdInCommentPane) = True Then + Set Cmt = App.Selection.Comments(1) + AddCheckoff(Cmt, sTag) + Else + Set rng = App.Selection.Range + For I = 1 To rng.Paragraphs.Count + For J = rng.Paragraphs(I).Range.Comments.Count To 1 Step -1 + Set Cmt = rng.Paragraphs(I).Range.Comments(J) + AddCheckoff(Cmt, sTag) + Next J + Next I + rng.Select() + End If + + End If + + End Sub + Public Sub OnGetText(ByVal ctl As IRibbonControl, ByRef text As Object) + Select Case ctl.Id + Case "cbLevel" + If ThisLevel = "" Then + ThisLevel = 1 + End If + text = ThisLevel + Case "cbIdent" + If ThisIdent = "" Then + GetIdents + ThisIdent = Idents(0) + End If + text = ThisIdent + Case "cbSeparator" + If ThisSeparator = "" Then + GetSeparators + ThisSeparator = Separators(0) + End If + text = ThisSeparator + Case "cbSetup" + If ThisSetup = "" Then + ThisSetup = DocPropertyGet(App.ActiveDocument, "SetupFile") + If ThisSetup = "" Then + SetupFiles = GetSetupFiles() + ThisSetup = SetupFiles(0) + DocPropertySave(App.ActiveDocument, "SetupFile", ThisSetup) + End If + LoadSetup + ChangeSetup + ThisSection = VESections(0) + UpdateRibbon + End If + text = ThisSetup + Case "cbSection" + If ThisSection.name = "" Then + GetSections + ThisSection = VESections(0) + End If + text = ThisSection.name + End Select + End Sub + + Public Sub OnGetItemID(ByVal ctl As IRibbonControl, ByRef Index As Integer, ByRef value) + Select Case ctl.Id + Case "cbLevel" + Case "cbIdent" + Case "cbSeparator" + Case "cbSetup" + Case "cbSection" + value = ThisSection.ID + End Select + End Sub + + + + +#End Region + +#Region "Helpers" + + Private Shared Function GetResourceText(ByVal resourceName As String) As String + Dim asm As Reflection.Assembly = Reflection.Assembly.GetExecutingAssembly() + Dim resourceNames() As String = asm.GetManifestResourceNames() + For i As Integer = 0 To resourceNames.Length - 1 + If String.Compare(resourceName, resourceNames(i), StringComparison.OrdinalIgnoreCase) = 0 Then + Using resourceReader As IO.StreamReader = New IO.StreamReader(asm.GetManifestResourceStream(resourceNames(i))) + If resourceReader IsNot Nothing Then + Return resourceReader.ReadToEnd() + End If + End Using + End If + Next + Return Nothing + End Function + +#End Region + +End Class diff --git a/PROMS/WORD ADD-INs/W2PAddIn/W2PAddIn/Ribbon1.xml b/PROMS/WORD ADD-INs/W2PAddIn/W2PAddIn/Ribbon1.xml new file mode 100644 index 00000000..f2db2128 --- /dev/null +++ b/PROMS/WORD ADD-INs/W2PAddIn/W2PAddIn/Ribbon1.xml @@ -0,0 +1,130 @@ + + + + + + + + +