473,804 Members | 2,257 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Hide / Show Details

Hello,

I am trying to display order ids and order details (order items).
I would like to give the user Hide/Show option to either display or hide
order details.

The page would look like:

Expand All Collapse All

=============== ====
Order 1
Hide Details
Item 1
Item 2
Etc
=============== ====

=============== ====
Order 2
Show Details
=============== ====

Any ideas how to accomplish this (could it be done with client site code)?
Thanks,

Nov 19 '05 #1
2 2583
Hi Greg,
There are a couple of ways to do this - essentially what you need is some
JavaScript to set things to hidden or not.

You could start with building a client side function something like:
<script language="javas cript">
function setVisibleStatu s(element)
{
if (document.all[element].style.display= ="")
{
document.all[element].style.display= ="none"
}
else
{
document.all[element].style.display= ""
}
}
</script>

This function will toggle this supplied element id to shown or hidden.

Then, as you are writing out your data you would need to add in hooks to
this function. So, let's say you are using the DataGrid for this, in the
ItemCreated event for the grid, you could use the
control.Attribu tes.Add("onclic k", "setVisibleStat us('tablerowid' )"), or
something similar.

Hope this gives you a start ...
Dave

"Greg" wrote:
Hello,

I am trying to display order ids and order details (order items).
I would like to give the user Hide/Show option to either display or hide
order details.

The page would look like:

Expand All Collapse All

=============== ====
Order 1
Hide Details
Item 1
Item 2
Etc
=============== ====

=============== ====
Order 2
Show Details
=============== ====

Any ideas how to accomplish this (could it be done with client site code)?
Thanks,

Nov 19 '05 #2
Hi Greg,
There are a couple of ways to do this - essentially what you need is some
JavaScript to set things to hidden or not.

You could start with building a client side function something like:
<script language="javas cript">
function setVisibleStatu s(element)
{
if (document.all[element].style.display= ="")
{
document.all[element].style.display= ="none"
}
else
{
document.all[element].style.display= ""
}
}
</script>

This function will toggle this supplied element id to shown or hidden.

Then, as you are writing out your data you would need to add in hooks to
this function. So, let's say you are using the DataGrid for this, in the
ItemCreated event for the grid, you could use the
control.Attribu tes.Add("onclic k", "setVisibleStat us('tablerowid' )"), or
something similar.

Hope this gives you a start ...
Dave

"Greg" wrote:
Hello,

I am trying to display order ids and order details (order items).
I would like to give the user Hide/Show option to either display or hide
order details.

The page would look like:

Expand All Collapse All

=============== ====
Order 1
Hide Details
Item 1
Item 2
Etc
=============== ====

=============== ====
Order 2
Show Details
=============== ====

Any ideas how to accomplish this (could it be done with client site code)?
Thanks,

Nov 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
12644
by: Roger Godefroy | last post by:
Hi There, I would like to show details in another (hidden) TR. It should look like something like on an image I have found wich illustrates it exactly is I want: http://otn.oracle.com/tech/blaf/specs/hide_show/hide_show_VIEWdetails_white1.gif Is there a sample code to do this? I allready could change the status from a hidden tr using:
3
2957
by: alex | last post by:
I'd like to have a show/hide widget on my web site, kind of like "show details" / "hide details" in Google Groups. Is there a tutorial explaining how to make them? Google's is a bit complex and it's easy to get something wrong. If the browser does not support the required features, I want it to generate a completely static page with the "details" shown automatically.
8
2428
by: Alex Nitulescu | last post by:
Hi. I have the following question - is it possible (I assume it is, but I have no idea how to do it) to HIDE the href text which automatically shows in the status bar of IE ? I have build a templated, data-bound custom control. Using it, I am showing a list of names from the Authors table, using hypertext links with the text set to the name of the person, such as: RINGER, PAUL RINGER, JANE each of the links pointing to a Details form,...
0
265
by: Greg | last post by:
Hello, I am trying to display order ids and order details (order items). I would like to give the user Hide/Show option to either display or hide order details. The page would look like: Expand All Collapse All
1
2712
by: Joe | last post by:
Hello All: I want to create a datagrid that looks like the following (here SHOW DETAILS and HIDE DETAILS would be link buttons which display detail information. Effectively they would toggle the detail information for a datarow in the datagrid): Header1 Header2 Header3 SHOW DEATILS value 123 myEntry1 SHOW DEATILS value 123 myEntry2
0
3457
by: Reinhard | last post by:
Hi, Need some directions on Ajax, UpdatePanel and Gridview to achive the following: I like to show a Gridview with Data ONLY if the user is interested in Details, but without a full page reload! If the page loads, only a summary (eg. COUNT of recs) should be displayed
0
1072
by: voroojak | last post by:
Hi I have some problem with report service in sql 2005. what ia mdoing is that when the report is generated first just show some columns and if they wants to see the details they have to click on each line to see the details. for example my report first is showing res_is, res_name and appl_num but when the want to see the details for that res_id or res_nam they can click on ot and see the mem_id and the year and week , ....(all the details...
10
11774
by: sara | last post by:
Hi - Is it possible to hide the detail section of a report at run time? I have a report that prints all details, with summary lines. The user would like the report ALSO with just summary lines. It seems the simplest thing is to run the code (see below) once with the detail section showing, and a second time hiding the detail section. I can't figure out the code to do that and don't see it posted.
0
10791
Debadatta Mishra
by: Debadatta Mishra | last post by:
Introduction In this article I will provide you an approach to manipulate an image file. This article gives you an insight into some tricks in java so that you can conceal sensitive information inside an image, hide your complete image as text ,search for a particular image inside a directory, minimize the size of the image. However this is not a new concept, there is a concept called Steganography which enables to conceal your secret...
0
9594
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10346
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10347
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10090
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7635
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6863
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5531
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5673
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
3001
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.