| DataGrid |
A grid is a standard way to display DB records in an X-Y manner. Let's see a basic way of displaying a grid of records using the DataGrid control of VS.Net -
| <!--T_grid_1.aspx--> <%@ Import Namespace="System.Data.OLEDB" %> |
Now, let's see the way to do it in Tornado.
| <!--T_grid_2.aspx--> <script language='vb' runat='server'> |
You might notice that this Tornado display page has some built-in nice colors, title and record navigation without any programming. To produce the equivalent of this using the standard controls in VS will take considerable effort. But the more important point is that many of the programming chores are hidden and that would allow you to concentrate on the business logic which in this case is the datasource and the query.
Does Tornado work with VS controls? See it for yourself -
| <!--T_grid_5.aspx--> <%@ Import Namespace="System.Data" %> |
If you are still thinking about how to reproduce the equivalent of a Tornado output using VS.Net, I hope the following example will put the issue to rest. This advanced example consists of 2 files - Master and Slave displaying embedded grid, aggregates and a spinning pie chart of the drill down details! This 38 lines of code can produce a very fancy application that is beyond the reach of many web programmers.
Master and Slave in one file - Display a master grid with an embedded slave grid
| <!--T_grid_3.aspx--> <body onLoad="self.focus()"> |