Ahh thank you, but there is one. I use VS 2003 and i generated one by double
clicking in the datagrids event list (properties)
I also added the event trigger manually just i case, but still nothing. So i
am a lil confused now. I added the Delete button using the datagrid Property
Builder.
Best regards
Trond
"Elton W" <El****@discussions.microsoft.com> wrote in message
news:94**********************************@microsof t.com...
Hi Trond,
You should have an event trigger in InitializeComponent:
dgMessages.DeleteCommand += new
DataGridCommandEventHandler(dgMessages_DeleteComma nd);
HTH
Elton Wang
el********@hotmail.com
"Trond" wrote:
I added a delete button to a datagrid. I also added an event:
private void dgMessages_DeleteCommand(object source,
System.Web.UI.WebControls.DataGridCommandEventArgs e)
I added this to event:
Label1.Text=dgMessages.DataKeys[e.Item.ItemIndex].ToString();
but the label is not set to the DataKey.
I set a breakpoint in it but nada. It appears to me that the datagrid
is
not firing the event.
What is it that i am missing?
Best regards
Trond