Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes GWT and the fly likes HTML table issues Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Frameworks » GWT
Reply Bookmark "HTML table issues" Watch "HTML table issues" New topic
Author

HTML table issues

SanjayR Jain
Ranch Hand

Joined: Mar 05, 2009
Posts: 43
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
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 8439

setText()
setHTM()
setWidget()

ItDoesntWorkIsUseless
Did you read the API docs for setTitle() to see what it actually does?


[Donate a pint, save a life!] [How to ask questions] [Onff-turn it on!]
SanjayR Jain
Ranch Hand

Joined: Mar 05, 2009
Posts: 43
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
Saloon Keeper

Joined: Jul 26, 2007
Posts: 8439

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?
Nilesh Pat
Ranch Hand

Joined: Mar 01, 2010
Posts: 30
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.


Regards,
Nil
salvin francis
Ranch Hand

Joined: Jan 12, 2009
Posts: 915

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.


My Website: [Salvin.in] Cool your mind:[Salvin.in/painting] My Sally:[Salvin.in/sally]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: HTML table issues
 
Similar Threads
display html and pop up save dialog box
XML, HTML, what's the difference?
Retrieving HTML markup from swing componant
Tab index for rows added using JavaScript
how to set the top of h:panelGrid?