Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

TcxGridTableViewStyles.NewItemRowInfoText Property

Specifies the style for the text displayed in the background of a new item row.

#Declaration

Delphi
property NewItemRowInfoText: TcxStyle index vsNewItemRowInfoText read; write;

#Property Value

Type Description
TcxStyle

The style of the new item row caption.

#Remarks

To specify the style for the info text:

  1. Create a TcxStyle object using a TcxStyleRepository component, for instance.

  2. Customize the new style depending on your needs. (Note that you are able to customize the style later at any time you need)

  3. Assign it to the NewItemRowInfoText property

#Code Example

The following example shows how to create and customize a style for the info text of a new item row in a tvCustomers View. When creating the style, the form (Self) is specified as its owner. Thus, the style is automatically destroyed when destroying the form.

FInfoStyle: TcxStyle;
//...
procedure TForm1.FormCreate(Sender: TObject);
begin
  FInfoStyle := TcxStyle.Create(Self);
  FInfoStyle.TextColor := clPurple;
  FInfoStyle.Font.Name := 'Courier New';
  tvCustomers.Styles.NewItemRowInfoText := FInfoStyle;
end;

The image below shows the info text (‘Click here to add a new row’) drawn using the specified style:

See Also