Error :The DetailsView "dv" fired event ModeChanging which wasn"t handled.
am 30.01.2008 00:29:00 von naijacoderI can't get the Detailview in GridView to change to EditMode i keep getting
error :
:The DetailsView 'dv' fired event ModeChanging which wasn't handled.
In the ModeChanging event below i looked for the Detailview and added the
changeMode but still doesn't work
protected void dv_ModeChanging(object sender, DetailsViewModeEventArgs e)
{
if (e.NewMode == DetailsViewMode.Edit)
{
DetailsView gv = new DetailsView();
gv = (DetailsView)this.GridView1.FindControl("dv");
gv.ChangeMode(DetailsViewMode.Edit);
}
}
I have a DetailView dv in a GridView GridView1 template like so :
style="display:none;position:relative;left:15px;OVERFLOW: auto;WIDTH:97%" >
OnModeChanging="dv_ModeChanging">
Any ideas what 'm doing wrong?
Thanks in advance.