FORUM CTRLX AUTOMATION
ctrlX World Partner Apps for ctrlX AUTOMATION
02-05-2024 04:56 PM
Hi, I'am using this topichttps://developer.community.boschrexroth.com/t5/Store-and-How-to/HowTo-display-content-in-a-table/ba... to create my own table based on structure from the PLC.
How modify tableGenerators.js which will be allow cell data edition? Now script insert row and create a child 'td' with data assigning.
// create data rows
for (let iRow = iRowFirst; iRow <= iRowLast; iRow++) {
myRow = addChild(myTable, "tr")
for (let iCol = 0; iCol < arCols.length; iCol++) {
let sItem = `${sStructItem}${sFS1}${iRow}${sFS2}${arCols[iCol]}`
if (typeof (oData[sItem]) === "number") {
addChild(myRow, "td", "", oData[sItem].toFixed(0 + arDigits[iCol]))
} else {
addChild(myRow, "td", "", shmi.localize(oData[sItem]))
}
}
}
I am going to insert Standard Input Field Widget into 'td', but I can't find any example how to use visuals widget at local scripts.
Solved! Go to Solution.
02-06-2024 04:05 PM
Hi @Hemingway ,
See the Visuals reference on BaseControl.addControl(). You'll need to log in to view the documentation. You can pass in control options to construct your desired control from the base.
02-07-2024 09:44 AM - edited 02-07-2024 09:49 AM
Hello
in the meantime I created a package with a widget cx-table. At the moment it is only part of Template-for-cartesian-handling-systems-V1-20-0 . So you can take the package from there and have a look to the documentation shipped with the template. Currently I'm working on the documentation with PLC & HMI example program, for an easy implementation into any HMI/PLC program. There are 2 table modes.
1. Edit PLC data via a table. Everything is configured in PLC. Table content is exchanged via a JSON string.
2. Edit HMI structure array. Interface in widget available, but not yet implemented.