Javascript Error on RadGrid Filter - Bugs & Issues - Bugs & Issues - Progress Community
 Bugs & Issues

Javascript Error on RadGrid Filter

  • Javascript Error on RadGrid Filter
  • I am using a RadGrid with filters, but when I click the filter button, I get an 'f is null' Javascript error and the filter options do not drop down.

    In addition, I am unable to drag the columns to the "Drag a column header and drop it here to group by that column" at the top of the Grid. I suspect the two issues are related since it is a Javascript error being thrown.

    I have been trying to use the demo version to possibly find the issue, but so far I've had no luck.

    The code of the grid follows:

    <telerik:RadGrid ID="AwaitingEditingGrid" runat="server" AutoGenerateColumns="False"
            CellSpacing="0" GridLines="None" AllowMultiRowSelection="True" OnNeedDataSource="Need_EditingGridDataSource"
            AllowSorting="True" PageSize="50" AllowPaging="True" ShowGroupPanel="True" >
        <PagerStyle Mode="NumericPages" AlwaysVisible="true" />
        <MasterTableView AutoGenerateColumns="false" AllowMultiColumnSorting="true" AllowFilteringByColumn="true">
            <CommandItemSettings ExportToPdfText="Export to PDF"></CommandItemSettings>
            <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column">
                <HeaderStyle Width="20px"></HeaderStyle>
            <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column">
                <HeaderStyle Width="20px"></HeaderStyle>
                <telerik:GridClientSelectColumn UniqueName="ClientSelectColumn" ItemStyle-Width="50">
                    <ItemStyle Width="50px"></ItemStyle>
                <telerik:GridBoundColumn FilterControlAltText="Filter Course column" HeaderText="Course"
                    DataField="Course" UniqueName="Course" >
                   <telerik:GridBoundColumn FilterControlAltText="Filter lesson column" HeaderText="Lesson"
                    DataField="Lesson" UniqueName="Lesson" >
                <telerik:GridHyperLinkColumn DataNavigateUrlFields="URL"
                    DataNavigateUrlFormatString="/0/Action/Edit" DataTextField="PageTitle"
                    FilterControlAltText="Filter pagetitle column" HeaderText="Page Title"
                    SortExpression="PageTitle" UniqueName="PageTitle">
                <telerik:GridBoundColumn DataField="ItemId" FilterControlAltText="Filter ItemIdColumn column"
                    UniqueName="ItemIdColumn" Visible="false">
                <EditColumn FilterControlAltText="Filter EditCommandColumn column">
                <telerik:GridSortExpression FieldName="Course" SortOrder="Ascending" />
                <telerik:GridSortExpression FieldName="Lesson" SortOrder="Ascending" />
        <ClientSettings EnableRowHoverStyle="true" AllowDragToGroup="True">
            <Selecting AllowRowSelect="True" EnableDragToSelectRows="true" />
        <FilterMenu EnableImageSprites="False">
        <HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default">

    Any help would be greatly appreciated.

    Chris Aumiller
  • More investigation reveals the following:

    This Javascript seems to not be working correctly:

    getColumnByUniqueName: function (a)
        for (var b = 0;
        b < this.get_columns().length;
            if (this.get_columns()Beer.get_element().UniqueName == a)
                return this.get_columns()Beer;
        return null;

    For some reason, this.get_columns().length is returning 0, thus the get_columns()Beer call is never actually being called, and it defaults to a null return.

    Any ideas, anyone?

    ETA: I should add that we are using Sitefinity 4.3.

    Chris Aumiller
  • Hello Chris,

    Are you getting any javascript errors initially when your page is loaded? Can you paste the error messages of these, if any? You can use the developer tools in your browser of choice to debug the javascript, e.g. Firebug in Firefox, Developer Tools in IE and Chrome, etc.

    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
  • Veli,

    I am not getting errors on load; only when I attempt to click the filter button.

    That error is:

    f is null
    Line 7713

    I've actually been testing this with the recent 4.4 release, and we've also seen it in 4.3 as I mentioned earlier.

  • We are not able to identify the cause of this issue at this point. If you can open a regular support ticket and send us some test module or some other same code we can debug locally, we will be able to better identify the cause of the problem.

    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
  • In preparing to put together a solution for this, I put the widget I was using on a page by itself (intending to export the data I was using to an Excel sheet so I could send it to you folks). When the widget is on a page by itself, it works fine, but when it is a part of another page with other widgets, it doesn't work.

    Have there been any reported issues with RadGrids and other widgets?

  • Hey Chris,

    The error you are getting may be caused by various widgets on your page. Are you using any other third-party components at the same time in your pages? The Ajax Control Toolkit, for example, may have incompatibility with RadControls. If any, consider removing those to see if you are getting the same error.

    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
  • When removing it from a custom template, it seems to work just fine, so the problem seems to lie there. When you tested, did you test with a custom template, a Telerik template, or a blank one? That may be key to tracking this down.

    ETA: The template in question has several custom user controls on it, as defined in the .master file. However, the only widget that's drop and draggable in the Sitefinity backend is the widget consisting of the RadGrid.

  • Hello

    What might be causing a problem is as mentioned above other widgets on the page or scripts loaded with the master page template. To test if this is the case can you place the Grid widget on a new page using no template (start from scratch) and check if the same problem will appear. If not the problem is in te template.

    Best wishes,
    Stanislav Velikov 
    the Telerik team

    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items