Меня смущают повторители! Независимо от того, пробую ли я список или таблицу, я получаю только размер таблицы 1 при итерации по данным («По умолчанию»):
@foreach(var cont in AsDynamic(Data["Default"])){
Если я захожу в Content.Toolbar, второй набор значков включает в себя + и -, которые, кажется, устанавливают количество отображаемых строк, 2 или 3 иногда работают, но раньше, чем позже я получаю повторение одной записи, хотя есть только 1 из этих данных в таблице Content-Data. Хммм.
Вот что я вижу, таблица с повторяющимися строками: (Извините, я не могу опубликовать более двух изображений, так как у меня пока нет репутации в Stackflow.)
Number Status Priority Title Life Property Address Eye Witness Name Eye Witness Contact Time Assigned To Description Entered at Modified Outcome Mapping
Number Status Priority Title Life Property Address Eye Witness Name Eye Witness Contact Time Assigned To Description Entered at Modified Outcome Mapping
1188 0 - New (Unassigned) 0 - New (Unassigned) Ranting Hippies taking over Island Center Forest LIFE! Property! 100 Vashon Way, Vashon, WA 98070 Sally Suzie 567-1000 6/6/2016 10:00:00 PM Community Operations Section
Reports are coming in that unruly hippies are taking over the land immediately north of the transfer station.
6/7/2016 12:01:13 AM Map it!
1188 0 - New (Unassigned) 0 - New (Unassigned) Ranting Hippies taking over Island Center Forest LIFE! Property! 100 Vashon Way, Vashon, WA 98070 Sally Suzie 567-1000 6/6/2016 10:00:00 PM Community Operations Section
Reports are coming in that unruly hippies are taking over the land immediately north of the transfer station.
6/7/2016 12:01:13 AM Map it!
1188 0 - New (Unassigned) 0 - New (Unassigned) Ranting Hippies taking over Island Center Forest LIFE! Property! 100 Vashon Way, Vashon, WA 98070 Sally Suzie 567-1000 6/6/2016 10:00:00 PM Community Operations Section
Reports are coming in that unruly hippies are taking over the land immediately north of the transfer station.
6/7/2016 12:01:13 AM Map it!
1188 0 - New (Unassigned) 0 - New (Unassigned) Ranting Hippies taking over Island Center Forest LIFE! Property! 100 Vashon Way, Vashon, WA 98070 Sally Suzie 567-1000 6/6/2016 10:00:00 PM Community Operations Section
Reports are coming in that unruly hippies are taking over the land immediately north of the transfer station.
6/7/2016 12:01:13 AM Map it!
1188 0 - New (Unassigned) 0 - New (Unassigned) Ranting Hippies taking over Island Center Forest LIFE! Property! 100 Vashon Way, Vashon, WA 98070 Sally Suzie 567-1000 6/6/2016 10:00:00 PM Community Operations Section
Reports are coming in that unruly hippies are taking over the land immediately north of the transfer station.
6/7/2016 12:01:13 AM Map it!
Here's the Template
<!-- Table View of Incident Log Entries -->
<div>@Edit.Toolbar(actions: "new", contentType: "Incidents")</div>
<div style="overflow-x:auto;">
<table>
<thead>
<tr>
<td>Number</td>
<td>Status</td>
<td>Priority</td>
<td>Title</td>
<td>Life</td>
<td>Property</td>
<td>Address</td>
<td>Eye Witness Name</td>
<td>Eye Witness Contact</td>
<td>Time</td>
<td>Assigned To</td>
<td>Description</td>
<td>Entered at</td>
<td>Modified</td>
<td>Outcome</td>
<td>Mapping</td>
</tr>
</thead>
<tfoot>
<tr>
<td>Number</td>
<td>Status</td>
<td>Priority</td>
<td>Title</td>
<td>Life</td>
<td>Property</td>
<td>Address</td>
<td>Eye Witness Name</td>
<td>Eye Witness Contact</td>
<td>Time</td>
<td>Assigned To</td>
<td>Description</td>
<td>Entered at</td>
<td>Modified</td>
<td>Outcome</td>
<td>Mapping</td>
</tr>
</tfoot>
<tbody>
@foreach(var cont in AsDynamic(Data["Default"])){
@:<tr class="sc-element sexy-table-row [email protected]">
@:<td>@cont.EntityId</td>
@:<td>@cont.Status</td>
@:<td>@cont.Priority</td>
@:<td>@cont.Title</td>
@:<td>
if (cont.Life) {
@:<span style="color:red;"> LIFE! </span>
}
@:</td>
@:<td>
if (cont.Property) {
@:<span style="color:orange;"> Property! </span>
}
@:</td>
@:<td>@cont.Address</td>
@:<td>@cont.EyeWitnessName</td>
@:<td>@cont.EyeWitnessContact</td>
@:<td>@cont.IncidentTime</td>
@:<td>@cont.AssignedTo</td>
@:<td>@Html.Raw(cont.Description)</td>
@:<td></td>
@:<td>@cont.Modified</td>
@:<td>@Html.Raw(cont.Outcome)</td>
@:<td>@cont.Mapping</td>
@:</tr>
}
</tbody>
</table>
</div>
</br>
@Content.Toolbar
</br>
Вот конфигурация шаблона:
Вот таблица Content-Data (в которой, как я заметил, нет повторяющихся строк!!!)
Кроме того, как только я получаю достаточно отображаемых строк (мне нужно вручную добавлять каждую строку или элемент списка, который я хочу?), мне нужно выяснить пейджинг. Единственный вариант, который я видел, — через виджет подкачки, доступный через конвейер данных, верно?! Я еще не видел примеров с пейджингом.
Это действительно мило, и я постараюсь помочь добавить в документацию, так как есть еще пара дыр (;->)
- j