473,569 Members | 2,557 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Dynamically created Datgrid will not enter Edit Mode!

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(obje ct sender, DataGridCommand EventArgs e)
{
DataGrid2.EditI temIndex = Convert.ToInt32 (e.Item.ItemInd ex);
DataGrid2.DataS ource = dsRota.Tables["dtRota_Display "];
DataGrid2.DataB ind();
}

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
Nov 18 '05 #1
0 1113

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
1452
by: Wee Bubba | last post by:
the lower part of my page consists of a dataList along with other server controls and HTML markup. this is my data display section. the upper part of my page is a data entry section. what I want to do is give the user the option of displaying the data below OR NOT. i.e. I am hoping that if they choose NOT to display the data in the lower...
2
3736
by: Dave | last post by:
Hi, I'm building a maintenance form for a table and some of the fields are textboxes (i.e name) and some should be dropdowns (i.e country of origin) When a user clicks 'Edit' in the <asp:EditCommandColumn> I want either a textbox or dropdown to appear when I check what is being edited. I thought I could create the dropdown on the fly...
2
1871
by: mwhalen | last post by:
Hi All, I've dynmaically created a textbox, but I can't edit it. When I click on it, the cursor flashes for a second, but then goes away and I can't enter any text or do anything with the value in the box. Here's the code I've used to create the control. It's within a datagrid that is bound to a dataTable so the action happens in the...
1
4489
by: dx | last post by:
I'm extremely frustrated with ASP.NET...again! To me this should be as simple as setting oCheckBox.Checked = True.. yet for some reason it isn't. I have a user control (ascx) that that has a checkbox and I can't get it to default to checked. I tried radiobuttons and experienced the same result.. can't start them as checked. The really...
2
10281
by: sck10 | last post by:
Hello, I am trying to programically make the following TemplateField ("MyTemplate") visible when the user clicks on the "Edit" Button using the PreRender handle event. My question is, how do you reference the properties of a particular TemplateField? For example: Protected Sub dvDetail_PreRender(ByVal sender As Object, ByVal e As...
0
1338
by: news.zen.co.uk | last post by:
Hi Guys, Using VB .NET 2003 and ASP1.1, I have a Datagrid embedded in an ASP page. In the processing of the ItemDataBound event I dynamically create a new Datagrid control within the Cell of the Parent (this refelect GUI'wise a Parent Child related data). I also add Handlers to the sub datagrid using AddHandler to handle the EditCommandColumn...
0
1277
by: Paul | last post by:
I'm trying to create a FormView dynamically. I've created Itemplate classes for Edit and Item templates and I can get either to work when I set the default mode. But I can't get it to switch from Item to Edit mode. I've implemented OnModeChanging which is showing the proper mode, but ModeChanged never gets tripped. Any ideas or help?
0
1096
by: Iain | last post by:
Hi All I have a datagrid which takes it's data from a table on a remote i-series. This datagrid is loaded on Page Load and the user is able to select a record to edit by pressing the appropriate button. No problem so far. The problem comes in that I appear to have to reload the data into the datagrid before placing it into editstate.
17
5534
by: cygsoft | last post by:
Hi I have created a dynamic row and inserted the values into the cells of those rows from textboxes. Now I have to edit those values stored in the rows. At the end of each row created dynamically two buttons namely "Edit" and "Delete" are present. If I click the "Edit" button the values in that particular cells should go back to the textboxes...
0
7614
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7924
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8125
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
5513
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5219
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3653
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3642
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2114
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1221
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.