PdfTableAddRows Method |
Namespace: Atalasoft.PdfDoc.Generating.Shapes
List<Product> productList = CreateProductList(); productTable.AddRows(productList.GetEnumerator()); //Or Dictionary<string, string> productData = new Dictionary<string, string>(); productData.Add("Name", productName); productData.Add("SKU", productSku); productData.Add("Quantity", quantity.ToString()); productData.Add("UnitPrice", unitPrice.ToString("C", CultureInfo.CurrentCulture)); productData.Add("CreatedDate", createdDate.ToString("d")); productData.Add("TotalPrice", (quantity * unitPrice).ToString("C", CultureInfo.CurrentCulture)); List<Dictionary<string, string>> productList = new List<Dictionary<string, string>>(); productList.add(productData); productTable.AddRows(productList.GetEnumerator());