EasyUI
Home
Demo
Tutorial
Documentation
Download
Extension
Contact
Forum
EasyUI Forum
May 16, 2024, 10:40:26 AM
Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News
:
Home
Help
Search
Login
Register
EasyUI Forum
>
General Category
>
General Discussion
>
Reload TreeGrid not updating grid
Pages: [
1
]
« previous
next »
Print
Author
Topic: Reload TreeGrid not updating grid (Read 9397 times)
btork
Newbie
Posts: 8
Reload TreeGrid not updating grid
«
on:
November 05, 2016, 06:51:06 AM »
I'm trying to reload all the data in the TreeGrid with a button. I can see from the network console that it's retrieving the json data and the grid flashes, but the data isn't updating.
Here's my javascript function:
function reloadAll(){
$('#tt').treegrid('reload');
}
<a href="javascript:void(0)" class="easyui-linkbutton" onclick="reloadAll()">Reload</a>
<table id="tt" class="easyui-treegrid" style="width:100%;height:550px;"
url="leaderboarddata.php?tourney=<?php echo $_GET['tourney'] ?>"
rownumbers="false"
idField="scorecardid" treeField="name"
data-options="onClickCell:function(field,row){
if (field == 'name'){
$(this).treegrid('toggle', row.scorecardid);
}
}">
Thanks,
Brian
«
Last Edit: November 05, 2016, 07:43:43 AM by btork
»
Logged
jarry
Administrator
Hero Member
Posts: 2264
Re: Reload TreeGrid not updating grid
«
Reply #1 on:
November 05, 2016, 11:45:16 PM »
Please look at the network console, Is the returning data from server correct after calling the reload method.
Logged
btork
Newbie
Posts: 8
Re: Reload TreeGrid not updating grid
«
Reply #2 on:
November 06, 2016, 06:51:47 AM »
Yes, the data is correct in the network console, but the grid doesn't update.
Logged
btork
Newbie
Posts: 8
Re: Reload TreeGrid not updating grid
«
Reply #3 on:
November 06, 2016, 07:06:39 AM »
Do I need to rebind the data to the table after I call Reload? I'm stumped here why this isn't updating.
Logged
btork
Newbie
Posts: 8
Re: Reload TreeGrid not updating grid
«
Reply #4 on:
November 06, 2016, 10:05:21 AM »
Can anyone post an example of a treegrid that works with the Reload method?
Logged
btork
Newbie
Posts: 8
Re: Reload TreeGrid not updating grid
«
Reply #5 on:
November 07, 2016, 11:10:26 AM »
I figured out that my issue was a data problem. My children records did not have the id field populated. This caused an issue when the reload method attempted to repopulate the data in the grid.
Hope that can help someone in the future.
Logged
Pages: [
1
]
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
General Category
-----------------------------
=> News
=> General Discussion
=> EasyUI for jQuery
=> EasyUI for Angular
=> EasyUI for Vue
=> EasyUI for React
=> Bug Report
Loading...