Gridview inside gridview problem

  • Thread starter Thread starter Vik
  • Start date Start date
V

Vik

I have a gridview inside a gridview.The child gridview has a SQLDataSource
with one parameter. I assign a value to this parameter in a RowDataBound
event procedure of the parent gridview:
string strIncID = ((LinkButton)e.Row.Cells[0].Controls[1]).Text;
sdsPersonExtV.SelectParameters["IncidentID"].DefaultValue = strIncID;

When debugging, I see that the parameter gets the correct values for every
row. When a page is displayed, the child gridview has the same values in all
the rows of the parent gridview. These values correspond to the last row of
the parent gridview.

What is wrong here?

Thanks.

Victor
 
The problem was that the SQLDataSource was placed outside of the gridview.
It should be in the same template as the child gridview.

Another problem now is that I cannot set the width of the columns for the
child gridview. The columns have the different widths in the different rows.

Thanks.

Victor
 
Back
Top