hosting ascx's inside a datagrid....

J

Jim

I have derived of DataGrid to give functionality of an expandable dataGrid
(similar to article in October2003 MSDN). I have override the LoadStateView
and SaveStateView to save the extra properties I have added to the derived
class.

It works perfectly fine at expanding and collapse the row that was clicked
on, it displays a web user control (*.ascx) correctly. When the refresh
button is pressed(F5) it refreshes correctly with the expanded row still
expanded and the web user control is displayed.

BUT

the problem is when I click on something inside the web user control
displayed in the expanded dataGrid row the action works fine BUT when the
main page refreshes and the datagrid is redrawn the web user control is not
displayed anymore....

So the question is if I display a web user control in a datagrid by
overriding the 'OnItemCreated' method do I have to do anything specifically
to save the State of the web user control?

If not does anyone no a solution to the problem?

Hope this makes sense....

Cheers

Earth Worm Jim
 
Z

Zi

Jim,
I am having a similar problem with a user control within a data
grid... did you find a solution? if so could you post please:)

Regards,

Zi
 
J

Jim

Zi

The answer for me was to call Page.DataBind() inside the web user control
(ascx file) when the button click event is fired.

HTH

Earth Worm Jim
 

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

No members online now.

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top