on 02-26-2007 7:27 AM
i want to show my table that have checkbox..
where user can select and click the process button..
only the row clicked will be process...
how to i put checkbox inside the table and check the row state
Hi buddy,
Here are the steps involved :
1. Insert a column in the table say col1.
2. Insert the table cell editor & select checkbox from the control list that is displayed. [ By this step u specify that each of the cell in this column will contain a checkbox.
3. Go to the context of the view. Create a Value node 'Col1'. Create a value attribute of type 'boolean' in 'Col1'. Give it the name 'Flag'.
The cardinality for value node 'Col1' should be set as 0..n.
At runtime if a table has 3 rows then e the checkbox in each row is bound to 'Flag' instance. If a user selects a row then 'Flag' corresponding to that checkbox is set.
You can find the row no. selected by simple condition checking on 'Flag'. Just iterate thru the whole instances of node 'Col1'.
Hope this serves your purpose.
PS: Please reward me if the answer is helpful.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Go to the properties 'selectionMode' of table and change it from 'auto' to 'multi'
regards,
abhijeet
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hai ,
Context
Table |
-Name
-Number
-isSelected(boolean)
bind a context attribute of type bollean to table. that will create a check box inside the table . if that value is true that check box will selected.
in action of button .
you can process the rows which is having isSelected true
regards,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dear yzme,
please try to do a sample application in SDN, Sample Applications.
There is a scenario which will solve the problem you have asked for.
Object Value Selector (9).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Cant u use the default select button in the table?
Or u need the check boxes as such?
Regards
BP
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
set selection property of context node to 0..n.
Press ctrl key to select multiple records.
Iterate over context node elements and check whether the element is selected or not using isMultiselected(int index) method.
int size=wdContext.node<node>().size();
for(int i=0;i<size;i++)
{
if(wdContext.node<node>().isMultiSelected(i))
{
//@TODO
}
else
{
//@TODO
}
}
User | Count |
---|---|
83 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
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.