I know this has been discussed many times on this forum, but for the life of me I cannot Understand/figure out how to store my dropdown multiple selections as records.
I have successfully adopted the methodology for allowing multiple selection utilizing an IEnumerable as a value, but converting the selection value to individual records is stumping me.
I am implementing an employee registry (not application users) and need to assign multiple job roles to some employees. I can successfully select multiple roles and store them in my temporary variable of 'selectedRoles', but then when the employee data is saved, I need each selected role to be added as an individual record in my EmployeeRoles table that consists of a JobRoleId and EmployeeId which can be called up again when I edit that employee. Id like to have previously saved job roles already selected when the drop down is opened and be able to make changes and reproduce this behavior.
@Andrew_Paull The way I save them is to invoke a custom method on save and loop through your 'selectedRoles' list saving them. Here's a custom method example -
@SloSuenos Excellent. I had considered and assumed a loop was necessary, but wasn't sure where to store such a method to call on in Radzen. How does radzen IDE handle this? Also, once the junction table is updated, how do I call upon the stored values again and set them as the value of the drop down when I edit the employee? Thanks!
I have made all the necessary changes to the example code to reflect what i am trying to do in this method, but intellisense doesnt like my Async and Notification calls. Ive tried adding the correct references, but none are working. I added this method to a custom service
Do you know any specific posts that may provide more details? I feel that this has been a bit of a wild goose chase trying to find one with my specific situation. I have been trying to resolve this for many hours and I cant get past the intellisense errors im getting. Ive completed the code structure and added to the correct page.cs so that radzen can find it..