Unable to View Radfilter dropdown in radgrid- Object Reference Error

2 posts, 0 answers
  1. Ayozen
    Ayozen avatar
    2 posts
    Member since:
    Apr 2009

    Posted 08 Jun 2012 Link to this post


    I have a radgrid that has radtabs and the multipage.  I want to use a dropdown in the radfilter for some of the fields, so that: 

    a) the initial page load is the default load
    b) from the filter selection, using the example from Grid / Filtering Template Columns, http://demos.telerik.com/aspnet-ajax/grid/examples/programming/filteringtemplatecolumns/defaultcs.aspx, the grid will bind according to the selection.

    I read all of the tutorials on customizing the filters, but nothing seems to work correctly for me. I followed the tutorial and I am not getting the results.  If anything, I am not ghetting an error on the RadMultiPage Control.  I created the FilterTemplateColumns.cs class.  I am not sure how to register that class correctly in my file. 

    At  the top of my .aspx page, I have the following, whcih is not correct:

    <%@ Register TagPrefix="custom" Namespace="MyCustomFilteringColumn.FilteringTemplateColumns"%>

    The class was created and saved in my App_code folder.

    The following is the grid where I am receiving the "object reference not set to an instance of an object"

    <telerik:RadMultiPage ID="RadMultiPage1" runat="server" SelectedIndex="0">
            <telerik:RadPageView ID="ProgrammingPageView" runat="server">
                <telerik:RadGrid ID="ProgramGrid" runat="server" DataSourceID="prgDS" AllowFilteringByColumn="true"
    AllowSorting="true" AllowPaging="true" AutoGenerateColumns="False"
    ShowStatusBar="true" PageSize="7">
    <PagerStyle Mode="NextPrevAndNumeric" Position="TopAndBottom" />
    <MasterTableView DataKeyNames="ProgrammingID" EnableNoRecordsTemplate="true" ShowHeadersWhenNoRecords="true">
    <NoRecordsTemplate>There isn't any data.</NoRecordsTemplate>
           <custom:MyCustomFilteringColumn DataField="Show" FilterControlWidth="180px" HeaderText="Show">
                            <headerstyle width="25%" />
                          <itemtemplate><%# Eval("Show") %></itemtemplate>
    What can I do to prevent this error?  I want to use other dropdowns in the filters.  Also, do I need to add <filter parameters> in my sqldatasource?

    Thank you for your help.
  2. Ayozen
    Ayozen avatar
    2 posts
    Member since:
    Apr 2009

    Posted 11 Jun 2012 Link to this post

    I reviewed another tutorial and learned that I was putting too much in the <sqldatasource statements>.  Once I corrrected my sqldatasource, my drop-downs were populated and the grids returned the correct data.

Back to Top