locked
New Child Data for existing screen RRS feed

  • Question

  • Hello,

    I have a LightSwitch application which is in development. It contains a parent screen with a few child screens shown in tab view. I have added a new child to the parent and I would like to add this into the tab view. I am unable to find an easy way to do this without having to create a new details screen which would lose all my display modifications.

    Thanks,

    Ken

    Monday, January 7, 2013 4:08 PM

Answers

  • When you say "child screens in tab view", I am interpreting that as child data collections in tab views.

    In screen design mode look at the 'master' data query on the left hand side.

    Under there should be an entry for "Add <new-child-entity>".

    That should behave like the other tabs, as if you had created a new screen from scratch.


    Dave Baker | Xpert360 blog | twitter : @xpert360 Opinions are my own. Please mark as answer if this helps solve your problem.

    • Proposed as answer by Xpert360 Monday, January 7, 2013 11:40 PM
    • Marked as answer by kenjonesepa Tuesday, January 8, 2013 9:22 AM
    Monday, January 7, 2013 5:33 PM

All replies

  • When you say "child screens in tab view", I am interpreting that as child data collections in tab views.

    In screen design mode look at the 'master' data query on the left hand side.

    Under there should be an entry for "Add <new-child-entity>".

    That should behave like the other tabs, as if you had created a new screen from scratch.


    Dave Baker | Xpert360 blog | twitter : @xpert360 Opinions are my own. Please mark as answer if this helps solve your problem.

    • Proposed as answer by Xpert360 Monday, January 7, 2013 11:40 PM
    • Marked as answer by kenjonesepa Tuesday, January 8, 2013 9:22 AM
    Monday, January 7, 2013 5:33 PM
  • If the child collections are based on an entity's navigation collections (which they should be), you don't need to add a child record to the parent, then add the child to the collection. You just add the child record directly to the child collection (it'll be "assigned" to the parent automatically).

    The easiest way is to use the child grid's "Add" button (which opens the new child record in a tab), or the "Add New" button (which opens the new child record in a modal window).

    It sounds like you're trying to "reinvent the wheel" (without knowing you're doing so), instead of using the mechanisms that LightSwitch provides for you out-of-the-box.

    Have you watched Beth Massi's How To video series? This will give you the basics of how LightSwitch works. You're much better off working with LightSwitch, than trying to figure out your own ways of doing things. You can always customise later if the built-in mechanisms don't do what you need.


    Yann - LightSwitch Central - Click here for FREE Themes, Controls, Types and Commands
     
    Please click "Mark as Answer" if a reply answers your question. Please click "Vote as Helpful" , if you find a reply helpful.
     
    By doing this you'll help others to find answers faster.

    Tuesday, January 8, 2013 4:18 AM
    Moderator
  • Thanks for the tip, I managed to get it to work.
    Tuesday, January 8, 2013 9:23 AM
  • Thanks for the reply Yann, I dont think I was clear enough with my description. Thankfully Xpert360 was able to inerpret my ramblings!
    Tuesday, January 8, 2013 9:24 AM
  • As long as you got the answer you needed, that's the main thing.

    Yann - LightSwitch Central - Click here for FREE Themes, Controls, Types and Commands
     
    Please click "Mark as Answer" if a reply answers your question. Please click "Vote as Helpful" , if you find a reply helpful.
     
    By doing this you'll help others to find answers faster.

    Tuesday, January 8, 2013 10:56 AM
    Moderator