top of page
Get current row in Table
Index
Title | Report | College | Year | Height | Weight |
---|

CODE
import wixWindow from 'wix-window';
$w.onReady(function () { });
export function table1_rowSelect(event) {
let myRowIndex = event.rowIndex
$w('#input1').value=$w('#dataset1').getCurrentItem().title
$w('#input2').value=$w('#dataset1').getCurrentItem().college
$w('#input3').value=$w('#dataset1').getCurrentItem().year
$w('#input4').value=$w('#dataset1').getCurrentItem().height
$w('#input5').value=$w('#dataset1').getCurrentItem().weight
}
$w.onReady(function () {
$w("#table1").onCellSelect((event) => {
let rowIndex = event.cellRowIndex;
console.log(rowIndex)
let rows = $w("#table1").rows;
let name = event.cellData;//Cell data
console.log((name))
wixWindow.openLightbox(name)
});
});
bottom of page