FormView GridView connection

B

BJF

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
 

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

Similar Threads

FormView 3
FormView 0
FormView disappears 2
GridView & FormView: Failed to load viewstate 2
LINQ and FormView 0
FormView Custom Binding help 0
LINQ and FormView 0
GridView & FormView 1

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,479
Members
44,899
Latest member
RodneyMcAu

Latest Threads

Top