hello sir/madam
I am developing a window application with ACCESS database
there are 22 field in my table.In order to update records I am trying to fetch these records at a form.
So flow is like this .
from "MS ACCESS" to "DataGridView" to form Controls(eg. textbox, combox ,datetime picker).
there are three columns of date in my table. i.e.
sanction_date, dob,renewal_date.there are approx 17000 records .
Date format in ms access is like this.
sanction_date(08-Jul-09) , renewal_date(02/21/2013), dob (blank,to be updated).
when these values are retrieved in datagrid view its format in datagrid view is like this.
sanction_date(04/29/2013),renewal_date(04/28/2016).
the date timepicker control does not fetch the value from datagrid view.
my code is...
private void buttonEdit_Click(object sender, EventArgs e)
{
Form2 t = new Form2();
t.Show();
int i;
i = dataGridView1.SelectedCells[0].RowIndex;
t.comboBoxthana.SelectedItem = dataGridView1.Rows[i].Cells[0].Value.ToString();
t.textBoxLicence_number.Text = dataGridView1.Rows[i].Cells[1].Value.ToString();
t.dateTimePicker1.Value =DateTime.Parse(dataGridView1.Rows[i].Cells[2].Value.ToString());
}