cancel
Showing results for 
Search instead for 
Did you mean: 

Regarding Table UI element

Former Member
0 Kudos

Dear Experts

Problem:I have a table with 7 columns.Depends on one of the columns it will display the no of rows like 40 or30.......But i have set 10 records per page.If end user wants to see after 10 th record he will scroll the page.Instead of that if he enter row no that row will be hjeilight.

Plz provide me the solution

Thanks & Regards

Hazrath.G

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Hazrath,

Create a value attribute of type integer and map to the Table property VisibleRowCount. At run time based on user input set this property value so that you can see all the values as per user input.

(or)

If you want to display all the data rows in the table say all the 50, then you can set the VisibleRowCount property to -1 so that all the rows will be visible in table.

Regards,

Nagarajan

Answers (2)

Answers (2)

former_member197348
Active Contributor
0 Kudos

Hi Hazrath,

If you want to navigate and select through table scroll bar as for as I know it is not possible.You can have a work around for this. Create a table ToolBar and create an ToolBarInputField. Create an action <b>select </b>. Bind the select action to onEnter event of the ToolBarInputField.Create a context attribute rowNumber and bind this to value property of ToolBarInputField.

You can use this code.

wdContext.node<TableNode>().setLeadSelcetion(rowNumber);

Hope this helps.

Regards,

Siva

Former Member
0 Kudos

Thanks Ram for ur immediate reply.

Do u have any code snippet for this,then plz send me.

Thanks & Regards

Hazrath.G

former_member197348
Active Contributor
0 Kudos

Hi Hazrath,

In the the action you need to write this code: As I told follow these steps:

1.Create a table ToolBar and create an ToolBarInputField.

2.Create an action select . Bind the select action to onEnter event of the ToolBarInputField.

3.Create a context attribute <b>desc</b>and bind this to value property of ToolBarInputField.

in <b>onActionSelect </b>action write this code:


for(int i=0;i< wdContext.node<TableNode>().size();i++)
{
if(wdContext.node<TableNode>().get<TableNode>ElementAt(i).getDesc1().equalsIgnoreCase(desc)) 
{
wdContext.node<TableNode>().setLeadSelection(i);

IWDAttributeInfo attribute
   = wdContext.node<TableNode>().getNodeInfo().getAttribute(
       IPrivateMyView.I<TableNode>Element.DESC1);
wdThis.wdGetAPI().requestFocus(wdContext.currentXYZElement(), attribute);    
}
}

This will definitely work.

regards,

Siva

Former Member
0 Kudos

Hi Rama

Thanks for ur reply.Now iam using NWDS 7.0.06

It has no ui element like Toolbar

But ToolbarInputField is available.

Thanks & Regards

Hazrath.G

former_member197348
Active Contributor
0 Kudos

Hi Hazrath,

ToolbarInputField can also be used. After all, this is for taking input from the user right.Check whether there is onEnter Event available in its properties. Then you can use my code in that action's implementation.

regards,

Siva

Former Member
0 Kudos

Hi Rama

I have written the below code.

But it isnot working

for(int i=0;i< wdContext.nodeIt_Final_out().size();i++)

{

if(wdContext.nodeIt_Final_out().getIt_Final_outElementAt(i).getText1().equalsIgnoreCase(wdContext.currentContextElement().getDesc()))

{

wdContext.nodeIt_Final_out().setLeadSelection(i);

IWDAttributeInfo attribute

= wdContext.nodeIt_Final_out().getNodeInfo().getAttribute(

IPrivateSecond.IIt_Final_outElement.TEXT1);

wdThis.wdGetAPI().requestFocus(wdContext.currentIt_Final_outElement(), attribute);

}

}

Thanks

Hazrath.G

former_member197348
Active Contributor
0 Kudos

Hi Hazrath,

It should work. Try these two options:

1.wdThis.wdGetAPI().requestFocus(wdContext.currentIt_Final_outElement(), attribute);

Change this to

