Default dropdown value based on selected record

Default dropdown value based on selected record

nicoledramirez@hotmail.comnicoledramirez@hotmail.com Posts: 60Questions: 14Answers: 2
edited April 2017 in DataTables 1.10

Hi!
Trying to set the default value for

{
                            label: "Start: <font color=red><b>*</b></font> ",
                            name: "cdi_mileage.startsite",
                            type: "select",
                            placeholder:"select"
                        },

based on the value for startsite column selected from the table.

I tried .set and .val in initedit but neither worked.

The controller is set up as follows:

.Field(new Field("cdi_mileage.startsite")
                    .Options("cdi_address_book_relationships", "id", "site_aka", q => q.Where("ClinicianName", mycookie, "="))
                    )

Edited by Allan - Syntax highlighting. Details on how to highlight code using markdown can be found in this guide.

Answers

  • allanallan Posts: 63,692Questions: 1Answers: 10,500 Site admin

    Can you show me the code that used for initEdit please? That should work!

    Thanks,
    Allan

This discussion has been closed.