EasyUI Forum
May 15, 2024, 07:46:16 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
  Home Help Search Login Register  
  Show Posts
Pages: 1 ... 18 19 [20]
286  General Category / EasyUI for jQuery / Re: automatic check/select data in datagrid on: June 03, 2014, 03:29:45 AM
help please ....
287  General Category / EasyUI for jQuery / automatic check/select data in datagrid on: June 02, 2014, 02:59:08 AM
I think you missed something in datagrid demo...  Cry

How to create a datagrid with some data already checked or selected?

I found method in docs about using selectRow and checkRow..
but it just worked only in client side (checked or selected after datagrid successfully loaded).....

Code:
<table id="package_group_table" class="easyui-datagrid" style="width:250px;height:150px"
                data-options="url:admin/packagegroup/list_package_group_for_checkbox',singleSelect:false">
                        <thead>
                            <tr>
                                <th data-options="field:'PACKAGE_GROUP_ID'">ID</th>
                                <th data-options="field:'PACKAGE_GROUP_ALIAS'">Name</th>
                                <th data-options="field:'CHECKED'"   formatter="formatCheck">Status</th>
                                <th data-options="field:'CHECKED_STATUS',checkbox:true">Ck</th>
                            </tr>
                        </thead>
                    </table>
                    <input type="button" onclick="wawa();" value="tes"></input>
                    <script type="text/javascript">
                        function formatCheck(val,row,idx){
                            if(val+'' == 'true'){
                                $('#package_group_table').datagrid('checkRow', idx);
                            }
                        }
                    </script>

Code above isnt working...
CHECKED field populated with true and false data...
Pages: 1 ... 18 19 [20]
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!