on 07-02-2007 4:36 PM
All,
I have a table, which has 100 entries, I want to filter the Rows programmatically. The prgram will set the filter value not from user.
How to do that?
Note: I dont want to show the Filter in the table and user will not have any control.
BM.
Message was edited by:
Bharathi M
HI Bharati,
If u want to do filtering from code, just implement the condition in the code at the time of adding elements
For example, if u want to add only the names which satrts with Bharati, then
IPrivate<view>.IMasterNode masterNode=wdContext.nodeMasterNode();
IPrivate<view>.ITableNode tableNode=wdContext.nodeTableNode();
IPrivate<view>.ITableElement tableElement;
for(int i=0;i<masterNode.size();i++)
{
String name=masterNode.getMasterElementAt(i).getName();
if(name.startsWith("Bharati")
{
tableElement=tablenode.createElement();
tableElement.setName(name);
tableNode.addElement(tableElement);
}
}
Regards,
Fahad Hamsa
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Bharathi,
On what basis u r trying to filter the values??If user is not going to enter the value for filter,then which value u r goin to use for filtering??If u have already the value what u r goin to use for filtering,then u have to filter the node ,which u r using populate the table.
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 Bharathi,
Just correct me if i m wrong in understanding ur problem.
U have a personID ,which u will be getting at runtime but user is not goin to enter that value.U have some records for the table in a node.Now u have to filter those records.
if this is ur problem,u can iterate the node ,get the values in a Collection & populate the values in the table or u can remove the elements from the node ,which are not associated to the personId.
regards
Sumit
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
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.