Announcement

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

    Widget for TreeNode feature??

    Do we have something similar to this
    http://www.extjs.com/examples/pages/treegrid/widgetrenderer.html

    in Smart GWT?.I'm trying o set label/Hlayout as tree node?.

    Code snippet would really help.

    Thanks

    #2
    Well you could get something similiar with a little work. Have you taken a look at: http://www.smartclient.com/smartgwt/showcase/#grid_cell_widgets. I would start with that, if you still can't get it, then post your code.

    Comment


      #3
      Thanks for the reply.

      Widgets do appear on the Grid,but they don't in the tree fashion as it is available @ http://www.extjs.com/examples/pages/treegrid/widgetrenderer.html.

      All buttons get aligned at same column level and doesn't look like tree.

      Please suggest,is there any ways to achieve this through CSS or any features available in SmartGWT.

      Thanks,

      Comment


        #4
        I kind of achieved the widget by adding the code in setCellFormatter and this served my purpose.We can use div/label/textbox in the cellFormatters and get the same in Tree.

        Code:
        		field.setCellFormatter(new CellFormatter()
        		{
        			public String format(Object value, ListGridRecord record, int rowNum, int colNum)
        			{						
        				return "<label class=\"mycustomClass\">"+record.getAttribute("Tree_Text")+"</label>";
        			}
        		});
        Thanks

        Comment

        Working...
        X