IColumn[] columns = {
//
// Make a column to show the row number
//
new AbstractColumn(new Model("No.")) {
@Override
public void populateItem(Item cellItem, String componentId,
IModel rowModel) {
Item parentRow = (Item)
cellItem.getParent().getParent();
cellItem.add(new Label(componentId,
Integer.toString(parentRow.getIndex() + 1)));
}
@Override
public String getCssClass() {
return "rowNo";
}
},
... [other columns etc] ...
}
On Mon, Apr 14, 2008 at 5:46 PM, Ritz123 <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> Has anyone implemented DataTable with row indexes showing the
> corresponding
> row number as the first column?
>
> Thanks
> --
> View this message in context:
> http://www.nabble.com/DataTable-with-row-indexes--tp16692909p16692909.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>