FormView GridView connection

Discussion in 'ASP .Net Web Controls' started by BJF, Dec 6, 2005.

  1. BJF

    BJF Guest

    If someone could help...

    My goal is to attach a FormView control to a GridView control such that
    clicking the Select link on a record in the GridView will cause that record
    to be displayed in the FormView control.

    So far I've got the GridView displaying all the correct records, and the
    FormView populating on the page's initial load. The FormView has its own
    data source - it points to the same table the GridView uses, but has a
    'where' clause that refers back to the GridView control on two fields. The
    datasource has default values for those two fields, and the data that is
    displayed on the initial page load reflects the record whose keys equal the
    default values. So far, so good.

    When I click another line's Select link, the page repaints, but the
    FormView control is empty. Viewing the source I can see its skeleton, but
    no content. I've breakpointed at the control's PreRender function, and the
    DataItem is populated on the initial page load, but is null on the postback.

    I'm sure I'm missing something fairly basic. Can I get a point in the
    right direction?

    Thanks,
    Ben

    --
    BJF, Dec 6, 2005
    #1
    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. Giorgio
    Replies:
    0
    Views:
    3,531
    Giorgio
    Jan 9, 2006
  2. =?Utf-8?B?bWdvbnphbGVzMw==?=

    GridView Hierarchical View - Gridview in Gridview

    =?Utf-8?B?bWdvbnphbGVzMw==?=, May 9, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    17,940
    =?Utf-8?B?UGhpbGxpcCBXaWxsaWFtcw==?=
    May 9, 2006
  3. Chris

    Formview within Formview

    Chris, May 19, 2007, in forum: ASP .Net
    Replies:
    0
    Views:
    502
    Chris
    May 19, 2007
  4. BJF

    FormView GridView connection

    BJF, Dec 8, 2005, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    108
  5. David Thielen

    FormView/Repeater/ Eval(FormView data)

    David Thielen, Jun 16, 2006, in forum: ASP .Net Web Controls
    Replies:
    2
    Views:
    620
    David Thielen
    Jun 16, 2006
Loading...

Share This Page