1.11M Members

String was not recognized as a valid DateTime.

 
0
 

when i run rertrive data the error shown

  private void dataGridView1_CellMouseClick(object sender, DataGridViewCellMouseEventArgs e)
        {
            txt_reser.Text = dataGridView1.SelectedRows[0].Cells[0].Value.ToString();
            text_guest.Text = dataGridView1.SelectedRows[0].Cells[1].Value.ToString();
            txt_room.Text = dataGridView1.SelectedRows[0].Cells[2].Value.ToString();
            txt_servce.Text = dataGridView1.SelectedRows[0].Cells[3].Value.ToString();
            txt_days.Text = dataGridView1.SelectedRows[0].Cells[4].Value.ToString();
            check_in.Text = dataGridView1.SelectedRows[0].Cells[5].Value.ToString();
            check_out.Text = dataGridView1.SelectedRows[0].Cells[6].Value.ToString();
            MessageBox.Show("Data Retrived", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information);


        }

String was not recognized as a valid DateTime.

 
0
 

Where in your code you are using aDateTime? Please rephrase your question.

 
0
 

line 8 and line 9

 
0
 

What are the values stored in Cells[5] and Cells[6] of your dataGridView?

You
This article has been dead for over six months: Start a new discussion instead
Post:
Start New Discussion
Tags Related to this Article