Are you keeping state on the DataGrid? If not, you need to specify
DataGrid1.DataSource with something before your DataGrid1.DataBind()
call.

HTH

Jay

-----Original Message-----
From: dotnet discussion [mailto:[EMAIL PROTECTED]] On Behalf Of
Marina
Sent: Friday, April 12, 2002 4:04 PM
To: [EMAIL PROTECTED]
Subject: [DOTNET] DataGrid

Hi All,

This is probably something simple, but I can't get the DataGrid on my
WebForm to allow editing. I have the Edit/Update/Delete column, and I
have the event handler for EditCommand event defined. But whenever any
of the Edit buttong are clicked, the page refreshes with an empty
DataGrid - the row I want to edit isn't there. Here is the event
handler:

Private Sub DataGrid1_EditCommand(ByVal source As Object, ByVal e As
System.Web.UI.WebControls.DataGridCommandEventArgs) Handles
DataGrid1.EditCommand

DataGrid1.EditItemIndex = e.Item.ItemIndex

DataGrid1.DataBind()

End Sub



Please help,

Marina

You can read messages from the DOTNET archive, unsubscribe from DOTNET,
or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

Reply via email to