Posts

Showing posts from October, 2010

Simple Image SlideShow using jQuery

 have seen a lot of users requesting for simple jQuery scripts for SlideShows. I saw a couple of them, but the scripts assumed that the number of image tags has to be fixed beforehand. The code given below is taken from my eBook “ 51 Recipes with jQuery and ASP.NET Controls ”. Note: This code was written when jQuery 1.3.2 was the latest version available. Currently we have jQuery 1.4.2 available. < html xmlns ="http://www.w3.org/1999/xhtml"> < head id ="Head1" runat ="server"> < title > Simple Image SlideShow </ title > < link href ="../CSS/Demos.css" rel ="stylesheet" type ="text/css" /> < script type ='text/javascript' src ='../Scripts/jquery-1.3.2.min.js'> </ script > < script type ="text/javascript"> $( function () { var imgs = [ '../images/1.jpg' , ...

Creating groups and summaries in Grid View

GridView has a lot of improvements over the DataGrid but it still lacks some very important features. A recurring requirement not available in the GridView is to create groups and summaries. To create summaries we can easily code the RowDataBound event. Grouping is a more complex task, and involves more coding and debugging. But when we need to combine these two features the things really start to get messy. With this in mind I have implemented the GridViewHelper, as the name suggests, a helper class to aid the creation of groups and summaries. [ Online sample ] [ Download source code ] Using the GridViewHelper Below we will see some GridViewHelper samples. First we show the grid to which the groups and summaries will be created. The sample data comes from Northwind database, with a few modifications: ShipRegion ShipName OrderId ProductName Quantity UnitPrice ItemTotal NM Old Worl...