J
Jim McGivney
I am using a Microsoft Book as a guide and trying to construct a Delete
Command Event Handler for a DataGrid.
The book lists the statement:
PublisherDataSet1.publishers.Rows.(e.Item.ItemIndex).Delete();
I try to follow the example. My code is:
private void DataGrid1_DeleteCommand(object source,
System.Web.UI.WebControls.DataGridCommandEventArgs e)
{
DataSet3.Ante.Rows.Item(e.Item.ItemIndex).Delete();
sqlDataAdapter1.Update(dataSet31);
DataGrid1.DataSource=dataSet31.Ante.DefaultView;
DataGrid1.EditItemIndex=-1;
DataGrid1.DataBind();
}
When I Build, I get the error message: System.Data.DataRowCollection does
not contain a definition for 'Item"
Any suggestions as to what I am doing wrong would be appreciated
Thanks,
Jim
Command Event Handler for a DataGrid.
The book lists the statement:
PublisherDataSet1.publishers.Rows.(e.Item.ItemIndex).Delete();
I try to follow the example. My code is:
private void DataGrid1_DeleteCommand(object source,
System.Web.UI.WebControls.DataGridCommandEventArgs e)
{
DataSet3.Ante.Rows.Item(e.Item.ItemIndex).Delete();
sqlDataAdapter1.Update(dataSet31);
DataGrid1.DataSource=dataSet31.Ante.DefaultView;
DataGrid1.EditItemIndex=-1;
DataGrid1.DataBind();
}
When I Build, I get the error message: System.Data.DataRowCollection does
not contain a definition for 'Item"
Any suggestions as to what I am doing wrong would be appreciated
Thanks,
Jim