on 12-22-2009 3:13 AM
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
24 | |
12 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.