This question is locked. New answers and comments are not allowed.
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!
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!