AddChild

Ajoute un nouveau DataRow à la relation nommée parent/enfant. Si la relation nommée existe, le DataRow fourni sera ajouté à la collection de DataRow existante. Sinon, une nouvelle collection sera créée avec le DataRow fourni comme son seul élément.

Syntaxe

Version ASCII
void addChild(const char* childName, SmartPointer<DataRow> childDataRow) 
Version Unicode
void addChild(const UnicodeString childName, SmartPointer<DataRow> childDataRow) 

Paramètres

  • Le nom de la relation parent/enfant (par exemple, « Données des zones inondables », « Références », « Utilisé par »)
  • Le DataRow à ajouter à la relation.

Exemple

SmartPointer<DataRow> childDataRow =new DataRow(); 
childDataRow ->set("Address", "100 Congress"); 
childDataRow ->set("City", "Austin"); 
SmartPointer<DataRow> dataRow =new DataRow(); 
dataRow->addChild("child1", childDataRow );