locked
Button Add / Edit / Delete from a Grid disabled.... RRS feed

  • Question

  • Hello there! 

    I have two databases, one of which has a table of budgets. The other has a relation table phone calls. 

    When I see the details screen of budgets, the grid of phone calls I can not add / edit / delete. 

    As I can make them work?
    Monday, July 21, 2014 9:31 PM

Answers

  • Hi, i've solved this issue with this solution:

    I've added some fields only on Details Screen, inside one modal window... then i've added save button on this modal window, that creates one new row in llamadasset with information with presuv item.

    Woked Fine for me!!

    • Marked as answer by Ivan Martinez Tuesday, July 22, 2014 9:18 PM
    Tuesday, July 22, 2014 9:18 PM

All replies

  • Check the tablename_CanInsert, tablename_CanUpdate, etc permission code on the entity. Open the entity designer and click the Write Code dropdown button at the top.

    Check you have a primary key for the table, preferably an INT IDENTITY.

    If you still have problems, post screenshots and/or more details of your entities and screens, at design time and runtime.


    Simon Jones
    If you found this post helpful, please "Vote as Helpful". If it actually answered your question, please remember to "Mark as Answer". This will help other people find answers to their problems more quickly.

    Tuesday, July 22, 2014 8:55 AM
  • There are no permision code, i've attachet screenshot:

    Database

    Tuesday, July 22, 2014 2:43 PM
  • Tuesday, July 22, 2014 2:44 PM
  • That compound primary key of two string fields may be the culprit.

    LightSwitch much prefers to use INT IDENTIY fields as the primary key as it  knows how to deal with them. Without a primary key that LightSwitch understands you can't insert, update or delete rows because LightSwitch can't uniquely identify the row you are trying to update or delete.

    You can keep a secondary unique index of your two string fields if you want, it could even be the clustered index for the table, but the PK should be a single, auto-incrementing, integer.


    Simon Jones
    If you found this post helpful, please "Vote as Helpful". If it actually answered your question, please remember to "Mark as Answer". This will help other people find answers to their problems more quickly.

    Tuesday, July 22, 2014 2:52 PM
  • Hi, i've solved this issue with this solution:

    I've added some fields only on Details Screen, inside one modal window... then i've added save button on this modal window, that creates one new row in llamadasset with information with presuv item.

    Woked Fine for me!!

    • Marked as answer by Ivan Martinez Tuesday, July 22, 2014 9:18 PM
    Tuesday, July 22, 2014 9:18 PM