EasyUI Forum
October 03, 2022, 06:27:50 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 clear issue  (Read 228 times)
zombie86
Newbie
*
Posts: 23


View Profile WWW Email
« on: August 17, 2022, 09:52:03 AM »

Dear All,

hope you are doing well,

I do face an issue with treegrid as it has dynamic dataset json
and when loading new dataset json it still has the checked nodes Sad
I do use
for clear
$('#tg').treegrid('loadData',{"rows":[],"total":0});

for new dataset
$('#tg').treegrid('loadData',JSONformattedData);

and when I use
var rows = $('#tg').treegrid('getCheckedNodes');

it still has previously checked nodes even they completely cleared Cry

your help is highly appreciated
Logged
jarry
Administrator
Hero Member
*****
Posts: 2120


View Profile Email
« Reply #1 on: August 17, 2022, 05:10:50 PM »

Please call 'clearChecked' method to clear all the checked rows.
Code:
$('#tg').treegrid('clearChecked');
Logged
zombie86
Newbie
*
Posts: 23


View Profile WWW Email
« Reply #2 on: August 17, 2022, 10:19:49 PM »

thanks jarry,

you saved my day Smiley

the method not listed in documentation
Logged
battlezad
Newbie
*
Posts: 44


View Profile
« Reply #3 on: August 17, 2022, 10:37:18 PM »

treegrid dependency on datagrid, clearChecked method is mentioned there.
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!