Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    TreeGrid drop leaf onto last position

    Hi,

    We're using smartGWT-3.0 pro, with GWT 2.3.0.

    While trying to implement a TreeGrid that would have quiz tests as folders and quiz questions as leafs.
    Here are the problem we encounter:

    Take a TreeGrid that has set setCanReparentNodes(true) and setCanReorderRecords(true).
    Try to drag a leaf node and drop it on the last position in a folder (after last item in that folder).
    Expected behavior: the leaf node will be added _AFTER_ last item in folder.
    Actual behavior: the leaf node is added _BEFORE_ last item in folder.
    Of course it is possible to drag the last node and put it before the "node before last" (that is the node we wanted to be on the last position) and achieve so the desired action, but still this can be considered a BUG. Isn't it?
    Another way to achieve desired result would be to call reloadChildren on affected folder node, but that will cause a very annoying flickering effect.

    Is this a known bug? Or perhaps it's something that we're doing wrong?

    #2
    i posted the same question last week, but no one replied me. or rather, everything i asked here, no one answered =.="

    Comment


      #3
      I'm confident someone will answer this question, even if the problem, or bug is reported. Maybe next smartGWT release will have this fixed. Isn't it? Isomorphic team?

      Or maybe this is a feature, we didn't figure out yet how to use:)

      Thanks!

      Comment


        #4
        Hi All,
        We may be misunderstanding your description but we are not seeing this behavior.

        You can see a TreeGrid with drag-reparenting and drag-reordering in the showcase here: http://www.smartclient.com/smartgwt/..._drag_reparent

        In that example if you (for example) select the second row ("Gene Porter"'s node), and drag it below "Olivier Herbert" (the last row in the open folder below), you'll see the drop indicator show up underneath that last record in that folder, and the folder-drop icon show up for the correct parent node ("Rogine Leger").
        Releasing the drag causes the record to be dropped and it shows up underneath that last child of the folder as expected.

        It sounds like we're not seeing the behavior that is causing you trouble.
        If you'd like us to take another look, please show us a reproducible case. If it shows up in a showcase example, by all means link to that example and give us steps to reproduce. Otherwise, please post a runnable test case we can actually try on our end

        Thanks
        Isomorphic Software

        Comment


          #5
          Thanks for your answer, but we're still not able to get it work.

          Trying to figure out the problem source I drastically reduced our tree grid implementation to a class that extends TreeGrid and sets the following properties:

          this.setDataSource(DataSource.get("quizTest"));
          this.setWidth100();
          this.setHeight("45%");
          this.setCanReorderRecords(true);
          this.setCanAcceptDroppedRecords(true);
          this.setAutoFetchData(true);

          The only important difference from the given sample http://www.smartclient.com/smartgwt/showcase/#tree_interaction_drag_reparent is that we use a DataSource to populate the TreeGrid. The *.ds.xml file is attached.

          Please make a short test case using a TreeGrid with a DS, and auto fetch data. We're using smartGWT pro DMI DS!

          Thanks!
          Attached Files

          Comment


            #6
            We have looked at this again - in short what we're seeing is that drag-reparenting appears to be working correctly even with data-bound trees.

            We'd guess this is likely a misconfiguration issue. In order to help you we're going to need a runnable test case to reproduce the problem.
            The best way to proceed would be to take your simplified test case and boil it down to an EntryPoint class that defines the tree and any dataSources and give us a series of steps to reproduce.
            Note that this is likely not to be related to the dataSource type so you can probably use client-only dataSources to simplify the test code.

            Comment

            Working...
            X