M
Mike
Hi,
I am having problems with my program, the problem is it will not put
the datagrid into edit mode.
The .aspx page has the following code in it : -
<asp:datagrid id="DataGrid2" runat="server"
OnEditCommand="DEDR_Edit2"></asp:datagrid>
The columns for the datagrid are created dynamically (code for this on
request) including the column giving the user the option to Edit the
grid. When the user clicks "edit" the page refreshes i.e post backs
but the user cannot edit the data, no text boxs. The EditTemplate is
not activated.
Using Visual Studio I have put a break point in the function which is
in the .aspx.cs file.
protected void DEDR_Edit2(object sender, DataGridCommandEventArgs e)
{
DataGrid2.EditItemIndex = Convert.ToInt32(e.Item.ItemIndex);
DataGrid2.DataSource = dsRota.Tables["dtRota_Display"];
DataGrid2.DataBind();
}
and it does not execute this code. This explains why there it does
not go into edit mode. But why is it not going into this function? If
I exclude it from the code, the compiler has a moan about not finding
DEDR_Edit2! So it knows it is there!
Please help!
Mike
I am having problems with my program, the problem is it will not put
the datagrid into edit mode.
The .aspx page has the following code in it : -
<asp:datagrid id="DataGrid2" runat="server"
OnEditCommand="DEDR_Edit2"></asp:datagrid>
The columns for the datagrid are created dynamically (code for this on
request) including the column giving the user the option to Edit the
grid. When the user clicks "edit" the page refreshes i.e post backs
but the user cannot edit the data, no text boxs. The EditTemplate is
not activated.
Using Visual Studio I have put a break point in the function which is
in the .aspx.cs file.
protected void DEDR_Edit2(object sender, DataGridCommandEventArgs e)
{
DataGrid2.EditItemIndex = Convert.ToInt32(e.Item.ItemIndex);
DataGrid2.DataSource = dsRota.Tables["dtRota_Display"];
DataGrid2.DataBind();
}
and it does not execute this code. This explains why there it does
not go into edit mode. But why is it not going into this function? If
I exclude it from the code, the compiler has a moan about not finding
DEDR_Edit2! So it knows it is there!
Please help!
Mike