Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!
  • 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
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

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
19
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
19
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.
 
Saloon Keeper
Posts: 2669
130
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.
 
When all four tires fall off your canoe, how many tiny ads does it take to build a doghouse?
the value of filler advertising in 2020
https://coderanch.com/t/730886/filler-advertising
    Bookmark Topic Watch Topic
  • New Topic