Category - Projects

Multiple Modal Popups


With have a many-to-many table and using inline admin editing, I had to create a way to edit topics within the DetailsView.

First, I added a modal popup to the DetailsView using an invisible button, and then in the selected event of the listview, it opens the popup.

I knew right away that I wanted to have a nested ListView in the topics field. I decided to use a ListView due to it's advantage of utilizing edit and insert in the same control.

I started out trying to nest a modal popup inside of the DetailsView's insert and edit template.

This caused a whole host of issues. After fighting through those, I eventually created the modalpopup outside of the DetailsView's popup. Then I wired up the edit icon inside the details view to show the new popup.

Lastly, if changes were made to the Topics ListView, I needed to update the available topics in the DetailsView.

I did this by added a refresh button that rebound the topics checkboxlist.

One of the hiccups I had was when the Topics ListView updated, it would close the DetailsView's popup. So I wired the Topics ListView to call the show method of the first popup.

On the projects page where I have both projects AND posts that have topics, I had to create a session item defining if they were working with projects or posts, so that the topics listview knew which popup to keep open.

You must be logged in to comment.