locked
LightSwitch 2013 - Ascending order with new items RRS feed

  • Question

  • Hello,

    I'm building a LightSwitch 2013 HTML application.

    I have a screen of adding new products.

    I have a query of Products in my screen (at first, there are no products, after user press save button the products are saved in my DB).

    I also have an "Add new product" button.

    When the user is pressing on that button it adds a new Product item:

    var newProduct = new myapp.Product();

    By default, lightswitch adds the new item on the top of the list.

    How can i make it to be on the bottom of the list?

    Thanks.


    • Edited by Yaron Y Sunday, November 6, 2016 8:19 AM
    Sunday, November 6, 2016 7:40 AM

All replies

  • anyone???
    Wednesday, November 23, 2016 1:08 PM
  • I am not aware of a way to do this before the screen is saved and refreshed. The only way I can think is to add the new item - making sure that it will appear at the bottom through the sorting setup for the query - and then to save the screen and refresh the query after each product is added.

    Regards, Xander. My Blog

    Wednesday, November 23, 2016 7:27 PM
  • Hello Xander,

    Thanks for your reply.

    Is there a way to do that without saving data?

    I don't want to save something that is not final....

    By the way, the query in my screen is a wcfria query... Can i save wcfria objects?! (temporary..)

    I was trying to change the data's order by taking - screen.Products.data - array and reverse it but this is unchangeable...

    Please let me know...

    Thanks.

    Thursday, November 24, 2016 6:55 AM