Custom Filter

9 posts, 0 answers
  1. Monique
    Monique avatar
    6 posts
    Member since:
    Mar 2012

    Posted 18 Mar 2012 Link to this post

    Hello Everyone! 
    I wanted to know if anyone could help me with a confusion that I have about custom filters, there are different steps when it is a Web application and it is not a website, because when I try to register  MyCustomeFilter.cs into my .aspx, does not recognize it and I get error.

    I would greatly appreciate
    if you help me
    Please



    I wish you a nice day....

  2. jumpstart
    jumpstart avatar
    479 posts
    Member since:
    Nov 2011

    Posted 21 Mar 2012 Link to this post

    Monique:

    Believe it or no, I just struggled with this yesterday when trying to implement a custom filtering column that uses a RadComboBox as the filter.

    My application is a Telerik C# WebApplication (not a WebSite). It turns out that in order for your custom tag in the .aspx page to find the MyCustomFilteringColumn.cs, I needed to add the "App_Code" folder to my project and then include the class within the folder. It may have something to do with the fact that the .cs file is only a code-behind file with no form attached. But, I can vouch for the fact that this works and your custom tag will work.

    <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="VideoReview.aspx.cs" Inherits="Telerik_TV_Rewind_Dashboard.VideoReview" %>
     
    <%@ Register TagPrefix="custom" Namespace="Telerik_TV_Rewind_Dashboard" %>
     
    .......
     
                            <%-- This is the Review Status Column--%>
                            <custom:MyCustomFilteringColumn DataField="Status" HeaderText="ReviewStatus" Groupable="true"
                                GroupByExpression="Status Group by Status" SortExpression="Status">
                                <ItemTemplate>
                                    <asp:Label ID="lblStatus" runat="server"><%# Eval("Status") %></asp:Label>
                                </ItemTemplate>
                                <EditItemTemplate>
                                    <asp:DropDownList DataMember="Status" ID="dllStatus" runat="server" Width="50px"
                                        Text='<%# Bind("Status") %>' SelectedValue='<%# DataBinder.Eval(Container.DataItem, "Status") %>'>
                                        <asp:ListItem Value="" Text="-Set Status-" />
                                        <asp:ListItem Value="None" Text="None" />
                                        <asp:ListItem Value="Review" Text="Review" />
                                        <asp:ListItem Value="Deprecate" Text="Deprecate" />
                                        <asp:ListItem Value="Revise" Text="Revise" />
                                        <asp:ListItem Value="Completed" Text="Completed" />
                                    </asp:DropDownList>
                                </EditItemTemplate>
                            </custom:MyCustomFilteringColumn>

    See the attached image with Visual Studio 2010 Solution Explorer.

    Cheers!
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Monique
    Monique avatar
    6 posts
    Member since:
    Mar 2012

    Posted 21 Mar 2012 Link to this post

    Hello JumpStart

    My register tag It is work and I can see on design my control filter created but it is not working.

    <%@ Register Namespace="Mod" TagPrefix="custom" %>

    I created the App_Code folder and add my Mod.RadFilterDropDownEditor.cs

    but I came out this error, apparently this duplicate information;



    Server Error in '/' Application.
    -------------------------------------------------- ------------------------------

    Compile Error
    Description: Error during compilation of a resource required to service this request. Review the specific error details below and modify your source code appropriately.

    Compiler Error Message: CS0433: The type 'Mod.RadFilterDropDownEditor' exists in both 'c: \ Windows \ Microsoft.NET \ Framework \ v4.0.30319 \ Temporary ASP.NET Files \ root \ 66b3e03d \ 60fd9dd4 \ assembly \ DL3 \ 09db7fcb \ 1dcb6903_dc07cd01 \ Mod.DLL 'as in' c: \ Windows \ Microsoft.NET \ Framework \ v4.0.30319 \ Temporary ASP.NET Files \ root \ 66b3e03d \ 60fd9dd4 \ App_Code.2fzuhwgx.dll '

    Source Error:

     

    Line 916:
    Line 917: [System.Diagnostics.DebuggerNonUserCodeAttribute ()]
    Line 918: private global :: Mod.RadFilterDropDownEditor @ __BuildControl__control23 () {
    Line 919: global :: Mod.RadFilterDropDownEditor @ __CTRL;
    Line 920:
     

    Source File: c: \ Windows \ Microsoft.NET \ Framework \ v4.0.30319 \ Temporary ASP.NET Files \ root \ 66b3e03d \ 60fd9dd4 \ App_Web_Prueba.aspx.cdcab7d2.i-8ucuk9.0.cs Line: 918


    Please Help me!
    Have a nice day n_n

    Monique
  5. Antonio Stoilkov
    Admin
    Antonio Stoilkov avatar
    530 posts

    Posted 22 Mar 2012 Link to this post

    Hello Monique,

    Based on your description it is hard to determine the problem. You could try resolving your issue by removing the Mod.dll and rebuild or remove the Mod.RadFilterDropDownEditor.cs file from App_Code folder. If your issue still persists you could create your project from scratch.
    All the best,
    Antonio Stoilkov
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  6. Monique
    Monique avatar
    6 posts
    Member since:
    Mar 2012

    Posted 22 Mar 2012 Link to this post

    Regards

    There is any possibility to share with me an example?
    Please

    I am confused....


    Monique
  7. jumpstart
    jumpstart avatar
    479 posts
    Member since:
    Nov 2011

    Posted 23 Mar 2012 Link to this post

    Monique:

    I faced the same problem when i dragged the "MyCustomFilteringColumn.cs" from the top level of the web application into a newly added folder: 'App_Code'. I kept getting a similar error when recompiling and running the project:

    Compiler Error Message: CS0433: The type 'Mod.RadFilterDropDownEditor' exists in both 'c: \ Windows \ Microsoft.NET \ Framework \ v4.0.30319 \ Temporary ASP.NET Files \ root \ 66b3e03d \ 60fd9dd4 \ assembly \ DL3 \ 09db7fcb \ 1dcb6903_dc07cd01 \ Mod.DLL 'as in' c: \ Windows \ Microsoft.NET \ Framework \ v4.0.30319 \ Temporary ASP.NET Files \ root \ 66b3e03d \ 60fd9dd4 \ App_Code.2fzuhwgx.dll '

    I had to remove the newly added folder and all copies of the "MyCustomFilteringColumn.cs"  from the project. I stored a copy of the class outside of the project for later reference. Then, I closed Visual Studio, and cleared the temporary internet files, in my case located in the "C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root" folder.

    Then, I readded the "App_Code" folder and re-added the "MyCustomFilteringColumn.cs" by right-clicking on the folder and selecting "add existing item" and browsing to a copy of this class saved outside of the project.

    When I recompiled, everything worked as desired.

    I hope this helps.
  8. Monique
    Monique avatar
    6 posts
    Member since:
    Mar 2012

    Posted 25 Mar 2012 Link to this post

    Hello!

    In your MyCustomFilteringColumn.cs ...
    What namespace do you have?
    The RadFilterDataFieldEditor inheritance appears you active...?


    I did my custom filter on a Website but I needed on a WebProject....

    Regards,
    Monique
  9. Monique
    Monique avatar
    6 posts
    Member since:
    Mar 2012

    Posted 25 Mar 2012 Link to this post

    I cleaned my temporary Files....
    I added the App_Code folder >> I added my customfilter.cs (It has Compile in Action Compile)
    I clean the solution then a build my solution.

    I get the same error about duplicate info.

    I have to write something on my Web.config?

    M.
  10. Antonio Stoilkov
    Admin
    Antonio Stoilkov avatar
    530 posts

    Posted 27 Mar 2012 Link to this post

    Hello Monique,

    I have assembled a sample project demonstrating the custom filtering column working. Note that the MyCustomFilteringColumn.cs file is outside the App_Code folder and Build Action set to Compile.

    Greetings,
    Antonio Stoilkov
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017