user34234124411
user34234124411

Reputation: 19

GWT extract all value from a row in a flextable

i have a flextable with many row and 5 colums, i need to extract all value from a specific row when i select one. The value must appears on a window. How can i do?

Upvotes: 0

Views: 3874

Answers (2)

Suresh Atta
Suresh Atta

Reputation: 121998

If you know the row number ,you can get each element by using

flexTable.getWidget(rowNum,colNum ).getelement().getInnerHtml();//will give with html tags

You can iterate throughout the flex table also like below .

   Iterator<Widget> widgetiterator = flexTable.iterator();
              while (widgetiterator.hasNext()){
                Widget childWidget = widgetiterator.next();
                if (childWidget instanceof RadioButton) { //Example
                ((RadioButton) childWidget).getValue(); 

                }
              }

And

Widget w flexTable.getWidget(rowNum,colNum );
 if (w instanceof TextBox) {
//TO Do get value 

Upvotes: 2

Alexey A.
Alexey A.

Reputation: 1419

You can get access to contents of any table td element using the code below:

flexTable.getFlexCellFormatter().getElement(row, column).getInnerHTML()

Upvotes: 2

Related Questions