New to Telerik UI for ASP.NET AJAXStart a free 30-day trial

Editing CheckBoxes directly in Batch Edit Mode

By default when Batch Edit mode is enabled the user needs to click on the cell first and then change its value. In some cases the users may prefer different behavior - for example when editing a boolean field that is presented by CheckBox in RadGrid.

The following example illustrates how you can change the value of a cell by clicking directly on the CheckBox in it.

ASP.NET
<telerik:RadGrid RenderMode="Lightweight" runat="server" ID="RadGrid1"
	OnNeedDataSource="RadGrid1_NeedDataSource"
	AutoGenerateColumns="false"
	AllowPaging="true" PageSize="10">

	<MasterTableView CommandItemDisplay="Top" DataKeyNames="ID" EditMode="Batch">

		<Columns>
			<telerik:GridBoundColumn DataField="ID" HeaderText="ID" UniqueName="ID" ReadOnly="true" InsertVisiblityMode="AlwaysVisible">
			</telerik:GridBoundColumn>
			<telerik:GridBoundColumn DataField="Name" HeaderText="Name" UniqueName="Name" ReadOnly="true">
			</telerik:GridBoundColumn>
			<telerik:GridTemplateColumn DataField="BoolField1" HeaderText="Template Column" UniqueName="BoolField1">
				<ItemTemplate>
					<asp:CheckBox runat="server" ID="CheckBox1" Enabled="true" Checked='<%# Eval("BoolField1") %>' onclick="checkBoxClick(this, event);" />
				</ItemTemplate>
				<EditItemTemplate>
					<asp:CheckBox runat="server" ID="CheckBox2" />
				</EditItemTemplate>
			</telerik:GridTemplateColumn>
		</Columns>
	</MasterTableView>
</telerik:RadGrid>

See Also

In this article
See Also
Not finding the help you need?
Contact Support