I have placed a month calendar & data grid in windows form. Datagrid is filled up with holiday dates. When a user selects a date, particular holiday date in the grid should be highlighted & seen to the user.Code is,
in month_calendar_datechanged event
For _i = 0 To DGV_Holidays.Rows.Count - 1
If e.Start.ToString("dd-MMM-yyyy") = Mid(DGV_Holidays.Item(0, _i).Value, 1, 11) Then
DGV_Holidays.Rows(_i).Selected = True
End If
Next
The datagrid contains 100 dates. when i select the holiday date in calendar, equivalent date is getting highlighted but the row is not seen (ie, Selected date position is 79th. the datgrid vertical scroll should move to 79th position)
Can anyone please help me out from this issue?
Thank you
in month_calendar_datechanged event
For _i = 0 To DGV_Holidays.Rows.Count - 1
If e.Start.ToString("dd-MMM-yyyy") = Mid(DGV_Holidays.Item(0, _i).Value, 1, 11) Then
DGV_Holidays.Rows(_i).Selected = True
End If
Next
The datagrid contains 100 dates. when i select the holiday date in calendar, equivalent date is getting highlighted but the row is not seen (ie, Selected date position is 79th. the datgrid vertical scroll should move to 79th position)
Can anyone please help me out from this issue?
Thank you