Binding to WCF Data Service produces an Error:

6 posts, 1 answers
  1. Mark
    Mark avatar
    4 posts
    Member since:
    Nov 2010

    Posted 02 Dec 2011 Link to this post

    Any Ideas why the following code should produce an error?

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

    <html>
        <head>
        <!--In the header of your page, paste the following for Kendo styles-->
        <link href="styles/kendo.common.min.css" rel="stylesheet" type="text/css" />
        <link href="styles/kendo.kendo.min.css" rel="stylesheet" type="text/css" />
        <!--Then paste the following for Kendo scripts-->
        <script src="scripts/jquery.min.js" type="text/javascript"></script>
        <script src="scripts/kendo.all.min.js" type="text/javascript"></script>


            <title>Binding to remote data</title>
        </head>
        <body>
            <div id="example" class="k-content">
                <div id="grid"></div>
                <script  type="text/javascript">
                    var dateRegExp = /^\/Date\((.*?)\)\/$/;

                    function toDate(value) {
                        var date = dateRegExp.exec(value);
                        return new Date(parseInt(date[1]));
                    }

                    $(document).ready(function () {
                        $("#grid").kendoGrid({
                            dataSource: {
                                type: "odata",
                                transport: {
                                    read: "http://localhost:64526/WcfLeaguesDataService.svc/tbl_Umpires"
                                },
                                schema: {
                                    model: {
                                        fields: {
                                            Id: { type: "number" },
                                            Firstname: { type: "string" },
                                            LastName: { type: "string" },
                                            EmailAdd: { type: "string" }
                                        }
                                    }
                                },
                                pageSize: 10,
                                serverPaging: true,
                                serverFiltering: true,
                                serverSorting: true
                            },
                            height: 250,
                            filterable: true,
                            sortable: true,
                            pageable: true,
                            columns: [{
                                field: "Id",
                                filterable: false
                            },
                                "Firstname",
                                "LastName",
                                "EmailAdd"
                            ]
                        });
                    });
                </script>
            </div>
        </body>
    </html>

    The Error is:

    <?xml version="1.0" encoding="iso-8859-1" standalone="yes"?>
    <error xmlns="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"> <code></code> <message xml:lang="en-GB">The query parameter '$format' begins with a system-reserved '$' character but is not recognized.</message> </error>

    As it is just an edit of the Example code. (The WCF string pasted into the browser, seems to work fine)
  2. Answer
    Atanas Korchev
    Admin
    Atanas Korchev avatar
    8462 posts

    Posted 02 Dec 2011 Link to this post

    Hi Mark,

     I found the following blog post which describes the issue:

    http://professionalaspnet.com/archive/2010/06/17/The-query-parameter-_27002400_format_2700_-begins-with-a-system_2D00_reserved-_270024002700_-character-but-is-not-recognized.aspx

    Regards,
    Atanas Korchev
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  3. Kendo UI is VS 2017 Ready
  4. Mark
    Mark avatar
    4 posts
    Member since:
    Nov 2010

    Posted 02 Dec 2011 Link to this post

    Thanks Atanas, I had found the same solution while searching MSDN.
  5. Naveen
    Naveen avatar
    9 posts
    Member since:
    Dec 2011

    Posted 20 Jan 2012 Link to this post

    HI all,
    iam getting below error,can any one help me to solve this error.iam getting this eoor while connecting data from database through odata services.

    This XML file does not appear to have any style information associated with it. The document tree is shown below.
    <error xmlns="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata">
    <code/>
    <message xml:lang="en-IN">
    The query parameter '$format' begins with a system-reserved '$' character but is not recognized.
    </message>
    </error>

  6. Eric Schoenholzer
    Eric Schoenholzer avatar
    138 posts
    Member since:
    Mar 2004

    Posted 20 Jan 2012 Link to this post

    Follow the answer above.
    You need to add the JSONPSupportBehavior.
    By default, WCF doesn't know the $format parameter

    Eric
  7. Naveen
    Naveen avatar
    9 posts
    Member since:
    Dec 2011

    Posted 22 Jan 2012 Link to this post

    Thanks Eric,i tried and got it.Now i wanted to show this data in charts.Is that possible?.i came to know that kendo charts will not support grouped data right.when it will be fixed?.when will be the next release of kendo chart  with which support grouped data?.Our management have so much interested to by this product if it will support grouped for BI solutions.I expect early reply from you.


    Thanks,
    naveen
Back to Top
Kendo UI is VS 2017 Ready