Web-MA ASP.Net GridView Adapter pure-CSS style based

Current Version: 0.1.2 released on 07/02/2007

A Full CSS will be finally rendered by your ASP.Net Pages

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

The GNU license to which this software is referering is available at: http://www.gnu.org/licenses/gpl.txt

If you want, you can add a link to www.web-ma.com, making it easy for others to recognize the author of this script.

Why my own adapter?

First of all I'm obliged to say that I didn't re-invented the wheel as well as I don't write a new adapater method.
This solutions is simply based on the work ASP.Net team did with the version 1.0 of the ASP.NET 2.0 CSS Control Adapters.
The MS control's adapters is a great code, but unfortunately not all the code return a pure CSS rendering, expecially for the GridView control where, they simply replace some tags, but essentially leave the <table> tag inside the code.

As a web designer / developer, it's about 3 years that I don't use anymore the table into my web site and the idea to see just that gridview rendered in an old fashion style let me orrify until I decided to try to improve / extend the Microsoft Control Adapter.

Why use this adpater?

Well you aren't obliged to use it; as Scott's said in one of its posts, they are working on a pure-CSS solution, but meanwhile they release it you can work with my code if you like it.
Don't forget that actually the adapter is in a sort of beta stage. I wrote it yesterday afternoon, tested this morning and despite it seems to work quite well, I cannot assure that it will works in every environment (I did tests on Firefox and IE 7).
For the same reason a lot of new things can be added as well as be improved.

Also pay attention that a pure CSS solution also needs a good CSS design and since the tags are nested and the new table could be nested too not all design are immediately reachable.

How to use this adpater?

  1. Download and install the standard Css Adapter from Microsoft;
  2. Install and create a sample web site using the new template that CSS Adapater create for you;
  3. Get the WebControlAdapterExtender.cs and place a directory of your choice;
  4. Download the zip file attached at the end of this page;
  5. Unzip the WmGridViewAdapter.cs nto the same directory where you have place the WebControlAdapterExtender.cs. This is not mandatory, but just for your better organization;
  6. Unzip the GridView.css file and put into your CSS default directory;
  7. Add a reference at your new css file and link into the page where you will use the Gridview.
  8. Get the CSSFriendlyAdapters.browser from the default template, and place it into the App_Browser folder (if it doesn't exist, create it);
  9. Edit the CSSFriendlyAdapters.browser file to include only the WmGridViewAdapter (remove all the other registered adapters);
  10. Run and enjoy your code;


Get the Web-MA GridView Adapter pure-CSS style based

Back to Open Source Utility list.

Copyright © 2007 - 2008 http://www.web-ma.com. All rights reserved.