Just a note to everyone out there. We just upgraded to Q1 2010 and suddenly the drop-down calendar on all GridViewDateTimeColumn columns in our RadGridViews started showing a "footer" (displays the current date/time and has "Clear" and "Now" buttons). None of the other similar controls (RadDateTimePicker, etc.) are doing this. This made the UI inconsistent, so I came up with code to hide the "footer" for GridViewDateTime columns:
Private Sub rgvGrid_CellEditorInitialized(ByVal sender As Object, _ |
ByVal e As Telerik.WinControls.UI.GridViewCellEventArgs) _ |
Handles rgvGrid.CellEditorInitialized |
If TypeOf rgvNotes.CurrentColumn Is GridViewDataColumn Then |
Select Case DirectCast(rgvNotes.CurrentColumn, GridViewDataColumn).UniqueName |
Case "SomeColumnName" |
Dim activeEditor As RadDateTimeEditor = TryCast(rgvNotes.ActiveEditor, RadDateTimeEditor) |
If activeEditor IsNot Nothing Then |
Dim editorElement As RadDateTimeEditorElement _ |
= TryCast(activeEditor.EditorElement, RadDateTimeEditorElement) |
If editorElement IsNot Nothing Then |
Dim dateTimePickerCalendar As RadDateTimePickerCalendar _ |
= TryCast(editorElement.GetCurrentBehavior(), RadDateTimePickerCalendar) |
If dateTimePickerCalendar IsNot Nothing Then |
dateTimePickerCalendar.Calendar.ShowFooter = False |
End If |
End If |
End If |
End Select |
End If |
End Sub |