Skip to main content
All docs
V26.1
  • TdxCustomDashboardControl.Parameters Property

    Provides access to the collection of dashboard parameters.

    Declaration

    property Parameters: TdxDashboardParameters read;

    Property Value

    Type Description
    TdxDashboardParameters

    A dashboard parameter collection.

    Remarks

    The collection accessible through the Parameters property is populated automatically with dashboard parameters stored within dashboard layout definition.

    Note

    The Parameters property provides access to a read-only dashboard parameter collection. If the list of parameters changes within the dashboard layout definition, the collection is updated automatically the next time you access it in code.

    Available Options

    You can use the ParamByName property to access a stored parameter by name. In addition, you can use the Parameters.Items property to access all parameters stored in the collection.

    Refer to the TdxDashboardParameters class description for detailed information on all available options.

    BeginUpdate/EndUpdate and Batch Parameter Changes

    Every time you modify a parameter stored within the Parameters collection, the State property value is updated and the TdxDashboardControl component redraws content to reflect the change. Enclose multiple parameter changes between Parameters.BeginUpdate and Parameters.EndUpdate procedure calls to avoid UI flickering due to excessive redraw operations and to improve performance.

    Code Examples

    List Dashboard Parameter Labels

    uses
      dxDashboard.Control,      // Declares the TdxDashboardControl class
      dxDashboard.Parameters,   // Declares the TdxDashboardParameter class
      dxMessageDialog,          // Declares the TdxMessageDialogForm class
      System.StrUtils;          // Provides advanced string management routines
    
    procedure TForm1.cxButton1Click(Sender: TObject);
    var
      AList: TStringList;
      AParameter: TdxDashboardParameter;
    begin
      // Create a TStringList instance
      AList := TStringList.Create;
      try
        // Iterate through dashboard parameters
        for AParameter in dxDashboardControl1.Parameters do
          AList.Add(Format('- %s', [
            // Use the parameter Name if Description is missing
            IfThen(AParameter.Description <> '', AParameter.Description, AParameter.Name)
          ]));
        // Display the parameter list or a notification message if the list is empty
        if AList.Count > 0 then
          dxShowMessage(AList.Text)
        else
          dxShowMessage('The dashboard has no parameters.');
      finally
        AList.Free;
      end;
    end;
    

    View Example: Pass a Hidden Dashboard Parameter to a SQL Query

    See Also