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

DateFilter with Ajax causing javascript error

1 Answer 23 Views
Filter
This is a migrated thread and some comments may be shown as answers.
Dave
Top achievements
Rank 1
Dave asked on 08 May 2013, 08:58 PM
I have the following code in an ascx page (part of a webpart for Sharepoint).
<asp:UpdatePanel runat="server">
    <ContentTemplate>
        <telerik:RadFilter runat="server" ID="RadFilter1" ShowApplyButton="False">
            <FieldEditors>
                <telerik:RadFilterTextFieldEditor DisplayName="fee" FieldName="fee" TextBoxWidth="120" />
                <telerik:RadFilterDateFieldEditor DataType="System.DateTime" DisplayName="foo" FieldName="foo" />
            </FieldEditors>
        </telerik:RadFilter>
    </ContentTemplate>
</asp:UpdatePanel>
When I select the "foo" field from the context menu, I get the following exception from javascript:
Sys.ArgumentUndefinedException: Value cannot be undefined.
Parameter name: type

If I let the code continue on, the filter appears to render correctly, but the datepicker and the timeview are unusable.  If I remove the UpdatePanel, the code works fine, but causes annoying postbacks every time the user interacts with the filter control.  At this point I'm thinking I may need to just use a text field instead of the date one.

For the record, I'm using this so I can manually process the resulting filter in my business logic, so I'm not wired up to a grid or a datasource.

1 Answer, 1 is accepted

Sort by
0
Dave
Top achievements
Rank 1
answered on 08 May 2013, 10:58 PM
Ok, I figured out the issue.  Turns out there is a problem with how SharePoint 2010 was processing the AJAX.  Upgrading to SP1 fixed the issue.  Hopefully this information is useful to someone else out there some day.
Tags
Filter
Asked by
Dave
Top achievements
Rank 1
Answers by
Dave
Top achievements
Rank 1
Share this question
or