cancel
Showing results for 
Search instead for 
Did you mean: 

table with checkbox

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

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.

Answers (4)

Answers (4)

abhijeet_mukkawar
Active Contributor
0 Kudos

Hi,

Go to the properties 'selectionMode' of table and change it from 'auto' to 'multi'

regards,

abhijeet

Former Member
0 Kudos

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,

Former Member
0 Kudos

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).

former_member188556
Active Contributor
0 Kudos

Hi,

Cant u use the default select button in the table?

Or u need the check boxes as such?

Regards

BP

Former Member
0 Kudos

everytime i can only select 1 row....

how do i select multiple rows

Former Member
0 Kudos

Change the selectionMode property of the table to multi to enable multisleection option on the table.

Regards, Anilkumar

former_member188556
Active Contributor
0 Kudos

Hi,

There is this table prop called "selection mode".

Set it to "multi".

This will allow u 2 select multiple node by pressing the CTRL key

Hope it helps

Regards

BP

Award points if found usefull

monalisa_biswal
Contributor
0 Kudos

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

}

}