472,371 Members | 1,473 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,371 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 2466
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...
2
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and efficiency. While initially associated with cryptocurrencies...
0
by: Arjunsri | last post by:
I have a Redshift database that I need to use as an import data source. I have configured the DSN connection using the server, port, database, and credentials and received a successful connection...
0
hi
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific technical details, Gmail likely implements measures...
1
by: Matthew3360 | last post by:
Hi, I have been trying to connect to a local host using php curl. But I am finding it hard to do this. I am doing the curl get request from my web server and have made sure to enable curl. I get a...
0
Oralloy
by: Oralloy | last post by:
Hello Folks, I am trying to hook up a CPU which I designed using SystemC to I/O pins on an FPGA. My problem (spelled failure) is with the synthesis of my design into a bitstream, not the C++...
0
by: Carina712 | last post by:
Setting background colors for Excel documents can help to improve the visual appeal of the document and make it easier to read and understand. Background colors can be used to highlight important...
0
by: Rahul1995seven | last post by:
Introduction: In the realm of programming languages, Python has emerged as a powerhouse. With its simplicity, versatility, and robustness, Python has gained popularity among beginners and experts...
2
by: Ricardo de Mila | last post by:
Dear people, good afternoon... I have a form in msAccess with lots of controls and a specific routine must be triggered if the mouse_down event happens in any control. Than I need to discover what...
0
by: jack2019x | last post by:
hello, Is there code or static lib for hook swapchain present? I wanna hook dxgi swapchain present for dx11 and dx9.

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.