mahesh waghela

mahesh waghela

  • NA
  • 32
  • 31.8k

Add Controls To ListView

May 22 2012 11:47 AM

The Listview is Databound by Sql Table and am trying to add controls like textbox on Listview as below:

listviewBinding();
TextBox tb = new TextBox();
tb
.BackColor = Color.Red;
tb
.Text = "To Balance B/f";
tb
.Width = listView1.Width;
listView1
.Controls.Add(tb);
listView1
.HeaderStyle = ColumnHeaderStyle.None;

The problem is that the top row is miss sizes and hence we can't able to read it properly. What is the solution for it?.