-
Notifications
You must be signed in to change notification settings - Fork 2
/
Default.aspx
36 lines (34 loc) · 1.72 KB
/
Default.aspx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<%@ Page Language="VB" AutoEventWireup="true" CodeBehind="Default.aspx.vb" Inherits="Solution.Default" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Data caching on the client</title>
<script type="text/javascript">
function ProcessRow(index) {
alert("The row id is '" + grid.cpTitleId[index - grid.GetTopVisibleIndex()] + "', and title is " + grid.cpTitles[index - grid.GetTopVisibleIndex()]);
}
</script>
</head>
<body>
<form id="form1" runat="server">
<asp:AccessDataSource ID="AccessDataSource1" runat="server" DataFile="~/App_Data/pubs.mdb"
SelectCommand="SELECT [title_id], [title], [type], [pubdate], [price] FROM [titles]"></asp:AccessDataSource>
<dx:ASPxGridView ID="grid" runat="server" Width="950px" AutoGenerateColumns="False" DataSourceID="AccessDataSource1" KeyFieldName="title_id"
OnCustomJSProperties="grid_CustomJSProperties">
<SettingsPager PageSize="5" />
<Columns>
<dx:GridViewDataTextColumn FieldName="title_id" ReadOnly="True" />
<dx:GridViewDataTextColumn FieldName="title" />
<dx:GridViewDataTextColumn FieldName="type" />
<dx:GridViewDataDateColumn FieldName="pubdate" />
<dx:GridViewDataTextColumn FieldName="price" />
<dx:GridViewDataTextColumn Caption="button">
<DataItemTemplate>
<input type="button" value="Click Me" onclick="ProcessRow(<%# Container.VisibleIndex %>);" />
</DataItemTemplate>
</dx:GridViewDataTextColumn>
</Columns>
</dx:ASPxGridView>
</form>
</body>
</html>