How do I change the parent of a gridview bound to a SqlDataSouce?

Discussion in 'ASP .Net Web Controls' started by Brian, Aug 10, 2006.

  1. Brian

    Brian Guest

    Hey There,

    I've created a custom control in ASP.Net based on a Panel.
    I've only overridden one method.
    In CreateChildControls I do the following:
    1. Create an ASP:Table, add a row, add a cell.
    2. Cycle through all of the controls of the custom control, remove them and
    add them to this table cell.
    3. Add the ASP:Table to the controls of this custom control.

    Databinding remains happy if I have TextBoxs or even DropDowns w/ a

    But when I add a GridView bad things begin to happen.

    The GridView appears to require that I do an extra step:
    Data gets bound to the gridview if I do this.
    But ... I can't seem to update the value's of any of the cells.

    Clearly there are forces at work that I'm not aware of.
    Can someone point me in the right direction?

    Brian, Aug 10, 2006
    1. Advertisements

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 (here). After that, you can post your question and our members will help you out.