IMinutesFieldManager.MakeFieldsVisible (IEnumerable<String>, EstimateColumnsView, FieldUserScope, FieldPlacementPosition, String) Method
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 |
|---|---|
|
A problem occurred. |
|
|
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. |
// 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.
