M
MattB
Hello I am trying to put a Datagrid which is in a web user control into
edit mode from the parent page.
Basically I am doing this...
in parent.aspx.cs
myNameSpace.WebUserCtl wuc = (WebUserCtl)Page.FindControl("WebUserCtl");
wuc.SetEditItem();
in WebUserCtl.ascx.cs
public void SetEditItem()
{
DataGrid1.EditItemIndex = 0;
BindGrid();
}
I always set it to 0 as I just want to edit the first item, this should work no?
Thanks ahead for any tips, hints, cheats, or plain outright hacks
Matt
edit mode from the parent page.
Basically I am doing this...
in parent.aspx.cs
myNameSpace.WebUserCtl wuc = (WebUserCtl)Page.FindControl("WebUserCtl");
wuc.SetEditItem();
in WebUserCtl.ascx.cs
public void SetEditItem()
{
DataGrid1.EditItemIndex = 0;
BindGrid();
}
I always set it to 0 as I just want to edit the first item, this should work no?
Thanks ahead for any tips, hints, cheats, or plain outright hacks
Matt