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(); }