|
| 1 | +The DataList component is meant to emulate the asp:DataList control in markup and is defined in the [System.Web.UI.WebControls.DataList class](https://docs.microsoft.com/en-us/dotnet/api/system.web.ui.webcontrols.datalist?view=netframework-4.8) |
| 2 | + |
| 3 | +## Features supported in Blazor |
| 4 | + |
| 5 | +- Flow Layout |
| 6 | + - Empty List |
| 7 | + - FooterStyle |
| 8 | + - FooterTemplate |
| 9 | + - HeaderStyle |
| 10 | + - HeaderTemplate |
| 11 | + - Tooltip |
| 12 | + - Single Column |
| 13 | + - Table Layout |
| 14 | + - Accessible Headers |
| 15 | + - Empty List |
| 16 | + - FooterStyle |
| 17 | + - FooterTemplate |
| 18 | + - HeaderStyle |
| 19 | + - HeaderTemplate |
| 20 | + - Tooltip |
| 21 | + - Single Column |
| 22 | + - Tooltip |
| 23 | + |
| 24 | +## Usage Notes |
| 25 | + |
| 26 | +- The following Web Forms features are ignored |
| 27 | + - `runat="server"` |
| 28 | + - `EnableViewState` |
| 29 | +- `ID` should be converted to `@ref` if the component is referenced in code |
| 30 | +- `ItemType` MUST be defined as an attribute |
| 31 | +- `Context` should be used to define the object used in templates. If not defined, the default `<INSERT>` will be available. |
| 32 | + |
| 33 | +## Web Forms Declarative Syntax |
| 34 | + |
| 35 | +```html |
| 36 | +<asp:DataList |
| 37 | + AccessKey="string" |
| 38 | + BackColor="color name|#dddddd" |
| 39 | + BorderColor="color name|#dddddd" |
| 40 | + BorderStyle="NotSet|None|Dotted|Dashed|Solid|Double|Groove|Ridge| |
| 41 | + Inset|Outset" |
| 42 | + BorderWidth="size" |
| 43 | + Caption="string" |
| 44 | + CaptionAlign="NotSet|Top|Bottom|Left|Right" |
| 45 | + CellPadding="integer" |
| 46 | + CellSpacing="integer" |
| 47 | + CssClass="string" |
| 48 | + DataKeyField="string" |
| 49 | + DataMember="string" |
| 50 | + DataSource="string" |
| 51 | + DataSourceID="string" |
| 52 | + EditItemIndex="integer" |
| 53 | + Enabled="True|False" |
| 54 | + EnableTheming="True|False" |
| 55 | + EnableViewState="True|False" |
| 56 | + ExtractTemplateRows="True|False" |
| 57 | + Font-Bold="True|False" |
| 58 | + Font-Italic="True|False" |
| 59 | + Font-Names="string" |
| 60 | + Font-Overline="True|False" |
| 61 | + Font-Size="string|Smaller|Larger|XX-Small|X-Small|Small|Medium| |
| 62 | + Large|X-Large|XX-Large" |
| 63 | + Font-Strikeout="True|False" |
| 64 | + Font-Underline="True|False" |
| 65 | + ForeColor="color name|#dddddd" |
| 66 | + GridLines="None|Horizontal|Vertical|Both" |
| 67 | + Height="size" |
| 68 | + HorizontalAlign="NotSet|Left|Center|Right|Justify" |
| 69 | + ID="string" |
| 70 | + OnCancelCommand="CancelCommand event handler" |
| 71 | + OnDataBinding="DataBinding event handler" |
| 72 | + OnDeleteCommand="DeleteCommand event handler" |
| 73 | + OnDisposed="Disposed event handler" |
| 74 | + OnEditCommand="EditCommand event handler" |
| 75 | + OnInit="Init event handler" |
| 76 | + OnItemCommand="ItemCommand event handler" |
| 77 | + OnItemCreated="ItemCreated event handler" |
| 78 | + OnItemDataBound="ItemDataBound event handler" |
| 79 | + OnLoad="Load event handler" |
| 80 | + OnPreRender="PreRender event handler" |
| 81 | + OnSelectedIndexChanged="SelectedIndexChanged event handler" |
| 82 | + OnUnload="Unload event handler" |
| 83 | + OnUpdateCommand="UpdateCommand event handler" |
| 84 | + RepeatColumns="integer" |
| 85 | + RepeatDirection="Horizontal|Vertical" |
| 86 | + RepeatLayout="Table|Flow" |
| 87 | + runat="server" |
| 88 | + SelectedIndex="integer" |
| 89 | + ShowFooter="True|False" |
| 90 | + ShowHeader="True|False" |
| 91 | + SkinID="string" |
| 92 | + Style="string" |
| 93 | + TabIndex="integer" |
| 94 | + ToolTip="string" |
| 95 | + UseAccessibleHeader="True|False" |
| 96 | + Visible="True|False" |
| 97 | + Width="size" |
| 98 | +> |
| 99 | + <AlternatingItemStyle /> |
| 100 | + <AlternatingItemTemplate> |
| 101 | + <!-- child controls --> |
| 102 | + </AlternatingItemTemplate> |
| 103 | + <EditItemStyle /> |
| 104 | + <EditItemTemplate> |
| 105 | + <!-- child controls --> |
| 106 | + </EditItemTemplate> |
| 107 | + <FooterStyle /> |
| 108 | + <FooterTemplate> |
| 109 | + <!-- child controls --> |
| 110 | + </FooterTemplate> |
| 111 | + <HeaderStyle /> |
| 112 | + <HeaderTemplate> |
| 113 | + <!-- child controls --> |
| 114 | + </HeaderTemplate> |
| 115 | + <ItemStyle /> |
| 116 | + <ItemTemplate> |
| 117 | + <!-- child controls --> |
| 118 | + </ItemTemplate> |
| 119 | + <SelectedItemStyle /> |
| 120 | + <SelectedItemTemplate> |
| 121 | + <!-- child controls --> |
| 122 | + </SelectedItemTemplate> |
| 123 | + <SeparatorStyle /> |
| 124 | + <SeparatorTemplate> |
| 125 | + <!-- child controls --> |
| 126 | + </SeparatorTemplate> |
| 127 | +</asp:DataList> |
| 128 | +``` |
| 129 | + |
| 130 | +## Blazor Syntax |
0 commit comments