when updated to Latest 2012 telerik dll, FIlteringControl contructor is expecting an arugument

5 posts, 0 answers
  1. AMO
    AMO avatar
    31 posts
    Member since:
    Nov 2011

    Posted 27 Feb 2013 Link to this post

    Hi,
         I am using interaction.Behaviours to call a CustomFilter control. Which inturn uses FilteringCOntrol.

         With trial version of telerik dlls,  we were proceeding in the below format
    protected override void OnAttached()
            {   
                  
                this.customFilteringControl = new FilteringControl();
                ApplyStyle();
                this.customFilteringControl.Loaded += this.OnFilteringControlLoaded;
                this.customFilteringControl.LostFocus += new RoutedEventHandler(customFilteringControl_LostFocus);
      
                // Tell the column to use our new "custom" filtering control.
                this.AssociatedObject.FilteringControl = customFilteringControl;
            }

    Once we replaced the dlls with licensed version 2012
    The FIlteringControl constructor is expecting a GridViewColumn as an argument
    From the xaml part using interaction.Behaviour How can we pass the gridview column as an argument..

    The ColumnFilterBehaviour is a Custom class we have created.

    <telerik:GridViewDataColumn Header="Cycle Date" UniqueName="cycle_date" 
                                                       DataType="{Binding DateTime, Source={StaticResource Types}}" 
                                                        DataMemberBinding="{Binding cycle_date,Converter={StaticResource dateValueConverter}}"
                                                        TextAlignment="Right">
                                 
                               <i:Interaction.Behaviors>
                                   <PmaModel:ColumnFilterBehaviour ColumnName="cycle_date" ColumnName1="cycle_date"  />
                               </i:Interaction.Behaviors>

  2. Rossen Hristov
    Admin
    Rossen Hristov avatar
    2478 posts

    Posted 27 Feb 2013 Link to this post

    Hi,

    Unfortunately, you cannot pass constructor arguments in XAML.

    But since we received complaints similar to yours we reverted this change. The FilteringControl has a parameterless constructor since Q3 2012.

    Which version are you using?

    Greetings,
    Rossen Hristov
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  3. DevCraft banner
  4. AMO
    AMO avatar
    31 posts
    Member since:
    Nov 2011

    Posted 27 Feb 2013 Link to this post

    Thank you Rossen .So is the Q3 dlls available now ?
  5. AMO
    AMO avatar
    31 posts
    Member since:
    Nov 2011

    Posted 27 Feb 2013 Link to this post

    Is there any workaround using the Q1 2012 DLLS for this ?
    Our requirement is that :we have different columns on which we have to appy custom filters .We need to pass the column names to this cutom control and depending on the column name we appy different styles to this custom filter control
  6. AMO
    AMO avatar
    31 posts
    Member since:
    Nov 2011

    Posted 28 Feb 2013 Link to this post

    Since we were using Behaviours to attach this filtercontrol to the Gridview column , we could use the AttachedObject Property .
    In the OnAttached() method, we used the following code snippet :

      protected override void OnAttached()
            {
                try
                {
                    GridViewColumn associatedColumn = this.AssociatedObject as GridViewColumn;
                    this.customFilteringControl = new FilteringControl(associatedColumn);
    }


    Thanks !:) :)

Back to Top
DevCraft banner