private void button3_Click(object sender, EventArgs e)
        {
            if (laptop.SelectedRows.Count == 0)
            {
                MessageBox.Show("Select A Laptop Row The Table (by clicking on the empty cell on the left side of the row), Then Press View Laptop To View Its Properies");
                return;
            }

            int             selectedrowindex = laptop.SelectedCells[0].RowIndex;
            DataGridViewRow selectedRow      = laptop.Rows[selectedrowindex];
            string          lapModel         = Convert.ToString(selectedRow.Cells["Model"].Value);

            Form foo = new ViewLaptop(lapModel, currentUserID);

            foo.Show();
        }
Exemplo n.º 2
0
 private void doubleclicktoview3(object sender, DataGridViewCellEventArgs e)
 {
     Form v = new ViewLaptop(dataGridView3.Rows[e.RowIndex].Cells["Name"].Value.ToString(), int.Parse(ID));
 }