locked
Why no standard icons in command bar for row layout? Design inconsitency? RRS feed

  • Question

  • Is there anyway to add the standard LightSwitch command bar with its 4 icons (add, edit, change, excel, and search field) to a row layout?

    From what I can determine, both a command bar and the record counter at the bottom of the screen which are present for a grid layout are missing for a row layout.

    Seems like this is a pretty major design inconsistency. 

    Anyone have a workaround?  I do not want to add my own buttons such as MyAdd, MyEdit, etc.

    I expect to be able to use LightSwitch standard command bar icons regardless of what kind of a layout I am using.

    Thanks,

    Pittsburgh Bob

    Saturday, September 8, 2012 5:11 PM

Answers

All replies

  • I've spent the better part of this weekend exploring LightSwitch and have run into what I consider a SHOW STOPPER. 

    I just wanted to confirm that there is no work around for this situation before abandoning the product.

    When I create a standard New Data Screen as follows:

    Row layout:  Person item details
    Row layout:  Address item details
    Grid layout:  Telephone item details

    Where
    Person is Parent
    Address is Child
    Telephone is Child

    I encounter the recurring problem, that Address item details can not be entered because there is no command bar and no add, change, delete icons.  All the row text boxes are grayed out.

    Yet the grid layout is open and ready for me to enter in new phone numbers for my new person.

    A new data screen should rely on the [Save] icon in the Ribbon at the top of the screen.
    All layouts (Person row layout, Address row layout, and Telephone grid layout) should be available for entry.

    Is this product still in Beta mode or is it this crippled?

    Thanks,

    Pittsburgh Bob


    • Edited by Pittsburgh Bob Saturday, September 8, 2012 6:22 PM
    • Merged by Otomii Lu Monday, September 10, 2012 6:53 AM
    Saturday, September 8, 2012 6:20 PM
  • From what I can determine, both a command bar and the record counter at the bottom of the screen which are present for a grid layout are missing for a row layout.

    Seems like this is a pretty major design inconsistency.

    The reason why you don't get these for the Rows Layout control is because it's a different type of control compared to the Data Grid control.

    Data Grid controls are collection controls and thus understand the notion of adding, deleting, etc... These are operations on a collection of items. On the other hand, a Rows Layout is a details control which is a type of control that can display a single entity. Since it only works on one item, the notions of adding, deleting, etc... do not apply.


    Justin Anderson, LightSwitch Development Team

    Saturday, September 8, 2012 7:51 PM
    Moderator
  • You haven't described the relationships between the Person, Address, and Telephone entities, but based on what you have provided, I've figured that:

    • Person and Address are in a One to Zero or One relationship: Person can have an Address and Address must have a Person.
    • Person and Telephone are in a One to Many relationship: Person can have many Telephones and Telephone must have a Person.

    Is this correct? Once I know the relationships, I can help you understand what is happening and provide a solution.


    Justin Anderson, LightSwitch Development Team

    Saturday, September 8, 2012 7:56 PM
    Moderator
  • Justin,

    Thanks for your reply. 

    Please see my subsequent post.

    This appears to be a major step backwards. 

    Bob McGaffic

    Saturday, September 8, 2012 8:18 PM
  • Your other post is unrelated to the question you pose here. If they were meant to be related, they should be in the same thread. I'll address your other threads in those threads and what you have asked here in this thread.

    Justin Anderson, LightSwitch Development Team

    Saturday, September 8, 2012 10:44 PM
    Moderator
  • Justin

    Parent record is Person

    Child record is Address.  1 person can have 1 or many addresses.

    Child record is Telephone.  1 person can have 1 or many telephone numbers.

    Child record is Email address.  1 Person can have 1 or many email addresses.

    One of each person's address records is marked as the default.

    One of each person's telephone records is marked as the default.

    One of each person's email address records is marked as the default.

    How would you then create a row layout to display this information which displays only the default records?

    Lightswitch controls will correctly display information using row layouts, but will
    not work when creating a new person, his address, his telephone, and his email address using row layouts when there is a 1:M relationship between person and these other tables.

    A Lightswitch row layout works fine for:

    Name:
    Nickname:
    Sex:
    Birthdate

    A Lightswitch row layout does not work fine for:

    Address type:
    Default indicator:
    Address 1
    Address 2
    City
    State
    Zip

    A Lightswitch row layout does not work fine for:

    Email address type:
    Email address:
    Email address comments:

    Saturday, September 8, 2012 11:04 PM
  • I apologize for the micro screen shot. 

    Here is something that is easier to read.

    Note in MS Access a SINGLE record in ROW layout mode has a property NAVIGATION BUTTONS that allows you to either display navigation buttons or not.

    What LighSwitch has done here is really bad design -- forced you the developer to either use a list in conjuction with your row layout in order to be able to move from one record to the next or to write your own buttons to control simple navigation.

    Sunday, September 9, 2012 9:56 AM
  • Justin,

    Please see my enlarged screen shot of how easy this is to do in MS Access.

    I look forward to learning your equally simple way to accomplish the same appearance in Lightswitch.

    Thanks.

    Sunday, September 9, 2012 10:00 AM
    • Marked as answer by Otomii Lu Monday, September 17, 2012 3:00 AM
    Monday, September 10, 2012 6:52 AM