Hello
Please give me a Hint.
I am migrating code from ListViewItem item = new ListViewItem("Apple"); to ListViewDataItem item = new ListViewDataItem(Apple);.
However, code ListViewDataItem is not being migrated.
The end goal is list.Items.Add(item); to be.
I am trying so far to try to solve the problem.
However, it is not resolved.
Please give me a Hint.
Please give me a Hint.
I am migrating code from ListViewItem item = new ListViewItem("Apple"); to ListViewDataItem item = new ListViewDataItem(Apple);.
However, code ListViewDataItem is not being migrated.
The end goal is list.Items.Add(item); to be.
I am trying so far to try to solve the problem.
However, it is not resolved.
Please give me a Hint.
C#:
ListViewItem item = new ListViewItem("Apple");
item.SubItems.Add("Banana");
list.Items.Add(item);
C#:
<asp:ListView ID="list" runat="server" Visible ="true">
<LayoutTemplate>
<table>
<tr>
<th>Apple</th>
<th>Banana</th>
</tr>
</table>
</LayoutTemplate>
<ItemTemplate>
<tr>
<td>
<asp:Label ID="ORDER_ID" Text='<%#Eval("ORDER_ID") %>' runat="server"></asp:Label></td>
<td>
<asp:Label ID="ORDER_ID1" Text='<%#Eval("ORDER_ID1") %>' runat="server"></asp:Label></td>
</tr>
</ItemTemplate>
</asp:ListView>
Last edited by a moderator: