Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

getCell(row,col) in GWT HTMLTable

There is no such method in HTMLTable:

Cell c =  getCell(row,col);

What is the most effective way of getting a cell in an HTML/Flex Table, given the row and column?

like image 832
Blessed Geek Avatar asked Mar 28 '26 23:03

Blessed Geek


1 Answers

Depends on what you want to do.

If you want to read/write the content of the cell, you might want to use HTMLTable#setText(int,int) and HTMLTable#getText(int,int), or HTMLTable#setWidget(int,int) and HTMLTable#getWidget(int,int), if the content of the cell is a widget.

There are more functions to read/write properties of the cell in HtmlTable.CellFormatter (link to gwt javadoc) and its subclasses - you can obtain it using HTMLTable#getCellFormatter() and maybe cast it, depending on the implementation of HTMLTable you are using. with the cell formatter you can, for example, set/remove styles, attributes or get the underlying Element (link to gwt javadoc) for even more direct control.

like image 129
MarioP Avatar answered Apr 02 '26 18:04

MarioP



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!