hosting ascx's inside a datagrid....

Discussion in 'ASP .Net Building Controls' started by Jim, Oct 2, 2003.

  1. Jim

    Jim Guest

    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
     
    Jim, Oct 2, 2003
    #1
    1. Advertising

  2. Jim

    Zi Guest

    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
     
    Zi, Oct 2, 2003
    #2
    1. Advertising

  3. Jim

    Jim Guest

    not yet will post when i get a solution

    Earth Worm Jim

    "Zi" <> wrote in message
    news:...
    > 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
     
    Jim, Oct 2, 2003
    #3
  4. Jim

    Jim Guest

    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

    "Jim" <ssss> wrote in message news:#...
    > not yet will post when i get a solution
    >
    > Earth Worm Jim
    >
    > "Zi" <> wrote in message
    > news:...
    > > 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

    >
    >
     
    Jim, Oct 6, 2003
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Quentin
    Replies:
    1
    Views:
    521
    Quentin
    Jul 29, 2003
  2. Jim
    Replies:
    3
    Views:
    422
  3. Jim

    hosting ascx's inside a datagrid....

    Jim, Oct 2, 2003, in forum: ASP .Net Datagrid Control
    Replies:
    3
    Views:
    115
  4. Jim

    hosting ascx's inside a datagrid....

    Jim, Oct 2, 2003, in forum: ASP .Net Web Controls
    Replies:
    3
    Views:
    106
  5. teo1991
    Replies:
    0
    Views:
    671
    teo1991
    Apr 2, 2009
Loading...

Share This Page