0

Adding row to the grid dynamically

asked 2012-10-08 13:52:47 +0800

ushakofff64rus gravatar image ushakofff64rus
3

There is my code:

@Wire
Grid atsObjectGrid;

public void doAfterCompose(Component comp) throws Exception {
super.doAfterCompose(comp);

Row r = new Row();
A a = new A( "Add" );
A b = new A( "Del" );

r.appendChild(a);
r.appendChild(b);

ArrayList arlist = new ArrayList();
arlist.add(r);


ListModelList<Row> lm = new ListModelList( arlist );

atsObjectGrid.setModel(lm);
}


I want to get table with one row and two columt with A (Reference), but I get this:

<Row null>

Help me please, and sorry for my English )))

delete flag offensive retag edit

1 Reply

Sort by ยป oldest newest

answered 2012-10-09 00:40:17 +0800

jj gravatar image jj
638 3

You shouldn't use Row as the model object. It's a ZK UI object. In your case, just use a simple array, and in your RowRenderer, render each column based on the array data.

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: 2012-10-08 13:52:47 +0800

Seen: 80 times

Last updated: Oct 09 '12

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