IMinutesFieldManager.MakeFieldsInvisible Method
Sub MakeFieldsInvisible( _
ByVal fields As IEnumerable(Of String), _
ByVal view As EstimateColumnsView, _
ByVal forUsers As FieldUserScope _
)
This language is not supported or no code example is available.
void MakeFieldsInvisible(
IEnumerable<string> fields,
EstimateColumnsView view,
FieldUserScope forUsers
)
This language is not supported or no code example is available.
Parameters
- fields
- IEnumerable<string>
A list of the fields to be made invisible.
- view
- EstimateColumnsView
An estimate view this operation will be applied to.
- forUsers
- FieldUserScope
The users this operation will be applied to.
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. |
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.
// 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.
Available since QDV 7.16.585.