I am getting an compilation error msg after adding the DataGrid's Edit/Cancel/Update/Delete linkcommands - any idea why this error is occurring?
CS0122: 'WebApplication1.WebForm1.DataGrid1_Cancel(object, System.Web.UI.WebControls.DataGridCommandEventArgs)' is inaccessible due to its protection level
HTML DataGrid1 setup:
<asp:datagrid id=DataGrid1 style="Z-INDEX: 102; LEFT: 10px; POSITION: absolute; TOP: 280px" runat="server" PageSize="13" AutoGenerateColumns="False" CellPadding="3" BackColor="White" BorderWidth="1px" BorderStyle="None" BorderColor="#E7E7FF" Width="991px" Height="216px" DataSource="<%# dsBV1 %>" DataMember="Prototype" AllowSorting="True"
OnCancelCommand="DataGrid1_Cancel" OnEditCommand="DataGrid1_Edit" OnUpdateCommand="DataGrid1_Update" OnDeleteCommand="DataGrid1_Delete">
Code-behind:
void DataGrid1_Cancel(object sender, DataGridCommandEventArgs e)
{
DataGrid1.EditItemIndex = -1; //just to get started
}
CS0122: 'WebApplication1.WebForm1.DataGrid1_Cancel(object, System.Web.UI.WebControls.DataGridCommandEventArgs)' is inaccessible due to its protection level
HTML DataGrid1 setup:
<asp:datagrid id=DataGrid1 style="Z-INDEX: 102; LEFT: 10px; POSITION: absolute; TOP: 280px" runat="server" PageSize="13" AutoGenerateColumns="False" CellPadding="3" BackColor="White" BorderWidth="1px" BorderStyle="None" BorderColor="#E7E7FF" Width="991px" Height="216px" DataSource="<%# dsBV1 %>" DataMember="Prototype" AllowSorting="True"
OnCancelCommand="DataGrid1_Cancel" OnEditCommand="DataGrid1_Edit" OnUpdateCommand="DataGrid1_Update" OnDeleteCommand="DataGrid1_Delete">
Code-behind:
void DataGrid1_Cancel(object sender, DataGridCommandEventArgs e)
{
DataGrid1.EditItemIndex = -1; //just to get started
}