Product Bundles
DevCraft
All Telerik .NET and Kendo UI JavaScript components and AI Tools in one package.
Kendo UI
Bundle of AI Tools plus four JavaScript UI libraries built natively for jQuery, Angular, React and Vue.
Build JavaScript UI
Javascript
Agent and App Development Solutions
Build. Accelerate. Govern.
AI-Ready Application Experiences
AI-Assisted SDLC
Agent Governance and Control
Telerik
Build modern .NET business apps
.Net Web
Desktop
Reporting and Documents
Cross-Platform
Additional Tools
Enhance the developer and designer experience
Testing & Mocking
CMS
Debugging
UI Tools
Free Tools
Support and Learning
Productivity and Design Tools
01.
<
telerik:RadGrid
runat
=
"server"
ID
"RadGrid2"
AutoGenerateColumns
"false"
AllowPaging
"true"
02.
PageSize
"2"
>
03.
MasterTableView
04.
Columns
05.
telerik:GridBoundColumn
DataField
"ID"
06.
</
07.
08.
PagerTemplate
09.
input
class
"rgPagePrev"
title
"Previous Page"
onclick="$find('<%#Container.OwnerTableView.ClientID%>').page('Prev');"
10.
value=" " type="button">
11.
"rgPageNext"
"Next Page"
onclick="$find('<%#Container.OwnerTableView.ClientID%>').page('Next');"
12.
13.
14.
15.
ClientSettings
16.
ClientEvents
OnCommand
"command"
/>
17.
18.
<script type=
"text/javascript"
//sample data
var
data =
[
{ ID: 1 },
{ ID: 2 },
{ ID: 3 },
{ ID: 4 },
{ ID: 5 },
{ ID: 6 },
];
mtv =
null
;
function
pageLoad()
{
//cache the ref to MasterTableView
mtv = $find(
).get_masterTableView();
//bind RadGrid
19.
bindGrid(0, 2);
20.
21.
//set virtual items count
22.
mtv.set_virtualItemCount(data.length - 1);
23.
}
24.
command(sender, args)
25.
26.
//cancel to prevent postback
27.
args.set_cancel(
true
);
28.
29.
//calculate page size items
30.
pageSize = mtv.get_pageSize();
31.
index = mtv.get_currentPageIndex() * pageSize;
32.
itemsToTake = Math.min(pageSize, data.length);
33.
34.
35.
bindGrid(index, index + itemsToTake);
36.
37.
bindGrid(startIndex, endIndex)
38.
39.
mtv.set_dataSource(Array.prototype.slice.call(data, startIndex, endIndex));
40.
mtv.dataBind();
41.
42.
</script>