-
Notifications
You must be signed in to change notification settings - Fork 1
/
Default.aspx
42 lines (40 loc) · 2.05 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
37
38
39
40
41
42
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<%@ Register Assembly="DevExpress.Web.v13.1, Version=13.1.14.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
Namespace="DevExpress.Web" TagPrefix="dx" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>How to Save/Load ClientLayout</title>
</head>
<body>
<form id="form1" runat="server">
<dx:ASPxGridView ID="Grid" runat="server" AutoGenerateColumns="False" ClientInstanceName="grid"
DataSourceID="SqlDataSource1" KeyFieldName="CategoryID" OnClientLayout="Grid_ClientLayout"
OnCustomCallback="Grid_CustomCallback">
<ClientSideEvents EndCallback="function(s, e) {
if (grid.cpCallback == 0)
lb.PerformCallback("refresh");
}" />
<Columns>
<dx:GridViewDataTextColumn FieldName="CategoryID" ReadOnly="True" VisibleIndex="0">
</dx:GridViewDataTextColumn>
<dx:GridViewDataTextColumn FieldName="CategoryName" VisibleIndex="1">
</dx:GridViewDataTextColumn>
<dx:GridViewDataTextColumn FieldName="Description" VisibleIndex="2">
</dx:GridViewDataTextColumn>
</Columns>
<SettingsPager PageSize="5" />
</dx:ASPxGridView>
<dx:ASPxListBox ID="ListBox" runat="server" ClientInstanceName="lb" OnCallback="ListBox_Callback">
<ClientSideEvents EndCallback="function(s, e) {
lb.SetSelectedIndex(lb.cpSelected);
}" SelectedIndexChanged="function(s, e) {
grid.PerformCallback("refresh");
}" />
</dx:ASPxListBox>
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:NorthwindConnectionString %>"
SelectCommand="SELECT [CategoryID], [CategoryName], [Description], [Picture] FROM [Categories]">
</asp:SqlDataSource>
</form>
</body>
</html>