IMinutesFieldManager.MakeFieldsVisible (IEnumerable<String>, EstimateColumnsView, FieldUserScope, FieldPlacementPosition, String) Method

Makes specified fields visible and sets their position in a specified view for specified users.
Sub MakeFieldsVisible( _ 
ByVal fields As IEnumerable(Of String), _ 
ByVal view As EstimateColumnsView, _ 
ByVal forUsers As FieldUserScope, _ 
ByVal fieldsPlacement As FieldPlacementPosition, _ 
ByVal referenceField As String
)
This language is not supported or no code example is available.
void MakeFieldsVisible( 
IEnumerable<string> fields
EstimateColumnsView view
FieldUserScope forUsers
FieldPlacementPosition fieldsPlacement
string referenceField 
)
This language is not supported or no code example is available.

Parameters

fields
IEnumerable<string>

A list of the fields to be made visible.

view
EstimateColumnsView

An estimate view this operation will be applied to.

forUsers
FieldUserScope

The users this operation will be applied to.

fieldsPlacement
FieldPlacementPosition

A position where the fields will be placed relative to the referenceField. If the referenceField is an empty string or a non-existent field, this parameter is ignored.

referenceField
string

A field that will serve as a base position for placing the other fields according to the fieldsPlacement value. If no such field exists, then fieldsPlacement is ignored and the fields are placed at the end.

Exception type Condition

QdvApiException

A problem occurred.

ArgumentOutOfRangeException

The view argument was set to EstimateColumnsView.General. This value is deprecated and doesn't refer to any particular view and thus cannot be used in this context.

Remarks
 
This method doesn't require a call to ApplyChanges for the changes to take effect. But once you make all required changes, you should call the IEstimate.RepaintCurrentView method to update the UI.
Example
 

// Get Unit field.
 IMinutesFieldManager minFieldsmanager = es.GetMinutesFieldManager();
 IMinutesField field = minFieldsmanager.GetField("Unit");
 
 // Change its background color.
 IColumnFormatting format = field.GetFormatting(EstimateColumnsView.Minutes);
 format.DataFormatting.BackgroundColor = System.Drawing.Color.Red;
 field.SetFormatting(EstimateColumnsView.Minutes, format);
 
 // Change the position. This cannot be done with IMinutesField.SetFormatting().
 // It must be done with MakeFieldsVisible, but the field must be made hidden first.
 var fields = new List<string>() { "Unit" };
 minFieldsmanager.MakeFieldsInvisible(fields, EstimateColumnsView.Minutes, FieldUserScope.ThisUser);
 minFieldsmanager.MakeFieldsVisible(fields, EstimateColumnsView.Minutes, FieldUserScope.ThisUser,
  FieldPlacementPosition.BeforeGivenField, "Description");
 
 // Repaint the changes
 es.RepaintCurrentView();					
This language is not supported or no code example is available.

The following example demonstrates how to change the background color of "Unit" field and move it before "Description" field.

Version
 
Available since QDV 7.16.585.

.NET Framework

Supported in: 4.8, 4.7, 4.6, 4.5.2

In this article

Definition