Details view windows explorer

Обзор DetailsView

Элемент управления DetailsView – одна из новинок ASP.NET 2.0. Он позволяет просматривать по одной записи из источника данных, тогда как GridView показывает их все сразу. Это можно сравнить с разными типами форм в Access: табличная форма соответствует GridView, а Columnar – DetailsView. Точно так же, как и GridView, DetailsView позволяет разбивку на страницы, редактирование, вставку и удаление с автоматическим связыванием с источником данных. Он также является наследником CompositeDataBoundControl.

Visual Studio 2005 предоставляет, как обычно, Smart Tag, с помощью которого можно задать источник данных, автоформатировать элемент управления, отредактировать поля и шаблоны полей.

Пример DetailsView, где данные берутся из базы данных Northwind, таблица Employees.

А так это выглядит на форме:

Применялось автоформатирование Mocha.
Свойства пейджера такие же как у GridView. Единственное отличие – отсутствие свойства PageSize – так как DetailsView всегда отображает одну запись. Например, для навигации по страницам использовать картинки. При этом PagerSettings:Mode должен быть задан как NumericFirstLast.

Так гораздо красивее. Картинки взяты из поставки CorelDraw 11. Странно, что такой возможности не ввели в календаре, надеюсь в следующей версии появится.

Элементы коллекции полей BoundField описываются так же, как и в GridView, но текст заголовка появляется слева, а не сверху.
Совместное использование с GridView

Если в записи много полей, то на одной странице в GridView можно отобразить некоторые из них, а в DetailsView выводить полную информацию.

Чтобы это реализовать, нужны два SqlDataSource, которые подсоединяются к одной базе через тот же ConnectionString. Первый – обычный, читает все записи:

Строка соединения определяется в Web.config:

SqlDataSource1 связан с GridView, который поддерживает возможность выбора записи.

Если не указать SelectedIndex=»0″, то в начале не будет выбран ни одна запись и DetailsView на странице не появится.

Второй SqlDataSource фильтрует информацию по EmployeeID.

Самое важное тут – SelectParameters. Таким образом в команду SelectCommand подставляется тот EmployeeID той записи, которая была выбрана в GridView1.

Вставка записей с помощью DetailsView

Чтобы наш DetailsView научился вставлять записи, необходимо установить свойство

AutoGenerateInsertButton=»True». В элементе управления появляется кнопка “New”. Стоит ее нажать, и данные заменяются на TextBox-ы.

Но пока записи вставляться не будут. В SqlDataSource необходимо определить

1. Свойство InsertCommand
2. По одному InsertParameter Для каждого поля.

Ничего сложного, не так ли? 🙂

Можно также обновить вышестоящий GridView, чтобы в нем немедленно отображалась вставленная запись. Напишем обработчик события ItemInserted.

Работа с шаблонами полей.

Ввод дат было бы легче организовать с помощью календаря. Для этого можно определить шаблонизированное поле.

И, конечно, нужно изменить тип параметров.

Редактирование и удаления делаются точно так, как в GridView.

Метод Bind, в отличие от метода Eval, работает в обе стороны, то есть не только читает данные из источника данных, но и позволяет его обновлять.

Возможность вставки записей DetailsView позволяет расширить возможности работы с источниками данных в ASP .NET 2.0.
События DetailsView

У DetailsView имеются пары событий, которые происходят при связывании с данными, при переходе из режима просмотра в режим вставки, при перелистывании страницы.

В таблице Employees некоторые поля должны быть заполнены, у них стоит AllowNulls=false. Поэтому при работе нашей формы произойдет исключение, если попытаться вставить запись, не введя имя и фамилию. Чтобы избежать этого, во время обработки события ItemInserting нужно сделать проверку. Также обработаем событие ModeChanged, чтобы напомнить клиенту о его обязанностях. ))

Так как DetailsView1 все-таки таблица, ищем поля ввода в 0 и 1 строке в 1 столбце. Если там пусто, отменим вставку.

Программное управление DetailsView

