Replaced .net user controls under rico3/plugins/dotnet with a single .net server...
[infodrom/rico3] / examples / dotnet / ex2editfilter.aspx
index 855b10f..502d0ab 100644 (file)
@@ -1,9 +1,5 @@
 <%@ Page Language="VB" ResponseEncoding="iso-8859-1" Debug="true" validateRequest="false" %>\r
-<%@ Register TagPrefix="Rico" TagName="LiveGrid" Src="../../plugins/dotnet/LiveGrid.ascx" %>\r
-<%@ Register TagPrefix="Rico" TagName="Column" Src="../../plugins/dotnet/GridColumn.ascx" %>\r
-<%@ Register TagPrefix="Rico" TagName="Panel" Src="../../plugins/dotnet/GridPanel.ascx" %>\r
-<%@ Register TagPrefix="Rico" TagName="sqlCompatibilty" Src="../../plugins/dotnet/sqlCompatibilty.ascx" %>\r
-<%@ Register TagPrefix="My" TagName="LoadRicoClient" Src="LoadRicoClient.ascx" %>\r
+<%@ Register TagPrefix="Rico" Assembly="Rico" NameSpace="Rico" %>\r
 <%@ Register TagPrefix="My" TagName="dbLib" Src="dbConnect.ascx" %>\r
 <My:dbLib id='app' runat='server' />\r
 \r
@@ -14,7 +10,7 @@ Sub Page_Load(Sender As object, e As EventArgs)
   Session.Timeout=60\r
   dim arEmpSql as string() = {"LastName","', '","FirstName"}\r
   dim oSqlCompat=new sqlCompatibilty(app.dbDialect)\r
-  ex8.columns(ex8.ColIndex("EmployeeID")).SelectSql="select EmployeeID," & oSqlCompat.Concat(arEmpSql,false) & " from employees order by LastName,FirstName" \r
+  EmployeeID.SelectSql="select EmployeeID," & oSqlCompat.Concat(arEmpSql,false) & " from employees order by LastName,FirstName" \r
   app.OpenGridForm(ex8)\r
 End Sub\r
 \r
@@ -34,26 +30,10 @@ End Sub
 <head>\r
 <title>Rico LiveGrid-Example 2 (editable)</title>\r
 \r
-<My:LoadRicoClient id='initlibs' runat='server' modules='Calendar,Tree' />\r
+<Rico:LoadClient checkQueryString='true' runat='server' />\r
 <link href="../demo.css" type="text/css" rel="stylesheet" />\r
 \r
-<script type='text/javascript'>\r
-\r
-// ricoLiveGridForms will call orders_FormInit right before grid & form initialization.\r
-\r
-function ex8_FormInit() {\r
-  var cal=new Rico.CalendarControl("Cal");\r
-  Rico.EditControls.register(cal, Rico.imgDir+'calarrow.png');\r
-  \r
-  var CustTree=new Rico.TreeControl("CustomerTree","CustTree.aspx");\r
-  Rico.EditControls.register(CustTree, Rico.imgDir+'dotbutton.gif');\r
-}\r
-</script>\r
-\r
 <style type="text/css">\r
-div.ricoLG_outerDiv thead .ricoLG_cell, div.ricoLG_outerDiv thead td, div.ricoLG_outerDiv thead th {\r
-       height:1.5em;\r
-}\r
 div.ricoLG_cell {\r
   white-space:nowrap;\r
 }\r
@@ -63,7 +43,7 @@ div.ricoLG_cell {
 \r
 <body>\r
 \r
-<table id='explanation' border='0' cellpadding='0' cellspacing='5' style='clear:both'><tr valign='top'><td>\r
+<div id='explanation'>\r
 Base Library: <script type='text/javascript'>document.write(Rico.Lib+' '+Rico.LibVersion);</script>\r
 <hr>The data on this grid can be edited using pop-up forms. \r
 Just click on a grid cell and then select Edit, Delete, or Add from the pop-up menu. \r
@@ -71,39 +51,29 @@ The Add and Edit forms are automatically generated by LiveGrid.
 Notice on the Add form how you use the Rico Tree control to select the customer. \r
 Notice on the Edit form how the Rico Calendar is used to change dates. \r
 Updates are disabled on the database, so you will get an error message if you try to save.\r
-</td><td>\r
-<script type='text/javascript'><!--\r
-google_ad_client = 'pub-7218597156507462';\r
-/* 125x125, created 5/11/09 */\r
-google_ad_slot = '9298106441';\r
-google_ad_width = 125;\r
-google_ad_height = 125;\r
-//-->\r
-</script>\r
-<script type='text/javascript' src='http://pagead2.googlesyndication.com/pagead/show_ads.js'></script>\r
-</td></tr></table>\r
+</div>\r
 <p><strong>Orders Table</strong></p>\r
 \r
 \r
-<Rico:LiveGrid runat='server' id='ex8' formView='true' TableName='orders' DefaultSort='OrderID' FilterLocation='-1'>\r
-<GridColumns>\r
-  <Rico:Panel runat='server' heading='Basic Info' />\r
+<Rico:LiveGridEdit runat='server' id='ex8' TableName='orders' DefaultSort='OrderID' FilterLocation='-1'>\r
+  <Rico:CalendarControl runat='server' id='Cal' icon='rico-icon rico-calarrow' />\r
+  <Rico:TreeControl runat='server' id='CustomerTree' icon='rico-icon rico-dotbutton' source='CustTree.aspx' />\r
+  <Rico:ColumnGroup runat='server' heading='Basic Info' />\r
   <Rico:Column runat='server' heading='Order#'        width='60'  ColName='OrderID'      EntryType='B' ColData='<auto>' ConfirmDeleteColumn='true' />\r
   <Rico:Column 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
-  <Rico:Column runat='server' heading='Sales Person'  width='140' ColName='EmployeeID'   EntryType='SL' filterUI='m' />\r
+  <Rico:Column runat='server' heading='Sales Person'  width='140' ColName='EmployeeID'   EntryType='SL' filterUI='m' id='EmployeeID' />\r
   <Rico:Column runat='server' heading='Order Date'    width='100' ColName='OrderDate'    EntryType='D' ColData='Today' SelectCtl='Cal' />\r
   <Rico:Column runat='server' heading='Required Date' width='100' ColName='RequiredDate' EntryType='D' ColData='Today' SelectCtl='Cal' />\r
   <Rico:Column runat='server' heading='Net Sale'      width='80'  format='DOLLAR'        Formula='select sum(UnitPrice*Quantity*(1.0-Discount)) from order_details d where d.OrderID=t.OrderID' />\r
 \r
-  <Rico:Panel runat='server' heading='Ship To' />\r
+  <Rico:ColumnGroup runat='server' heading='Ship To' />\r
   <Rico:Column runat='server' heading='Name'        width='150' ColName='ShipName'       EntryType='B' />\r
   <Rico:Column runat='server' heading='Address'     width='150' ColName='ShipAddress'    EntryType='B' />\r
   <Rico:Column runat='server' heading='City'        width='120' ColName='ShipCity'       EntryType='B' filterUI='m' />\r
   <Rico:Column runat='server' heading='Region'      width='80'  ColName='ShipRegion'     EntryType='T' />\r
   <Rico:Column runat='server' heading='Postal Code' width='80'  ColName='ShipPostalCode' EntryType='T' />\r
   <Rico:Column 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
-</GridColumns>\r
-</Rico:LiveGrid>\r
+</Rico:LiveGridEdit>\r
 \r
 </body>\r
 </html>\r