url for Listview

6 posts, 0 answers
  1. Kushal
    Kushal avatar
    12 posts
    Member since:
    Aug 2012

    Posted 07 Sep 2012 Link to this post

    i am using kendo listview in which i am specifying url as below

    $("#btnShowRestaurant").click(function () {
                    alert('hiii');


                    var dataSource = new kendo.data.DataSource({
                        transport: {
                            read: {
                                url: "Restaurant.aspx/GetHotelData",
                                dataType: "jsonp"
                            }
                        },
                        pageSize: 12
                    });

    Is it they right way? because the webmethod in codebedhind is unreachable... any body having similar issue..any other option..

    thanks in advance
                 
                 
  2. Nohinn
    Nohinn avatar
    167 posts
    Member since:
    Feb 2011

    Posted 07 Sep 2012 Link to this post

    Not sure about it, things needed for it to work:
    • Your function must be public
    • Your function must be static
    • You have to set the WebMethod attribute to the function with EnableSession = false
  3. Kendo UI is VS 2017 Ready
  4. Kushal
    Kushal avatar
    12 posts
    Member since:
    Aug 2012

    Posted 07 Sep 2012 Link to this post

    at least someone replied...let me check...
  5. Kushal
    Kushal avatar
    12 posts
    Member since:
    Aug 2012

    Posted 07 Sep 2012 Link to this post

    checked...still not working 

    WebMethod attribute  EnableSession = false was missing added that as well but doesn't help..

    any thing else...

  6. Nohinn
    Nohinn avatar
    167 posts
    Member since:
    Feb 2011

    Posted 07 Sep 2012 Link to this post

    Still not working means the control is not populating or you're not receiving anything from the call?

    To be sure of this question you can look with firebug or chrome developer tools at the network tab, if you're getting there anything from that url "Restaurant.aspx/GetHotelData", could you take an screenshot so I (or anyone else) can take a look at it?

    Maybe you're receiving it but not as it is expected, or maybe you're having a 500 error or similar, so an screen would be handful.
  7. Kushal
    Kushal avatar
    12 posts
    Member since:
    Aug 2012

    Posted 08 Sep 2012 Link to this post

    @Nohinn  ..  i really appreciate you helping me out...

    My first question is.. the code i am using [ url: "Restaurant.aspx/GetHotelData", ]
    is it correct...  because i have break point on GetHotelData function, but control never reaches there... 

    Do you have any example where a code behind function is called in kendo ui list veiw url.

    there is one more question.. i see many examples url like this " url: "/Person/SearchRolResults", "  .. they are calling web services right??

    ** I have attached the file but ignore it .. it shows only headers..!!


Back to Top
Kendo UI is VS 2017 Ready