C#.Net - Easy Way To Add Date Picker Control Into Datagridview.
C#.Net - Easy Way To Add Date Picker Control Into Datagridview.
API Declarations
private int SelRow = 0;
// Cell Height
private int yLoc = 30;
// Point Object
private Point pt;
Rate C#.Net - Easy Way To Add Date Picker Control Into Datagridview.
(2(2 Vote))
{
InitializeComponent();
dataGridView1.Rows.Add(30);
dateTimePicker1.Height = 35;
}
private void dataGridView1_CellClick(object sender, DataGridViewCellEventArgs e)
{
SelRow = e.RowIndex;
yLoc = SelRow * dataGridView1.CurrentRow.Height;
dateTimePicker1.Height = dataGridView1.CurrentRow.Height;
Point pt = new Point(249, (yLoc= yLoc + 30));
dateTimePicker1.Location = pt;
}
private void Form1_Load(object sender, EventArgs e)
{
dataGridView1.Rows[0].Selected = true;
pt = new Point(249, yLoc);
dateTimePicker1.Location = pt;
}
C#.Net - Easy Way To Add Date Picker Control Into Datagridview. Comments
No comments yet — be the first to post one!
Post a Comment