07-23-2021, 05:05 PM
I have a CustomLayoutWdg as cell in a row of a TableLayoutWdg
I want my widget to read/write the value of a sister cell and set the row as changed
From a bvr fired in my widget I get the parent row with:
And get the cells with:
I can set the cell/row as changed with:
I can loop on every cell end get the value:
my problem is:
how can i get the value of a specific column?
Do I have to read the table header and get the column name index or is there e better, more readable solution?
I want my widget to read/write the value of a sister cell and set the row as changed
From a bvr fired in my widget I get the parent row with:
Code:
var row = bvr.src_el.getParent(".spt_table_row");
And get the cells with:
Code:
var cells = row.getElements(".spt_cell_edit");
I can set the cell/row as changed with:
Code:
cell.addClass("spt_cell_changed");
row.addClass("spt_row_changed");
spt.table.set_changed_color(row, cell);
I can loop on every cell end get the value:
Code:
for (var i = 0; i < cells.length; i++) {
console.log("TEST:", cells[i].getAttribute("spt_input_value"));
}
my problem is:
how can i get the value of a specific column?
Do I have to read the table header and get the column name index or is there e better, more readable solution?