I have a data grid with a calendar column. What I want to do is an event (not sure which one is suitable), and this is what should happen:
Update()
) - I already have the method figured out. I just don't know how to do the whole check to see if a value has been changed.CellValueChanged
doesn't work as it is triggered if anything changed on the grid, such as loading the data etc. Is there something else I can use?
Let me know if I need to add more info, I'm not quite sure how to do this.
private void dataGridView1_CellValueChanged(object sender, DataGridViewCellEventArgs e)
{
DataGridViewColumn column = dataGridView1.Columns[e.ColumnIndex];
if (column.Name == "dateColumn")
{
UpdateStuff();
}
}
private void UpdateStuff()
{
object myDate = dataGridView1.CurrentCell.Value;
}