Предположим, мы нашли табличное представление информации о работнике слишком скучным. Мы хотим написать список характеристик работников в виде связного текста, а в DetailsView оставить только координаты(адрес, телефон).

Характеристика пишется с помощью элемента Repeater. Внутри него находится DetailsView. Источник данных рипитера– таблица Employees, как и выше. А какой установить источник у DetailsView? Если таким же, то для всех записей будет выводится та же самая информация – из первой записи таблицы. Так что для каждой записи нужен свой источник, отфильтрованный в соответствии с EmployeeID.

Во время обработки события ItemCreated, когда данные еще не связаны, можно динамически связать DetailsView с данными.

Точно так же можно связать DetailsView с BulletedList, с DropDownList и другими.

Обобщая сказанное, можно сказать, что DetailsView – это не только вертикальная таблица с возможностью рассмотреть детали интересующей записи, но и возможность вставлять записи в таблицу, не создавая дополнительных элементов управления и не писать при этом большого количества кода.

windows explorer display all files in details view with «artists.. album. genre. rating». even the files are documents. how to change the default?

I use «Windows Vista».
Whenever I open «Windows Explore»—details view, the default setting is always «Name, Artists, Album, Genre, Rating», even when the folders are for documents or pdf files. I always want «size, date, file type. » kind of information. I can change the single folder to show «size, date..», but when I switched to other folder, it goes back to the default setting to be «name, artists. «.

Читайте также:  Microsoft com windows directx downloads

So how can I change the default viewing setting for windows explorer from «name, artists. » so I don’t need to change each folder every time I view it?

I tried «organize/properties» and even read a book about Vista, but could not find the setting.

Thank you for your reply. Once this options is available please try steps above.

When you right-click a folder and choose Properties, the Customize tab may be missing. The Customize tab lets you choose a Folder icon, Thumbnail image and set the Folder type of a folder.

Note that the system folders such as Windows, Program Files, My Documents, My Pictures, My Music do not have the customize tab. This is by design, and cannot be changed.

If the Customize tab is missing for each and every folder in the hard disk (non-system folders), follow these steps to get the Customize tab back.

To restore the customize tab for the normal folders (non-system folders), follow these steps:

  • Open Registry Editor and navigate to the following key:

HKEY_CLASSES_ROOT \ Directory \ shellex \ PropertySheetHandlers

  • Create a sub-key named
  • Close Registry Editor and restart Windows. If the Customize tab is still missing, navigate to this key:

HKEY_CURRENT_USER \ Software \ Microsoft \ Windows \ CurrentVersion \ Policies \ Explorer

HKEY_LOCAL_MACHINE \ Software \ Microsoft \ Windows \ CurrentVersion \ Policies \ Explorer

Set default in File Explorer to List View in Windows 10

Replies (53) 

* Please try a lower page number.

* Please enter only numbers.

* Please try a lower page number.

* Please enter only numbers.

12 people found this reply helpful

Was this reply helpful?

Sorry this didn’t help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

131 people found this reply helpful

Was this reply helpful?

Sorry this didn’t help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

I have tried some thing and it seems to work.

Go to the folder that you want, click on View, click on Preview pane then on List.

Then shut down File Explorer and restart.

Get back in and pick the folder in File Explorer and it should be in list view.

This works on each folder by it self. Other folders can be different.

27 people found this reply helpful

Was this reply helpful?

Sorry this didn’t help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

I appreciate the answer. I’ve done that about 10,000 times. Yes it may work the next time, but then for reasons I don’t understand, I’ll open up another folder or come back to that folder later and it will be back to the details view. It is very irritating. I have been using Microsoft OS since the DOS days. I’ve seen this problem for decades. I work at a computer all day and have been wasting my time on this for a long time. 🙁

Thanks anyway. It was kind of you to try to help.

67 people found this reply helpful

Was this reply helpful?

Sorry this didn’t help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How to use the File Explorer views in Windows 10 like a pro

