Re: DataTable: how to make a column showing the row number?

2008-02-23 Thread MYoung
Ok, I got it. item.getParent() is a RepeatingView item.getParent().getParent() is the row's Item. So ((Item)item.getParent().getParent()).getIndex() gives me the answer. Thanks! igor.vaynberg wrote: > > public void populateItem(Item cell, String compId, IModel rowModel) { > item.getindex

Re: DataTable: how to make a column showing the row number?

2008-02-23 Thread MYoung
igor.vaynberg wrote: > > ...item.getparent() > I tried it and gives me a RepeatingView, not a Item. igor.vaynberg wrote: > > public void populateItem(Item cell, String compId, IModel rowModel) { > item.getindex() is cell, ((item)item.getparent()).getindex() is row > > -igor > > > On Sat

Re: DataTable: how to make a column showing the row number?

2008-02-23 Thread Igor Vaynberg
public void populateItem(Item cell, String compId, IModel rowModel) { item.getindex() is cell, ((item)item.getparent()).getindex() is row -igor On Sat, Feb 23, 2008 at 6:43 PM, MYoung <[EMAIL PROTECTED]> wrote: > > Like the first column here, just whatever the row's number is: > > ++-

DataTable: how to make a column showing the row number?

2008-02-23 Thread MYoung
Like the first column here, just whatever the row's number is: ++-+ | No. | Names | ++-+ | 1 | AAA | ++-+ | 2 | AAA | ++-+ | 3 |