Consulting

Results 1 to 5 of 5

Thread: Getting dropdown to repeat in new table row

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Getting dropdown to repeat in new table row

    I have put the following code in a Dropdown list in the “Change” event. It works great but when the “Add Row” button is clicked the items in the dropdown of the new row do not appear. How do I get the code to repeat for each row? Any help is greatly appreciated!


    HTML Code:
    var newVal = this.boundItem(xfa.event.newText);  // Stores the dropdown value when the user selects something from the drop down list.
    switch (newVal)   // Depending upon the selections made in the Sector dropdown populates the Table2.Row1.GL_DropDown field
    {
    case "1":
            Table2.Row1.GL_DropDown.clearItems();
            Table2.Row1.GL_DropDown.rawValue =null;
            Table2.Row1.GL_DropDown.addItem("Option 1")
            Table2.Row1.GL_DropDown.addItem("Option 2")
            Table2.Row1.GL_DropDown.addItem("Option 3")
            Table2.Row1.GL_DropDown.addItem("Option 4")
    break;
    case "2":
            Table2.Row1.GL_DropDown.clearItems();
            Table2.Row1.GL_DropDown.rawValue =null;
            Table2.Row1.GL_DropDown.addItem("Module 1")
            Table2.Row1.GL_DropDown.addItem("Module 2")
           Table2.Row1.GL_DropDown.addItem("Module 3")
           Table2.Row1.GL_DropDown.addItem("Module 4")    
    break;
    
    case "3":
            Table2.Row1.GL_DropDown.clearItems();
            Table2.Row1.GL_DropDown.rawValue =null;
            Table2.Row1.GL_DropDown.addItem("Station 1")
            Table2.Row1.GL_DropDown.addItem("Station 2")
            Table2.Row1.GL_DropDown.addItem("Station 3")
            Table2.Row1.GL_DropDown.addItem("Station 4")
    break;
    default:
    break;
    }
    Last edited by Aussiebear; 02-13-2025 at 01:06 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •