* There is a radgrid with one of the column as checkbox in
itemtemplate.

I want to loop through this radgrid's items. And based on each item's checkbox.checked condition, enable a seperate button control.(in client-side using javascript)
* I've deviced code for this, but it is not giving the desired output.
What's wrong in this please.

**Javascript:**

```
<telerik:RadScriptBlock ID="scriptBlock1" runat="server">
<script type="text/javascript">
function checkRestrictionAcceptance() 
    {
        var masterTable = $find("<%=RGGroupedCartRestrictedAssets.ClientID%>").get_masterTableView();        
        var count = masterTable.get_dataItems().length;
        var checkbox;
        var item;
        for (var i = 0; i < count; i++) 
        {
            item = masterTable.get_dataItems()[i];
            checkbox = item.findElement("AcceptedCheckbox");
            alert(checkbox.checked);
            if (checkbox.checked) 
            {
                var DownloadButton = document.getElementById('DownloadButton');
                DownloadButton.enabled = false;
            }
        }
    }
 </script>
</telerik:RadScriptBlock>

```

**Aspx:**

```
<telerik:RadGrid ID="RGGroupedCartRestrictedAssets" runat="server" DataSourceID="CslaDSGroupedCartRestrictedAssets" AutoGenerateColumns="False"
                    GridLines="None"  AllowPaging="True" AllowSorting="True" AllowFilteringByColumn="True" EnableEmbeddedSkins="false">

                    <MasterTableView  DataSourceID="CslaDSGroupedCartRestrictedAssets" DataKeyNames="RestrictionText">

                        <Columns>                                
                            <telerik:GridTemplateColumn>                                
                                <ItemTemplate>
                                    <asp:Checkbox ID="AcceptedCheckbox"  runat="server" />
                                </ItemTemplate>
                        </Columns>
                    </MasterTableView>
                </telerik:RadGrid>

<asp:Button ID="DownloadButton" runat="server" Text = "Test"  OnClientClick ="checkRestrictionAcceptance();"/>

```