Hi,

For the column to appear as a checkbox you need to tell it how to render, so 
use the TableViewBooleanCellRenderer 
(http://pivot.apache.org/2.0/docs/api/org/apache/pivot/wtk/content/TableViewBooleanCellRenderer.html):

<TableView.Column name="select" width="25" headerData=" ">
        <cellRenderer>
                <content:TableViewBooleanCellRenderer/>
        </cellRenderer>
</TableView.Column>

See also http://pivot.apache.org/tutorials/table-views.custom.html where a 
different renderer is used to show an image.

Regards,
David.

-----Original Message-----
From: V SANTOSH PAVAN RAJU BS [mailto:[email protected]] 
Sent: Thursday, 17 November 2011 00:13
To: [email protected]
Subject: Checkbox can be placed in a TableView?

I want to place a checkbox in a tableview.
I written code for that in bmal file in the following way:

<TableView bxml:id="tableView">
<columns>
<TableView.Column name="select" width="25" headerData=" "/>
<TableView.Column name="name" width="150" headerData="NAME" />
<TableView.Column name="number" width="150" headerData="NUMBER"/>
<TableView.Column name="age" width="100" headerData="AGE" />
<TableView.Column name="status" width="1*" headerData="STATUS"/>
</columns>

<rowEditor>
<content:TableViewRowEditor editEffect="vertical_slide" />
<cellEditors>
<select>
<BoxPane styles="{padding:{left:5,top:3}}">
<Checkbox />
</BoxPane>
</select>
<name>
<TextInput textKey="name" />
</name>
<number>
<TextInput textKey="number" />
</number>
<age>
<TextInput textKey="age" />
</age>
<status>
<TextInput textKey="status" />
</status>
</cellEditors>
</rowEditor>
<collections:HashMap />
<collections:HashMap />

</TableView>
<columnHeader>
<TableViewHeader tableView="$tableView" />
</columnHeader>

But here checkbox is visible only when i double click on a row. and
also when select a checkbox, remainig checkboxes in all the rows got
selected.
So tell me where i was wrong.

-- 
Thanks & Regards
B.S.V.S.Pavan Raju.
Skype: skype_pavan1
Hyderabad.

Reply via email to