Re: How to get the row number of a flex table

2010-07-07 Thread Professor Vagner
Hello friends,

try this:

ClickHandler clickHandler = new ClickHandler() {

@Override
public void onClick(ClickEvent event) {
com.google.gwt.user.client.ui.HTMLTable.Cell cell =
flexTable.getCellForEvent(event);
Window.alert(Row Index  + cell.getRowIndex());
}
};

Button yourButton1 = new Button(your button 1);
yourButton1.addClickHandler(clickHandler);
flexTable.setWidget(0, 0, yourButton1);

Button yourButton2 = new Button(your button 2);
yourButton2.addClickHandler(clickHandler);
flexTable.setWidget(1, 0, yourButton2);

Button yourButton3 = new Button(your button 3);
yourButton3.addClickHandler(clickHandler);
flexTable.setWidget(2, 0, yourButton3);

Button yourButton4 = new Button(your button 4);
yourButton4.addClickHandler(clickHandler);
flexTable.setWidget(3, 0, yourButton4);


-- 
Professor Vagner

O PLANETA É O MEU PAÍS, E A CIÊNCIA É A MINHA RELIGIÃO ! INDO AO INFINITO E
ALÉM... !!

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: How to get the row number of a flex table

2010-07-06 Thread Sunny
hi Vik,

try
FlexCellFormatter formatter =
FlexTable.getCellFormatter().getRowNum();

hope this helps

Sunny.

On Jul 6, 9:09 am, aditya sanas 007aditya.b...@gmail.com wrote:
 you can set buttons ID by the method getElement().setId();

 you can set Id as row number and as whenever button get clicked you will
 have to check its id by

 getElement().getId() which is row number that we had set.

 --
 Aditya



 On Mon, Jul 5, 2010 at 8:53 AM, Vik vik@gmail.com wrote:
  Hie

  I have a table extending a FlexTable.

  In every row there is Button. On clicking this button I want to know the
  row number of the table. Any idea on how to achieve this?

  Thankx and Regards

  Vik
  Founder
 www.sakshum.com
 www.sakshum.blogspot.com

  --
  You received this message because you are subscribed to the Google Groups
  Google Web Toolkit group.
  To post to this group, send email to google-web-tool...@googlegroups.com.
  To unsubscribe from this group, send email to
  google-web-toolkit+unsubscr...@googlegroups.comgoogle-web-toolkit%2bunsubs­cr...@googlegroups.com
  .
  For more options, visit this group at
 http://groups.google.com/group/google-web-toolkit?hl=en.- Hide quoted text -

 - Show quoted text -

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: How to get the row number of a flex table

2010-07-05 Thread aditya sanas
you can set buttons ID by the method getElement().setId();

you can set Id as row number and as whenever button get clicked you will
have to check its id by

getElement().getId() which is row number that we had set.


--
Aditya


On Mon, Jul 5, 2010 at 8:53 AM, Vik vik@gmail.com wrote:

 Hie

 I have a table extending a FlexTable.

 In every row there is Button. On clicking this button I want to know the
 row number of the table. Any idea on how to achieve this?

 Thankx and Regards

 Vik
 Founder
 www.sakshum.com
 www.sakshum.blogspot.com

 --
 You received this message because you are subscribed to the Google Groups
 Google Web Toolkit group.
 To post to this group, send email to google-web-tool...@googlegroups.com.
 To unsubscribe from this group, send email to
 google-web-toolkit+unsubscr...@googlegroups.comgoogle-web-toolkit%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/google-web-toolkit?hl=en.


-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



How to get the row number of a flex table

2010-07-04 Thread Vik
Hie

I have a table extending a FlexTable.

In every row there is Button. On clicking this button I want to know the row
number of the table. Any idea on how to achieve this?

Thankx and Regards

Vik
Founder
www.sakshum.com
www.sakshum.blogspot.com

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.