Trigger to disable control when DatePicker is null

2 posts, 0 answers
  1. Ariel Erlijman
    Ariel Erlijman avatar
    5 posts
    Member since:
    Jun 2010

    Posted 17 Aug 2010 Link to this post

    I have a grid where the rows have a DatePicker and a DropDown. I want to disable the DropDown if the DatePicker is empty. I have this in my grid:


    <telerik:GridViewDataColumn DataFormatString="d" Header="Termination" DataMemberBinding="{Binding TerminationDate}" >
    <telerik:RadDatePicker x:Name="TerminationDate" SelectedDate="{Binding Path=TerminationDate, Mode=TwoWay}"/>
    Header="Beneficiary Terminated"
    ItemsSource="{Binding Path=ReferenceData.AllBeneficiaryTerminationReasonType}"
    DataMemberBinding="{Binding TerminationReasonID,UpdateSourceTrigger=PropertyChanged}">

    <Style TargetType="telerik:GridViewComboBoxColumn">
    <DataTrigger Binding="{Binding ElementName=TerminationDate}" Value="{x:Null}">
    <Setter Property="FrameworkElement.IsEnabled" Value="false"></Setter>




    I have tried the commented code but did not work. I can not reach the TerminationDate element.






  2. Maya
    Maya avatar
    4062 posts

    Posted 19 Aug 2010 Link to this post

    Hello Ariel Erlijman,

    The property "IsEnabled" comes from the Framework ContentElement, which GridViewColumns inherit in our WPF version of RadGridView. Unfortunately, it is not implemented in the internal logic of the Control.
    However, you may find detailed information about disabling a whole column in our online documentation and an example in our demos.

    Best wishes,
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Back to Top