Aurigma Image Uploader 6.5 Dual
Adding View Mode Switch
Sometimes you may want to allow a user to switch between file view modes. Thumbnail view mode is usually the most convenient one, but it is the slowest way to display the folder content, that's why it would be preferable for a user to be able to switch to the detailed list view (or some other one), which works much faster.
It can be carried out in two ways. First of all, you can enable the right-click menu, which allows switching between various view modes (just set the ShowContextMenu property to true).
The idea is very simple. You add HTML element containing necessary view modes (<select>, <input type="radio">, or whatever), and change the FolderView property of Image Uploader at the onchange event.
If you allow the user to switch between the view modes using not only the HTML control, but also the context menu of Image Uploader, you should also handle this situation. The SELECT element or other control you use should be updated if the user selects another view from the right-click menu. For that, the ViewChange event is exposed. It is raised when the view mode is changed. Just set a required value according to the FolderView property in the ViewChange event handler.
The code example is presented below. If you do not want to have any of the view modes, just remove an appropriate option.