Wrox Programmer Forums
ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Basics 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
Old June 5th, 2003, 02:32 AM
Registered User
Join Date: Jun 2003
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default Tabbing in Datagrids

Hello my name stephen McNeill a programmer for Flight-Refuelling in
(Dorset). I was wondering is it possible to tab between mulitple datagrids.
With each datagrid displaying different information depending on the tab
page name. My email is stephen.mcneil@flight-refuelling.com
Old June 5th, 2003, 10:13 PM
Friend of Wrox
Join Date: Jun 2003
Posts: 111
Thanks: 0
Thanked 0 Times in 0 Posts

I'm not exactly sure what you're trying to accomplish. However, in general, it is helpful to remember that ASP.Net pages output plain old HTML and javascript ('cause that's all a browser understands). If you are building some kind of HTML interface, which has "tabs", then you just need to pass some kind of information to the server about which tab the user has selected (eg using a HTML link control), and then build your page appropriately.
Old June 6th, 2003, 02:11 AM
Registered User
Join Date: Jun 2003
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts

What I'm trying to do is to make it look like multiple datagrids are super imposed over each other. Each datagrid has a tab or link at the top showing a variable (most likely a name), which can bring (when selected) a particular datagrid (data) to the top of the pile of datagrids. This idea is sometimes called folders, tabbing or property pages. I just want to know if it is possible to do such a thing.
Old June 6th, 2003, 02:04 PM
Imar's Avatar
Wrox Author
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts

Hi Stephen,

If I understand the situation correctly, yes, this can be done in ASP.NET.

The easiest way to set this up is to create a HTML table with the tabs and a few panels that contain the datagrids.

Each cell in the tab table contains a single tab with a hyperlink control. As soon as the hyperlink is clicked, a server side event is triggered. Inside the event, you can find out which tab was clicked and then hide all panels containing the grids and only show the right panel and datagrid for the current tab. You can then set the "selected" style for the current tab to make it appear selected.

The IBuySpy example (available from http://www.asp.net/Default.aspx?tabindex=5&tabid=42) shows how you can do this.

In fact, the whole ASP.NET site is based on this principle.



Similar Threads
Thread Thread Starter Forum Replies Last Post
datagrids dhoward VB.NET 2002/2003 Basics 8 May 24th, 2007 09:07 AM
Datagrids dhoward VB.NET 2002/2003 Basics 1 January 2nd, 2007 01:06 AM
Datagrids Louisa VB.NET 2002/2003 Basics 2 September 25th, 2004 09:55 AM
Tabbing in Excel Mac 2004 Hugh Excel VBA 0 July 17th, 2004 01:13 PM
DataGrids and DataKeyField booksnore2 Classic ASP Basics 2 July 5th, 2004 08:38 AM

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