cancel
Showing results for 
Search instead for 
Did you mean: 

Table Rows Auto display

Former Member
0 Kudos

Hi Friends,

I have a requirement , Collapse the Table row's display according to the no of rows in the output and not see blank rows.

Example: if the number of records more than 15 then i have to show 15 rows in table, if the number of records 10, i want to show only 10 rows with data but not 15 rows , here how to hide or collpse the empty 5 rows which i don't want to show the user cause these 5 rows are empty.

Please help.

Thanks

Krish

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello,

Create a value attribute on the context: rowNumbers of type integer

After you have initialized or have set the data of your table. Get the number of rows (int rows = wdContext.nodeRows().size();) -- and then bind that to the rowNumbers context attribute. wdContext.currentContextElement.setRowNumbers(rows);

Now, your table has a property: visibleRowCount -- bind this property to the rowNumbers attribute.

For other needs, just manipulate this attribute dynamically by binding it to an attribute you change during run-time.

This should solve your problem.

Regards,

Jan

Former Member
0 Kudos

Hi,

Try setting the Visible Row count property to -1 and check if you are getting the required results.

Thanks and Regards,

Vivek.

Former Member
0 Kudos

Hi Friends,

Thanks for all.

As Micheal suggested i have created a context attribute and bind this to the table property of VisibleRowCount. then I contolled this attribute dynamically in my code as I needed.


	int rows = wdContext.nodeBonus_Reportc_Tab().size();
	wdContext.currentContextElement().setRowNumbers(rows);
	//Collapse the Output tab according to the no of rows in the output and not see blank rows.Set maximum limit to 20 rows .
	int sizeRows = wdContext.currentContextElement().getRowNumbers();
	if(sizeRows > 19){
    	
		wdContext.currentContextElement().setRowNumbers(20);
	}
	else
	{
    	
		wdContext.currentContextElement().setRowNumbers(-1);
	}

As Vivek said I can set the property to -1 this will meet my requirement partly but not complete. As per jitendra, I did not see the property called Display Empty row for table may be i am not on upto date version of NWDS.

Once again thanks for all your help.

Krish

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi friend,

You can do this by selecting the tables display empty row property to false. Let us know if you face any issue after this.

Regards

Jeetendra.

Former Member
0 Kudos

Hi Friend,

If You don't want to see the empty rows Thats It. You can do it very simply without any coding or putting extra load in your application By selecting the tables Display Empty row Property to False. Do it and let us know if any issue persist.

Regards

Jeetendra.