views:

233

answers:

1

i have create dynamic datepicker inside gridview. i want to know how to get the values of the datepicker

help me out!!

i have used this line

 DateTime date2 = DateTime.Parse(((TextBox)Gridview1.Rows[rowIndex].Cells[3].FindControl("frmdate_endtime")).Text);
+4  A: 

Why not cast the control to the appropriate date/time picker class and take the value from that directly? You shouldn't need to parse the text.

Jon Skeet