Announcement

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

    listgrid row title on drag

    On drag, a listgrid row displays the field called "name", "id", or "title" in the drag box, and if that fails it uses the first column. If you are doing a expanded row, it displays the triangle for the drag, since that is the first column.

    I'm trying to display the actual column in the listgrid on drag but I've come across a few problems.

    Using setTitleField on the ListGrid does figure out what field to use, but it displays [Object, Object].

    Using getDragTrackerTitle with getDragTrackerMode(Title) would seem to do it, but getDragTrackerTitle isn't being called.

    I don't think it's an issue with our data structure, since if I change the name of our field to "title", it correctly shows the text on drag.

    I'm hoping there's some other way to fix this, some workaround.

    We're using smartgwt jars from 4/24.

    Here's some of the code if it's useful.

    Code:
    grdActivities = new ListGrid(){{
        setFields(new ListGridField("activity", "Activity"){{
    			setValueField("id");
    			setDisplayField("qualifiedName");
    			setRequired(true);
    			setOptionDataSource(dsActivities);
    			setDataPath("activity/id");
          }});
    	setHeight100();
    	setCanExpandRecords(true);
    	setCanExpandMultipleRecords(false);
    }

    #2
    Thanks for the notification. We've made a change which should address the issue with the opener icon showing up as the drag tracker by default. This will be present in the next nightly build, and should be all you need to have things work.

    We're also looking into the issue with being able to customize the drag tracker title.

    On the case of having an explicit title field simply return "[Object object]" we can't really comment without seeing the problem in action. If you think there's a framework bug here, please put together a standalone test case (a simple Entry point class we can drop into a SGWT enabled eclipse project and run ourselves) demonstrating the problem and we will take a look

    Regards
    Isomorphic Software

    Comment


      #3
      Just a quick follow up: We've now also added an explicit API to set a drag-tracker customizer on the ListGrid. This will show up in the 4.1d branch, in the next nightly build (dated Aug 30 or above).

      Regards
      Isomorphic Software

      Comment

      Working...
      X