System.Data.DataRow.GetChildRows C# (CSharp) Method

GetChildRows() public method

Gets the child rows of this using the specified and the specified
public GetChildRows ( DataRelation relation, DataRowVersion version ) : System.Data.DataRow[]
relation DataRelation
version DataRowVersion
return System.Data.DataRow[]
        public DataRow[] GetChildRows(DataRelation relation, DataRowVersion version)
        {
            if (relation == null)
            {
                return _table.NewRowArray(0);
            }

            if (relation.DataSet != _table.DataSet)
            {
                throw ExceptionBuilder.RowNotInTheDataSet();
            }
            if (relation.ParentKey.Table != _table)
            {
                throw ExceptionBuilder.RelationForeignTable(relation.ParentTable.TableName, _table.TableName);
            }
            return DataRelation.GetChildRows(relation.ParentKey, relation.ChildKey, this, version);
        }

Same methods

DataRow::GetChildRows ( DataRelation relation ) : System.Data.DataRow[]
DataRow::GetChildRows ( string relationName ) : System.Data.DataRow[]
DataRow::GetChildRows ( string relationName, DataRowVersion version ) : System.Data.DataRow[]

Usage Example

Exemplo n.º 1
0
        public DualDraw(DataRow data)
        {
            DataRow[] parts = data.GetChildRows("Module_Module");

            _lower = (IDrawExecuter)BaseModule.GetModule(parts[0]);
            _upper = (IDrawExecuter)BaseModule.GetModule(parts[1]);
        }
All Usage Examples Of System.Data.DataRow::GetChildRows