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?
Asked
Active
Viewed 3,792 times
0
-
you need to extract html contents of all the cells in a row? – Alexey A. Feb 23 '13 at 09:00
-
yes i need to click on a row and show a window on screen which contains all value of the row clicked – user34234124411 Feb 23 '13 at 09:10
2 Answers
2
You can get access to contents of any table td element using the code below:
flexTable.getFlexCellFormatter().getElement(row, column).getInnerHTML()

Alexey A.
- 1,389
- 1
- 11
- 20
-
thx but i receive all html value with div1is possible obtain only the value? – user34234124411 Feb 23 '13 at 09:36
-
1in this case you better use ((Label)flexTable.getWidget(row, column)).getValue() – Alexey A. Feb 23 '13 at 09:39
-
2
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

Suresh Atta
- 120,458
- 37
- 198
- 307