I have a datagridview in my vb.net form.
The first column is a combobox, the 2nd and 3rd are the datetimepicker columns created using sample code from microsoft.
When I add a new row I load the datetime columns with todays date.
When I change the first datetime column, I check whether the entered date is greater than the date in the next datetime column, If so, I need to focus back to the first datetime column.
I tried using the code from this forum, but it is not working for me.
I used the following code in the cellvaluechanged event.
dgv_Emp_Proj.CurrentCell = dgv_Emp_Proj.Item(1, 0)
Is it the problem with the property setting of the datagridview, or with the datetimepicker used in datagridview.
Or am I calling the code in the wrong event of the datagridview.
Trying to solve this for the past 2 days, but couldn't find a solution.
Any help in this regard?