Jquery Tree grid easy-UI with checkbox (get json data from servlet)

614 views Asked by At

Hi I am new to jquery and easy-ui. I am able to show data from template.json file. data using template.json

    <!DOCTYPE html>
    <html>
    <head>
        <meta charset="UTF-8">
        <title>Cascade CheckBox in TreeGrid - jQuery EasyUI Demo</title>

        <link rel="stylesheet" type="text/css" href="http://www.jeasyui.com/easyui/themes/default/easyui.css">
        <link rel="stylesheet" type="text/css" href="http://www.jeasyui.com/easyui/themes/icon.css">
        <script type="text/javascript" src="http://code.jquery.com/jquery-1.6.1.min.js"></script>
        <script type="text/javascript" src="http://www.jeasyui.com/easyui/jquery.easyui.min.js"></script>


    </head>
    <body>
        <h2>Cascade CheckBox in TreeGrid</h2>
        <p>TreeGrid nodes with cascade check boxes.</p>
        <div style="margin:20px 0;"></div>
        <table title="Folder Browser" class="easyui-treegrid" style="width:700px;height:250px"
                data-options="
                    url: 'treegrid_data1.json',
                    method: 'get',
                    checkbox: true,
                    rownumbers: true,
                    idField: 'id',
                    treeField: 'name'
                ">
            <thead>
                <tr>
                    <th data-options="field:'name'" width="220">Name</th>
                    <th data-options="field:'size'" width="100" align="right">Size</th>
                    <th data-options="field:'date'" width="150">Modified Date</th>
                </tr>
            </thead>
        </table>

    </body>
    </html>

The problem I am facing is, I want to get the json file from servlet. How can use ajax call here? Also in this table i want to add submit button below the table or in table footer so that when user click on this button he should get all selected data in alert. Please help me in this. Thanks in advance.

0

There are 0 answers