protected void RadGrid1_InsertCommand(object sender, Telerik.Web.UI.GridCommandEventArgs e) { GridEditFormItem item = (GridEditFormItem)e.Item; Contractors contractors = new Contractors(); //Create the empty element that should be inserted. Customer customerToAdd = new Customer(); int customerID; int.TryParse(contractors.GetAllCustomers().Last().CustomerID, out customerID); //Increment the PK field. customerToAdd.CustomerID = (++customerID).ToString(); //Apply the vlaues from the editor controls. item.UpdateValues(customerToAdd); //Add the element. contractors.AddCustomer(customerToAdd); }