EasyUI Forum
March 29, 2024, 03:50:11 AM *
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 1553 times)
zombie86
Newbie
*
Posts: 24


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: 2260


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: 24


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!