Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP .Net (http://www.velocityreviews.com/forums/f29-asp-net.html)
-   -   Hide / Show Details (http://www.velocityreviews.com/forums/t100696-hide-show-details.html)

=?Utf-8?B?R3JlZw==?= 04-14-2005 08:36 PM

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,




=?Utf-8?B?RGF2ZSBCcml0dG9u?= 04-15-2005 03:25 AM

RE: Hide / Show Details
 
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,
>
>
>



All times are GMT. The time now is 11:26 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.