mercredi 27 juin 2018

web service using easyUi datagrid

I have the problem,i need to replace the .php files with my web service to bind the dategrid as in the following snippet. Maybe someone tell me exactly how the problem was solved, I just started and for me is hard to understand the explanation , please show me an example. thank you in advance

<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>  



Aucun commentaire:

Enregistrer un commentaire