# Edit an InCell Editable Grid using Radio Buttons

## Environment

<table>
 <tr>
  <td>Product</td>
  <td>Telerik UI for ASP.NET MVC Grid</td>
 </tr>
 <tr>
  <td>Product version</td>
  <td>2025.1.227</td>
 </tr>
</table>

## Description

How can I edit a specified field using a radio buttons in an InCell editable Grid?

## Solution

You can achieve this requirement using the following implementation:

1. Define a template column that contains radio buttons and set its `checked` attribute based on the value of the **Role** field:

   ```Razor HtmlHelper
   @(Html.Kendo().Grid<Person>()
       .Name("persons")
       .Columns(columns =>
       {
           columns.Template(@<text></text>)
           .ClientTemplate(@"<input name='name#=PersonID#' type='radio' value='0' #= Role==0 ? checked='checked':'' # />
           <input name='name#=PersonID#' type='radio' value='1' #= Role==1 ? checked='checked':'' # />
           <input name='name#=PersonID#' type='radio' value='2' #= Role==2 ? checked='checked':'' # />");
           ... // Additional columns.
       })
       .Editable(ed=>ed.Mode(GridEditMode.InCell))
       ... // Additional configuration.
   )
   ```

2. Handle the `click` event of each radio button and update the **Role** field based on the respective radio button state:

   ```JS
       $(function () {
           $('#persons').on('click', ':radio', function () {
               var checked = $(this).is(':checked');
               var grid = $('#persons').data().kendoGrid;
               var dataItem = grid.dataItem($(this).closest('tr'));
               dataItem.set('Role', $(this).val());
           });
       });
   ```

To review the complete example, refer to the [project on how to create a template Grid column with radio buttons that update the underlying model when their state changes](https://github.com/telerik/ui-for-aspnet-mvc-examples/tree/master/Telerik.Examples.Mvc/Telerik.Examples.Mvc/Areas/GridEditingInCellRadioButtonColumn).

## 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 Knowledge Base](https://docs.telerik.com/aspnet-mvc/knowledge-base)
