Hi
try this
Hi,
Try this
namespace BusinessLayer
{
public class queries
{
DataTable dt;
DataRow dr;
public void createDataTable()
{
dt = new DataTable();
dt.Columns.Add(new DataColumn("Sr.No", typeof(int)));
dt.Columns.Add(new DataColumn("Product ID", typeof(int)));
dt.Columns.Add(new DataColumn("Product Name", typeof(string)));
dt.Columns.Add(new DataColumn("Price", typeof(int)));
dt.Columns.Add(new DataColumn("Quantity", typeof(int)));
dt.Columns.Add(new DataColumn("Subtotal", typeof(int)));
dt.Columns["Sr.No"].AutoIncrement = true;
dt.Columns["Sr.No"].AutoIncrementSeed = 1;
dt.Columns["Sr.No"].AutoIncrementStep = 1;
ViewBag["dt"] = dt;
}