Editor - New, Update - C#

Editor - New, Update - C#

david.j.meyer2@boeing.comdavid.j.meyer2@boeing.com Posts: 54Questions: 15Answers: 0

When we create a new record, we enter the employee id and then make a call to our database to get the employee name and email. After the employee id is entered it would then show all the remaining fields. Is this possible and if so how would i make the create dialog only show the employee id until they enter the employee id? How would i attach an ajax call to the employee id field to get the data and populate the fields.

This question has an accepted answers - jump to answer

Answers

  • david.j.meyer2@boeing.comdavid.j.meyer2@boeing.com Posts: 54Questions: 15Answers: 0

    Is there an example of how to create dependencies and field processing.

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin

    The dependent() method sounds just about perfect for what you describe. Set it to point at an Ajax url which the browser submits the employee id to, and then the server responds with JSON that will set the values and show the fields that you then want to be visible. They can be readonly fields if that is suitable.

    Allan

  • david.j.meyer2@boeing.comdavid.j.meyer2@boeing.com Posts: 54Questions: 15Answers: 0

    I'm a little confused on how to setup the interaction. When does the ajax method get called? While the user is inputting the data or is it triggered? Is there an example that i can look at to gain a better understanding of the interaction between the user input and the ajax call?

    Thanks again, Dave

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    Answer ✓

    When does the ajax method get called?

    When the value of the host field is changed (your employee id in this case).

    Here is an example.

    Allan

This discussion has been closed.