0
Answer

Add Controls To ListView

mahesh waghela

mahesh waghela

12y
1.4k
1

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?.