All Telerik .NET tools and Kendo UI JavaScript components in one package. Now enhanced with:
<
telerik:RadGrid
ID
=
"RadGrid3"
runat
"server"
AutoGenerateColumns
"false"
OnNeedDataSource
"RadGrid3_NeedDataSource"
OnItemDataBound
"RadGrid3_ItemDataBound"
>
MasterTableView
Columns
telerik:GridTemplateColumn
ItemTemplate
asp:CheckBox
"Chk1"
/>
</
"Chk2"
telerik:GridBoundColumn
HeaderText
"ID"
DataField
UniqueName
protected
void
RadGrid3_NeedDataSource(
object
sender, GridNeedDataSourceEventArgs e)
{
dynamic data =
new
[] {
{ ID = 1, Name =
"Name1"
},
{ ID = 2, Name =
"Name2"
{ ID = 3, Name =
"Name3"
}
};
RadGrid3.DataSource = data;
RadGrid3_ItemDataBound(
sender, GridItemEventArgs e)
if
(e.Item
is
GridDataItem)
GridDataItem item = e.Item
as
GridDataItem;
CheckBox Chk1 = item.FindControl(
)
CheckBox;
CheckBox Chk2 = item.FindControl(
// default first check box will be checked
Chk1.Checked =
true
;
Chk1.Attributes.Add(
"onclick"
,
"checkUncheckManage(this,'"
+ Chk2.ClientID+
"')"
);
Chk2.Attributes.Add(
+ Chk1.ClientID +
function
checkUncheckManage(chkA, chkB) {
var
_chkB = document.getElementById(chkB);
_chkB.checked = !chkA.checked;