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

[Solved] Grid checkbox

0 Answers 32 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
feng
Top achievements
Rank 1
feng asked on 04 Mar 2011, 08:14 AM
Hi all,

I am working with Telerik grid control,when I add a checkbox column in the view,if the checkbox is checked,how can I get the value of the checked column in javascript?

The code is below:

<%= Html.Telerik().Grid(Model)
               .Name("grid")
               .DataKeys(keys =>
               {
                   keys.Add(o =>o.AdId);
               })
               .DataBinding(dataBinding => dataBinding.Server().Select("AdChooser", "Scenario"))
               .Pageable(p => p.PageSize(50))
               .Scrollable(p => p.Height(298))
               .Selectable().ClientEvents(events => events.OnRowSelected("onRowSelected"))
               .Columns(columns =>
               {
                   columns.Template(o => "<input type='checkbox' name='checkedGroups' class='checkboxGroups' value='<#= AdName #>' />").Title("<input type='checkbox' id='mastercheckbox'/>").Width(50).HeaderHtmlAttributes(new { Style = "text-align:center" });
                   columns.Bound(o => o.AdId).Width(100).Title("Ad ID");
                   columns.Bound(o => o.AdName).Title("AdName");
               })  
               .Filterable()
            %>
when I checked the multi checkbox,How can I get the checked value of advertiserName though javascript?


Thank you!
Tags
General Discussions
Asked by
feng
Top achievements
Rank 1
Share this question
or