a50d619d986305bab9b248132eb91503df93927c
[infodrom/rico3] / examples / dotnet / ex2notheme.aspx
1 <%@ Page Language="VB" ResponseEncoding="iso-8859-1" %>\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.OpenGrid(ex2notheme)\r
11 End Sub\r
12 \r
13 </script>\r
14 \r
15 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">\r
16 <html>\r
17 <head>\r
18 <title>Rico LiveGrid-Example 2</title>\r
19 \r
20 <Rico:LoadClient id='RicoClient' checkQueryString='notheme' runat='server' />\r
21 <link href="../demo.css" type="text/css" rel="stylesheet" />\r
22 \r
23 </head>\r
24 <body>\r
25 \r
26 <div id='explanation'>\r
27 Base Library: \r
28 <script type='text/javascript'>\r
29 document.write(Rico.Lib+' '+Rico.LibVersion);\r
30 </script>\r
31 <hr>\r
32 This example shows how the entire grid can be customized by disabling the regular themes.\r
33 Here we have specified:<ul>\r
34 <li>A default heading style (white text on a black background)\r
35 <li>Selected a custom heading style for the date columns\r
36 <li>Selected a custom hover style (when you hover over the headings)\r
37 <li>Selected a custom style for the date column data (red text)\r
38 <li>Selected a custom row highlight when you click on a row (yellow background)\r
39 <li>Specifed that ship information have a blue background when the ship country is France, and a red background when the ship country is Switzerland.\r
40 </ul>\r
41 Notice that when you export to Excel, styles and number formats get copied into the Excel file!\r
42 One caveat: specifying a font color for a the heading cell only works when the grid's HdgHoverStyleId is set.\r
43 Click on a cell to see available actions.\r
44 </div>\r
45 \r
46 <Rico:LiveGrid runat='server' id='ex2notheme' fmt="json" DefaultSort='OrderID' menuEvent='click' frozenColumns='1' HdgHoverStyleId="GrayText" highlightElem='cursorRow'>\r
47   <Rico:DefaultHdgStyle runat='server' bgcolor="black" color="white" align="center" />\r
48   <Rico:Style runat='server' StyleID='RedHdg' bgcolor="red" color="white" align="center" />\r
49   <Rico:Style runat='server' StyleID='GrayText' color="#dddddd" />\r
50   <Rico:Style runat='server' StyleID='ricoLG_oddRow' bgcolor="#eeeeee" />\r
51   <Rico:Style runat='server' StyleID='ricoLG_selection' bgcolor="yellow" />\r
52   \r
53   <Rico:Table runat='server' TblName='orders' />\r
54   <Rico:TableCol runat='server' ColName='OrderID' heading='Order#' width='60' />\r
55   <Rico:TableCol runat='server' ColName='CustomerID' heading='Cust#' width='60' />\r
56   <Rico:TableCol runat='server' ColName='ShipName' heading='Ship Name' width='150' CellStyleColID='Country' />\r
57   <Rico:TableCol runat='server' ColName='ShipCity' heading='Ship City' width='120' CellStyleColID='Country' />\r
58   <Rico:TableCol runat='server' ColName='ShipCountry' heading='Ship Country' width='90' id='Country' CellStyleColID='Country' >\r
59     <Rico:Style runat='server' StyleID='France' bgcolor="blue" color="white" />\r
60     <Rico:Style runat='server' StyleID='Switzerland' bgcolor="red" color="white" />\r
61   </Rico:TableCol>\r
62   <Rico:TableCol runat='server' ColName='OrderDate' heading='Order Date' datatype='date' width='100' HdgStyleId='RedHdg' color='red' dateFmt='d mmm yyyy' />\r
63   <Rico:TableCol runat='server' ColName='ShippedDate' heading='Ship Date' datatype='date' width='100' HdgStyleId='RedHdg' color='red' dateFmt='d mmm yyyy' />\r
64 </Rico:LiveGrid>\r
65 \r
66 </body>\r
67 </html>\r