[]
        
(Showing Draft Content)

GrapeCity.ActiveReports.PageReportModel.NameValidator.ValidateName

ValidateName Method

ValidateName(string, NameType)

Checks report item names to ensure that they are unique, not empty or null, and do not contain invalid characters.

Declaration
public bool ValidateName(string name, NameType nameType)
Parameters
Type Name Description
string name

A string value indicating the name to validate.

NameType nameType

A NameType value indicating whether the name is for a control, dataset, data region, or grouping object.

Returns
Type Description
bool

A boolvalue. true if the name is valid; otherwise false.

Examples
var validator = new NameValidator();
bool isValid = validator.ValidateName("ReportItemName", NameType.Control);