Click here to Skip to main content
15,746,302 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello everybody,
I have trouble with my project, which writen by WPF.Can you help me? Please!!
I have a listview, it show data in mysql. It has done. But i want add tag for each item. I tried but i dont make it.
Can you give me a solution of trouble? Thank you so much.

What I have tried:

this is code in xaml.
<<GridViewColumn Header="name" DisplayMemberBinding="{Binding name_nv}"/>
<<GridViewColumn Header="IP" DisplayMemberBinding="{Binding ip_thuchien}"/>
<<GridViewColumn Header="stt" DisplayMemberBinding="{Binding repeat}"/>
I show data :
list_nvu.ItemsSource = CMD_readIP.Show_ListIP().DefaultView;
And i tried
list_nvu.Items.Add(new System.Windows.Controls.ListViewItem() { Content =listitem_IP, Tag = "x" });
But it dont work as i want.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900