comboboxvisual-studio-lightswitchscreens

Adding new row to LightSwitch combobox


I'm having problem with LightSwitch (VS 2012 version, Silverlight client) screen design. I have following data model:

I've created new screen for creating Trainings. The screen layout contain Participant section and I can add there participants and select appropriate Agent relations only if there already are corresponding rows in Agent table. But I would also like there a option, to create new agent on the fly. So if user tries to enter Agent, that does not exists, he would be able to enter new information about agent and select him in Participant section.

Is there a way?


Solution

  • This is a perennial problem, that has no built-in way to handle it out-of-the-box. It has to be coded for each ACB (auto-complete box) that you want to be able to add records to.

    This blog post will show you a way to accomplish it.

    LightSwitch – Add non existent records using AutoCompleteBox