# Creating Action Without Update Button in a Grid Command Column

## Environment

<table>
 <tr>
  <td>Product</td>
  <td>Grid for Progress® Telerik® UI for ASP.NET MVC</td>
 </tr>
</table>

## Description

I have a grid where I only need **Create**,  **Read** and **Destroy**  actions. However, if I have no `command.Edit();` in the `c.Command`, then there is no way to create a record.

If I add the `command.Edit();`, then it throws an error, saying I need to hook up an Update method.

How do I fix this?

## Solution

It is possible to achieve the desired behavior by providing a custom save button and making it visible only when the edited model is new.

Here is one way of achieving the desired result:

1. Add a custom command button. You may use the `IconClass()` to get it to look like the built-in save buttons:

   ```Razor
       columns.Command(c =>
       {
           c.Destroy();
           c.Custom("Save").Click("saveRow").IconClass("k-icon k-i-check").Visible     ("shouldBeVisible");
       });
   ```

2. Add the click handler which will [save the row](https://docs.telerik.com/kendo-ui/api/ui/grid/methods/saverow) and trigger the create action:

   ```JS
       function saveRow(e) {
           e.preventDefault();
           // e.target is the DOM element representing the button
           var tr = $(e.target).closest("tr");
           this.saveRow();
       }
   ```

3. Set the visibility of the custom button to true only for [new models](https://docs.telerik.com/kendo-ui/api/data/model/methods/isnew):

   ```JS
       function shouldBeVisible(e) {       
           return e.isNew();
       }
   ```

## More ASP.NET MVC Grid Resources

* [ASP.NET MVC Grid Documentation](https://www.telerik.com/aspnet-mvc/documentation/html-helpers/data-management/grid/overview)

* [ASP.NET MVC Grid Demos](https://demos.telerik.com/aspnet-mvc/grid/index)

* [ASP.NET MVC Grid Product Page](https://www.telerik.com/aspnet-mvc/grid)

* [Telerik UI for ASP.NET MVC Video Onboarding Course (Free for trial users and license holders)](https://www.telerik.com/aspnet-mvc/documentation/getting-started/video-onboarding)

* [Telerik UI for ASP.NET MVC Forums](https://www.telerik.com/forums/aspnet-mvc)

## See Also

* [Client-Side API Reference of the Grid for ASP.NET MVC](https://docs.telerik.com/kendo-ui/api/ui/grid)
* [Server-Side API Reference of the Grid for ASP.NET MVC](https://docs.telerik.com/aspnet-mvc/api/grid)
* [Telerik UI for ASP.NET MVC Breaking Changes](https://www.telerik.com/aspnet-mvc/documentation/backwards-compatibility/2023-backwards-compatibility)
* [Telerik UI for ASP.NET MVC Knowledge Base](https://docs.telerik.com/aspnet-mvc/knowledge-base)
