cancel
Showing results for 
Search instead for 
Did you mean: 

How can i edit perticular row in dynamically created table

Former Member
0 Kudos

Hi to All,

Here my requirement is create table dynamically from existing XML and first column with radio buttons,column data and row wise data there on XML but i'm able to create table and displaying data then whenever i click on first column radio button that row editable and remaining rows in disable mode then i edit that row and click on save button that particular row data will be inserted to XML.Please tell me how can i achieve this requirement.

Thanks and Regards,

surya.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

resolved by self.

siarhei_pisarenka3
Active Contributor
0 Kudos

Hi surya

- Use RadioButtonGroupByIndex for the first column.

- Disable automatic change of table's lead selection: selectionChangeBehaviour = manual, selectionMode = none.

- In onSelect event handler of the RadioButtonGroupByIndex set new table's lead selection from the code to the row where the button is clicked.

- Add calculated read-only attribute isRowEditable (boolean) to the table's node. Getter shall be like this:

return (element.index() == element.node().getLeadSelection());

- Bind the cell editors' enabled property to isRowEditable attribute.

BR, Siarhei

PS: this is my message #666 - do not trust it

Edited by: Siarhei Pisarenka on Feb 23, 2010 2:29 PM

Former Member
0 Kudos

Hi Pisarenka,

Thanks you for ur reply and one more thing how can i set dynamically added attribute as calculated and how to get "get,set " methods.

if possible please provide me sample code.

Thanks nad Regards,

surya.

siarhei_pisarenka3
Active Contributor
0 Kudos

Hi Surya

When I wrote about isRowEditable attribute I did not mean it should be dynamic. You can create the attribute at design-time and implement the getter. At run-time you just need to bind the attribute to your cell editors that you create dynamically.

BR, Siarhei