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