P
paulhux174
I have an inner and outter grids, I'm setting the inner Grid's
SqlDataSource SelectParameters depending on the outter Grids data -
This works.
when I call insert (using all default Grid functionality - no code)
using the 'insert' button the Grid creates,
the insert default parameter is lost (or over written). I'm not showing
the parameter ( or bound column) in the Grid's InsertItemTemplate .
protected void GV_OnRowDataBound(object sender, GridViewRowEventArgs
e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
SqlDataSource s =
(SqlDataSource)e.Row.FindControl("SqlDataSource2");
s.SelectParameters[0].DefaultValue = e.Row.Cells[0].Text;
s.InsertParameters[0].DefaultValue = e.Row.Cells[0].Text;
// ****** store the default value now seams to work
}
}
SqlDataSource SelectParameters depending on the outter Grids data -
This works.
when I call insert (using all default Grid functionality - no code)
using the 'insert' button the Grid creates,
the insert default parameter is lost (or over written). I'm not showing
the parameter ( or bound column) in the Grid's InsertItemTemplate .
protected void GV_OnRowDataBound(object sender, GridViewRowEventArgs
e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
SqlDataSource s =
(SqlDataSource)e.Row.FindControl("SqlDataSource2");
s.SelectParameters[0].DefaultValue = e.Row.Cells[0].Text;
s.InsertParameters[0].DefaultValue = e.Row.Cells[0].Text;
// ****** store the default value now seams to work
}
}