This is a migrated thread and some comments may be shown as answers.

[Solved] Get all items that are checked

0 Answers 47 Views
Grid
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Sam
Top achievements
Rank 1
Sam asked on 01 Apr 2013, 05:25 AM
Hello,

I'm using MVC grid in Razor and have the following grid:

@(Html.Telerik().Grid<MVC.Models.List>()
                .Name("grid")
                .Columns(columns =>
                {
                    columns.Bound(c => c.Id)
                        .HeaderTemplate(
                            @<text>
                                <input type="checkbox" title="check all records" id="checkAllRecords"   />
                            </text>
                        )

                        .ClientTemplate("<input type='checkbox' name='checkedRecords' value='<#= Id #>'")
                        .Template(
                            @<text>
                            <input name="checkedRecords" type="checkbox"
                                value="@item.Id" title="checkedRecords" />
                        </text>)
                        
                        
                        .Width(50)
                        .HeaderHtmlAttributes(new { style = "text-align:center" })
                        .HtmlAttributes(new { style = "text-align:center" });
                    columns.Bound(p => p.Description).Width(100);

                })
                .DataBinding(d => d.Ajax().Select("List", "Home"))
               )

I would like to know if there is a way to get all ids of the records that were checked using javascript?  Thanks for your help.
Tags
Grid
Asked by
Sam
Top achievements
Rank 1
Share this question
or