Current location: Hot Scripts Forums » Programming Languages » ASP.NET » Grid View Toggle Detail


Grid View Toggle Detail

Reply
  #1 (permalink)  
Old 02-06-08, 04:38 AM
Rapid Dr3am Rapid Dr3am is offline
Community VIP
 
Join Date: Jan 2004
Location: Liverpool, England
Posts: 752
Thanks: 0
Thanked 0 Times in 0 Posts
Grid View Toggle Detail

Hi,

Me again! Right so now I'm designing a GridView (yeah fun i know).

What I'm doing is pulling rows from my db so I'm pulling:

FName, SName, Telco, MTelco, EMail, Comments.

What I want to do is display them like this:

FName | SName | Telco | MTelco
- Toggle Button -
---------------------------------------------------
EMail | Comments
---------------------------------------------------

I'm not afraid to use JS (will be ajaxed at a later date as will the whole system. Any help would be appreciated. I'm using C# as codebehind.
__________________
Placeholder, place signature here.
Reply With Quote
  #2 (permalink)  
Old 02-06-08, 05:03 AM
omniman's Avatar
omniman omniman is offline
Coding Addict
 
Join Date: Aug 2006
Location: Baltimore, MD
Posts: 342
Thanks: 0
Thanked 1 Time in 1 Post
There are a few ways to handle this...

1. If you really want to stick with the gridview, you can modify the HTML output in the pages PreRender event and add another row below the main GV row. In that you can place a collapsible panel with the detail.

2. Or, ditch the gridview and use a repeater. Then you can place the extra row and panel right in the markup and you'll be done.

The second option is easier at first glance. But it can get tricky if you plan to use some of the GV's features such as paging, sorting, or selecting. If that's the case, I would go for option 1.

You can also make the GV one big template cell. Then nest a table in there yourself. That way you wouldn't have to touch it in PreRender, but wouldn't have as much flexibility.

So, it's pretty much a tradeoff between flexibility and ease...
__________________
"Political Correctness is a doctrine, fostered by a delusionary, illogical, liberal minority and rabidly promoted by an unscrupulous mainstream media, which holds forth the proposition that it is entirely possible to pick up a turd by the clean end."
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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 Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Displaying Results in a Grid sccc2008 PHP 2 01-22-07 01:13 AM
Use forum points to view forum post CWY.net Script Requests 0 11-09-06 08:19 PM
Displaying a grid of images. AkaMadDiSk Script Requests 2 04-26-06 06:14 PM
visual basic problem I cannot solve: data grid : need vb programmer for hire chrismonroe10 Visual Basic 1 03-25-05 06:42 PM
detail data, with next previous record ivan PHP 2 12-30-03 06:40 PM


All times are GMT -5. The time now is 02:35 PM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.