dim arEmpSql as string() = {"LastName","', '","FirstName"}\r
dim oSqlCompat=new sqlCompatibilty(app.dbDialect)\r
EmployeeID.SelectSql="select EmployeeID," & oSqlCompat.Concat(arEmpSql,false) & " from employees order by LastName,FirstName" \r
- app.OpenGridForm(ex8n)\r
+ app.OpenGridForm(nosession)\r
End Sub\r
\r
</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
Updates are disabled on the database, so you will get an error message if you try to save.\r
-<p>Rather than requesting data from RicoQuery, this page is able to process the AJAX\r
-data requests itself. No session variables are used.\r
+<p>Each request for data is processed separately. No session variables are used.\r
+The disadvantage is that the query must be completely rebuilt every time - and just building\r
+the query requires an additional query to the database to get table metadata (primary keys, etc).\r
+This overhead is not required when session variables are used.\r
</div>\r
<p><strong>Orders Table (without sessions)</strong></p>\r
\r
\r
-<Rico:LiveGridEdit runat='server' id='ex8n' TableName='orders' DefaultSort='OrderID' FilterLocation='-1' sessions='false'>\r
+<Rico:LiveGridEdit runat='server' id='nosession' DefaultSort='OrderID' FilterLocation='-1' sessions='false'>\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
+\r
+ <Rico:Table runat='server' TblName='orders' />\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='s' 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
+ <Rico:EditCol runat='server' heading='Order#' width='60' ColName='OrderID' EntryType='B' ColData='<auto>' ConfirmDeleteColumn='true' />\r
+ <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
+ <Rico:EditCol runat='server' heading='Sales Person' width='140' ColName='EmployeeID' EntryType='SL' filterUI='m' id='EmployeeID' />\r
+ <Rico:EditCol runat='server' heading='Order Date' width='100' ColName='OrderDate' EntryType='D' ColData='Today' SelectCtl='Cal' />\r
+ <Rico:EditCol runat='server' heading='Required Date' width='100' ColName='RequiredDate' EntryType='D' ColData='Today' SelectCtl='Cal' />\r
+ <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
\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='80' ColName='ShipCity' EntryType='B' filterUI='s' />\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
+ <Rico:EditCol runat='server' heading='Name' width='150' ColName='ShipName' EntryType='B' />\r
+ <Rico:EditCol runat='server' heading='Address' width='150' ColName='ShipAddress' EntryType='B' />\r
+ <Rico:EditCol runat='server' heading='City' width='120' ColName='ShipCity' EntryType='B' filterUI='m' />\r
+ <Rico:EditCol runat='server' heading='Region' width='80' ColName='ShipRegion' EntryType='T' />\r
+ <Rico:EditCol runat='server' heading='Postal Code' width='80' ColName='ShipPostalCode' EntryType='T' />\r
+ <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
</Rico:LiveGridEdit>\r
\r
</body>\r