• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • paul wheaton
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Tim Holloway
  • Carey Brown
  • salvin francis

HTML table issues

 
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello all
is it possible to add and delete rows in the html table ?
If yes then please tell me the method names through it is possible

Another problem which I am facing is that I have used setTitle() method on HTML table but it is not working.Is there other property need to be set for this method.

Thanks in advance
 
Bartender
Posts: 11445
18
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
setText()
setHTM()
setWidget()

ItDoesntWorkIsUseless
Did you read the API docs for setTitle() to see what it actually does?
 
SanjayR Jain
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello
setText
setHTML
setWidget

All three methods are used to set value in the cell.
I want to set a title for table.
Is there any method for this?
 
Maneesh Godbole
Bartender
Posts: 11445
18
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes. I know they are used to set the cell values. Thats how you should be refreshing your table to display/take out the added/deleted values.

Regarding the table title

Maneesh Godbole wrote:Did you read the API docs for setTitle() to see what it actually does?

 
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
setTitle() is for setting tooltips.
if you want to add tooltip to any cell in the table. just add setTitle(). (you can add setTitle() to the widget inside the cell also that works better).

for removing rows from table try removeRow() method of flextable.
 
Bartender
Posts: 2348
102
Google Web Toolkit Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Method for deleting cell:
removeCell(int row, int column)

Method for deleting row:
removeRow(int row)

This is assuming that you are using widget extending HTMLTable (eg: Grid or FlexTable)

There isnt any "Title" to a table, what you are probably refering to is column headers in this case, you can apply styles to a given cell using:
getCellFormatter().setStyleName(String styleName);

Via style you can highlight a cell by giving it background and making text bold so that it represents a header.
 
No more fooling around. Read this tiny ad:
Enterprise-grade Excel API for Java
https://products.aspose.com/cells/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!