Dodgy Nested Grid Update!

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Adam Knight

    Dodgy Nested Grid Update!

    Hi all,

    I have a data list whose item template contains a user control which
    consists of a datagrid.

    Everything is working fine, except one glaring problem!!!

    I enter updated info into the edit textboxes provided by the grids edt item
    template and click update.
    The updates don't take affect. It appears from my debugging that when the
    form is posted back the original values
    are posted and not the updated values.

    Anyone have any ideas on how to get around this?
    Or have any ideas on what is going on?

    Cheers,
    Adam


  • Phillip Williams

    #2
    RE: Dodgy Nested Grid Update!


    "Adam Knight" wrote:
    [color=blue]
    > Hi all,
    >
    > I have a data list whose item template contains a user control which
    > consists of a datagrid.
    >
    > Everything is working fine, except one glaring problem!!!
    >
    > I enter updated info into the edit textboxes provided by the grids edt item
    > template and click update.
    > The updates don't take affect. It appears from my debugging that when the
    > form is posted back the original values
    > are posted and not the updated values.
    >
    > Anyone have any ideas on how to get around this?
    > Or have any ideas on what is going on?[/color]

    Your implementation of a nested DataGrid can affect the ViewState of the
    EditCommandColu mn.

    You would not have a problem placing a grid inside a DataList if your
    implementation, for example, were as simple as placing everything on the aspx
    page without using the Codebehind, e.g.:


    But if you are using the Codebehind class and building your nested DataGrid
    upon Databinding the DataList, then you need to manage the ViewState for the
    EditCommandColu mn by yourself, as in this example:


    Let me know if this solved the problem. Otherwise post the significant
    pieces of code of your implementation.

    ---
    Phillip Williams



    Comment

    Working...