This is a migrated thread and some comments may be shown as answers.

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

4 Answers 47 Views
DataFilter
This is a migrated thread and some comments may be shown as answers.
AMO
Top achievements
Rank 1
AMO asked on 27 Feb 2013, 01:03 PM
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>

4 Answers, 1 is accepted

Sort by
0
Rossen Hristov
Telerik team
answered on 27 Feb 2013, 01:58 PM
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.

0
AMO
Top achievements
Rank 1
answered on 28 Feb 2013, 05:14 AM
Thank you Rossen .So is the Q3 dlls available now ?
0
AMO
Top achievements
Rank 1
answered on 28 Feb 2013, 05:22 AM
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
0
AMO
Top achievements
Rank 1
answered on 28 Feb 2013, 07:10 AM

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 !:) :)

Tags
DataFilter
Asked by
AMO
Top achievements
Rank 1
Answers by
Rossen Hristov
Telerik team
AMO
Top achievements
Rank 1
Share this question
or