Forum Discussion

FICO's avatar
FICO
Community Manager
3 years ago

How to refresh vdl-table in JavaScript after adding a new row?

I want to replace the +- button coming with the addrow-autoinc option for vdl-table because we need to perform certain value changes when a new row is added. I think I managed in my JavaScript code (we want faster response so are using JS code here) to add a new row of data to the underlying dataframe for the vdl-table. However, the table view is not refreshed to include the new row. Is there any JavaScript code I can call to force the vdl-table to refresh? Can I set an ID to the vdl-table, then call some method like reload or refresh?

Thank you!

1 Reply

  • FICO's avatar
    FICO
    Community Manager

    Hi, have you looked into using VDL Actions? https://www.fico.com/fico-xpress-optimization/docs/latest/insight5_dev_guide/GUID-7686AF9B-5CD8-4B88-98F9-9626CE651E34.html

    That would be my first suggestion. It is fairly easy to string a few Actions together, triggered from a 'click' event in order to update Entity data.

    Let me know if you would need a code example.

    Joc