locked
Lightswitch HTML Client - Detail picker for each related List Item RRS feed

  • Question

  • I have a doubt in Lightswitch Html Client application.

    Scenario:

    Suppose i have two tables  "Property" and "PropertyVaues".

    A Property can have many PropertyValues is the relationship between them.

    I want to show the data on screen like below:

    Property List:

    XYZ            [___10____(+)]

    MNO          [___abc____(+)]

    PQR           [___30.5___(+)]


    Xyz  is the list item

    assume [___10____(+)]  is the detail picker of PropertyValues which allow to select one value related to XYZ Property item, and same for other list items.

    Only Related "PropertyValues" for each list item must be available in the detail picker.

    Please help me out if any one has the solution to solve it.

    Or you can give me any other way to accomplish the above scenario.

    Thanks

    • Edited by Ravii Patel Tuesday, December 30, 2014 11:10 AM
    Monday, December 29, 2014 1:51 PM

Answers

All replies

  • How about using checkbox to do that,  checked "PropertyValues" for each list item can be available.
    Thursday, January 8, 2015 8:18 AM
  • How about using checkbox to do that,  checked "PropertyValues" for each list item can be available.

    Did not get you. Can you please elaborate your reply??

    Thanks


    • Edited by Ravii Patel Thursday, January 8, 2015 9:17 AM
    Thursday, January 8, 2015 9:16 AM
  • Thursday, January 8, 2015 6:09 PM
  • Is it just me or is this forum not updating correctly? On the main forum list, I don't see my latest post as the most recent reply.

    Anyway reposting this:            

    • Marked as answer by Ravii Patel Friday, January 9, 2015 7:06 AM
    • Unmarked as answer by Ravii Patel Friday, January 9, 2015 7:06 AM
    • Marked as answer by Ravii Patel Friday, January 9, 2015 7:06 AM
    Thursday, January 8, 2015 11:55 PM
  • Thanks Josh for the reply. 

    I am having one more issue. Can you please help me out on that also?

    Issue:

    When i am selecting a value for any dropdown(present inside a list item), the selected value is assigned for all other dropdown also.

    I want each dropdown must show its own selected value.

    Thanks,

    Ravi Patel

    Friday, January 9, 2015 7:10 AM
  • Hi Ravi,

    You'll have to tell us more about your screen and the entities involved.  For example, is this a browse screen based on Properties entity having a list control of properties.  Each List item has a drop down for Property Value?  Do a screen shot of your screen designer window.

    Josh

    Friday, January 9, 2015 3:01 PM
  • Hello Josh,

    I am implementing it on AddEdit screen.

                      (1)                                               (2)                           

    Screen description:

    [Note: Some Images are in my next post]

    1. Image(1) shows the list of properties (GSM, Mill Name, CMS). These Properties have its respective property values in drop down.

    2. When i select any value from the dropdown list (eg. 10 from GSM). the value is assigned to all other drop down. [shown in image(3) next post]

    (4) Again when suppose i select value for "Mill Name" Property as "Abc", it is assigned to all other drop down. [shown in image(4) next post]

    I want that a property value must be assigned to its respective Property only.

    Please help me on this. Or suggest me another way out to accomplish such scenario.

    Thanks

    Ravi Patel

    Monday, January 12, 2015 5:35 AM
  • Continuation of above post:

                         (3)                                                        (4)


    • Edited by Ravii Patel Monday, January 12, 2015 5:37 AM
    Monday, January 12, 2015 5:36 AM
  • Hi Ravii,

    It's unclear to me what entity your AddEdit Screen is bound to and what data your details picker is bound to.

    As an example, I have Props and PropValues tables related one to many.  I also have a table called Items and ItemProps related one to many.  ItemProps is also related to both Props and PropValues. 

     Create a query based on PropValues having a PropID parameter used to filter PropValues by Prop.Id. 

    Now on AddEditItem screen, click 'Add ItemProps' to include the related ItemProps in the data pane.  Then click 'Add Data Item' and add the query.

    ...to be continued


    • Edited by joshbooker Monday, January 12, 2015 3:23 PM
    Monday, January 12, 2015 3:05 PM
  • ...continued

    On AddEditItem screen, drag Prop and PropValue from ItemProps onto the screen design.  Change PropValue into a details Picker having Rows Layout and Value as children.  Set the 'Choices' property of the Details Picker to the query name 'PropValuesByProp'.  Finally, set the 'Data Binding' property of Details Picker to:

     ItemProps.selectedItem.Prop.Id

    Now AdddEditItem looks like this:

    HTH,

    Josh


    • Edited by joshbooker Monday, January 12, 2015 3:21 PM
    Monday, January 12, 2015 3:06 PM
  • Sorry Josh for replying after so many days. "I am on small vacation"

    Your example is same as mine, but my scenario consists a small difference. 

    Your example has ItemProps as an intermediate between Item and Prop table.

    But, I am relating Item and Prop table directly. 

    Thanks

    Ravi Patel

    Monday, January 19, 2015 6:46 AM