473,324 Members | 1,646 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

Error in EditTemplate

Hello group,
I'm new in asp.net and have one question about edit value in dataGrid.

In my project I have file Mod.aspx with:

<P><asp:datagrid id="dgRabaty" runat="server" AutoGenerateColumns="False"
OnEditCommand="rabatEdit" OnUpdateCommand="rabatUpdate"
OnDeleteCommand="rabatDelete" OnCancelCommand="rabatCancel">
<Columns>
<asp:TemplateColumn HeaderText="Xenta/Vista">
<HeaderStyle Font-Size="X-Small" Font-Names="Tahoma" Font-Bold="True"
HorizontalAlign="Center"
BackColor="#FFCC33"></HeaderStyle>
<ItemStyle Font-Size="X-Small" Font-Names="Tahoma"
HorizontalAlign="Center" BackColor="#FFFF99"></ItemStyle>
<ItemTemplate>
<asp:Label id=Label2 runat="server" Text='<%# DataBinder.Eval(Container,
"DataItem.xenta") %>'>
</asp:Label>
</ItemTemplate>
etc.

And i file Mod.aspx.cs I have definition function:

public void rabatEdit(Object sender, DataGridItemEventArgs e)
{ ...}
public void rabatDelete(Object sender, DataGridItemEventArgs e)
{ ...}
public void rabatCancel(Object sender, DataGridItemEventArgs e)
{ ...}
public void rabatUpdate(Object sender, DataGridItemEventArgs e)
{ ...}

This project compile corect but in runtime I have:

Compiler Error Message: CS0123: Method 'TACerp.NewMod.rabatEdit(object,
System.Web.UI.WebControls.DataGridItemEventArgs)' does not match delegate
'void System.Web.UI.WebControls.DataGridCommandEventHand ler(object,
System.Web.UI.WebControls.DataGridCommandEventArgs )'

What I must change in my code.

Thanx
PawelR
Nov 19 '05 #1
1 1024
Pawelku:) can you post your full
public void rabatEdit(Object sender, DataGridItemEventArgs e)
{ ...}
public void rabatDelete(Object sender, DataGridItemEventArgs e)
{ ...}
public void rabatCancel(Object sender, DataGridItemEventArgs e)
{ ...}
public void rabatUpdate(Object sender, DataGridItemEventArgs e)
{ ...}
U must be missing something in ur EventArg.
Pozdrawiam..
Patrick
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 19 '05 #2

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

Similar topics

13
by: deko | last post by:
I use this convention frequently: Exit_Here: Exit Sub HandleErr: Select Case Err.Number Case 3163 Resume Next Case 3376 Resume Next
7
by: p | last post by:
WE had a Crystal 8 WebApp using vs 2002 which we upgraded to VS2003. I also have Crystal 9 pro on my development machine. The web app runs fine on my dev machine but am having problems deploying....
2
by: Yan Wang | last post by:
I can populate the dropdown box in a edittemplate correctly. I can even have the dropdown preselect the correct value returned from my database. However, I cannot capture the selected value when I...
10
by: Nathan Sokalski | last post by:
I have a DataList control with an EditTemplate. Three of the controls in this template include a Calendar, a Button with CommandName="update", and a Button with CommandName="cancel". Whenever I...
0
by: Stanley Cheung | last post by:
Dear all, i put a datalist into a user control and then apply the itemtemplate & ediiTemplate inside, i use dgXXX.itemcommand to get the commandname from button the problem is the content of...
0
by: JDC | last post by:
Hi all, I have a template column in a GridView, in which the EditTemplate consists of three drop-down lists. When an item is chosen in the first combo, I want the page to refresh and populate...
0
by: webmaster | last post by:
I've been playing around with asp.net 2.0/vs.net 2005/C# 2005 - I had a few noob questions. 1. Is there a setting that sets all current and future controls on a page to position absolutely...
1
by: Aamir Ghanchi | last post by:
Like thr subject line says. I get no intellisense in VS 2005 as well as get the compilation message "The name 'ddlCourse1' does not exist in the current context". Is there a way to have access to...
0
by: =?Utf-8?B?U2F2dm91bGlkaXMgSW9yZGFuaXM=?= | last post by:
How can I display a different control for my in my table, inside an ItemTemplate or EditTemplate, depending on the value of another column, the , which has values like 'STRING', 'INTEGER', ...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.