-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathHomeMenu.cs
80 lines (56 loc) · 2.49 KB
/
HomeMenu.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace WindowsFormsApplication3
{
public partial class HomeMenu : UserControl
{
public HomeMenu()
{
InitializeComponent();
}
/* private void bunifuCustomDataGrid1_CellContentClick(object sender, DataGridViewCellEventArgs e)
{
DialogResult res = MessageBox.Show("Are you sure want to close", "Confirmation", MessageBoxButtons.OKCancel, MessageBoxIcon.Stop);
}*/
private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
{
int n = dataGridView1.Rows.Add();
int a = 5, b = 8;
dataGridView1.Rows[n].Cells[0].Value = "1";
dataGridView1.Rows[n].Cells[1].Value = "vaibhav";
dataGridView1.Rows[n].Cells[2].Value = "456";
dataGridView1.Rows[n].Cells[3].Value = "5";
dataGridView1.Rows[n].Cells[4].Value = a * b;
}
private void panel1_Paint(object sender, PaintEventArgs e)
{
}
private void HomeMenu_Load(object sender, EventArgs e)
{
int n = dataGridView1.Rows.Add();
int a = 5, b = 8;
dataGridView1.Rows[n].Cells[0].Value = "1";
dataGridView1.Rows[n].Cells[1].Value = "vaibhav";
dataGridView1.Rows[n].Cells[2].Value = "456";
dataGridView1.Rows[n].Cells[3].Value = "5";
dataGridView1.Rows[n].Cells[4].Value = a * b;
// dataGridView1.BorderStyle = BorderStyle.None;
dataGridView1.AlternatingRowsDefaultCellStyle.BackColor = Color.FromArgb(238, 239, 249);
dataGridView1.CellBorderStyle = DataGridViewCellBorderStyle.SingleHorizontal;
dataGridView1.DefaultCellStyle.SelectionBackColor = Color.DarkTurquoise;
dataGridView1.DefaultCellStyle.SelectionForeColor = Color.WhiteSmoke;
dataGridView1.BackgroundColor = Color.White;
dataGridView1.EnableHeadersVisualStyles = false;
// dataGridView1.ColumnHeadersBorderStyle = DataGridViewHeaderBorderStyle.None;
dataGridView1.ColumnHeadersDefaultCellStyle.BackColor = Color.FromArgb(20, 25, 72);
dataGridView1.ColumnHeadersDefaultCellStyle.ForeColor = Color.White;
}
}
}