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

[Solved] Client Side Databinding Debugging?

2 Answers 135 Views
Grid
This is a migrated thread and some comments may be shown as answers.
KevinMc
Top achievements
Rank 1
KevinMc asked on 30 Mar 2009, 09:27 PM
I am working through the client side databinding examples and I would like to be able to set a breakpoint in a javascript function to see what is coming back from the server. Is there a client side event that i can hook to in order to view the JSON and inspect it? Aditionally are you guys planning on any more client side demos? It would be nice if you would go through all of your examples on the grid demos and show the server side implementation and the client side implementation with a note where the server side implementation cannot be duplicated client side. Right now it is very confusing what is possible and what is not possible with client side databinding. One example i would love to see is http://demos.telerik.com/aspnet-ajax/controls/examples/integration/gridcomboajax/defaultcs.aspx?product=grid.

2 Answers, 1 is accepted

Sort by
0
KevinMc
Top achievements
Rank 1
answered on 31 Mar 2009, 01:42 PM
So i found an example for using a combobox on the page to filter grid results client side, but i am still trying to figure out where i can intercept the webservice reply and inspect the json being received. Anyone have any pointers?
0
Nikolay Rusev
Telerik team
answered on 03 Apr 2009, 06:32 AM
Hello Kevin,

I not quite sure that I completly understand your scenario.
However currently the only way of intercepting returned JSON from server is if you are not using declarative client-side data-binding. You should request WebService/PageMethod and on the success handler you can see the result returned from server. For example:
      <script type="text/javascript">  
            function pageLoad()  
            {  
                PageMethods.GetData(loadGrid);  
            }  
 
            function loadGrid(result)  
            {  
                //here you have your JSON from server - in the result argument                  
                var table = $find("<%=RadGrid1.ClientID %>").get_masterTableView();  
                table.set_dataSource(result);  
                table.dataBind();  
            }  
 
        </script> 

I hope this helps.


Best wishes,
Nikolay
the Telerik team

Check out Telerik Trainer , the state of the art learning tool for Telerik products.
Tags
Grid
Asked by
KevinMc
Top achievements
Rank 1
Answers by
KevinMc
Top achievements
Rank 1
Nikolay Rusev
Telerik team
Share this question
or