Product Bundles
DevCraft
All Telerik .NET tools and Kendo UI JavaScript components in one package. Now enhanced with:
Web
Mobile
Document Management
Desktop
Reporting
Testing & Mocking
CMS
UI/UX Tools
Debugging
Free Tools
Support and Learning
Productivity and Design Tools
function
SelectAllRow() {
var
grid = $find(
"<%= RadGrid2.ClientID %>"
);
if
(grid) {
MasterTable = grid.get_masterTableView();
Rows = MasterTable.get_dataItems();
for
(
i = 0; i < Rows.length; i++) {
row = Rows[i];
row.set_selected(
true
}
return
false
;
<
telerik:RadGrid
ID
=
"RadGrid2"
runat
"server"
AutoGenerateColumns
"false"
OnNeedDataSource
"RadGrid2_NeedDataSource"
AllowMultiRowSelection
"true"
>
MasterTableView
DataKeyNames
"ID"
ClientDataKeyNames
CommandItemDisplay
"Top"
CommandItemTemplate
asp:LinkButton
"Buttontest"
Text
"Select All Row"
OnClientClick
"return SelectAllRow();"
/>
</
Columns
telerik:GridBoundColumn
HeaderText
DataField
UniqueName
"Name"
ClientSettings
Selecting
AllowRowSelect
protected
void
RadGrid2_NeedDataSource(
object
sender, GridNeedDataSourceEventArgs e)
{
dynamic data =
new
[] {
{ ID = 1, Name =
"Name1"
},
{ ID = 2, Name =
"Name2"
{ ID = 3, Name =
"Name3"
};
RadGrid2.DataSource = data;