• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

HTML table issues

 
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 11497
19
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 11497
19
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 2911
150
Google Web Toolkit Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic