Example of Row Number in ASP.NET MVC Data Grid Control
This sample demonstrates the Row Number feature in the Data Grid, which automatically displays sequential row numbers in a dedicated column. It provides a simple way to identify the position of records in the current grid view.
${AvailableStock} ${Unit}
${SoldStock} ${Unit}
@Html.UiGrid(new UiGridOptions
{
Id = "RowNumber",
Height = "365px",
OnActionBegin = "actionBegin",
Data = ViewData["dataSource"],
RowHeight = 45,
AllowSorting = true,
AllowFiltering = true,
EnableVirtualization = true,
FilterType = UiGridFilterType.CheckBox,
EditSettings = new UiEditSettings { AllowEditing = true, AllowAdding = true, AllowDeleting = true, Mode = UiEditMode.Cell },
Toolbar = new List<string> { "Delete", "Update", "Cancel", "ExcelExport", "PdfExport" },
Columns = new List<UiGridColumn>
{
new UiGridColumn { TextAlign = UiTextAlign.Center, Type = UiColumnType.RowNumber },
new UiGridColumn { Field = "ProductID", HeaderText = "Product ID", Type = UiColumnType.Number, Width = 120, TextAlign = UiTextAlign.Right, Visible = false, IsPrimaryKey = true },
new UiGridColumn { Field = "ProductName", HeaderText = "Products", Width = 160, AllowEditing = false, ValidationRules = new UiValidationRules { Required = true } },
new UiGridColumn { Field = "Category", HeaderText = "Category", Width = 140, AllowEditing = false, ValidationRules = new UiValidationRules { Required = true } },
new UiGridColumn { Field = "SellingPrice", HeaderText = "Price", Type = UiColumnType.Number, Width = 130, TextAlign = UiTextAlign.Right, FilterType = UiGridFilterType.Menu, Format = "C", EditType = UiEditType.NumericEdit, ValidationRules = new UiValidationRules { Required = true, Min = 0 } },
new UiGridColumn { Field = "AvailableStock", HeaderText = "In-Stock", Type = UiColumnType.Number, Width = 120, TextAlign = UiTextAlign.Right, Template = "#availableStockTemplate", FilterType = UiGridFilterType.Menu, EditType = UiEditType.NumericEdit, ValidationRules = new UiValidationRules { Required = true, Min = 0 } },
new UiGridColumn { Field = "SoldStock", HeaderText = "Sold", Type = UiColumnType.Number, Width = 120, TextAlign = UiTextAlign.Right, Template = "#soldStockTemplate", FilterType = UiGridFilterType.Menu, EditType = UiEditType.NumericEdit, ValidationRules = new UiValidationRules { Required = true, Min = 0 } }
}
})
<template id="availableStockTemplate"><span>${AvailableStock} ${Unit}</span></template>
<template id="soldStockTemplate"><span>${SoldStock} ${Unit}</span></template>
@Html.UiGrid(new UiGridOptions
{
Id = "RowNumber",
Height = "365px",
OnActionBegin = "actionBegin",
Data = ViewData["dataSource"],
RowHeight = 45,
AllowSorting = true,
AllowFiltering = true,
EnableVirtualization = true,
FilterType = UiGridFilterType.CheckBox,
EditSettings = new UiEditSettings { AllowEditing = true, AllowAdding = true, AllowDeleting = true, Mode = UiEditMode.Cell },
Toolbar = new List<string> { "Delete", "Update", "Cancel", "ExcelExport", "PdfExport" },
Columns = new List<UiGridColumn>
{
new UiGridColumn { TextAlign = UiTextAlign.Center, Type = UiColumnType.RowNumber },
new UiGridColumn { Field = "ProductID", HeaderText = "Product ID", Type = UiColumnType.Number, Width = 120, TextAlign = UiTextAlign.Right, Visible = false, IsPrimaryKey = true },
new UiGridColumn { Field = "ProductName", HeaderText = "Products", Width = 160, AllowEditing = false, ValidationRules = new UiValidationRules { Required = true } },
new UiGridColumn { Field = "Category", HeaderText = "Category", Width = 140, AllowEditing = false, ValidationRules = new UiValidationRules { Required = true } },
new UiGridColumn { Field = "SellingPrice", HeaderText = "Price", Type = UiColumnType.Number, Width = 130, TextAlign = UiTextAlign.Right, FilterType = UiGridFilterType.Menu, Format = "C", EditType = UiEditType.NumericEdit, ValidationRules = new UiValidationRules { Required = true, Min = 0 } },
new UiGridColumn { Field = "AvailableStock", HeaderText = "In-Stock", Type = UiColumnType.Number, Width = 120, TextAlign = UiTextAlign.Right, Template = "#availableStockTemplate", FilterType = UiGridFilterType.Menu, EditType = UiEditType.NumericEdit, ValidationRules = new UiValidationRules { Required = true, Min = 0 } },
new UiGridColumn { Field = "SoldStock", HeaderText = "Sold", Type = UiColumnType.Number, Width = 120, TextAlign = UiTextAlign.Right, Template = "#soldStockTemplate", FilterType = UiGridFilterType.Menu, EditType = UiEditType.NumericEdit, ValidationRules = new UiValidationRules { Required = true, Min = 0 } }
}
})
<script>
// Syncfusion: a new product gets the unit of its category (Litre, Kg or Pack).
function actionBegin(args) {
if (args.requestType === 'save' && args.action === 'add') {
if (args.data.Category === 'Beverages' || args.data.Category === 'Dairy Products') {
args.data.Unit = 'Litre';
}
else if (args.data.Category === 'Fruits' || args.data.Category === 'Vegetables' || args.data.Category === 'Nuts' || args.data.Category === 'Rices') {
args.data.Unit = 'Kg';
}
else {
args.data.Unit = 'Pack';
}
}
}
</script>
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web.Mvc;
using Lumen.UI.Mvc;
namespace YourApp.Controllers
{
public class GridController : Controller
{
// The page is Views/Grid/RowNumber.cshtml; it draws what ViewData holds.
public ActionResult RowNumber()
{
var products = GroceryProduct.GetAllProducts();
ViewData["dataSource"] = products;
return View();
}
public class GroceryProduct
{
public GroceryProduct()
{
}
public GroceryProduct(int ProductID, string ProductName, string Category, double PurchasePrice, double SellingPrice, int AvailableStock, int SoldStock, DateTime ExpiryDate, string Unit)
{
this.ProductID = ProductID;
this.ProductName = ProductName;
this.Category = Category;
this.PurchasePrice = PurchasePrice;
this.SellingPrice = SellingPrice;
this.AvailableStock = AvailableStock;
this.SoldStock = SoldStock;
this.ExpiryDate = ExpiryDate;
this.Unit = Unit;
}
public static List<GroceryProduct> GetAllProducts() => new List<GroceryProduct>
{
new GroceryProduct(1001, "Apples", "Fruits", 5.6, 6.45, 102, 56, new DateTime(2029, 2, 25), "Kg"),
new GroceryProduct(1002, "Walnuts", "Nuts", 16.82, 17.96, 459, 8, new DateTime(2028, 9, 11), "Kg"),
new GroceryProduct(1003, "Milk", "Dairy Products", 5.05, 5.56, 454, 62, new DateTime(2027, 5, 11), "Litre"),
new GroceryProduct(1004, "Kiwi", "Fruits", 3.14, 3.46, 61, 56, new DateTime(2027, 9, 6), "Kg"),
new GroceryProduct(1005, "Puffed Corn", "Snacks", 9.24, 10.58, 73, 1, new DateTime(2029, 9, 9), "Pack"),
new GroceryProduct(1006, "Watermelon", "Fruits", 3.62, 4.2, 423, 229, new DateTime(2028, 2, 12), "Kg"),
new GroceryProduct(1007, "Sweet Potato", "Vegetables", 5.1, 5.39, 484, 10, new DateTime(2027, 5, 27), "Kg"),
new GroceryProduct(1008, "Oranges", "Fruits", 5.59, 6.38, 295, 19, new DateTime(2027, 8, 26), "Kg"),
new GroceryProduct(1009, "Curd", "Dairy Products", 18.82, 20.81, 369, 233, new DateTime(2030, 5, 16), "Litre"),
new GroceryProduct(1010, "Sandwich Bread", "Breads and Buns", 3.86, 4.32, 209, 103, new DateTime(2027, 9, 10), "Pack"),
new GroceryProduct(1011, "Raspberries", "Fruits", 14.63, 16.39, 110, 82, new DateTime(2030, 10, 20), "Kg"),
new GroceryProduct(1012, "Chocolate Wafer", "Chocolates", 5.89, 6.52, 147, 225, new DateTime(2028, 10, 1), "Pack"),
new GroceryProduct(1013, "Wheat Bread", "Breads and Buns", 2.83, 3.08, 148, 234, new DateTime(2027, 8, 7), "Pack"),
new GroceryProduct(1014, "Coffee Powder", "Beverages", 8.02, 8.94, 282, 78, new DateTime(2029, 4, 24), "Litre"),
new GroceryProduct(1015, "Vanilla Toffee", "Sweets", 10.09, 11.1, 411, 29, new DateTime(2027, 10, 14), "Pack"),
new GroceryProduct(1016, "Rice Crackers", "Snacks", 7.71, 8.61, 155, 51, new DateTime(2029, 12, 2), "Pack"),
new GroceryProduct(1017, "Cashew Pieces", "Nuts", 22.4, 25.68, 149, 55, new DateTime(2028, 2, 5), "Kg"),
new GroceryProduct(1018, "Cocoa Dream", "Chocolates", 11.28, 12.18, 58, 17, new DateTime(2029, 7, 15), "Pack"),
new GroceryProduct(1019, "Coffee Creamer", "Dairy Products", 9.86, 11.48, 282, 0, new DateTime(2029, 4, 24), "Litre"),
new GroceryProduct(1020, "Collard Greens", "Vegetables", 1.06, 1.2, 147, 6, new DateTime(2029, 4, 25), "Kg"),
new GroceryProduct(1021, "Bakery Rolls", "Breads and Buns", 5.78, 6.1, 482, 204, new DateTime(2028, 10, 5), "Pack"),
new GroceryProduct(1022, "Chocolate Bark", "Chocolates", 11.33, 12.14, 368, 116, new DateTime(2028, 10, 16), "Pack"),
new GroceryProduct(1023, "Chocolate Swirl", "Chocolates", 6.35, 7.17, 305, 1, new DateTime(2027, 8, 21), "Pack"),
new GroceryProduct(1024, "Cranberries", "Fruits", 2.43, 2.64, 321, 205, new DateTime(2029, 8, 11), "Kg"),
new GroceryProduct(1025, "Dairy Spread", "Dairy Products", 11.68, 12.99, 77, 75, new DateTime(2030, 12, 13), "Litre"),
new GroceryProduct(1026, "Pine Nuts", "Nuts", 32.73, 35.87, 72, 132, new DateTime(2030, 9, 26), "Kg"),
new GroceryProduct(1027, "Parboiled Rice", "Rices", 13.26, 15.53, 397, 46, new DateTime(2030, 4, 18), "Kg"),
new GroceryProduct(1028, "Cucumber", "Vegetables", 11.12, 13.08, 173, 83, new DateTime(2030, 11, 9), "Kg"),
new GroceryProduct(1029, "Turnip", "Vegetables", 8.27, 8.95, 315, 192, new DateTime(2027, 5, 20), "Kg"),
new GroceryProduct(1030, "Wild Rice", "Rices", 11.19, 11.99, 382, 14, new DateTime(2029, 10, 23), "Kg"),
new GroceryProduct(1031, "Black Rice", "Rices", 8.38, 8.92, 354, 119, new DateTime(2029, 8, 15), "Kg"),
new GroceryProduct(1032, "Chocolate Crunch", "Chocolates", 5.5, 6.03, 57, 246, new DateTime(2030, 2, 5), "Pack"),
new GroceryProduct(1033, "Crispy Lentils", "Snacks", 4.09, 4.4, 141, 71, new DateTime(2027, 3, 26), "Pack"),
new GroceryProduct(1034, "Milk Fudge", "Sweets", 13.3, 14.67, 349, 87, new DateTime(2029, 5, 4), "Pack"),
new GroceryProduct(1035, "Chocolate Cluster", "Chocolates", 14.11, 15.76, 167, 131, new DateTime(2029, 1, 3), "Pack"),
new GroceryProduct(1036, "Kefir", "Dairy Products", 7.46, 8.76, 304, 153, new DateTime(2027, 8, 12), "Litre"),
new GroceryProduct(1037, "Long Grain Rice", "Rices", 21.76, 23.95, 431, 10, new DateTime(2027, 4, 14), "Kg"),
new GroceryProduct(1038, "Crunchy Mix", "Snacks", 16.32, 18.25, 267, 10, new DateTime(2029, 10, 24), "Pack"),
new GroceryProduct(1039, "Caramel Chews", "Sweets", 9.44, 10.23, 257, 34, new DateTime(2029, 9, 23), "Pack"),
new GroceryProduct(1040, "Tiger Nuts", "Nuts", 14.21, 15.52, 149, 39, new DateTime(2028, 1, 22), "Kg"),
new GroceryProduct(1041, "Heavy Cream", "Dairy Products", 13.28, 15.16, 306, 131, new DateTime(2028, 10, 23), "Litre"),
new GroceryProduct(1042, "Meadow Rice", "Rices", 18.55, 20.64, 266, 205, new DateTime(2028, 8, 19), "Kg"),
new GroceryProduct(1043, "Caramel Truffle", "Chocolates", 10.22, 11.74, 144, 205, new DateTime(2030, 11, 20), "Pack"),
new GroceryProduct(1044, "Milk Cream", "Dairy Products", 17.59, 19.67, 319, 84, new DateTime(2030, 7, 1), "Litre"),
new GroceryProduct(1045, "Maple Candy", "Sweets", 5.25, 6.15, 222, 55, new DateTime(2030, 10, 6), "Pack"),
new GroceryProduct(1046, "Snack Nuts", "Nuts", 12.67, 13.39, 357, 95, new DateTime(2027, 11, 23), "Kg"),
new GroceryProduct(1047, "Ghee", "Dairy Products", 7.09, 7.53, 220, 13, new DateTime(2027, 12, 22), "Litre"),
new GroceryProduct(1048, "Rice Blend", "Rices", 17.1, 19.96, 382, 183, new DateTime(2028, 5, 4), "Kg"),
new GroceryProduct(1049, "Pita Bread", "Breads and Buns", 7.17, 8.32, 391, 100, new DateTime(2030, 12, 26), "Pack"),
new GroceryProduct(1050, "Radish", "Vegetables", 2.81, 3.16, 426, 177, new DateTime(2030, 8, 15), "Kg"),
new GroceryProduct(1051, "Vegetable Medley", "Vegetables", 9.46, 10.12, 100, 10, new DateTime(2029, 1, 15), "Kg"),
new GroceryProduct(1052, "Bananas", "Fruits", 13.36, 15.15, 443, 196, new DateTime(2028, 8, 14), "Kg"),
new GroceryProduct(1053, "Cashew Fudge", "Sweets", 7.53, 8.14, 269, 241, new DateTime(2030, 7, 10), "Pack"),
new GroceryProduct(1054, "Candy Mix", "Sweets", 6.51, 7.23, 184, 163, new DateTime(2030, 6, 25), "Pack"),
new GroceryProduct(1055, "Bagels", "Breads and Buns", 2.2, 2.32, 445, 244, new DateTime(2027, 8, 28), "Pack"),
new GroceryProduct(1056, "Snack Mix", "Snacks", 4.59, 5.27, 500, 249, new DateTime(2027, 11, 4), "Pack"),
new GroceryProduct(1057, "Nut Crunch", "Nuts", 12.67, 13.39, 422, 22, new DateTime(2029, 7, 4), "Kg"),
new GroceryProduct(1058, "Snack Twists", "Snacks", 13.12, 14.19, 415, 13, new DateTime(2030, 3, 11), "Pack"),
new GroceryProduct(1059, "Orange Candy", "Sweets", 19.08, 22.33, 347, 185, new DateTime(2029, 2, 26), "Pack"),
new GroceryProduct(1060, "Artichoke", "Vegetables", 1.55, 1.81, 214, 19, new DateTime(2027, 5, 28), "Kg"),
new GroceryProduct(1061, "Medium Grain Rice", "Rices", 6.21, 6.81, 87, 12, new DateTime(2029, 6, 9), "Kg"),
new GroceryProduct(1062, "Walnut Halves", "Nuts", 9.63, 11.22, 376, 55, new DateTime(2028, 9, 20), "Kg"),
new GroceryProduct(1063, "Valley Rice", "Rices", 10.18, 11.44, 146, 38, new DateTime(2028, 1, 7), "Kg"),
new GroceryProduct(1064, "Date Delight", "Sweets", 3.96, 4.47, 150, 165, new DateTime(2030, 1, 4), "Pack"),
new GroceryProduct(1065, "Corn Puffs", "Snacks", 6.18, 7.05, 473, 216, new DateTime(2028, 10, 25), "Pack"),
new GroceryProduct(1066, "Harvest Rice", "Rices", 14.57, 16.48, 479, 232, new DateTime(2027, 1, 11), "Kg"),
new GroceryProduct(1067, "Sugar Crystals", "Sweets", 11.86, 12.84, 356, 79, new DateTime(2029, 9, 10), "Pack"),
new GroceryProduct(1068, "Mocha Chocolate", "Chocolates", 4.04, 4.31, 58, 216, new DateTime(2027, 4, 7), "Pack"),
new GroceryProduct(1069, "Bell Peppers", "Vegetables", 2.52, 2.82, 500, 128, new DateTime(2029, 8, 11), "Kg"),
new GroceryProduct(1070, "Mint Candy", "Sweets", 16.99, 19.45, 464, 185, new DateTime(2030, 3, 27), "Pack"),
new GroceryProduct(1071, "Tortilla Chips", "Snacks", 3.2, 3.43, 189, 95, new DateTime(2027, 10, 17), "Pack"),
new GroceryProduct(1072, "Almond Brittle", "Sweets", 4.95, 5.42, 136, 219, new DateTime(2030, 9, 20), "Pack"),
new GroceryProduct(1073, "Onion Rings", "Snacks", 4.74, 5.19, 234, 82, new DateTime(2030, 1, 17), "Pack"),
new GroceryProduct(1074, "Cocoa Wafer", "Chocolates", 12.27, 14.11, 275, 151, new DateTime(2028, 9, 8), "Pack"),
new GroceryProduct(1075, "Dragon Fruit", "Fruits", 9.44, 10.39, 123, 24, new DateTime(2030, 4, 23), "Kg"),
new GroceryProduct(1076, "Lemons", "Fruits", 5.84, 6.88, 437, 211, new DateTime(2029, 1, 26), "Kg"),
new GroceryProduct(1077, "Cocoa Bloom", "Chocolates", 6.78, 7.94, 166, 209, new DateTime(2028, 12, 7), "Pack"),
new GroceryProduct(1078, "Cinnamon Candy", "Sweets", 8.08, 9.19, 188, 143, new DateTime(2029, 11, 23), "Pack"),
new GroceryProduct(1079, "French Bread", "Breads and Buns", 3.96, 4.48, 154, 210, new DateTime(2028, 3, 3), "Pack"),
new GroceryProduct(1080, "Chocolate Medallion", "Chocolates", 12.16, 14.18, 200, 133, new DateTime(2028, 12, 3), "Pack"),
new GroceryProduct(1081, "Mixed Nuts", "Nuts", 25.3, 28.31, 424, 149, new DateTime(2027, 9, 20), "Kg"),
new GroceryProduct(1082, "Pili Nuts", "Nuts", 13.87, 16.21, 301, 23, new DateTime(2028, 2, 18), "Kg"),
new GroceryProduct(1083, "Golden Rice", "Rices", 6.92, 7.68, 92, 218, new DateTime(2030, 6, 9), "Kg"),
new GroceryProduct(1084, "Pears", "Fruits", 8.27, 9.35, 396, 41, new DateTime(2028, 11, 12), "Kg"),
new GroceryProduct(1085, "Mandarins", "Fruits", 14.98, 15.91, 214, 52, new DateTime(2030, 7, 17), "Kg"),
new GroceryProduct(1086, "Ginkgo Nuts", "Nuts", 32.12, 34.24, 148, 107, new DateTime(2027, 5, 5), "Kg"),
new GroceryProduct(1087, "Pecans", "Nuts", 18.83, 20.59, 163, 112, new DateTime(2029, 12, 18), "Kg"),
new GroceryProduct(1088, "Apricots", "Fruits", 9.22, 10.21, 338, 145, new DateTime(2030, 11, 15), "Kg"),
new GroceryProduct(1089, "Hazelnut Truffle", "Chocolates", 14.85, 15.7, 278, 77, new DateTime(2028, 2, 18), "Pack"),
new GroceryProduct(1090, "Pineapple", "Fruits", 10.39, 12.06, 140, 45, new DateTime(2027, 8, 28), "Kg"),
new GroceryProduct(1091, "Rice Snacks", "Snacks", 17.37, 19.2, 436, 194, new DateTime(2028, 3, 24), "Pack"),
new GroceryProduct(1092, "Short Grain Rice", "Rices", 14.42, 15.49, 315, 46, new DateTime(2029, 9, 13), "Kg"),
new GroceryProduct(1093, "Bok Choy", "Vegetables", 4.04, 4.61, 397, 181, new DateTime(2029, 10, 12), "Kg"),
new GroceryProduct(1094, "Okra", "Vegetables", 2.33, 2.57, 227, 138, new DateTime(2028, 7, 28), "Kg"),
new GroceryProduct(1095, "Honeydew", "Fruits", 10.02, 11.76, 338, 94, new DateTime(2030, 9, 5), "Kg"),
new GroceryProduct(1096, "Pistachios", "Nuts", 10.13, 11.13, 126, 132, new DateTime(2030, 8, 19), "Kg"),
new GroceryProduct(1097, "Seeded Bun", "Breads and Buns", 5.66, 6.61, 442, 37, new DateTime(2030, 8, 11), "Pack"),
new GroceryProduct(1098, "Toffee Chocolate", "Chocolates", 22.27, 23.71, 96, 53, new DateTime(2028, 1, 20), "Pack"),
new GroceryProduct(1099, "Cardamom Bites", "Sweets", 13.67, 14.84, 316, 145, new DateTime(2027, 11, 15), "Pack"),
new GroceryProduct(1100, "Rose Fudge", "Sweets", 11.78, 12.53, 191, 231, new DateTime(2029, 9, 18), "Pack"),
new GroceryProduct(1101, "Dairy Blend", "Dairy Products", 5.25, 6.15, 216, 44, new DateTime(2027, 8, 15), "Litre"),
new GroceryProduct(1102, "Berry Chews", "Sweets", 5.11, 5.92, 259, 193, new DateTime(2030, 1, 11), "Pack"),
new GroceryProduct(1103, "Fragrant Rice", "Rices", 16.01, 17.55, 486, 141, new DateTime(2029, 12, 1), "Kg"),
new GroceryProduct(1104, "Dinner Rolls", "Breads and Buns", 3.33, 3.86, 437, 239, new DateTime(2029, 11, 18), "Pack"),
new GroceryProduct(1105, "Almond Kernels", "Nuts", 33.56, 36.31, 472, 135, new DateTime(2028, 9, 7), "Kg"),
new GroceryProduct(1106, "Dessert Bites", "Sweets", 3.1, 3.49, 108, 128, new DateTime(2029, 9, 20), "Pack"),
new GroceryProduct(1107, "Hamburger Buns", "Breads and Buns", 9.54, 10.33, 349, 123, new DateTime(2027, 6, 4), "Pack"),
new GroceryProduct(1108, "Pantry Rice", "Rices", 19.22, 21.58, 226, 156, new DateTime(2028, 3, 2), "Kg"),
new GroceryProduct(1109, "Nut Bites", "Nuts", 10.76, 11.98, 81, 34, new DateTime(2030, 2, 25), "Kg"),
new GroceryProduct(1110, "Crisp Bites", "Snacks", 7.02, 7.52, 185, 195, new DateTime(2030, 2, 21), "Pack"),
new GroceryProduct(1111, "Bread Knot", "Breads and Buns", 2.4, 2.81, 106, 84, new DateTime(2029, 5, 19), "Pack"),
new GroceryProduct(1112, "Peas", "Vegetables", 5.11, 5.48, 212, 53, new DateTime(2028, 3, 16), "Kg"),
new GroceryProduct(1113, "White Bread", "Breads and Buns", 5.91, 6.55, 433, 150, new DateTime(2029, 1, 26), "Pack"),
new GroceryProduct(1114, "Spinach", "Vegetables", 5.19, 5.82, 88, 123, new DateTime(2027, 12, 10), "Kg"),
new GroceryProduct(1115, "Limes", "Fruits", 11.85, 13.2, 95, 227, new DateTime(2030, 9, 21), "Kg"),
new GroceryProduct(1116, "Cheese Crackers", "Snacks", 17.83, 20.24, 96, 118, new DateTime(2027, 8, 17), "Pack"),
new GroceryProduct(1117, "Sesame Brittle", "Sweets", 15.76, 16.87, 171, 65, new DateTime(2030, 7, 17), "Pack"),
new GroceryProduct(1118, "Coconut Fudge", "Sweets", 10.38, 11.26, 93, 205, new DateTime(2030, 10, 20), "Pack"),
new GroceryProduct(1119, "Crunch Squares", "Snacks", 4.76, 5.18, 305, 15, new DateTime(2028, 2, 18), "Pack"),
new GroceryProduct(1120, "Cabbage", "Vegetables", 11.19, 13.01, 292, 230, new DateTime(2027, 7, 26), "Kg"),
new GroceryProduct(1121, "Cocoa Ribbon", "Chocolates", 16.91, 18.29, 332, 238, new DateTime(2027, 12, 9), "Pack"),
new GroceryProduct(1122, "Guava", "Fruits", 12.37, 14.52, 103, 230, new DateTime(2029, 2, 1), "Kg"),
new GroceryProduct(1123, "Chocolate Crescent", "Chocolates", 4.52, 5.05, 54, 197, new DateTime(2029, 5, 13), "Pack"),
new GroceryProduct(1124, "Peanut Crunch", "Snacks", 4.84, 5.33, 184, 219, new DateTime(2027, 2, 4), "Pack"),
new GroceryProduct(1125, "Honey Candy", "Sweets", 7.24, 7.94, 249, 131, new DateTime(2030, 11, 7), "Pack"),
new GroceryProduct(1126, "Pretzel Sticks", "Snacks", 10.82, 11.71, 479, 219, new DateTime(2029, 8, 1), "Pack"),
new GroceryProduct(1127, "Chocolate Milk", "Dairy Products", 8.68, 9.35, 310, 85, new DateTime(2029, 2, 20), "Litre"),
new GroceryProduct(1128, "Persimmon", "Fruits", 4.25, 4.49, 441, 232, new DateTime(2029, 8, 13), "Kg"),
new GroceryProduct(1129, "Leeks", "Vegetables", 9.77, 11.46, 181, 225, new DateTime(2030, 12, 11), "Kg"),
new GroceryProduct(1130, "Cantaloupe", "Fruits", 7.41, 8.48, 236, 173, new DateTime(2030, 10, 13), "Kg"),
new GroceryProduct(1131, "Caramel Squares", "Sweets", 7.1, 7.94, 177, 128, new DateTime(2028, 11, 2), "Pack"),
new GroceryProduct(1132, "Nut Selection", "Nuts", 13.98, 16.05, 265, 139, new DateTime(2028, 4, 13), "Kg"),
new GroceryProduct(1133, "Skim Milk", "Dairy Products", 12.64, 13.75, 207, 166, new DateTime(2030, 2, 18), "Litre"),
new GroceryProduct(1134, "Vanilla Yogurt", "Dairy Products", 9.4, 10.29, 207, 193, new DateTime(2030, 10, 19), "Litre"),
new GroceryProduct(1135, "Swiss Cheese", "Dairy Products", 15.87, 16.81, 287, 226, new DateTime(2027, 8, 24), "Litre"),
new GroceryProduct(1136, "Chocolate Drop", "Chocolates", 7.38, 7.81, 295, 143, new DateTime(2027, 5, 7), "Pack"),
new GroceryProduct(1137, "Greek Yogurt", "Dairy Products", 16.3, 17.6, 89, 116, new DateTime(2027, 7, 6), "Litre"),
new GroceryProduct(1138, "Country Rice", "Rices", 12.39, 14.21, 372, 123, new DateTime(2027, 12, 10), "Kg"),
new GroceryProduct(1139, "Carrots", "Vegetables", 8.48, 9.77, 233, 179, new DateTime(2029, 1, 1), "Kg"),
new GroceryProduct(1140, "Munch Bites", "Snacks", 6.74, 7.39, 486, 148, new DateTime(2030, 5, 2), "Pack"),
new GroceryProduct(1141, "Hot Dog Buns", "Breads and Buns", 8.02, 8.79, 233, 55, new DateTime(2028, 10, 23), "Pack"),
new GroceryProduct(1142, "Nectarines", "Fruits", 7.41, 8.48, 124, 62, new DateTime(2028, 11, 13), "Kg"),
new GroceryProduct(1143, "Pomegranate", "Fruits", 13.64, 15.18, 453, 139, new DateTime(2027, 6, 3), "Kg"),
new GroceryProduct(1144, "Quinoa Crisps", "Snacks", 6.3, 7.4, 181, 201, new DateTime(2028, 5, 16), "Pack"),
new GroceryProduct(1145, "Prairie Rice", "Rices", 14.26, 15.25, 267, 122, new DateTime(2028, 9, 23), "Kg"),
new GroceryProduct(1146, "Basmati Rice", "Rices", 20.49, 22.44, 208, 86, new DateTime(2028, 1, 6), "Kg"),
new GroceryProduct(1147, "Ginger Candy", "Sweets", 19.08, 22.33, 57, 197, new DateTime(2028, 10, 2), "Pack"),
new GroceryProduct(1148, "Dark Chocolate Block", "Chocolates", 10.11, 11.34, 354, 101, new DateTime(2030, 11, 24), "Pack"),
new GroceryProduct(1149, "Zucchini", "Vegetables", 3.27, 3.63, 363, 51, new DateTime(2028, 6, 22), "Kg"),
new GroceryProduct(1150, "Garlic", "Vegetables", 2.38, 2.71, 385, 163, new DateTime(2029, 2, 22), "Kg"),
new GroceryProduct(1151, "Macadamias", "Nuts", 9.66, 10.25, 482, 222, new DateTime(2028, 5, 28), "Kg"),
new GroceryProduct(1152, "Salted Pistachios", "Nuts", 21, 23.46, 154, 44, new DateTime(2028, 5, 22), "Kg"),
new GroceryProduct(1153, "Royal Rice", "Rices", 12.63, 13.87, 131, 236, new DateTime(2030, 4, 16), "Kg"),
new GroceryProduct(1154, "Butter", "Dairy Products", 19.9, 21.3, 123, 135, new DateTime(2030, 2, 19), "Litre"),
new GroceryProduct(1155, "Almonds", "Nuts", 15.03, 17.01, 308, 21, new DateTime(2027, 8, 11), "Kg"),
new GroceryProduct(1156, "Rustic Loaf", "Breads and Buns", 9.51, 10.77, 277, 3, new DateTime(2030, 12, 23), "Pack"),
new GroceryProduct(1157, "Sugar Drops", "Sweets", 18.1, 20.24, 232, 163, new DateTime(2027, 4, 9), "Pack"),
new GroceryProduct(1158, "Blackberries", "Fruits", 6.89, 7.52, 123, 56, new DateTime(2029, 11, 24), "Kg"),
new GroceryProduct(1159, "Cocoa Treasure", "Chocolates", 20.82, 24.08, 117, 23, new DateTime(2029, 3, 15), "Pack"),
new GroceryProduct(1160, "Cream Cheese", "Dairy Products", 9.59, 11.27, 314, 183, new DateTime(2028, 10, 1), "Litre"),
new GroceryProduct(1161, "Yam", "Vegetables", 10.48, 11.39, 280, 120, new DateTime(2029, 4, 27), "Kg"),
new GroceryProduct(1162, "Potato Chips", "Snacks", 12.81, 15.04, 122, 91, new DateTime(2028, 1, 10), "Pack"),
new GroceryProduct(1163, "Pumpkin", "Vegetables", 7.32, 7.73, 298, 65, new DateTime(2027, 6, 10), "Kg"),
new GroceryProduct(1164, "Cottage Loaf", "Breads and Buns", 9.07, 10.1, 57, 186, new DateTime(2030, 10, 23), "Pack"),
new GroceryProduct(1165, "Milk Powder", "Dairy Products", 5.11, 5.92, 493, 139, new DateTime(2030, 10, 26), "Litre"),
new GroceryProduct(1166, "Pullman Loaf", "Breads and Buns", 9.07, 10.06, 368, 24, new DateTime(2028, 11, 21), "Pack"),
new GroceryProduct(1167, "Grapefruit", "Fruits", 14.98, 17.04, 235, 181, new DateTime(2027, 2, 14), "Kg"),
new GroceryProduct(1168, "Potato Rolls", "Breads and Buns", 7.81, 8.99, 310, 57, new DateTime(2030, 3, 9), "Pack"),
new GroceryProduct(1169, "Cracker Bites", "Snacks", 17.5, 19.38, 142, 170, new DateTime(2028, 5, 5), "Pack"),
new GroceryProduct(1170, "Everyday Rice", "Rices", 6.54, 7.15, 112, 244, new DateTime(2029, 4, 26), "Kg"),
new GroceryProduct(1171, "Trail Mix", "Snacks", 16.14, 17.97, 468, 80, new DateTime(2029, 7, 23), "Pack"),
new GroceryProduct(1172, "Swiss Chard", "Vegetables", 1.52, 1.62, 370, 227, new DateTime(2027, 7, 18), "Kg"),
new GroceryProduct(1173, "Colby Cheese", "Dairy Products", 7.53, 8.14, 482, 114, new DateTime(2028, 9, 28), "Litre"),
new GroceryProduct(1174, "Chocolate Pearl", "Chocolates", 11.07, 12.41, 151, 199, new DateTime(2029, 6, 3), "Pack"),
new GroceryProduct(1175, "Kitchen Rice", "Rices", 20.03, 22.3, 119, 98, new DateTime(2029, 4, 4), "Kg"),
new GroceryProduct(1176, "Jelly Cubes", "Sweets", 7.24, 7.94, 271, 195, new DateTime(2028, 7, 7), "Pack"),
new GroceryProduct(1177, "Mozzarella Cheese", "Dairy Products", 7.47, 8.39, 341, 139, new DateTime(2027, 9, 9), "Litre"),
new GroceryProduct(1178, "White Rice", "Rices", 13.78, 14.66, 67, 174, new DateTime(2028, 5, 9), "Kg"),
new GroceryProduct(1179, "Wheat Crackers", "Snacks", 5.42, 5.74, 59, 155, new DateTime(2030, 7, 17), "Pack"),
new GroceryProduct(1180, "Lemon Drops", "Sweets", 3.71, 4.18, 418, 122, new DateTime(2029, 4, 2), "Pack"),
new GroceryProduct(1181, "English Muffins", "Breads and Buns", 2.44, 2.8, 75, 55, new DateTime(2028, 7, 17), "Pack"),
new GroceryProduct(1182, "Country Bread", "Breads and Buns", 9.78, 10.53, 200, 144, new DateTime(2027, 8, 25), "Pack"),
new GroceryProduct(1183, "Coconut Toffee", "Sweets", 15.76, 16.87, 331, 152, new DateTime(2027, 7, 6), "Pack"),
new GroceryProduct(1184, "Cocoa Crisp", "Chocolates", 24.12, 26.66, 180, 61, new DateTime(2030, 5, 14), "Pack"),
new GroceryProduct(1185, "Hickory Nuts", "Nuts", 27.61, 31.77, 459, 236, new DateTime(2030, 5, 8), "Kg"),
new GroceryProduct(1186, "Soft Buns", "Breads and Buns", 8.51, 9.62, 242, 239, new DateTime(2029, 6, 25), "Pack"),
new GroceryProduct(1187, "String Cheese", "Dairy Products", 16.42, 17.89, 434, 202, new DateTime(2029, 10, 3), "Litre"),
new GroceryProduct(1188, "Cocoa Delight", "Chocolates", 15.95, 17.6, 443, 33, new DateTime(2030, 11, 13), "Pack"),
new GroceryProduct(1189, "Chocolate Melt", "Chocolates", 24.71, 27.2, 399, 143, new DateTime(2028, 8, 17), "Pack"),
new GroceryProduct(1190, "Arborio Rice", "Rices", 11.78, 12.69, 140, 118, new DateTime(2030, 4, 13), "Kg"),
new GroceryProduct(1191, "Sugar Sticks", "Sweets", 15.31, 16.89, 189, 156, new DateTime(2028, 11, 9), "Pack"),
new GroceryProduct(1192, "Beetroot", "Vegetables", 5.49, 6.16, 61, 58, new DateTime(2027, 8, 25), "Kg"),
new GroceryProduct(1193, "Rye Bread", "Breads and Buns", 6.81, 7.88, 364, 183, new DateTime(2027, 8, 23), "Pack"),
new GroceryProduct(1194, "Candlenuts", "Nuts", 19.97, 22.14, 420, 90, new DateTime(2028, 10, 16), "Kg"),
new GroceryProduct(1195, "Nut Blend", "Nuts", 13.37, 15.3, 459, 4, new DateTime(2027, 4, 19), "Kg"),
new GroceryProduct(1196, "Kale", "Vegetables", 6.27, 7.38, 260, 238, new DateTime(2030, 3, 15), "Kg"),
new GroceryProduct(1197, "Family Rice", "Rices", 15.28, 17.44, 154, 213, new DateTime(2029, 9, 23), "Kg"),
new GroceryProduct(1198, "Savory Sticks", "Snacks", 15.55, 17.33, 67, 159, new DateTime(2030, 10, 13), "Pack"),
new GroceryProduct(1199, "Taffy Bites", "Sweets", 10.53, 11.68, 236, 113, new DateTime(2028, 11, 14), "Pack"),
new GroceryProduct(1200, "Grapes", "Fruits", 7.78, 8.48, 231, 53, new DateTime(2029, 6, 16), "Kg"),
new GroceryProduct(1201, "Breadsticks", "Breads and Buns", 6.36, 6.8, 486, 66, new DateTime(2030, 7, 11), "Pack"),
new GroceryProduct(1202, "Classic Rice", "Rices", 7.57, 8.29, 210, 185, new DateTime(2030, 11, 13), "Kg"),
new GroceryProduct(1203, "Roasted Almonds", "Nuts", 13.99, 15.76, 470, 247, new DateTime(2029, 2, 23), "Kg"),
new GroceryProduct(1204, "Hazelnuts", "Nuts", 16.72, 19.49, 317, 131, new DateTime(2029, 5, 22), "Kg"),
new GroceryProduct(1205, "Fruit Chews", "Sweets", 7.16, 7.53, 458, 87, new DateTime(2029, 8, 4), "Pack"),
new GroceryProduct(1206, "Roasted Cashews", "Nuts", 13.99, 15.76, 438, 87, new DateTime(2028, 2, 16), "Kg"),
new GroceryProduct(1207, "Brazil Nuts", "Nuts", 17.38, 18.45, 328, 134, new DateTime(2029, 10, 16), "Kg"),
new GroceryProduct(1208, "Blueberries", "Fruits", 14.22, 16.27, 91, 177, new DateTime(2029, 8, 24), "Kg"),
new GroceryProduct(1209, "Custard", "Dairy Products", 7.48, 8.2, 487, 176, new DateTime(2030, 7, 4), "Litre"),
new GroceryProduct(1210, "Condensed Milk", "Dairy Products", 10.09, 11.1, 382, 191, new DateTime(2030, 10, 4), "Litre"),
new GroceryProduct(1211, "Corn Chips", "Snacks", 11.05, 12.51, 210, 78, new DateTime(2029, 8, 5), "Pack"),
new GroceryProduct(1212, "Pepper Cheese", "Dairy Products", 13.23, 14.74, 386, 101, new DateTime(2028, 2, 24), "Litre"),
new GroceryProduct(1213, "Strawberry Yogurt", "Dairy Products", 15.97, 17.14, 440, 4, new DateTime(2028, 4, 14), "Litre"),
new GroceryProduct(1214, "Celery", "Vegetables", 10.08, 10.88, 348, 3, new DateTime(2027, 2, 3), "Kg"),
new GroceryProduct(1215, "Ricotta Cheese", "Dairy Products", 19.57, 22.4, 472, 0, new DateTime(2029, 11, 12), "Litre"),
new GroceryProduct(1216, "Green Beans", "Vegetables", 5.33, 6.13, 270, 205, new DateTime(2028, 4, 13), "Kg"),
new GroceryProduct(1217, "Red Cabbage", "Vegetables", 10.01, 11.47, 305, 146, new DateTime(2027, 10, 22), "Kg"),
new GroceryProduct(1218, "Kaiser Rolls", "Breads and Buns", 2.5, 2.77, 291, 231, new DateTime(2029, 8, 26), "Pack"),
new GroceryProduct(1219, "Peanut Brittle", "Sweets", 15.18, 16.44, 149, 154, new DateTime(2028, 2, 17), "Pack"),
new GroceryProduct(1220, "Italian Bread", "Breads and Buns", 6.25, 6.6, 314, 136, new DateTime(2027, 3, 19), "Pack"),
new GroceryProduct(1221, "Asparagus", "Vegetables", 10.05, 11.5, 370, 133, new DateTime(2030, 11, 11), "Kg"),
new GroceryProduct(1222, "Multigrain Bread", "Breads and Buns", 4.76, 5.24, 261, 134, new DateTime(2030, 3, 27), "Pack"),
new GroceryProduct(1223, "Cottage Cheese", "Dairy Products", 3.8, 4.18, 151, 198, new DateTime(2027, 3, 8), "Litre"),
new GroceryProduct(1224, "Beech Nuts", "Nuts", 13.22, 14, 115, 86, new DateTime(2030, 8, 17), "Kg"),
new GroceryProduct(1225, "Milk Chocolate Block", "Chocolates", 16.27, 17.11, 130, 159, new DateTime(2027, 9, 3), "Pack"),
new GroceryProduct(1226, "Chocolate Harmony", "Chocolates", 10.2, 11.12, 372, 240, new DateTime(2028, 11, 13), "Pack"),
new GroceryProduct(1227, "Pecan Pieces", "Nuts", 24.11, 25.7, 119, 59, new DateTime(2029, 3, 11), "Kg"),
new GroceryProduct(1228, "Parsley", "Vegetables", 3.78, 4, 208, 137, new DateTime(2029, 5, 23), "Kg"),
new GroceryProduct(1229, "Nut Medley", "Nuts", 28.35, 30.42, 151, 179, new DateTime(2030, 1, 13), "Kg"),
new GroceryProduct(1230, "Buttermilk", "Dairy Products", 3.71, 4.18, 442, 137, new DateTime(2029, 9, 8), "Litre"),
new GroceryProduct(1231, "Pretzel Buns", "Breads and Buns", 7.4, 8, 265, 155, new DateTime(2028, 7, 6), "Pack"),
new GroceryProduct(1232, "Calrose Rice", "Rices", 14.19, 16.6, 75, 55, new DateTime(2030, 6, 8), "Kg"),
new GroceryProduct(1233, "Monterey Cheese", "Dairy Products", 6.77, 7.63, 76, 121, new DateTime(2027, 9, 8), "Litre"),
new GroceryProduct(1234, "Cherries", "Fruits", 9.41, 11.08, 447, 2, new DateTime(2027, 5, 7), "Kg"),
new GroceryProduct(1235, "Red Rice", "Rices", 18.01, 20.77, 331, 205, new DateTime(2028, 8, 7), "Kg"),
new GroceryProduct(1236, "Figs", "Fruits", 6.86, 7.35, 325, 206, new DateTime(2027, 12, 20), "Kg"),
new GroceryProduct(1237, "Cocoa Twist", "Chocolates", 6.35, 7.38, 345, 25, new DateTime(2027, 3, 7), "Pack"),
new GroceryProduct(1238, "Veggie Crisps", "Snacks", 8.79, 10.04, 491, 78, new DateTime(2027, 12, 23), "Pack"),
new GroceryProduct(1239, "Brown Rice", "Rices", 20.6, 22.01, 96, 100, new DateTime(2029, 8, 14), "Kg"),
new GroceryProduct(1240, "Pearl Rice", "Rices", 16.51, 18.92, 96, 204, new DateTime(2030, 2, 13), "Kg"),
new GroceryProduct(1241, "Whipped Butter", "Dairy Products", 4.99, 5.43, 222, 133, new DateTime(2028, 5, 8), "Litre"),
new GroceryProduct(1242, "Cherry Chews", "Sweets", 6.2, 7.03, 154, 220, new DateTime(2027, 6, 17), "Pack"),
new GroceryProduct(1243, "Peaches", "Fruits", 3.78, 4, 198, 140, new DateTime(2028, 7, 21), "Kg"),
new GroceryProduct(1244, "Shallots", "Vegetables", 10.64, 11.85, 291, 136, new DateTime(2027, 3, 8), "Kg"),
new GroceryProduct(1245, "Bagel Chips", "Snacks", 13.07, 15.18, 341, 22, new DateTime(2028, 5, 25), "Pack"),
new GroceryProduct(1246, "Premium Nuts", "Nuts", 16.32, 18.45, 152, 46, new DateTime(2030, 8, 12), "Kg"),
new GroceryProduct(1247, "Snack Squares", "Snacks", 4.26, 4.51, 243, 65, new DateTime(2028, 3, 16), "Pack"),
new GroceryProduct(1248, "Jasmine Rice", "Rices", 14.22, 16.28, 487, 61, new DateTime(2030, 8, 3), "Kg"),
new GroceryProduct(1249, "River Rice", "Rices", 20.6, 22.01, 78, 77, new DateTime(2030, 10, 8), "Kg"),
new GroceryProduct(1250, "Cocoa Truffle", "Chocolates", 15.3, 16.38, 336, 219, new DateTime(2030, 8, 17), "Pack"),
new GroceryProduct(1251, "Toffee Nuggets", "Sweets", 11.82, 13.22, 54, 69, new DateTime(2029, 7, 1), "Pack"),
new GroceryProduct(1252, "Ginger", "Vegetables", 1.71, 2, 471, 121, new DateTime(2029, 3, 23), "Kg"),
new GroceryProduct(1253, "Brussels Sprouts", "Vegetables", 1, 1.09, 455, 144, new DateTime(2027, 11, 5), "Kg"),
new GroceryProduct(1254, "Premium Rice", "Rices", 21.52, 24.1, 128, 186, new DateTime(2029, 3, 25), "Kg"),
new GroceryProduct(1255, "Eggplant", "Vegetables", 6.17, 6.73, 100, 184, new DateTime(2027, 4, 8), "Kg"),
new GroceryProduct(1256, "Fennel", "Vegetables", 11.35, 12.43, 74, 161, new DateTime(2027, 8, 4), "Kg"),
new GroceryProduct(1257, "Savory Bites", "Snacks", 11.54, 12.29, 236, 178, new DateTime(2028, 12, 2), "Pack"),
new GroceryProduct(1258, "Crunchy Nuts", "Nuts", 20.16, 22.53, 250, 119, new DateTime(2030, 9, 12), "Kg"),
new GroceryProduct(1259, "Chestnuts", "Nuts", 25.3, 28.31, 324, 29, new DateTime(2027, 10, 13), "Kg"),
new GroceryProduct(1260, "Caramel Chocolate", "Chocolates", 5.48, 6.32, 105, 102, new DateTime(2027, 5, 13), "Pack"),
new GroceryProduct(1261, "Banana Chips", "Snacks", 7.22, 7.82, 142, 184, new DateTime(2028, 9, 22), "Pack"),
new GroceryProduct(1262, "Hill Rice", "Rices", 5.53, 6.25, 390, 182, new DateTime(2028, 9, 3), "Kg"),
new GroceryProduct(1263, "Dates", "Fruits", 5.41, 6.35, 463, 247, new DateTime(2029, 11, 5), "Kg"),
new GroceryProduct(1264, "Cocoa Morsels", "Dairy Products", 5.33, 6.25, 100, 10, new DateTime(2029, 1, 15), "Litre"),
new GroceryProduct(1265, "Crispy Mix", "Snacks", 15.07, 16.39, 377, 139, new DateTime(2028, 10, 5), "Pack"),
new GroceryProduct(1266, "Cashews", "Nuts", 15.03, 17.01, 443, 70, new DateTime(2030, 1, 7), "Kg"),
new GroceryProduct(1267, "Praline Chocolate", "Chocolates", 22.42, 25.83, 60, 53, new DateTime(2028, 7, 28), "Pack"),
new GroceryProduct(1268, "Butter Roll", "Breads and Buns", 2.89, 3.34, 87, 87, new DateTime(2030, 9, 5), "Pack"),
new GroceryProduct(1269, "Farmhouse Loaf", "Breads and Buns", 3.99, 4.53, 148, 102, new DateTime(2027, 8, 19), "Pack"),
new GroceryProduct(1270, "Sour Cream", "Dairy Products", 10.4, 11.86, 316, 202, new DateTime(2028, 2, 18), "Litre"),
new GroceryProduct(1271, "Popcorn", "Snacks", 3.04, 3.27, 500, 178, new DateTime(2028, 9, 21), "Pack"),
new GroceryProduct(1272, "Tomatoes", "Vegetables", 8.1, 9.28, 425, 176, new DateTime(2028, 10, 2), "Kg"),
new GroceryProduct(1273, "Plums", "Fruits", 10.45, 11.18, 99, 118, new DateTime(2029, 2, 18), "Kg"),
new GroceryProduct(1274, "Nut Crumble", "Breads and Buns", 8.69, 9.76, 100, 10, new DateTime(2029, 1, 15), "Pack"),
new GroceryProduct(1275, "Yogurt", "Dairy Products", 8.34, 9.5, 343, 92, new DateTime(2028, 3, 20), "Litre"),
new GroceryProduct(1276, "Parmesan Cheese", "Dairy Products", 14.68, 17.11, 431, 229, new DateTime(2029, 10, 5), "Litre"),
new GroceryProduct(1277, "Ganache Bite", "Chocolates", 12.49, 13.52, 493, 98, new DateTime(2028, 11, 5), "Pack"),
new GroceryProduct(1278, "Cauliflower", "Vegetables", 7.28, 8.35, 427, 188, new DateTime(2028, 6, 12), "Kg"),
new GroceryProduct(1279, "Butter Toffee", "Sweets", 19.43, 22.58, 252, 250, new DateTime(2027, 2, 20), "Pack"),
new GroceryProduct(1280, "Chocolate Drizzle", "Chocolates", 8.46, 8.92, 101, 2, new DateTime(2027, 8, 26), "Pack"),
new GroceryProduct(1281, "Flatbread", "Breads and Buns", 5.45, 5.93, 416, 17, new DateTime(2029, 2, 22), "Pack"),
new GroceryProduct(1282, "Ciabatta Rolls", "Breads and Buns", 2.04, 2.3, 190, 201, new DateTime(2027, 11, 8), "Pack"),
new GroceryProduct(1283, "Mini Roll", "Breads and Buns", 6.06, 6.62, 166, 8, new DateTime(2028, 2, 14), "Pack"),
new GroceryProduct(1284, "Silky Rice", "Rices", 14.2, 15.9, 300, 98, new DateTime(2029, 5, 16), "Kg"),
new GroceryProduct(1285, "Roasted Walnuts", "Nuts", 32.91, 36.33, 69, 195, new DateTime(2030, 3, 7), "Kg"),
new GroceryProduct(1286, "Crusty Roll", "Breads and Buns", 4.88, 5.66, 391, 22, new DateTime(2029, 4, 7), "Pack"),
new GroceryProduct(1287, "Tangerines", "Fruits", 5.96, 6.7, 80, 120, new DateTime(2029, 12, 4), "Kg"),
new GroceryProduct(1288, "Sourdough Bread", "Breads and Buns", 9.94, 11.72, 182, 232, new DateTime(2028, 11, 24), "Pack"),
new GroceryProduct(1289, "Chocolate Nugget", "Chocolates", 6.1, 7.17, 265, 54, new DateTime(2027, 5, 28), "Pack"),
new GroceryProduct(1290, "Fudge Square", "Chocolates", 13.19, 15.03, 242, 250, new DateTime(2030, 7, 3), "Pack"),
new GroceryProduct(1291, "Broccoli", "Vegetables", 10.84, 11.41, 87, 19, new DateTime(2030, 9, 12), "Kg"),
new GroceryProduct(1292, "Sweet Treats", "Sweets", 12.68, 13.51, 120, 243, new DateTime(2029, 12, 5), "Pack"),
new GroceryProduct(1293, "Star Fruit", "Fruits", 12.78, 14.26, 129, 198, new DateTime(2028, 1, 25), "Kg"),
new GroceryProduct(1294, "Granola Bites", "Snacks", 13.94, 15.3, 406, 244, new DateTime(2030, 7, 3), "Pack"),
new GroceryProduct(1295, "Papaya", "Fruits", 2.83, 3.31, 61, 166, new DateTime(2030, 2, 19), "Kg"),
new GroceryProduct(1296, "Rice Pops", "Snacks", 11.33, 12.55, 361, 111, new DateTime(2028, 11, 15), "Pack"),
new GroceryProduct(1297, "Brioche Bun", "Breads and Buns", 3.68, 3.89, 377, 84, new DateTime(2030, 7, 3), "Pack"),
new GroceryProduct(1298, "Chocolate Velvet", "Chocolates", 18.62, 21.52, 90, 107, new DateTime(2027, 2, 4), "Pack"),
new GroceryProduct(1299, "Choice Rice", "Rices", 10.89, 11.76, 84, 235, new DateTime(2028, 9, 23), "Kg"),
new GroceryProduct(1300, "Mangoes", "Fruits", 12.05, 12.76, 464, 38, new DateTime(2029, 3, 21), "Kg")
};
public int ProductID { get; set; }
public string ProductName { get; set; }
public string Category { get; set; }
public double PurchasePrice { get; set; }
public double SellingPrice { get; set; }
public int AvailableStock { get; set; }
public int SoldStock { get; set; }
public DateTime ExpiryDate { get; set; }
public string Unit { get; set; }
}
}
}
@* Install once: Install-Package Lumen.UI.Mvc (or: dotnet add package Lumen.UI.Mvc) *@
@* Views/Web.config: <add namespace="Lumen.UI.Mvc" /> *@
@* Views/Shared/_Layout.cshtml *@
<head>
@Html.UiStyles()
<link rel="stylesheet" href="~/Content/site.css" />
</head>
<body>
@RenderBody()
@Html.UiScripts()
@RenderSection("scripts", required: false)
</body>
@* Grids with a DataUrl: @Html.AntiForgeryToken() on the page and [HttpPost, ValidateJsonAntiForgeryToken] on the action. *@
In this demo, the row number column is enabled by setting the columns->type property to RowNumber. The grid automatically generates and maintains row numbers for all displayed records, updating them appropriately during operations such as paging, sorting, filtering and grouping.