locked
How to display the information selected from drop down list in the grid RRS feed

  • Question

  • I have a table called Employees and it stores all the personal information of employees.  I want a drop down list of all the employees name and when I select one of them then i want to display the personal information of that particular employee in the grid below my drop down list...Any body can give me an idea how can i achieve this??

    Thursday, May 3, 2012 11:28 PM

Answers

All replies

  • Hi

    You can use the List and Details Screen achieve this .

    1. create a List and Details Screen

    2. Add DataItem->Local Property->type:Employees(Entity)

    3.Delete all the items in both layout.

    4.Drag Employees Property to first layout, let the control type to default(summary)

    5.Drag Employees Property to second layout, let the control type to RowsLayout.

    Then you will get what you need.

    I just get what you need.

    If I haven't explain clear you can send the email to me.

    My email is support-v-diyuan@hotmail.com.

    I will send my sourcecode to you.

    Hope it helpful.


    Monday, May 7, 2012 8:41 AM
    Moderator
  • Hi dino, I could not get what i wanted by these steps? Could you tell me in more detail please?

    Thanks

    Monday, May 7, 2012 10:00 PM
  • Hi

    Sorry for answer too late.

    Since I haven't resieve your email, I can't send the source code to you.

    Here is the step.

    Here is my Employees table.

    1 creat a list and Details screen, add Data Item like this:


    Friday, May 11, 2012 6:49 AM
    Moderator
  • 2 Drag this property twice to 2 diffrent layout.

    First set the type to Auto Complete Box(this is the drop down list)

    Second set to Rows Layout like this:

    Then you can get what you want.

    In this case if you want to choose other filed for the dropdown list, you can refer to this article:

    http://blogs.msdn.com/b/bethmassi/archive/2012/01/12/creating-cascading-drop-down-lists-in-visual-studio-lightswitch.aspx

    Hope it helpful.


    Friday, May 11, 2012 6:50 AM
    Moderator