public void SetChildContentRecursive(IEnumerable <AbstractNode> contentEnum) { contentEnum = contentEnum ?? new AbstractNode[0]; int index = 0; foreach (AbstractNode content in contentEnum) { // Add or overwrite existing items if (index < ChildRows.Count) { // Overwrite ((DynamicTreeDebuggerRow)ChildRows[index]).SetContentRecursive(content); } else { // Add ChildRows.Add(new DynamicTreeDebuggerRow(process, content)); } index++; } int count = index; // Delete other nodes while (ChildRows.Count > count) { ChildRows.RemoveAt(count); } }
public void addChildRow(VirtualGridRow row) { if (!ChildRows.Contains(row)) { ChildRows.Add(row); row.ParentRow = this; } }
public override void Dispose() { if (Parent != null) { ////Используем локальную переменную, чтобы не затирать DataRow.WTPCOMPONENT_PARENTID //Parent.PropertyChanged -= Parent_PropertyChanged; Parent = null; } ChildComponents.Dispose(); ChildRows.Clear(); ChildRows.Dispose(); base.Dispose(); }
private void AgregarRenglon() { //Agregar detalle de la factura. ChildRows = (DataRowView)bsitem.AddNew(); ChildRows.BeginEdit(); ChildRows["numero"] = txt_numero_despacho.Text; ChildRows["cant"] = 0; ChildRows["ratio"] = 0; ChildRows["width"] = 0; ChildRows["msi"] = 0; ChildRows["kilo_rollo"] = 0; ChildRows["precio"] = 0.0; ChildRows["total_renglon"] = 0; ChildRows.Row.SetParentRow(ParentRow.Row); ChildRows.EndEdit(); bsitem.Position = bsitem.Count - 1; ContadorRegistros(); }
public bool IsTreeActive() { return(ChildRows.Any(x => !x.IsEmpty || x.IsTreeActive())); }
public void RemoveChildRow(Row row) { ChildRows.Remove(row); row.ParentRow = null; }
public void AddChildRow(Row row) { ChildRows.Add(row); row.ParentRow = this; row.Visible = TreeOpen; }
public WTPRow[] GetChildRows() { return(ChildRows.ToArray()); }