473,405 Members | 2,354 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

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 2557
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="javascript">
function setVisibleStatus(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.Attributes.Add("onclick", "setVisibleStatus('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="javascript">
function setVisibleStatus(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.Attributes.Add("onclick", "setVisibleStatus('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
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: ...
3
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...
8
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...
0
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: ...
1
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...
0
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...
0
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...
10
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....
0
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
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...
0
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...
0
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...

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.