tags:

views:

90

answers:

2

Hi,

I have a child GridView which is displayed when a user selects a row in a the parent GridView. What the user can do is select items in the Gridview, which then go off to a results page. However, what I have is a button on the page which when clicked shows the user what they have selected. The problem is that when the button is pressed the child gridview is hidden, how do I (if it has been selected/displayed) keep it open/displayed?

Do I have to set up a variable which will hold whether the child gridview has been displayed, can I put it in the pages viewstate (I don't know anything about this as all this .net stuff is new to me)?

Thanks R.

A: 

Something quick you could try is to set

Visble=True

For your parent and child gridview in the button's handler

cptScarlet
No sorry, you seem to have misunderstood what I am trying to do.
flavour404
A: 

It's difficult to say without some sample code, but another possiblility is that when the button is clicked, the parent gridview is rebound to a data source (probably in the Page_Load event), but not the child gridview. Try rebinding the child gridview to its data source right after the parent gridview.

gvChildGrid.DataSource = {some data source}; gvChildGrid.DataBind();

Carl Hancke