One of the strengths of File Explorer is the number of different ways you can view the content of a folder on your Windows 10 PC. Whether it is a bare-bones listing of file names or a view that shows graphics in large-sized thumbnails, File Explorer makes it easy to see data in the layout you prefer. You can use your mouse, touchscreen, or shortcuts to change views and decide how your files and folders are displayed in Windows 10. In this tutorial, we explain the different views of File Explorer and how to use them like a pro in Windows 10:

About File Explorer views and how to access them in Windows 10

The views or layouts change the way files and folders appear in your active File Explorer window. This can be helpful if you want an overview of the items in a location or when you know a file is in a certain folder but have difficulties finding it.

To begin, open File Explorer. If you access the Views tab, it’s impossible to miss the gallery in the Layout section.

Читайте также:  Proxifier error windows network

The views are displayed in the Layout section of the View tab

Depending on the size of your File Explorer window, the views gallery can be compact, as you can see above, or expanded, as shown in the image below.

The expanded gallery in File Explorer

TIP: Hovering your mouse pointer over any gallery option shows a preview of that choice in the window below.

If the gallery is compact, you don’t have to maximize File Explorer to access all the available views. Use the top two arrows on the right to scroll through the options instead.

Use the arrows to go through the views

You can also click or tap the More arrow underneath to expand the gallery.

Press More to for other options to Change your view

This shows all the views available in Windows 10, regardless of File Explorer’s current size.

The views gallery expands

TIP: Learn what else the View tab has to offer in Windows 10 by reading about 10 ways to view files like a Pro in File Explorer.

Another way to reach the views is to right-click or press-and-hold on a free area within the File Explorer window. Then, in the subsequent contextual menu, click or tap on Views to see the same available layout options. A dot indicates which view is currently applied.

Access Views from the right-click menu

Regardless of how you access them, File Explorer provides eight ways to view the contents of a folder: Extra large icons, Large icons, Medium icons, Small icons, List, Details, Tiles, and Content.

The eight views in Windows 10’s File Explorer

Some of these layouts display thumbnails with the content of your items, while others show standard icons based on file types. The different views to preview files and folders are Extra large icons, Large icons, Medium icons, Tiles, and Content.

You can click or tap on the desired view to use it. Alternatively, find out more about the shortcuts for each layout from the following chapters of this guide, which also cover what each view does and how it can help your productivity in Windows 10.

NOTE: A folder’s default layout is determined by its view template, so it can also be modified by changing the folder’s view template in File Explorer. To learn more about different folder view templates and their layouts, read our tutorial about configuring the default templates to suit your preferences.

The Extra large icons view in File Explorer

If you’re wondering which view displays the gigantic icons of files and folders, the answer is “Extra large icons. Unsurprisingly, this layout offers the best previews of graphic and video files, and we recommended it when it comes to pictures, media files, and PowerPoint presentations. However, when it comes to other regular files, this view does not offer more data than the other icon size layouts.

The Extra large icons view displays gigantic previews

To access the “Extra large icons” view, use the keyboard shortcut Ctrl + Shift + 1.

The Large icons view in Windows 10’s File Explorer

One of the two default views in Windows 10, the Large icons layout is also useful to see your photos without having to open them. While its thumbnails are not as big as the ones you get with the previous option, they are larger compared to the other views, so this layout gives you a pretty clear picture of what’s inside your media files. When it comes to generic icons for items like PDF files and executables, enlarging them in File Explorer does not tell you any more than the smaller icons do.

File Explorer uses Large icons as its default view for media folders

Windows 10 also makes it easy to reach the Large icons view by showing a shortcut for it in the bottom-right corner of your File Explorer windows.

File Explorer displays by default a shortcut for Large icons

As you can also see in the image above, to display your files and folders in the Large icons view, you have to simultaneously press the following on your keyboard: Ctrl + Shift + 2.

NOTE: If you’re frequently using one of File Explorer’s large views, you can also change the folder icons in Windows 10 to avoid drowning in a sea of yellow. 🙂

The Medium icons layout in File Explorer

When you apply it in File Explorer, the Medium icons view gives you an idea about the contents of media items in a folder. However, its thumbnails are hardly big enough to distinguish among several similar graphics files, so you’re better off using the two previous layouts if you are trying to find a particular image or video. Due to its adequate size, the Medium icons view offers a good overview of the items within a folder, so we recommend it when you need to select multiple files in Windows 10.

