Announcement

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

    ColumnTree selected item

    May be a stupid question but how do I find the selected item in a ColumnTree (Miller Columns)?

    What I'd like is to have a form (DynamicForm I think) display the details of whats selected in my ColumnTree.
    Last edited by objects; 16 Dec 2008, 02:32.

    #2
    Missing API in SmartGWT - through JSNI you could call columnTree.getSelection(colNum)

    Comment


      #3
      thanks for that. What type of smartclient component is used under the hood by the ColumnTree? I looked in the smartclient explorer and couldn't see anything.

      Comment


        #4
        Each column is a ListGrid. If you look through the SmartClient docs for 7.0 beta (a separate download, sorry), there's a little more information, which will make it's way into the SmartGWT docs soon.

        Comment


          #5
          thanks for that its all a bit clearer now.

          Just been looking at the Pattern Reuse example which is close to what I'm after except using a ColumnTree instead of a ListGrid. Looking at the source for that example it appears I need to be able to add a RecordClickHandler to the ColumnTree's underlying ListGrid(s).

          This is looking a bit involved at this point so I might hold off and wait on a later release unless you can point me in the right direction :)

          Comment


            #6
            ColumnTree.getSelected(colNum) has been added to build 12-17-2008.

            Comment


              #7
              method name changed

              Originally posted by sjivan
              ColumnTree.getSelected(colNum) has been added to build 12-17-2008.
              now it's called getSelection(colNum).

              Note that you need to return ListGridRecord objects in your DataSource, I tried to return Record objects and got a "ClassCastException: cannot convert from Record to ListGridRecord" when called this method, even though they were displayed just fine.

              Cheers!

              Comment


                #8
                a bit more detailed?

                Hi cirovladimir,
                thanks for the update.

                Can you or anyone else provide a bit more detailed explanation?

                i get the ListGridRecord object , use a clickHandler but still not able to find the selected e.g. string i clicked on.


                Besides , is there any simple way to get back all the selected items from all the previous columns?

                Comment

                Working...
                X