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

TdxDbOrgChart.OnLoadNode Event

In This Article

OnLoadNode occurs when a node has been created and its properties have been read from the dataset.

#Declaration

Delphi
property OnLoadNode: TdxOcEvent read; write;

#Remarks

Use the OnLoadNode event to perform specific operations after the node has been created based on the data in a linked dataset.

procedure TForm1.ChartLoadNode(Sender: TObject; Node: TdxOcNode);
begin
  if Node.Parent=nil then Node.Shape := shRoundRect;  // by Node's properties
  if Chart.DataSet.FieldByName('Flag').AsBoolean then
    Node.Color := clRed; // by contents of database
end;

On calling OnLoadNode, the current record in the database corresponds to the Node and the event handler must not change its location (Do not use Locate, Fist, Last and MoveBy methods of the dataset or use bookmark to return to the node that corresponds with the Node).

See Also