i am selection row from gridview in which leftdate is not available/empty ,so when i select that row editing then exception is raised that (String was not recognized as a valid DateTime.')
here is screen shot 

here c# code
- protected void Edit(object sender, EventArgs e)
- {
- using (GridViewRow row = (GridViewRow)((LinkButton)sender).Parent.Parent)
- {
- txtEmpID.ReadOnly = true;
- txtEmpID.Text = row.Cells[0].Text;
- txtEmpName.Text = row.Cells[1].Text;
- txtFahterName.Text = row.Cells[2].Text;
- //ddlSecID.ClearSelection();
- //ddlSecID.Items.FindByText(row.Cells[3].Text).Selected = true;
- //txtjdate.Text = row.Cells[4].Text;
- txtCNIC.Text = row.Cells[3].Text;
- ddlSecID.ClearSelection();
- if (ddlSecID.Items.FindByText(row.Cells[4].Text) != null)
- {
- ddlSecID.Items.FindByText(row.Cells[4].Text).Selected = true;
- }
- if (ddlstatus.Items.FindByText(row.Cells[5].Text) != null)
- {
- ddlstatus.Items.FindByText(row.Cells[5].Text).Selected = true;
- }
- txtjdate.Text = Convert.ToDateTime(row.Cells[6].Text).ToString("dd/MM/yyyy");
- if (!string.IsNullOrEmpty(txtldate.Text))
- {
- // DateTime date = DateTime.Parse(txtldate.Text);
- txtldate.Text = null;
- }
- else
- {
- txtldate.Text = Convert.ToDateTime(row.Cells[7].Text).ToString("dd/MM/yyyy");
- }
- popup.Show();
- }
- }

Priyanka JainPosted Sep 11, 2019, 7:28 AM
Jared MaduraiPosted Sep 15, 2019, 12:12 PM
Akhter HUssainPosted Sep 11, 2019, 9:44 AM
Priyanka JainPosted Sep 11, 2019, 9:35 AM
Akhter HUssainPosted Sep 11, 2019, 9:34 AM
Akhter HUssainPosted Sep 11, 2019, 9:31 AM
Priyanka JainPosted Sep 11, 2019, 9:26 AM
Akhter HUssainPosted Sep 11, 2019, 8:52 AM
Priyanka JainPosted Sep 11, 2019, 8:47 AM
Akhter HUssainPosted Sep 11, 2019, 8:45 AM
Priyanka JainPosted Sep 11, 2019, 8:39 AM
Akhter HUssainPosted Sep 11, 2019, 8:35 AM
Priyanka JainPosted Sep 11, 2019, 8:27 AM
Akhter HUssainPosted Sep 11, 2019, 8:23 AM
Priyanka JainPosted Sep 11, 2019, 8:04 AM
Akhter HUssainPosted Sep 11, 2019, 7:54 AM
Amit MohantyPosted Sep 11, 2019, 7:52 AM
Akhter HUssainPosted Sep 11, 2019, 7:37 AM
Amit GuptaPosted Sep 11, 2019, 7:16 AM
Akhter HUssainPosted Sep 11, 2019, 7:07 AM
Amit GuptaPosted Sep 11, 2019, 6:44 AM
Akhter HUssainPosted Sep 11, 2019, 6:27 AM
Amit GuptaPosted Sep 11, 2019, 6:17 AM
Akhter HUssainPosted Sep 11, 2019, 6:09 AM
Bidyasagar MishraPosted Sep 11, 2019, 3:54 AM
Amit GuptaPosted Sep 11, 2019, 3:48 AM