• If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Announcement

Collapse
No announcement yet.

Dynamic (Row‑Level) Dropdown in Edit Grid Based on Another Column

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Dynamic (Row‑Level) Dropdown in Edit Grid Based on Another Column

    I have an Edit Grid (Local Edit mode) with multiple rows.
    The grid has the following columns:
    • State – non?editable
    • City – editable (should be a dropdown)
    The City dropdown values must depend on the State value of the same row.
    For example:
    • If State = California, the City dropdown should show only cities from California
    • If State = Texas, the City dropdown should show only cities from Texas
    Each row in the grid can have a different State, and therefore the City dropdown options must be different per row.
    How can i implement this
    ?

  • #2
    I would suggest you review this blog post...
    Learn how to constrain a dropdown filter based on another field's value in Valence. Enhance IBM i web apps with dynamic, user-friendly filtering.

    Comment


    • #3
      This Drop down in question is not a Filter, it is an editable field inside the grid.I want to change the city of multiple row using dropdown and save at once

      Comment


      • #4
        Does this edit grid use inline editing (row-level or cell-level)?

        Comment


        • #5
          its a Local Edit Grid with Inline Cell-Edit

          Comment


          • #6
            Just checking if there are any updates or feedback on this topic, or if anyone has implemented a different approach to handle this requirement.

            As an alternative workaround, I was thinking of the following approach:
            • Add a row-level icon/button in the Edit Grid
            • On click, open a popup grid containing the valid options
            • When a row is selected in the popup grid, pass that value back and update the corresponding field for that specific row and column in the Edit Grid
            • This update would be done without immediately writing to the database, but instead updating the grid state and setting the hasChanged flag accordingly
            Is this possible and how to implement it?.

            Comment

            Working...
            X