DataBinding and reading selections on Multi SelectList

I'm looking for an example of reading the selected values from a RadzenListBox where multiselect = true and the form is submitted as part of an EditForm submit.

I presume you are wanting to save your multi selections to a related child table?

This may not be the best way but will work.

You can get your selection from the list change event and then use a foreach loop to iterate through the items.

As you loop through you’ll have to create a new record for each item and add to your dbcontext. Then save the dbcontext.

Hope that helps.

John

Thanks but actually no I am not saving the results to a table. I have about a dozen multi select dropdown lists on a page that allow configuration of the next process and need to process the selections on form submit or some other "finalizing" event.

I would assume that each multi select drop down list would provide some sort of list or array of selected values so I am looking for an example of accessing that.

if the dropdowns are databound then you can loop through each when you come to your 'finalizing event'

or you could create a list object for each and on dropdown change you could iterate through the items and populate the list with the selected items, then you'll have a number of list objects which you can interogate when you finalize.