GridView DataBind, Adds an extra row to the gridview.
-
Hi all, I am trying to bind a datatable to a Gridview, In each row i add a usercontrol, The table has 8 rows, The problem is when i call the GridView.Databind() method, and extra row is added to the gridview i.e. the gridview displays 9 rows on the page. What could be the cause of this?
Thanks & Regards, Pramod "Everyone is a genius at least once a year"
-
Hi all, I am trying to bind a datatable to a Gridview, In each row i add a usercontrol, The table has 8 rows, The problem is when i call the GridView.Databind() method, and extra row is added to the gridview i.e. the gridview displays 9 rows on the page. What could be the cause of this?
Thanks & Regards, Pramod "Everyone is a genius at least once a year"
AB7771 wrote:
In each row i add a usercontrol,
To where you are adding this? To a new column? Hard to give suggestions without seeing the code.
Navaneeth How to use google | Ask smart questions
-
AB7771 wrote:
In each row i add a usercontrol,
To where you are adding this? To a new column? Hard to give suggestions without seeing the code.
Navaneeth How to use google | Ask smart questions
I am binding a dataset to a Gridview. Gridview1.DataSource = dtTable; GridView1.DataBind(); And in the GridView1_RowCreated() method I add the usercontrol for each row. TableCell cell = new TableCell(); e.row.cells[0].Add(LoadControl("~/Usercontrol1.ascx")); Hope that clears it.
Thanks & Regards, Pramod "Everyone is a genius at least once a year"