7 Answers, 1 is accepted
For your convenience I've prepared sample application demonstrating one possible way of changing default filtering behavior. In general you can change the filtering on DateTime to between filtering and adding 1 minute(in current example) to original value.
Greetings,
Nikolay
the Telerik team

You can change the following code to add one day instead one of minute as in my previous example:
..
RadListViewLessThanOrEqualToFilterExpression<DateTime> lt =
new
RadListViewLessThanOrEqualToFilterExpression<DateTime>(expression.FieldName)
{
CurrentValue = value.AddDays(1)
};
..
All the best,
Nikolay
the Telerik team

I am building using vb.net, will this code translate ok?
Also.. is it possible to tidy up I.e remove items from the drop down list that displays directory elements to only show Lastwrite time and name?
Regards
J
For your convenience I am attaching VB version of the code + JavaScript code for hiding items from RadFilter context menu.
All the best,
Nikolay
the Telerik team

Would it be possible to help show me how I could get a radrotator bound with the file array after the date has been chosen. I have a working example as supplied with a standard calendar control but cannot integrate this using the radfilter as supplied.
Sub Calendar1_SelectionChanged(ByVal sender As Object, ByVal e As System.EventArgs)
Dim dir As New DirectoryInfo(Server.MapPath("~/GalleryFiles/Camera1"))
Dim files As FileInfo() = dir.GetFiles("*.thumbnail.jpg")
Dim count As Integer = files.Length
Dim i As Integer
Dim jFiles As String
Dim dt As String
dt = Calendar1.SelectedDate.ToShortDateString()
' holds the result, which will be used in order to rebind the RadRotator control
Dim resultDataSource As List(Of String) = New List(Of String)()
For i = 0 To count - 1
Dim theDate As Integer = DateDiff(DateInterval.Day, files(i).LastWriteTime, Calendar1.SelectedDate)
Dim virtualPath As String = "~/GalleryFiles/Camera1"
If theDate = 0 Then
jFiles = jFiles &
"<li><img style="" width:50px"" src='../GalleryFiles/Camera1/" & files(i).Name.Substring(0, 16) & ".jpg'' ><a href='../GalleryFiles/Camera1/" & files(i).Name.Substring(0, 16) & ".jpg'>" & files(i).Name.Substring(0, 16) & " " & files(i).LastWriteTime.Date & "</a></li>"
' Add the files in the new DataSource
'resultDataSource.AddRange(dir.GetFiles(files(i).Name))
'resultDataSource.Add(files(i).Name)
resultDataSource.Add(files(i).Name.Substring(0, 16))
End If
Next
' Rebind the control
' If no files are found, thne the RadRotator will contain 0 items and will not show any content
RadRotator1.DataSource = resultDataSource
RadRotator1.DataBind()
list.Text =
"</ul>" & jFiles
Label1.Text = dt
End Sub
PS. Thank you very much for the most recent help.
J
If I understand your scenario correctly, you are trying to filter against RadRotator. If this is the case you can use the following approach.
1. Define in FieldEditors for RadFilter
2. Build custom provider that will process expressions in for DateTime in expected for your scenario way
3. Handle ApplyExpressions event of RadFilter to apply the filter criteria on RadRotator data source. For the purpose you can use the help of DynamicLinq.
For your convenience I am attaching sample application demonstrating described above case.
Regards,
Nikolay
the Telerik team