GridView Tree Effect

I am curious if there is anyway to do the following:

GridView Normal View:

2008 | Name Of Something1 | ### | ### | Edit
2008 | Name Of Something2 | ### | ### | Edit
2008 | Name Of Something3 | ### | ### | Edit
2008 | Name Of Something4 | ### | ### | Edit
2008 | Name Of Something5 | ### | ### | Edit

Now when you select a row, it causes a tree effect like this:

2008 | Name Of Something1 | ### | ### | Edit
-Entry1 | Ranking | Score
-Entry2 | Ranking | Score
-Entry3 | Ranking | Score
2008 | Name Of Something2 | ### | ### | Edit
2008 | Name Of Something3 | ### | ### | Edit
2008 | Name Of Something4 | ### | ### | Edit
2008 | Name Of Something5 | ### | ### | Edit

I know GridViews are not all that custimizable in the grand scheme of things, so if there would be a better way to do this then let me know. I decided to go with the GridView cause it made it easy to create the Edit Template, Paginate, and Sortable.

Basically i think it would be a nested Gridview that is only viewable when that particular row is selected.

Ras

Have you tried the GridViewTree server control? Here http://www.DigitalTools.com/GVT.aspx

Consider using the DataList instead (no columns). Then use the SelectedItem template to embed another datalist/repeater.

hmm…yeah that probably would work, but I am kind of lazy right now and don’t want to go through all the trouble to create a pager/sorter for the datalist. That is why i went with the GridView. I will probably have to bite the bullet though.

Thanks
Ras

Well, if you can get to .NET 3.5 on this project, you have some new controls that can handle these cases very well (ListView and Pager).

ISTR that DataLists support paging, but I might be wrong. Repeaters 4 Lyfe.

.net 3.5…heh. I am just waiting for my VS08 to come. Said it won’t be here till feb. I am not holding my breath though.

Maybe i will put this particular piece of the puzzle aside till then.

Well, wwb is our resident repeater lover :slight_smile:

I didn’t mention repeaters because:

  1. you wanted selection - which DataList has

  2. I was confident that wwb would chime in :slight_smile:

Also, wwb is right, the 3.5 ListView is much more versatile, and the paging supports GET based paging as opposed to postback paging.

We just ordered 2008 for a few non-MSDN folks, so I would double check with the ordering department. It is definitely about for Select, Open and MSDN subscribers now.

As for repeaters, well, back in the dark old days of 1.1, the builtin controls (and VS 2003) did horrible things to your HTML. Coming out with anything approaching standards compliance was impossible without going “back to basics.” So you used alot of naked databinding, literals and repeaters. So much so that one usually quit using the fancier integrated controls as one had figured out how to mimic the key parts of those controls’ functionality without taking on that overhead. Things are alot better now, but I, for one, am thankful for having lived through the dark ages.

Consider yourself lucky. I still live in the dark times.

In the process of Downloading vs08…turns out the folks that control things never actually activated my MSDN subscription. Once i got that all squared away, then realized i could already download the program.

Kind of a slide from the thread topic here (but its ok since i started it), I just found out that my host, godaddy, does not yet support 3.5. So does this mean that i should not try to build anything with VS08 yet until they go to 3.5 or i find another host, or can i continue to build 2.0 websites on VS08 till i am ready to upgrade to 3.5?

Ras

VS2008 allows multi-targeting, so you should be good to go making 2.0 apps for your current hosting situation.

I suspect 3.5 support will be coming sooner rather than later anyhow.