-
Notifications
You must be signed in to change notification settings - Fork 1
/
Default.aspx
57 lines (49 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<%@ Register Assembly="DevExpress.Web.v13.2, Version=13.2.15.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" Namespace="DevExpress.Web" TagPrefix="dx" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<script>
function OnSelectedIndexChanged(s, e) {
var items = listbox.GetSelectedItems();
var text = "";
var values = "";
for (var i = 0; i < items.length; i++) {
text += items[i].text + ";";
values += items[i].value + ";";
}
dd.SetText(text)
dd.SetKeyValue(values);
}
</script>
</head>
<body>
<form id="form1" runat="server">
<dx:ASPxDropDownEdit ID="ASPxDropDownEdit1" runat="server" ClientInstanceName="dd" Width="300px">
<DropDownWindowTemplate>
<dx:ASPxListBox ID="ASPxListBox1" runat="server" Width="100%" ClientInstanceName="listbox"
DataSourceID="AccessDataSource1" SelectionMode="CheckColumn"
ValueField="CategoryID" TextField="CategoryName"
ValueType="System.Int32">
<ClientSideEvents SelectedIndexChanged="OnSelectedIndexChanged" />
</dx:ASPxListBox>
</DropDownWindowTemplate>
</dx:ASPxDropDownEdit>
<table>
<tr>
<td>Send selected values to the server:
</td>
<td>
<dx:ASPxButton ID="ASPxButton1" runat="server" Text="Ok" OnClick="ASPxButton1_Click">
</dx:ASPxButton>
</td>
</tr>
</table>
<asp:AccessDataSource ID="AccessDataSource1" runat="server"
DataFile="~/App_Data/Northwind.mdb" SelectCommand="SELECT * FROM [Categories]"></asp:AccessDataSource>
<dx:ASPxLabel ID="ASPxLabel1" runat="server">
</dx:ASPxLabel>
</form>
</body>
</html>