At wit's end...

R

Roy

Hey all,

Have a nested datagrid with paging enabled. The nested portion is a
user control in the last column of the datagrid. The user control
column passes two variables, which is how the user control knows which
data to display. Simple really.

What happens is the first page of the datagrid displays fine. However,
if I click "next page","previous page", "last page", or "first page" to
display the next page of data, the nested datagrid no longer displays.
Using response.write's I've determined that after the initial page it
seems that the two variables *never get passed* to the user control,
hence it never displays anything, not even the column headers in the
nested datagrid.

Clearly it has something to do with me using the paging functions, but
I'll be darned if I can piece together what's going on.
 
M

Marina

Is the code passing the variables wrapped in an if statement checking for
postback? Make sure your code is passing the data to the user control on
every postback.
 
R

Roy

Nope, this is parent datagrid, you can see below how the variables are
passed in the last column:
.......
<asp:BoundColumn DataField="container" ReadOnly="true"
HeaderText="Container"></asp:BoundColumn>
<asp:BoundColumn DataField="pod" ReadOnly="true"
HeaderText="PoD"></asp:BoundColumn>
<asp:BoundColumn DataField="name" ReadOnly="true"
HeaderText="Name"></asp:BoundColumn>
<asp:BoundColumn DataField="doc" ReadOnly="true"
HeaderText="Doc"></asp:BoundColumn>
<asp:BoundColumn DataField="event_loc_ed" ReadOnly="true"
HeaderText="Location"></asp:BoundColumn>
<asp:BoundColumn DataField="pcfn" ReadOnly="true"
HeaderText="PCFN"></asp:BoundColumn>
<asp:TemplateColumn>
<ItemTemplate>
<asp:placeHolder ID="ExpandedContent" Visible="True"
Runat="server"> <tr><td colspan="11">
<UC_Grid:Nested id="FVDGrid" x=<%# container.dataitem("doc")%> y=<%#
container.dataitem("container")%> runat="server"/>
</td></tr></asp:placeHolder></ItemTemplate>
</asp:TemplateColumn>
</columns>
</ASP:DataGrid>
 
R

Roy

Actually, your postback comment has spurred a new line of thought in
me. Thanks!

I'd bet my bottom dollar that after the first postback on the main page
occurs, the last column (the user control) is not accessed. I have no
clue why, but still, that'd explain what's going on. The interesting
thing is I include a call to the "bindgrid" function when someone
clicks "next page" etc.... so I don't see why there would be any
difference between the first postback and each preceeding one.
 
M

Marina

Are you paging the outer grid or the inner one? Your post is very confusing.

Does the outer grid have the correct information after going to the next
page but the inner does not?

Can you put a simple reproduceable case of this and then post all the code,
so we could see exactly what you are trying to do.
 
R

Roy

Are you paging the outer grid or the inner one? Your post is very
confusing.

The outer grid is the one being paged.
Does the outer grid have the correct information after going to the next
page but the inner does not?

Correct. The outer grid displays fine for every page. The nested grid
does not display at all after the first page.
Can you put a simple reproduceable case of this and then post all the
code, so we could see exactly what you are trying to do.

That's alot of code and I suspect this google group page will truncate
all the info making it hard to read. :) Besides, I don't necessary
want anyone to do my job for me, I was just curious if anyone had any
ideas/tips or directions in which to push me.
 

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

Members online

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,046
Latest member
Gavizuho

Latest Threads

Top