GWT CellTable-Need to have two buttons in last single cell of each row

前端 未结 2 1761
面向向阳花
面向向阳花 2021-01-12 10:40

I am using CellTable to add columns to it. It works fine when I add rows and single data on each cell.

It has header like Name ,Age, Address with rows below it which

2条回答
  •  暗喜
    暗喜 (楼主)
    2021-01-12 11:37

    The solution above is perfect!THX. In addition: If you liked to design the buttons in the ActionCell, then you could do this -> In the constructon of the class you can build a html input and in "class" attribute, you can add a css style, which will be used.:

    public ActionHasCell(String text, Delegate delegate) {
            cell = new ActionCell(text, delegate) {
    
            public void render(Context context, Person person, SafeHtmlBuilder sb)
            {
                SafeHtml html = SafeHtmlUtils.fromTrustedString("");
                sb.append(html);
            }
    
        };
    }
    

    This time you don't need the String, but you can pass parameters and use them to build the button.

提交回复
热议问题