Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Hide / Show Details

Reply
Thread Tools

Hide / Show Details

 
 
=?Utf-8?B?R3JlZw==?=
Guest
Posts: n/a
 
      04-14-2005
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,



 
Reply With Quote
 
 
 
 
=?Utf-8?B?RGF2ZSBCcml0dG9u?=
Guest
Posts: n/a
 
      04-15-2005
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,
>
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
show hide divs - show last state upon reload/post ll Javascript 2 05-01-2008 12:15 PM
Show Details/Hide Details link button =?Utf-8?B?Sm9l?= ASP .Net 1 03-13-2006 04:51 PM
Datalist: "hide/show" more details Michel Couche ASP .Net 0 02-01-2006 02:42 PM
Warning "Re: Your details" & "Re: My details" Joe Lee Computer Support 3 05-17-2004 05:08 PM
I would like to hide details for my web-site Eitan ASP .Net 2 01-06-2004 10:42 PM



Advertisments