cancel
Showing results for 
Search instead for 
Did you mean: 

basic Table UI Element RowCounter

Former Member
0 Kudos

Hi ,

Can anybody please help me to put row counter for table in Sap WebDynpro for java .

I need to put a row counter in bottom of the table. which shows no. of rows and current row no etc.,

Can any body plz help me.

Thanks and Regards,

Shashi.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

set the property footerVisible of table to true

Regards

Ayyapparaj

Former Member
0 Kudos

HI ayyapparaj,

Thanks for your quick replay

Is it enough to put footervisible to True for the table Property .

Because for my table i have put footervisible to True only there is no change whether i put true or false for the table property.

Can you please help me.

Regards,

Shashi

Former Member
0 Kudos

Are you on NW 7.1?

Armin

Former Member
0 Kudos

Hi Armin,

Yes i am in NWDS 7.1 only.

Thanks and Regards,

Shashi.

Former Member
0 Kudos

In NW 7.1 the table footer with these (did I say crappy?) paginator buttons has been replaced by a real scrollbar with the additional ability to provide scroll-tips

Armin

Former Member
0 Kudos

Hi Armin,

Sorry i am not getting you. i am new to Sap WebDynPro for java.

i don't know about previous versions of NWDS.

Can you please brief me how to set colcount for the table .

Regards,

Shashi

Former Member
0 Kudos

What do you mean with "set colcount"?

Armin

Former Member
0 Kudos

hi,

I need to put a row counter in bottom of the table. which shows no of rows in a table . and selected row no.

Thanks and regards,

Shashi

Former Member
0 Kudos

Put a TextView under the table, bind its "text" property to a calculated context attribute "tableInfo" of type "string".

Implement getter like


String getTableInfo(...)
{
  int nRows = wdContext.node<TableDataSource>().size();
  int selectedRowIndex = wdContext.node<TableDataSource>().getLeadSelection();
  return nRows + " rows" + (selectedRowIndex != -1 ? ", selected row: " + selectedRowIndex : "");
}

Armin

former_member197348
Active Contributor
0 Kudos

Hi Sashi,

In 7.0.x versions we can see in the table footer the number of rows automatically.

If you want to get no. rows and selected row do like this:

int size = wdContext.node<tablenode>().size();
int selectedRow=  wdContext.node<tablenode>().getLeadselection()+1;

you can set these values to context and display them

regards,

Siva

Former Member
0 Kudos

footerVisible = true

Armin