The value for OData $orderby cannot be empty

2 posts, 0 answers
  1. Richard
    Richard avatar
    28 posts
    Member since:
    Sep 2011

    Posted 06 Jun 2016 Link to this post

    Trying to use an ODataDataSource with a RadSearchBox.  When I try to use it, I get the following error:

    The query specified in the URI is not valid. The value for OData query '$orderby' cannot be empty.

    Is there a way to set an orderby that I can pass?  I don't see an option (or maybe I'm going nuts - could be) and it appears as though the ODataDataSource is just passing a blank $orderby= in the query string. 



  2. Bozhidar
    Bozhidar avatar
    1189 posts

    Posted 09 Jun 2016 Link to this post


    The provided information is not enough th troubleshoot the issue. Our online demos demonstrate a working scenario with the SearchBox bound to an ODataDataSource:

    I've also tested the following markup which is working on my end:
    <telerik:RadODataDataSource runat="server" ID="DataSource1">
            <Read Url=""></Read>
            <telerik:DataModel ModelID="Product" Set="Products">
                <telerik:DataModelField FieldName="ProductID" />
                <telerik:DataModelField FieldName="ProductName" />
    <telerik:RadSearchBox RenderMode="Lightweight" runat="server" ID="RadSearchBox1"
        DataKeyNames="ProductID, ProductName"
        <DropDownSettings Height="400" Width="300" />

    Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
Back to Top