wdThis.wdGetAPI().requestFocus(wdContext.nodeIt_Final_out().getIt_Final_outElementAt(i), attribute);

if it does not work, try this:


if(wdContext.nodeIt_Final_out().getIt_Final_outElementAt(i).getText1().equalsIgnoreCase(wdContext.currentContextElement().getDesc()))
{
// only use lead selection
wdContext.nodeIt_Final_out().setLeadSelection(i);
// comment request focus 
//IWDAttributeInfo attribute
//= wdContext.nodeIt_Final_out().getNodeInfo().getAttribute(
//IPrivateSecond.IIt_Final_outElement.TEXT1);
//wdThis.wdGetAPI().requestFocus(wdContext.currentIt_Final_outElement(), attribute);
}

<b>You told that ToolBar was not available in your NWDS 7.0.06. But I have used 7.0.0 and am using 7.0.09 in both there is ToolBar available for table.

Can you please check it once?

[Right click on the table->select Insert ToolBar-> Right click on the ToolBar ->select Insert ToolBarItem->select ToolBarInputFeild]</b>

regards,

Siva

Former Member
0 Kudos

Hi, it's not working.

But iam giving 6 points to u.Thanks for ur every answer.

Thanks

Hazrath.G

former_member197348
Active Contributor
0 Kudos

Hi Hazrath,

I did functionality successfully. Let's attempt one more trail. Don't give up.


Option 1:
for(int i=0;i< wdContext.nodeIt_Final_out().size();i++)
{
if(wdContext.nodeIt_Final_out().getIt_Final_outElementAt(i).getText1().equalsIgnoreCase(wdContext.currentContextElement().getDesc()))
{
wdContext.nodeIt_Final_out().setLeadSelection(i);
//Check whether control is coming here. 
// if not then there is a problem in 
}
}
Option 2:
for(int i=0;i< wdContext.nodeIt_Final_out().size();i++)
{
if(wdContext.nodeIt_Final_out().getIt_Final_outElementAt(i).getText1().equalsIgnoreCase(wdContext.currentContextElement().getDesc()))
{
wdContext.nodeIt_Final_out().setLeadSelection(i);
IWDAttributeInfo attribute
= wdContext.nodeIt_Final_out().getNodeInfo().getAttribute(
IPrivateSecond.IIt_Final_outElement.TEXT1);
wdThis.wdGetAPI().requestFocus(wdContext.nodeIt_Final_out().getIt_Final_outElementAt(i), attribute);
}
}
  

Option 3:Create a context variable visRow of type int. Bind this to firstVisibleRow property of table.


for(int i=0;i< wdContext.nodeIt_Final_out().size();i++)
{
if(wdContext.nodeIt_Final_out().getIt_Final_outElementAt(i).getText1().equalsIgnoreCase(wdContext.currentContextElement().getDesc()))
{
_wdContext.currentContextElement().setVisRow(i);_wdContext.nodeIt_Final_out().setLeadSelection(i);
IWDAttributeInfo attribute
= wdContext.nodeIt_Final_out().getNodeInfo().getAttribute(
IPrivateSecond.IIt_Final_outElement.TEXT1);
wdThis.wdGetAPI().requestFocus(wdContext.nodeIt_Final_out().getIt_Final_outElementAt(i), attribute);
}
}

and check table properties:

All are deafult values.

Please close this if you have resolved by mentioning solution

regards,

Siva

Former Member
0 Kudos

Hi Gurram,

take the row no. from user. set the lead select to that row no.

wdContext.node<table node>.setLeadSelection(row no);

regards

Sumit

Former Member
0 Kudos

Hi malhotra

Thanks for ur immediate reply.But that's not my problem.

My table col's are shown below

Fcenter desc Glcode desc1 AlloAmt usedamt remainAmt

like the above 25 records r available in output.

but i have set 15 records per page.

But he wants to see 20 threcord.

I want that if he enters the desc1 of 2o th record in inputfield then it will show the 20 th record.

Thanks

Hazrath.G