The Medium icons layout is useful to manage multiple items

On your keyboard, simultaneously press Ctrl + Shift + 3 to use the Medium icons view.

Читайте также:  Как использовать windows anytime upgrade

The Small icons view in Windows 10

The last of the four icon size layouts in File Explorer, Small icons, is different from the other three. Not only are items displayed in columns, but there are no thumbnails shown in this view, and, instead, the icons next to your files are only representative of their type (Microsoft Word Document, PDF, executable, graphic file, etc.).

Small icons is the only icon size layout that does not show a preview

The keyboard shortcut to use the Small icons layout is Ctrl + Shift + 4.

TIP: If you’re wondering which view displays your files and folders as small icons, this layout is not the only one. The next two views we discuss, List and Details, are using the same size icons.

The List layout in Windows 10’s File Explorer

As you’d expect from its name, the List layout shows very little details, displaying your files and folders as small icons, which makes it nearly indistinguishable from the Small icons view. However, even if neither of them shows a preview of actual content, one way to tell them apart is by their columns, which are wider and don’t truncate item names in the List view. Also, like any list, you can read its entries from top to bottom, while the Small icons layout shows everything left to right.

List everything in your folder to thoroughly look through item names

You can use the List view with the keyboard shortcut Ctrl + Shift + 5.

The Details view in Windows 10

If you experiment with layouts when using File Explorer, which view provides the most information at a glance is obvious. While the previous options focused on either thumbnails or providing an overview to help you identify items faster, Details view displays each file and folder on a separate row, along with detailed information.

This default layout is easy to read, and its initial columns depend on the view template used, showing relevant data about the items in your active File Explorer window. That is why, despite every item showing a small icon, this view is used to view the detailed information about files and folders in Windows 10. The screenshot below shows the most common scenario, when the columns are Name, Date modified, Type, and Size.

See everything about your files with the Details view

If you need a fast way to see your items in the Details layout, you can click or tap on its shortcut, which is always shown in File Explorer’s lower-right corner.

A shortcut for Details is displayed by default in File Explorer

As also shown in the shortcut’s tooltip above, the Details view can also be accessed with the keyboard shortcut Ctrl + Shift + 6.

The main reason we use and recommend the Details layout, especially when working with many files at once, is that you can add more columns to it. On top of that, you can use this view in File Explorer to sort files by column heading or easily group and filter them based on the criteria you need. If you want to learn more, the Details view is heavily featured in our tutorial on How to sort, group, and filter files & folders in Windows 10’s File Explorer.

The Tiles layout in File Explorer

The Tiles view shows medium-sized icons for your items, as well as basic details. You can use it to display thumbnails and information about the type and size of your files. While not as detailed as the Content or Details views, the Tiles layout is a useful mix between Medium icons and Content.

Get basic information about your files with the Tiles view

You can apply the Tiles layout by pressing Ctrl + Shift + 7 simultaneously on your keyboard.

The Content view in Windows 10’s File Explorer

The Content view lists files and folders on separate rows, displaying, for each item, additional details like Type, Size, Date modified, Dimensions, or Authors. This layout is a mix between the Tiles and Details options, although its thumbnails are slightly smaller than those used by the Tiles view. If you wish to quickly check extra data about files when browsing with File Explorer, the Content view layout could be the best choice.

Use the Content view to quickly find information about the authors and content of your files

Predictably, the keyboard shortcut for the Content view is Ctrl + Shift + 8.

TIP: There are plenty of other things you can change about the way files and folders are displayed in Windows 10, and we included some of them in our article about 15 ways to improve File Explorer.

Which view(s) do you prefer and why?

The views in File Explorer help you change what data you see by taking charge of your layout options. Luckily, Windows 10 provides more than enough views to satisfy any user. We mostly use the Details, Content, and Large icons layouts. After reading this extensive guide, we’re curious about which view you prefer in File Explorer and why. Let us know in the comments below.

Оцените статью