Announcement

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

    Empty value for PickTreeItem

    Is it possible to have an empty value for a PickTreeItem after selecting a value?

    If you look at the example at https://www.smartclient.com/smartcli...e/?id=pickTree, it starts with an "empty value", but after selecting it, it cannot be changed back to an empty value or can it?

    #2
    If you use a valueField *and* displayField, the valueField can be null and the displayField can have something like "[Empty]" or whatever you want to show to the end user for an empty value.

    Comment


      #3
      Bump...
      Is there a way to clear a selection (default to root) such as either showing the root value in the dropdown (setting the item's valueTree showRoot=true doesn't work), or having "specialValues" as in a picklist? I can add a button to the form to "Clear Selection" (set the pickTreeItem value to whatever), but it would be better if it was in the dropdown selection itself, if possible.

      Comment


        #4
        You can just use a SelectItem and set the dataModelType to tree, then you get a drop-down that basically works like a TreeGrid, and you can use specialValues and other pickList features.

        Comment


          #5
          That would be great, but I don't see a "dataModelType" property in the online docs nor attached to a SelectItem when inspecting the client form item instance. I'm using the client only components V13.

          Comment


            #6
            Sorry, we misnamed the property. It's actually dataSetType:

            https://smartclient.com/smartclient-...st.dataSetType

            Comment

            Working...
            X