Q:

Enable particular textbox of a row in a telerik grid on click of particular checkbox using jquery

I have a telerik grid having many columns. out of many columns, in some columns I am displaying data through database query. and remaining columns of a row will be having a textbox which will be disabled by default. In every row, there is a checkbox. and on the checkbox click, I want to enable the disabled textboxes of a particular row in which checkbox is checked:
Here is my code of telerik grid:
<% Html.Telerik().Grid< Model>()
            .Name("Grid1")
            .ToolBar(toolbar => toolbar.Template(
                                Html.Resource("Grid")))
                                 .DataKeys(keys =>
                                 {
                                     keys.Add(o => o.FName);
                                 })
                .Columns(columns =>
                {
                    columns.Bound(m => m.EmployeeID)
                       .ClientTemplate("<input type='checkbox' name='Employee1' id='Employee1' onclick='return Function1(this);'/>")
                    columns.Bound(m => m.EmpName).Title("EmpName").ReadOnly(true).Width(70);
                    columns.Bound(m => m.Task).Title("Task")
                        .ClientTemplate("<input type='textbox' name='Task' id='Task' disabled='disabled' new { style='width:55px'} value='<#=Task#>' />").Width(53);
                })
                .DataBinding(databinding => databinding
                                        .Ajax()
                                        .Select("GetData", "Home")
                )
            .Scrollable()
            .Selectable()
            .Render();
        %>

I want to write a jquery for this.
can anyone help me?

A:

You have to show us your generated html. But what ever it is something like this will work. So suppose your grid was written out as a table like this:
<table>
    <tr>
        <td>
           <input type='checkbox' name='SelectedEmployee' id='SelectedEmployee'/>
        </td>
        <td>
           <input type='text' name='Allocation' id='Allocation' />
        </td>
    </tr>
</table>

You can toggle the textbox by doing this
$('[name="SelectedEmployee"]').click(function () {
    var row = $(this).closest('tr');
    if ($(this).is(':checked')) {
        // enable textbox when checkbox is checked
        row.find('#Allocation').removeAttr('disabled');
    }
    else {
        // disable textbox when checkbox is unchecked
        row.find('#Allocation').attr('disabled','disabled');
    }                
});

