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
6 <script runat="server">
\r
8 Sub Page_Load(Sender As object, e As EventArgs)
\r
10 app.OpenGrid(ex2notheme)
\r
15 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
\r
18 <title>Rico LiveGrid-Example 2</title>
\r
20 <Rico:LoadClient id='RicoClient' checkQueryString='notheme' runat='server' />
\r
21 <link href="../demo.css" type="text/css" rel="stylesheet" />
\r
26 <div id='explanation'>
\r
28 <script type='text/javascript'>
\r
29 document.write(Rico.Lib+' '+Rico.LibVersion);
\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
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
46 <Rico:LiveGrid runat='server' id='ex2notheme' fmt="json" DefaultSort='OrderID' menuEvent='click' frozenColumns='1' HdgHoverStyleId="GrayText" highlightElem='cursorRow'>
\r
47 <Rico:Style runat='server' StyleID='DefaultHdg' BackColor="black" ForeColor="white" HorizontalAlign="center" Bold="true" />
\r
48 <Rico:Style runat='server' StyleID='RedHdg' BackColor="red" ForeColor="white" HorizontalAlign="center" Bold="true" />
\r
49 <Rico:Style runat='server' StyleID='GrayText' ForeColor="#dddddd" />
\r
50 <Rico:Style runat='server' StyleID='ricoLG_oddRow' BackColor="#eeeeee" />
\r
51 <Rico:Style runat='server' StyleID='ricoLG_selection' BackColor="yellow" />
\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' BackColor="blue" ForeColor="white" />
\r
60 <Rico:Style runat='server' StyleID='Switzerland' BackColor="red" ForeColor="white" />
\r
62 <Rico:TableCol runat='server' ColName='OrderDate' heading='Order Date' datatype='date' width='100' HdgStyleId='RedHdg' ForeColor='red' dateFmt='d mmm yyyy' />
\r
63 <Rico:TableCol runat='server' ColName='ShippedDate' heading='Ship Date' datatype='date' width='100' HdgStyleId='RedHdg' ForeColor='red' dateFmt='d mmm yyyy' />
\r