EasyUI Forum
September 15, 2025, 04:02:48 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
  Home Help Search Login Register  
  Show Posts
Pages: [1]
1  General Category / Bug Report / Re: Treegrid multiple select happens by field id rather than row id on: October 10, 2016, 12:05:11 PM
That fixes it, thanks!

Scott
2  General Category / Bug Report / Treegrid multiple select happens by field id rather than row id on: October 06, 2016, 07:17:36 AM
When using the treegrid and setting singleSelect to false, if you click a row then shift click another row further down, the rows selected are those between the two row ids, regardless of which rows are actually between the two clicked rows.  Here is an example, with eight rows in order except for the one with id=3:

Code:
<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8">
        <title>TreeGrid</title>
        <link rel="stylesheet" type="text/css" href="jquery-easyui/themes/default/easyui.css">
        <link rel="stylesheet" type="text/css" href="jquery-easyui/themes/icon.css">
        <script type="text/javascript" src="jquery.min.js"></script>
        <script type="text/javascript" src="jquery-easyui/jquery.easyui.min.js"></script>
    </head>
    <body>
        <table title="Hello World!" class="easyui-treegrid"
               data-options="idField: 'id', treeField: 'name', singleSelect: false, ctrlSelect: true">
            <thead>
                <tr>
                    <th data-options="field:'id'" width="50">Id</th>
                    <th data-options="field:'name'" width="100">Name</th>
                </tr>
            </thead>
            <tbody>
                <tr><td>0</td><td>a</td></tr>
                <tr><td>1</td><td>b</td></tr>
                <tr><td>2</td><td>c</td></tr>
                <tr><td>4</td><td>e</td></tr>
                <tr><td>5</td><td>f</td></tr>
                <tr><td>6</td><td>g</td></tr>
                <tr><td>3</td><td>d</td></tr>
                <tr><td>7</td><td>h</td></tr>
            </tbody>
        </table>
    </body>
</html>

If you click row 0, then shift-click row id=3 (the 7th row), it will select rows with ids=0..3, skipping rows with id=4..6 even though they are in-between the two clicked rows.  Similarly, click row id=0 and row id=4 and it will select row id=3 too even though it is not in-between.  I am using the free version (thanks BTW!), so the source code for the treegrid is obfuscated, but I could see enough that it looks like the multiple select is happening with min()/max() for the ids, rather than something like row indexes.

Thanks,
Scott
Pages: [1]
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!