Click here to Skip to main content
15,886,806 members
Please Sign up or sign in to vote.
1.67/5 (3 votes)
See more:
how to pass values from textbox into listview click buttons in windows application in C#
Posted

Suppose ur ListView is in the form of Details, now try this:
ListViewItem itme = new ListViewItem();
               itme.SubItems.Clear();
               item.Text ="Your Value1";
               itme.SubItems.Add("Your Sub Value1");
 ListView1.Items.Add(itme);
 
Share this answer
 
try this hope its help you

C#
private void button1_Click(object sender, EventArgs e)
        {
            ListViewItem li = new ListViewItem();
            li.Text = textBox1.Text;
            this.listView1.Items.AddRange(new System.Windows.Forms.ListViewItem[] {li
            });
        }
 
Share this answer
 
Comments
krishna97 27-Jul-13 6:30am    
sir how can fill row wise value in button clik event in show in listview in c#
krishna97 27-Jul-13 6:32am    
sir this code only colum wise but i am click the button data insert in row wise

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