0

如何给grid的每个row加入onclick event

asked 2007-07-11 15:42:21 +0800

wsm gravatar image wsm
69 2
不知道怎么做才能给grid的每一行加入一个onclick
delete flag offensive retag edit

2 Replies

Sort by » oldest newest

answered 2007-07-11 22:47:41 +0800

jumperchen gravatar image jumperchen
3909 2 8
http://jumperchen.blogspo... ZK Team
那你需要自行在每一個row上註冊onClick的Event.
例如:
<row onClick="doSomething" ...

OR 用程式註冊,
for (Iterator it = grid.getRows().getChildren().iterator(); it.hasNext();) {
Row row = (Row)it.next();
row.addEventListener(Events.ON_CLICK, new EventListener(){
public void onEvent(Event event) throws Exception {
// dosomething.
}});
}

/Jumper
link publish delete flag offensive edit

answered 2007-07-12 10:05:08 +0800

wsm gravatar image wsm
69 2
谢谢
link publish delete flag offensive edit
Your reply
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow

RSS

Stats

Asked: 2007-07-11 15:42:21 +0800

Seen: 831 times

Last updated: Jul 12 '07

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More