I am using a custom skin. In order to make the calendar link not be a broken image, I am using the following code to manually force the scheduler to look in the right place. That works great on the initial page load, but if there are any async postbacks on the page that reload the calendar, the image link is broken again until the page is reloaded. Is there a better way to do this where the link won't get screwed up on async postbacks?
Protected Overloads Overrides Sub OnPreRender(ByVal e As System.EventArgs)
'Change the image path for the date popup icon
Try
MyBase.OnPreRender(e)
Dim selectedDatePicker As RadDatePicker = TryCast(RadScheduler1.FindControl("SelectedDatePicker"), RadDatePicker)
If selectedDatePicker.IsEmpty = False Then
selectedDatePicker.ImagesPath = "skins/LightGreen/Calendar"
selectedDatePicker.Calendar.ShowRowHeaders = False
End If
Catch ex As Exception
'Do nothing - supress the error
End Try
End Sub
Thanks,
- Brad