on 05-01-2008 8:22 PM
Hi,
I have some queries which i want to ask before making a sample application asked my senior.Please reply in detail as i am new to this technology.
1. How to get the details of a lead selected row of table?
2. How to change the visible rows of a table dynamically?
3. How to change the layout manager?
thanks in advance,
ankur
Hi ankur,
following are the answers to your queries:
1. How to get the details of a lead selected row of table?
A table is binded to a node say TableDetails
use the following code to fetch lead selection
int leadSelection=wdContext.nodeTableDetails.getLeadSelection();
ITableDetailsElement objTableDetailsElement=wdContext.nodeTableDetails().getTableDetailsElementAt(leadSelection);
to fetch column details of lead selction
objTableDetailsElement.getcol1Attr();
objTableDetailsElement.getcol2Attr();
2. How to change the visible rows of a table dynamically? Step1 Create a context of integer type say visibleRow.
Step 2: Bind it to visiblerow property of your table
Sep 3: Set this attribute to any integer value in your code like:
wdContext.currentContextElement.setVisibleRow(10);
or there is one more way to do so which is given below:
inside wdModifyView()
IWDTable table = (IWDTable) view.getElement("Table");
table.setVisibleRowCount( 10);
// will set visible row value
3. How to change the layout manager?
In the outline you will find the property called Layout there you can change to the required Layout(Matrix, Grid,Flow & Row Layout).
thanks,
amit bagati
Edited by: Amit Bagati on May 1, 2008 9:56 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
thanks everyone for your useful replies.
regards,
Ankur
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI Ankur,
Check properties tab of a table carefully. As most of the settings are there only.. such as
to get lead selection.
1. in your OnLeadselect method of you table you can do as
wdContext.nodeAssignedtoTable().getLeadSelection();
2. How to change the visible rows of a table dynamically?
If you just want to set visiblity of rows then.
1. there is visible property of row assign it a context of type visibilty and in your coding you can set it to none, visible, invisible.
If you want to create dynamically rows
then refer
it is really usefull.
3. How to change the layout manager?
There is no special layout for table. Table inherite layout of group/container in which you added it as a child
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
1. How to get the details of a lead selected row of table?
You can get the Lead Selected Row values by referring the current context.
e.g:
wdContext.currentTableNodeElement().getFirstColumn(); where FirstColumn is your first table column will get you the lead selected value.
2. How to change the visible rows of a table dynamically?
you can create a value attribute of type integer and assign to VisibleRowCount property of Table UI element. At runtime you can change the values.
3. How to change the layout manager?
Select any container and set the Layout as GridLayout or matrix layout which will help you to design the UI Element according to your wish.
Additional:
All Layout will arrange in tabular form so you can put invisible elements where it needed and use Transparent containers wherever it needs.
nikhiL
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.