using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Data.SqlClient;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace lllllllll
{
public partial class Form2 : Form
{
public Form2( string Item_no, string Item_name, string Description,string Price)
{
InitializeComponent();
dataGridView1.Rows.Add();
dataGridView1.Rows[0].Cells[0].Value = Item_no;
dataGridView1.Rows[0].Cells[1].Value = Item_name;
dataGridView1.Rows[0].Cells[2].Value = Description;
dataGridView1.Rows[0].Cells[3].Value = Price;
}
private void Form2_Load(object sender, EventArgs e)
{
// TODO: This line of code loads data into the 'dataDataSet1.Items' table. You can move, or remove it, as needed.
this.itemsTableAdapter.Fill(this.dataDataSet1.Items);
}
}
}
What I have tried:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Data.SqlClient;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace lllllllll
{
public partial class Form2 : Form
{
public Form2( string Item_no, string Item_name, string Description,string Price)
{
InitializeComponent();
dataGridView1.Rows.Add();
dataGridView1.Rows[0].Cells[0].Value = Item_no;
dataGridView1.Rows[0].Cells[1].Value = Item_name;
dataGridView1.Rows[0].Cells[2].Value = Description;
dataGridView1.Rows[0].Cells[3].Value = Price;
}
private void Form2_Load(object sender, EventArgs e)
{
// TODO: This line of code loads data into the 'dataDataSet1.Items' table. You can move, or remove it, as needed.
this.itemsTableAdapter.Fill(this.dataDataSet1.Items);
}
}
}