Error in EditTemplate

P

PawelR

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.DataGridCommandEventHandler(object,
System.Web.UI.WebControls.DataGridCommandEventArgs)'

What I must change in my code.

Thanx
PawelR
 
P

Patrick Olurotimi Ige

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top