<%@ LANGUAGE="VBSCRIPT" %> Rico SimpleGrid-Example 3
This SimpleGrid demonstrates how filters can be applied as the user types. Entries in the text boxes are case-insensitive. Filtering is performed on the client -- responsiveness will vary with the speed of the client computer, the number of rows in the grid, and the efficiency of the browser.
  // filterUI='t' --> text box
  // filterUI='s' --> select list
  var grid_options = {
    useUnformattedColWidth: false,
    FilterLocation:   -1,     // put filter on a new header row
    columnSpecs:  [,,{filterUI:'t',width:150},
                   {filterUI:'t',width:100}, {filterUI:'s',width:100},
                   {type:'date',width:90}, {type:'date',width:90}]
  };

<% dim grid,sqltext,rsMain set grid=new SimpleGrid ' create instance of class grid.AddHeadingRow false grid.AddCell "ID" grid.AddCell "ID" grid.AddCell "Shipment" grid.SetCellAttr "colspan",3 grid.AddCell "Date" grid.SetCellAttr "colspan",2 grid.AddHeadingRow true grid.AddCell "Order" grid.AddCell "Customer" grid.AddCell "Name" grid.AddCell "City" grid.AddCell "Country" grid.AddCell "Order" grid.AddCell "Ship" if OpenDB then sqltext="select OrderID,CustomerID,ShipName,ShipCity,ShipCountry,OrderDate,ShippedDate from orders order by OrderID" set rsMain = oDB.RunQuery(sqltext) while not rsMain.eof grid.AddDataRow grid.AddCell Server.HTMLEncode(rsMain("OrderID")) grid.AddCell Server.HTMLEncode(rsMain("CustomerID")) grid.AddCell Server.HTMLEncode(rsMain("ShipName")) grid.AddCell Server.HTMLEncode(rsMain("ShipCity")) grid.AddCell Server.HTMLEncode(rsMain("ShipCountry")) grid.AddCell rsMain("OrderDate") grid.AddCell rsMain("ShippedDate") rsMain.movenext wend oDB.rsClose rsMain end if grid.Render "ex3", 1 ' output html set grid=Nothing %>