MVC3 Ajax Checkboxes grid
===

I want to do a grid of checkboxes that contain products/categories. The products and categories could be dynamic (I mean, the count of products/categories can change). I'm able to create the grid and save the data when I check a box. My problem is to use ajax properly. 

Here is my model : 
   
     public class ProductModel
     {
        public List<List<ProductItemGrid>> ProductItemGrid { get; set; }
        public List<string> ProductNameList { get; set; }
        public List<string> CategoryNameList { get; set; }

    }

    public class ProductItemGrid
    {
        public int ProductID { get; set; }
        public int CategoryID { get; set; }
        public bool ProductInCategory { get; set; }
    }

Part of my view, (I use the list of list to populate it) :

    @for (int i = 0; i < Model.ProductNameList.Count(); i++)
    {
    <tr class=@(i % 2 == 0 ? "even" : "odd")>
    
        <td style="font-weight: bold;">
            @Html.DisplayFor(x => x.ProductNameList[i])
        </td>
        @foreach (var result in Model.ProductItemGrid[i])
        {
            string ckBoxName = result.ProductID.ToString() + result.CategoryID.ToString();
            <td id='<%=ckBoxName%>'>
            @using (Ajax.BeginForm("UpdateProductItem", "Product", new AjaxOptions() { InsertionMode = InsertionMode.Replace, UpdateTargetId = ckBoxName }))
            {

                    @Html.Hidden("p_CategoryID", result.CategoryID)
                    @Html.Hidden("p_ProductID", result.ProductID)
                    @Html.CheckBox("<%=ckBoxName%>", result.ProductInCategory, new { onclick = "test" })
                
            }
            </td>
        }
        </tr>
    }
 
Right now the view contain some error, but Im sure you get the main idea. With the ajax form, Im able to update my database, but my main problem is to update the checkbox itself after doing the C# part. Also, I'm trying to name the < td> to be able to update the ckbox by giving him a name as ProductID_CategoryID (so it would be easier for me to know which one Im updating). Thks.   