Q:

How to bind web service in jquery easy ui CRUD DataGrid

I am developing an website in c# asp.net using jQuery EasyUI CRUD datagrid.
But i need to replace the .php files with my web service to bind the datagrid as in the following snippet.Please suggest me a way to do so.
 <table id="dg" title="My Users" style="width:700px;height:250px"  
            toolbar="#toolbar" pagination="true" idField="id"  
            rownumbers="true" fitColumns="true" singleSelect="true">  
        <thead>  
            <tr>  
                <th field="firstname" width="50" editor="{type:'validatebox',options:{required:true}}">First Name</th>  
                <th field="lastname" width="50" editor="{type:'validatebox',options:{required:true}}">Last Name</th>  
                <th field="phone" width="50" editor="text">Phone</th>  
                <th field="email" width="50" editor="{type:'validatebox',options:{validType:'email'}}">Email</th>  
            </tr>  
        </thead>  
    </table>  

<script type="text/javascript">  
        $(function(){  
            $('#dg').edatagrid({  
                url: 'get_users.php',  
                saveUrl: 'save_user.php',  
                updateUrl: 'update_user.php',  
                destroyUrl: 'destroy_user.php'  
            });  
        });  
    </script>  

A:

You can use jQuery Ajax, with jTemplate. 
$.ajax({
    url: "Your webservice path",
    type: "POST",
    data: "JSON formated data to pass in the webservice",
    contentType: "application/json; charset=utf-8",
    dataType: "json",
    cache: false,
    success: function (data) {
       //You can further use jTemplate to output the data.
    },
    error: function (data) {
    }
});

The following link shows a simple example for jTemplate:
http://www.codeproject.com/Articles/45759/jQuery-jTemplates-Grid

