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

Not loads data into the combobox

1 Answer 86 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Pedro
Top achievements
Rank 1
Pedro asked on 10 Oct 2012, 08:06 PM

Greetings.

I have the following problem, I want to load data into a ComboBox in my service WCF (. Svc). But not charging anything, the only difference I see is the one you selected in the attached images.

The difference is in the type:
In the example website <text/javascript>
In my website <application/xml>

The result running on the website. It is the image (servicio de ejemplo)
Sample code:

<script>

                $("#categories").kendoComboBox({

                        placeholder: "Select category...",

                         dataTextField: "CategoryName",

                        dataValueField: "CategoryID",

                        dataSource: {

                            type: "odata",

                            serverFiltering: true,

                            transport: {

                read: "http://demos.kendoui.com/service/Northwind.svc/Categories"                                

                            }

                        }

                    });

</script>


The result running on the website. It is the image (mi servicio)
My code:

<script>

                $("#categories").kendoComboBox({

                        placeholder: "Select category...",

    dataTextField: "Status",

                        dataValueField: "AcquisitionNo",

                        dataSource: {

                            type: "odata",

                            serverFiltering: true,

                            transport: {

            read: "http://192.168.0.125/SAGDataService1.svc/vwInventoryHeader"

                            }

                        }

                    });

              </script>


It gives me no error just not charge me anything.
I need help please
thanks



1 Answer, 1 is accepted

Sort by
0
Jayesh Goyani
Top achievements
Rank 2
answered on 09 Nov 2012, 08:01 AM
Hello,

Please try with below code snippet
[ServiceContract]
  public interface IService1
  {
        [OperationContract]
      [WebInvoke(ResponseFormat = WebMessageFormat.Json)]
     //Your method declaration
  }


Thanks,
Jayesh Goyani
Tags
ComboBox
Asked by
Pedro
Top achievements
Rank 1
Answers by
Jayesh Goyani
Top achievements
Rank 2
Share this question
or