a second nested gridview


J

JohnE

Hello. I have a main gridview that lists all requests. The first nested
gridview shows any children of the main gridview. The second nested gridview
shows the children of the first nested gridview. I can populate all the
gridviews accordingly. Even have small arrows to point right or down to show
the children of both gridviews. It all looks like the following;

main gridview
first nested gridview
second nested gridview

But, I am puzzled. On the main gridview the arrows work to expand/collapse
with the exception of those requests that are also children of a different
request. This never occurred until the second nested gridview was added.
Given that the outcome was to be the same, my thinking was that everything
just needed to be duplicated, tweak a bit, and all should be fine. My
thinking was flawed. The nested gridviews work but the main does not. I
could be putting more thought into this when I may not need to.

Does anyone know of a good example where there are multilevel nested
gridviews explained?

Thanks...John
 
Ad

Advertisements

M

Mr. Arnold

JohnE said:
Hello. I have a main gridview that lists all requests. The first nested
gridview shows any children of the main gridview. The second nested gridview
shows the children of the first nested gridview. I can populate all the
gridviews accordingly. Even have small arrows to point right or down to show
the children of both gridviews. It all looks like the following;

main gridview
first nested gridview
second nested gridview

But, I am puzzled. On the main gridview the arrows work to expand/collapse
with the exception of those requests that are also children of a different
request. This never occurred until the second nested gridview was added.
Given that the outcome was to be the same, my thinking was that everything
just needed to be duplicated, tweak a bit, and all should be fine. My
thinking was flawed. The nested gridviews work but the main does not. I
could be putting more thought into this when I may not need to.

Does anyone know of a good example where there are multilevel nested
gridviews explained?

Your friend is Google.

<http://www.codeproject.com/kb/aspnet/MultiNestMDGridview.aspx>
 
Ad

Advertisements

J

JohnE

Mr. Arnold said:

Google has been my friend for a very long time. But once in-a-while my
friend lets me down. I had seen and looked over the one you referred to but
it does not fit with mine. I do not use RowEditing but rather RowDataBound.
Plus, the example (albeit a good one) has the nested grids appear at the end.
My nested grids show underneath each other, in a new row, indented of
course.

Here is what the first nested grid looks like:

<%--The first nested gridview information--%>
<asp:TemplateField>
<ItemTemplate>
</td></tr
<tr>
<td colspan="100%" >
<div id="div<%# Eval("ChangeRequestID")
%>" style="display:none;position:relative;left:50px;" >
<asp:GridView
ID="gvwChangeRequestChildren"
runat="server"
Width="70%"

AutoGenerateColumns="false"
EmptyDataText="No
child change requests for the above selected parent change request."

DataKeyNames="IsChildOf"
Font-size="10px">
<Columns>
<asp:BoundField
DataField="ChangeRequestID" HeaderText="Child ID" />
<asp:BoundField
DataField="ChangeRequest" HeaderText="Change Request" />
<asp:BoundField
DataField="DevTargetEndDate" HeaderText="Target End Date"
DataFormatString="{0:M-d-yyyy}" />
</Columns>
</asp:GridView>
</div>
</td>
</tr>
</ItemTemplate>
</asp:TemplateField>

Now I thought the second nested gridview would be similar. But the
expand/collapse arrows are now acting different with the second nested
gridview included. Otherwise it all works/looks like it should.

What the expand / collapse arrows are doing is if there is a child of a
child, then the main gridview arrow for that request does not work. The main
gridview shows all requests. The first nested shows children of those on the
main gridview. The second nested shows children of the first nested
gridview. The whole thing is a drilldown style. So, as you can see, when
the second nested gridview gets added, the arrows go funky. Back it out,
everything returns to proper operating.

So goes the dillemma.

.... John
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top