Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > Dynamically created Datgrid will not enter Edit Mode!

Reply
Thread Tools

Dynamically created Datgrid will not enter Edit Mode!

 
 
Mike
Guest
Posts: n/a
 
      01-13-2004
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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Affecting a dynamically created drop down from another dynamically created drop down. msimmons ASP .Net 0 07-16-2009 03:17 PM
Edit a record in a datgrid : Having to reload the data Iain ASP .Net 0 01-10-2007 01:26 PM
capturing from text area Shft+Enter, Control+Enter, Alt+Enter and browser issue. HopfZ Javascript 0 08-28-2006 10:11 AM
Managing ViewState of a dynamically created Custom Composite Server Control -(where the original is also dynamically created) dickster ASP .Net Building Controls 0 12-08-2005 09:32 AM
Dynamically created Datgrid will not enter Edit Mode! Mike ASP .Net 0 01-13-2004 06:00 PM



Advertisments