Click here to Skip to main content
15,936,677 members
Please Sign up or sign in to vote.
2.00/5 (1 vote)
See more:
I want to Insert rows into a column of Listview control Like Name Column Contains a,b,c,d and and 'a' like color red,green,yellow,white

Name Like Color
a red
b white
c yellow
a yellow
a yellow
b red
d white
c red
a white

then i want to show in list view like
Like Color Name
red a,c,b
yellow a,c
White a,d,b

then suggest for this type of View in List View Control the Data Comes From Database

thanks in Advance

<br />
            listView1 .Columns.Add("Addres....", 100); <br />
           <br />
            listView1.Columns.Add("Sino", 100);<br />
            listView1.Columns.Add("name", 100);           <br />
           <br />
             listView1.Items.Add("colorapply");       <br />
           <br />
      <br />
<br />
               listView1.Items.Add("first");<br />
                listView1.Items[1].SubItems[0].Text = "a";              <br />
                listView1.Items[1].SubItems[0].BackColor = Color.Red;<br />
                listView1.Items.Add("second");<br />
                listView1.Items[2].SubItems[0].Text = "b";<br />
                listView1.Items[2].SubItems[0].BackColor = Color.Blue ;<br />
                listView1.Items.Add("three");<br />
                listView1.Items[3].SubItems[0].Text = "c";<br />
                listView1.Items[3].SubItems[0].BackColor = Color.Brown  ;<br />
Share this answer
Follow this Link and do some modification according to ur requirements[^]
Share this answer
Rupa1 8-Dec-10 7:45am    
how can we display color in that

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