When displaying data, we sometimes would like to group data for better user experience or when displaying long list of hierarchal data, we would want to display them in a tree view kind of structure. There is more than way of doing this, but I am going to explain achieving this functionality using  AJAX Collapsible Panel Extender Control .   Overview: I am going to use  Adventure Works  as datasource. Every product in  Production.Product  table belongs to a product sub category. We fetch handful of products and the sub categories they belong to from the database. Our objective is to list all the available sub categories and allow user to  expand/collapse  to look/hide the list of products belonging to each subcategory.   Database Connection Added following entry under  connectionStrings  element in  web.config .      < add   name = "Sql"   connectionString="Data Source=(local);      Initial  Catalog = AdventureWorks ...
C#, ASP.NET, .NET, Intermediate,Database,Database,Free source code, tutorials
 
Comments
Post a Comment