Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
Classic ASP Professional For advanced coder questions in ASP 3. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Professional section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old September 1st, 2005, 01:42 PM
Authorized User
 
Join Date: Jul 2004
Location: Bellevue, WA, USA.
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
Default DataGrid Multi-Column

Hello,

I am looking for a data grid that can do the following. Perhaps, I can modify the .Net ASP Datagrid control from MS Dev Studio to do this, but not sure what the approach is. I am looking for a datagrid that can display data in news paper like columns, with 2 or more columns. For example, names would be in the first column, second column, third column and fourth column. The below example would have 16 rows, 1 for each name in a column. Also, I am looking for sorting by first letter of the name, but a sort selector on top of the grid.

A C D F L M N O
Name Name Name Name
Able Cindy Francis Michelle
Amy Clark Frank Mike
Andy Debbie Louise Nat
Cathy Don Lowell Opal

Can the .Net control be modified to do this? Are there controls that can be purchased that do this?
  #2 (permalink)  
Old October 5th, 2005, 02:19 PM
Registered User
 
Join Date: Oct 2005
Location: , Virginia, USA.
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Sounds like you should be looking at using either a DataList or DataTable instead of a DataGrid. I've used a DataTable but it requires you to programatically fill each cell. A DataList makes for easier databinding than the Table but you will have to do some research to see if it has the option of multiple columns. I believe it does but I have no experience with it.

Basically the DataGrid has the least flexability but is easier to use. The Table has the most flexibility & the least overhead (probably making the code faster) but is harder to use. The DataList is in between.

  #3 (permalink)  
Old October 5th, 2005, 02:28 PM
Registered User
 
Join Date: Oct 2005
Location: , Virginia, USA.
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default

A simpler solution if you don't need to alow the user to modify the data would be a ListBox. It definitely has multiple columns and can be databound. You can either have the ListBox sort the items by default or have a separate button toggle the ListBox sort property between true and false. You can also create a DataView which can be sorted by a different value from the DataSet and bind the ListBox to that.

  #4 (permalink)  
Old October 5th, 2005, 03:44 PM
Registered User
 
Join Date: Oct 2005
Location: , Virginia, USA.
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default

My first reply should read Table instead of DataTable, they are different things. sorry

  #5 (permalink)  
Old October 5th, 2005, 06:02 PM
Friend of Wrox
Points: 6,664, Level: 34
Points: 6,664, Level: 34 Points: 6,664, Level: 34 Points: 6,664, Level: 34
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2004
Location: Sydney, NSW, Australia.
Posts: 1,870
Thanks: 12
Thanked 20 Times in 20 Posts
Send a message via AIM to mat41
Default

Fellas - this is not the .net area of this forum.

Wind is your friend
Matt


Similar Threads
Thread Thread Starter Forum Replies Last Post
Multi Column Combo Box in Datagrid View Columns HemaChaudhry Visual Basic 2005 Basics 1 September 20th, 2007 07:51 AM
Multi column search and compare luxcs Excel VBA 1 November 16th, 2006 02:45 PM
List Tool Multi Column? Vendlus BOOK: Professional SQL Server Reporting Services ISBN: 0-7645-6878-7 1 April 28th, 2006 06:39 AM
Multi column combo lists c_olinrb Access 4 July 21st, 2005 09:21 AM
multi-column combo myth12345 VB How-To 1 January 3rd, 2005 04:29 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.