1,105,340 Community Members

String was not recognized as a valid DateTime.

Member Avatar
diya45
Junior Poster in Training
66 posts since Dec 2011
Reputation Points: -2 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
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.

Member Avatar
ddanbe
Posting Expert
5,336 posts since Oct 2008
Reputation Points: 2,054 [?]
Q&As Helped to Solve: 904 [?]
Skill Endorsements: 46 [?]
Featured
 
0
 

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

Member Avatar
diya45
Junior Poster in Training
66 posts since Dec 2011
Reputation Points: -2 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

line 8 and line 9

Member Avatar
ddanbe
Posting Expert
5,336 posts since Oct 2008
Reputation Points: 2,054 [?]
Q&As Helped to Solve: 904 [?]
Skill Endorsements: 46 [?]
Featured
 
0
 

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

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