Hi,
I'm very new on working with Telerik products. The past few days i'm working with RadDataFilter and custom editors but I stuck with the following problem.
My custom editor is a usercontrol witch has a dependency property called SelectedDateRange of type DateRange. The DateRange is a class with two properties
Public Class DateRange
Implements System.ComponentModel.INotifyPropertyChanged
#Region "INotifyPropertyChanged Implementation"
Public Event PropertyChanged(ByVal sender As Object, ByVal e As System.ComponentModel.PropertyChangedEventArgs) Implements System.ComponentModel.INotifyPropertyChanged.PropertyChanged
Protected Sub OnPropertyChanged(ByVal propertyname As String)
RaiseEvent PropertyChanged(Me, New System.ComponentModel.PropertyChangedEventArgs(propertyname))
End Sub
#End Region
Private _beginDate As Date?
<DataMember()>
Public Property BeginDate() As Date?
Get
Return _beginDate
End Get
Set(ByVal value As Date?)
_beginDate = value
OnPropertyChanged("BeginDate")
End Set
End Property
Private _endDate As Date?
<DataMember()>
Public Property EndDate() As Date?
Get
Return _endDate
End Get
Set(ByVal value As Date?)
_endDate = value
OnPropertyChanged("EndDate")
End Set
End Property
Public Function HasRange() As Boolean
Return BeginDate.HasValue Or EndDate.HasValue
End Function
End Class
Using your example i'm trying to bind the SelectedDateRange with the Value Property of the FilterDescriptor using the following statement
<DataTemplate x:Key="DateRangeBlockEditor">
<AhsSysUIControls:DateRangeBlock SelectedDateRange="{Binding Value,Mode=TwoWay}" />
</DataTemplate>
It seems that this doesn't work as i get always an unsetValue. The bottom line is that i want the FilterDescriptor to carry the DateRange because later i iterate all the FilterDescriptors to create an SQL where statement. Any ideas?
Thanks Sotiris