cancel
Showing results for 
Search instead for 
Did you mean: 

Table controls to edit items

Table controls to edit items

Hemingway
Established Member

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.

2 REPLIES 2

Sgilk
Contributor

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.

HmiGuide
Community Moderator
Community Moderator

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.

Icon--AD-black-48x48Icon--address-consumer-data-black-48x48Icon--appointment-black-48x48Icon--back-left-black-48x48Icon--calendar-black-48x48Icon--center-alignedIcon--Checkbox-checkIcon--clock-black-48x48Icon--close-black-48x48Icon--compare-black-48x48Icon--confirmation-black-48x48Icon--dealer-details-black-48x48Icon--delete-black-48x48Icon--delivery-black-48x48Icon--down-black-48x48Icon--download-black-48x48Ic-OverlayAlertIcon--externallink-black-48x48Icon-Filledforward-right_adjustedIcon--grid-view-black-48x48IC_gd_Check-Circle170821_Icons_Community170823_Bosch_Icons170823_Bosch_Icons170821_Icons_CommunityIC-logout170821_Icons_Community170825_Bosch_Icons170821_Icons_CommunityIC-shopping-cart2170821_Icons_CommunityIC-upIC_UserIcon--imageIcon--info-i-black-48x48Icon--left-alignedIcon--Less-minimize-black-48x48Icon-FilledIcon--List-Check-grennIcon--List-Check-blackIcon--List-Cross-blackIcon--list-view-mobile-black-48x48Icon--list-view-black-48x48Icon--More-Maximize-black-48x48Icon--my-product-black-48x48Icon--newsletter-black-48x48Icon--payment-black-48x48Icon--print-black-48x48Icon--promotion-black-48x48Icon--registration-black-48x48Icon--Reset-black-48x48Icon--right-alignedshare-circle1Icon--share-black-48x48Icon--shopping-bag-black-48x48Icon-shopping-cartIcon--start-play-black-48x48Icon--store-locator-black-48x48Ic-OverlayAlertIcon--summary-black-48x48tumblrIcon-FilledvineIc-OverlayAlertwhishlist