PageList with toggle button

Hi I have and Page List with a toggle button and I had attachet an event onchange, so i want to know where row of my my List is change , cause I need to do something with the data of the row.

view: “pagelist”,
id: “submenu”,
scroll: “y”,
type: “landscape”,
url: “/Home/CourtesiesView”,
datatype: “xml”,
select: false,
activeContent: {
Acceptbutton: {
id: “Acceptbutton”,
view: “toggle”,
labelPosition: “right”,
options: [{ Value: 0, label: “Si” }, { Value: 1, label: “No”}],
width: 140,
css: “Accepting_Button”,
//click: upgrade_logic,
on: { “onchange”: function (old_value, new_value) {

                                                             ////How I know the Row ID ?????

				            } 
				            }

				        }
				    }

Due to the small bug in active content code, it is not possible to access this info with compressed code.

Normally it must be accessible as

$$('list1').locate(this.$view)

where list1 - id of owner list

Fixed build is attached, additionally it allows to get such info as

this.config.$masterId

touch.zip (1.44 MB)

Hi I had tried to get the id with the $$(‘list1’).locate(this.$view) but get my an error… so I found another way to do the same… thanks for the new build… heres the code

view: “pagelist”,
id: “List”,
scroll: “y”,
type: “landscape”,
url: “/Home/CourtesiesView”,
datatype: “xml”,
select: false,
activeContent: {
Acceptbutton: {
id: “Acceptbutton”,
view: “toggle”,
labelPosition: “right”,
options: [{ Value: 0, label: “Si” }, { Value: 1, label: “No”}],
width: 140,
css: “Accepting_Button”,
//click: upgrade_logic,
on: { “onchange”: function (new_value, old_value) {
setTimeout(“MyTest();”, 100);
}
}
}

function MyTest() {
var i, id, sum, value;
sum = 0;
for (i = 0; i < $$(“List”).dataCount(); i++) {
id = $$(“List”).idByIndex(i);
value = $$(“List”).item(id).Acceptbutton;

            dhx.notice("Upgrade id " + value);

        }

    }

In the change event, I used an Timeout cause if you put the “for” directly, you won’t get the last value of the togglebutton, so to fix that just call the function with the timer and Eureka you get all the list with the last values, to make whatever you need to do

Thanks Stanislav

Regards