OverheadSheetColumn Class

Represents one column in an overhead worksheet.
Public Class OverheadSheetColumn
This language is not supported or no code example is available.
public class OverheadSheetColumn
This language is not supported or no code example is available.
Name Description
Public property BreakdownByDiscreteValues Gets the discrete values from BreakdownByField used to filter and distribute the values from the BreakdownMainField.
Public property BreakdownByField Gets the mnemonic of a field with discrete values that is used to filter and distribute the values from the BreakdownMainField.
Public property BreakdownMainField Gets the mnemonic of a minute field whose values are to be shown or distributed.
Public property FactorReceivingField Gets the mnemonic of a minute field that receives the factor.
Public property FreeFieldDefaultValue Gets the default value of the free field.
Public property FreeFieldTotalMode Gets the value specifying what's in total of the free field.
Public property Header1 Gets the header 1 of the column.
Public property Header2 Gets the header 2 of the column.
Public property Header3 Gets the header 3 of the column.
Public property Kind Gets the kind of the column.
Public property MacroColumnDisplayNA Gets the value specifying how to display #N/A values in the macro column.
Public property MacroColumnSumInTotals Gets the value indicating whether to show the sum in totals in the macro column.
Public property PermissionID Gets the ID of the column usable for permissions in the user profile.
Public property Position Gets the zero-based column position in the sheet.
Public property SetOfFields Gets the mnemonic of set of fields, if this column is of type OverheadSheetColumnKind.SetOfFields.
Public property SheetInfo Gets the info about the overhead sheet to which this column belongs.
Public property ShowMultipleFields Gets a value indicating whether to show multiple fields, one for each value in BreakdownByDiscreteValues.
Public property SlaveListField Gets the mnemonic of a minute field that is the slave list.
Top
Methods
 
Name Description
Public method Equals(Object) Determines whether the specified object is equal to the current object. (inherited from Object).
Protected method Finalize Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (inherited from Object).
Public method GetHashCode Serves as the default hash function. (inherited from Object).
Public method GetType Gets the Type of the current instance. (inherited from Object).
Protected method MemberwiseClone Creates a shallow copy of the current Object. (inherited from Object).
Public method ToString Returns a string that represents the current object. (inherited from Object).
Top
Example
 

The following example will display all the columns that were added by the user. This means, that all non-removable native columns will be ignored. There is a minute field of type "List (Name only)" whose mnemonic is LIST1. The code will operate on the overhead sheet that belongs to that field. The code requires using System.Linq;.

try
 {
     // Get the overhead workbook. The lock is required.
     es.CurrentVersion.Overhead.GetLockOnWorkbook();
     var wsMgr = es.CurrentVersion.Overhead.WorksheetManager;
     var wbook = es.CurrentVersion.Overhead.GetWorkbook();
 
     foreach (IWorksheet sheet in wbook.Worksheets)
     {
         // Find the sheet for the "LIST1" field, which is of type "List (Name only)".
         // The "LIST1" is the mnemonic, not the name, which may be localized. The OverheadSheetInfo.Name contains the mnemonic,
         // and the OverheadSheetInfo.LocalizedName contains the latter.
         var sheetInfo = wsMgr.GetOverheadSheetInformation(sheet);
         if (sheetInfo.Type == NativeSheetType.List_Box && sheetInfo.Name == "LIST1")
         {
             // Get only the columns that were added by the user. Exclude the non-removable native columns.
             var userColumns = sheetInfo.Columns.Where((col) => col.Kind != OverheadSheetColumnKind.NativeColumn);
 
             // Sort them by the position.
             var sortedUserColumns = userColumns.OrderBy((col) => col.Position);
 
             // Display their headers.
             string s = "";
             foreach (var column in sortedUserColumns)
             {
                 s += column.Header1 + " | " + column.Header2 + " | " + column.Header3 + " | " + "\n";
             }
             MessageBox.Show(s);
         }
     }
 }
 catch (Exception generalError)
 {
     // Catches all errors to get the proper message.
     MessageBox.Show(generalError.Message, "Error!", MessageBoxButtons.OK, MessageBoxIcon.Error);
 }
 finally
 {
     // Release the lock on the overhead workbook in any case.
     es.CurrentVersion.Overhead.ReleaseLockOnWorkbook();
 }					
This language is not supported or no code example is available.
Qdv.UserApi.OverheadSheetColumn
Version
 
Available since QDV 7.23.1099.

.NET Framework

Supported in: 4.8, 4.7, 4.6, 4.5.2

In this article

Definition