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

Binding to WCF Data Service produces an Error:

5 Answers 193 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Mark
Top achievements
Rank 1
Mark asked on 02 Dec 2011, 02:12 PM
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)

5 Answers, 1 is accepted

Sort by
0
Accepted
Atanas Korchev
Telerik team
answered on 02 Dec 2011, 03:53 PM
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!
0
Mark
Top achievements
Rank 1
answered on 02 Dec 2011, 04:25 PM
Thanks Atanas, I had found the same solution while searching MSDN.
0
Naveen
Top achievements
Rank 1
answered on 20 Jan 2012, 07:22 AM
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>

0
Eric Schoenholzer
Top achievements
Rank 2
answered on 20 Jan 2012, 05:55 PM
Follow the answer above.
You need to add the JSONPSupportBehavior.
By default, WCF doesn't know the $format parameter

Eric
0
Naveen
Top achievements
Rank 1
answered on 23 Jan 2012, 05:24 AM
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
Tags
Grid
Asked by
Mark
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
Mark
Top achievements
Rank 1
Naveen
Top achievements
Rank 1
Eric Schoenholzer
Top achievements
Rank 2
Share this question
or