EasyUI Forum
October 19, 2025, 01:25:23 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Treegrid with checkbox selection  (Read 18454 times)
bakkers
Newbie
*
Posts: 21


View Profile Email
« on: June 18, 2015, 06:40:37 AM »

Hello

Is there a way to add checkbox selection to a treegrid?

If it's not posible can i the make treegrid with the option to select multiple lines?
« Last Edit: June 18, 2015, 06:42:42 AM by bakkers » Logged
jarry
Administrator
Hero Member
*****
Posts: 2300


View Profile Email
« Reply #1 on: June 18, 2015, 11:51:09 PM »

Please add a 'checkbox' column to get a checkbox selecting treegrid.
Code:
<table id="tg" title="Folder Browser" class="easyui-treegrid" style="width:700px;height:250px"
data-options="
url: 'treegrid_data1.json',
method: 'get',
rownumbers: true,
idField: 'id',
treeField: 'name',
singleSelect: false
">
<thead>
<tr>
<th data-options="field:'ck',checkbox:true"></th>
<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>
Logged
Aod47
Jr. Member
**
Posts: 85


View Profile
« Reply #2 on: June 20, 2015, 06:14:34 AM »

Could you please show me how to set cascadeCheck like a [CheckBox Tree] and how to get value from selected rows. Many thank.
Logged
jarry
Administrator
Hero Member
*****
Posts: 2300


View Profile Email
« Reply #3 on: June 20, 2015, 04:57:02 PM »

The cascade checking feature does not supported in the treegrid plugin.
Logged
bakkers
Newbie
*
Posts: 21


View Profile Email
« Reply #4 on: June 22, 2015, 12:29:40 AM »

Please add a 'checkbox' column to get a checkbox selecting treegrid.
Code:
<table id="tg" title="Folder Browser" class="easyui-treegrid" style="width:700px;height:250px"
data-options="
url: 'treegrid_data1.json',
method: 'get',
rownumbers: true,
idField: 'id',
treeField: 'name',
singleSelect: false
">
<thead>
<tr>
<th data-options="field:'ck',checkbox:true"></th>
<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>

Thank you for this, is there anyway to make it so the user can select more the one checkbox?
Logged
jarry
Administrator
Hero Member
*****
Posts: 2300


View Profile Email
« Reply #5 on: June 22, 2015, 01:42:12 AM »

The singleSelect has been set to false, so you can select multiple rows on the treegrid.
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!