I'm having a problem with my TreeGrid implementation.
I have a tree grid that is tied to a RestDataSource. The DataSource has a parentID foreign key relationship to create the tree.
When I drag and drop to reorder a folder inside the same parent folder I can get the information to properly send to the server, and I can successfully update the folder order on the server side. What I can't seem to do is get the client to update it's view to match the server.
So I have:
If I try and move the 4th sub folder between the 1st and 2nd sub folder (or anywhere else inside the Main Folder) the DataSource automatically fires off an updateData request that I catch on the server and process.
I have tried sending back a simple success status, and I've tried sending back the whole (modified) Main Folder structure. Neither of which seems to cause the client to update properly. Of course if I reload the page it comes back exactly as it should.
I've even tried creating an 'order' field in the DataSource (and TreeGrid) and setting sortField: 'order' but it doesn't seem to make a difference. I've even called sort('order') inside dataArrived() to no avail.
If I display the 'order' field in the tree I can see that the entries are properly updated from the server (when I send back the whole 'Main Folder' structure), but the folder list is never re-sorted by the updated values.
So, a long story short:
What exactly do I need to return from the server in order to get the client to properly update it's view?
Thanks,
-Chris
I have a tree grid that is tied to a RestDataSource. The DataSource has a parentID foreign key relationship to create the tree.
When I drag and drop to reorder a folder inside the same parent folder I can get the information to properly send to the server, and I can successfully update the folder order on the server side. What I can't seem to do is get the client to update it's view to match the server.
So I have:
Code:
Main Folder ---->1st sub folder ---->2nd sub folder ---->3rd sub folder ---->4th sub folder
I have tried sending back a simple success status, and I've tried sending back the whole (modified) Main Folder structure. Neither of which seems to cause the client to update properly. Of course if I reload the page it comes back exactly as it should.
I've even tried creating an 'order' field in the DataSource (and TreeGrid) and setting sortField: 'order' but it doesn't seem to make a difference. I've even called sort('order') inside dataArrived() to no avail.
If I display the 'order' field in the tree I can see that the entries are properly updated from the server (when I send back the whole 'Main Folder' structure), but the folder list is never re-sorted by the updated values.
So, a long story short:
What exactly do I need to return from the server in order to get the client to properly update it's view?
Thanks,
-Chris
Comment