Announcement

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

    ListGridField detail from DSField

    Hello,

    Could it be that the meaning of field "detail" has changed in a few recent builds?
    Setting this field on a DataSourceField made a field hidden by default in the ListGrid, but you could still choose it in the columns chooser in the ListGridField context menu.
    Now it seems that all my detail fields are not showing up anymore in the Columns list. In code, I can still find them when doing getAllFields().

    SC_SNAPSHOT-2011-10-24

    #2
    Nevermind, I think it's somewhere in my app as it also happens on an older build of SmartGWT.

    Comment


      #3
      So strange, it's a code flow problem:

      I did
      Code:
      grid.sort
      grid.setCanSort(false)
      
      grid.setFields
      grid.setDataPath
      grid.setValuesManager
      Calling the sort over there causes the detail fields to disappear from the columns chooser.

      Moving the first 2 lines after the 3 lines, keeps the detail fields.

      Comment


        #4
        The issue is most likely to do with whether the grid is actually initialized (in the browser as a JavaScript object) when the various methods are run.

        It sounds like there may be a bug of some sort here, but it's hard to be certain just from the description -- if you'd like us to take a look, please put together a simple, runnable test case that shows the good and bad behavior.

        It should be fairly easy to put together - you can use a trivial clientOnly dataSource and a grid.

        Comment


          #5
          It's OK. It sounds fair not to do a command like 'sort' before the grid has been initialized.
          Though it could work, it isn't 'natural' to ask for a sort on a field, before the fields were added to the grid :)

          Comment

          Working...
          X