Click here to Skip to main content
15,894,307 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
C#
protected void grdList_RowCommand(object sender, GridViewCommandEventArgs e)
    {
        if (e.CommandName.Equals("Insert"))
        {
            TextBox txtCode = (TextBox)grdList.FooterRow.FindControl("txtNewCode");
            TextBox txtDescription = (TextBox)grdList.FooterRow.FindControl("txtNewDescription");
            bool result = ProductManager.SaveProductGroup(txtSearchCode.Text,txtSearchGroup.Text, txtSearchDescription.Text,"A");
            FillGrid();
        }
        else if (e.CommandName == "Delete")
        {
            
            string ProductGroup = Convert.ToString(e.CommandArgument);
             
            bool result = ProductManager.DeleteProductGroup(ProductGroup);
            //MY ERROR IS THIS IT ALWAYS SAYS " Error 1 No overload for method 'DeleteProductGroup' takes 1 arguments	D:\Projects\POSInventory\ProductGroup.aspx.cs	46 27 D:\Projects\POSInventory\"

            FillGrid();

            
        }
    }
Posted
Comments
[no name] 11-Jun-15 7:13am    
So go look at the definition of DeleteProductGroup and find out how many parameters that method takes, then supply the right kind and number of parameters and your problem will go away.
VIce of CT 14-Jun-15 22:50pm    
oh thank you men i just did it !! Great people here

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900