Fix wheel scrolling on LiveGrid content
[infodrom/rico3] / examples / dotnet / ex2nosession.aspx
1 <%@ Page Language="VB" ResponseEncoding="iso-8859-1" validateRequest="false" %>\r
2 <%@ Register TagPrefix="Rico" Assembly="Rico" NameSpace="Rico" %>\r
3 <%@ Register TagPrefix="My" TagName="dbLib" Src="dbConnect.ascx" %>\r
4 <My:dbLib id='app' runat='server' />\r
5 \r
6 <script runat="server">\r
7 \r
8 Sub Page_Load(Sender As object, e As EventArgs)\r
9   Session.Timeout=60\r
10   app.OpenGridForm(nosession)\r
11   EmployeeID.SelectSql="select EmployeeID," & nosession.SqlCompat.Concat(new String(){"LastName","', '","FirstName"}) & " from employees order by LastName,FirstName" \r
12 End Sub\r
13 \r
14 </script>\r
15 \r
16 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">\r
17 <html>\r
18 <head>\r
19 <title>Rico LiveGrid-Example 2 (editable)</title>\r
20 \r
21 <Rico:LoadClient checkQueryString='true' runat='server' />\r
22 <link href="../demo.css" type="text/css" rel="stylesheet" />\r
23 \r
24 <style type="text/css">\r
25 div.ricoLG_cell {\r
26   white-space:nowrap;\r
27 }\r
28 </style>\r
29 </head>\r
30 \r
31 \r
32 <body>\r
33 \r
34 <div id='explanation'>\r
35 Base Library: <script type='text/javascript'>document.write(Rico.Lib+' '+Rico.LibVersion);</script>\r
36 <hr>The data on this grid can be edited using pop-up forms. \r
37 Just click on a grid cell and then select Edit, Delete, or Add from the pop-up menu. \r
38 Updates are disabled on the database, so you will get an error message if you try to save.\r
39 <p>Each request for data is processed separately. No session variables are used.\r
40 The disadvantage is that the query must be completely rebuilt every time - and just building\r
41 the query requires an additional query to the database to get table metadata (primary keys, etc).\r
42 This overhead is not required when session variables are used.\r
43 </div>\r
44 <p><strong>Orders Table (without sessions)</strong></p>\r
45 \r
46 \r
47 <Rico:LiveGridEdit runat='server' id='nosession' DefaultSort='OrderID' AutoFilter='true' sessions='false'>\r
48   <Rico:CalendarControl runat='server' id='Cal' icon='rico-icon rico-calarrow' />\r
49   <Rico:TreeControl runat='server' id='CustomerTree' icon='rico-icon rico-dotbutton' source='CustTree.aspx' />\r
50 \r
51   <Rico:Table runat='server' TblName='orders' />\r
52   <Rico:ColumnGroup runat='server' heading='Basic Info' />\r
53   <Rico:EditCol runat='server' heading='Order#'        width='60'  ColName='OrderID'      EntryType='B' ColData='<auto>' ConfirmDeleteColumn='true' />\r
54   <Rico:EditCol runat='server' heading='Customer'      width='160' ColName='CustomerID'   EntryType='CL' InsertOnly='true' SelectCtl='CustomerTree' SelectSql="select CustomerID,CompanyName from customers order by CompanyName" filterUI='t' />\r
55   <Rico:EditCol runat='server' heading='Sales Person'  width='140' ColName='EmployeeID'   EntryType='SL' filterUI='m' id='EmployeeID' />\r
56   <Rico:EditCol runat='server' heading='Order Date'    width='100' ColName='OrderDate'    EntryType='D' ColData='Today' SelectCtl='Cal' />\r
57   <Rico:EditCol runat='server' heading='Required Date' width='100' ColName='RequiredDate' EntryType='D' ColData='Today' SelectCtl='Cal' />\r
58   <Rico:FormulaCol runat='server' heading='Net Sale'   width='80'  DataType='DOLLAR'      Formula='select sum(UnitPrice*Quantity*(1.0-Discount)) from order_details d where d.OrderID=t.OrderID' />\r
59 \r
60   <Rico:ColumnGroup runat='server' heading='Ship To' />\r
61   <Rico:EditCol runat='server' heading='Name'        width='150' ColName='ShipName'       EntryType='B' />\r
62   <Rico:EditCol runat='server' heading='Address'     width='150' ColName='ShipAddress'    EntryType='B' />\r
63   <Rico:EditCol runat='server' heading='City'        width='120' ColName='ShipCity'       EntryType='B' filterUI='m' />\r
64   <Rico:EditCol runat='server' heading='Region'      width='80'  ColName='ShipRegion'     EntryType='T' />\r
65   <Rico:EditCol runat='server' heading='Postal Code' width='80'  ColName='ShipPostalCode' EntryType='T' />\r
66   <Rico:EditCol runat='server' heading='Country'     width='90'  ColName='ShipCountry'    EntryType='N' filterUI='s' control="new Rico.TableColumn.link('http://en.wikipedia.org/wiki/{11}','_blank')" />\r
67 </Rico:LiveGridEdit>\r
68 \r
69 </body>\r
70 </html>\r