User controls and data binding based on event (ASP.NET 2.0)

P

Piotrek

Hi.

I am developing a web app. On the main page I have two user controls:
searchControl and detailsControl. In the searchControl I have a
GridView. On this GridView DataBound handler I am checking if there was
some object found while searching (this control is used for searching).
If so, I am calling my event CustomerSelected passing ID of first
Customer from GridView.

The second control (detailsControl) should be displaying details of
Customer selected in first control. There is a FormViewControl, which
is used for it. This control has a method OnCustomerSelected, which is
a response for CustomerSelected event. In this method I am reading
passed Customer ID and I am calling FormView.DataBind() method.

The problem is that FormView does NOT show the results. I set breaking
points, so I know that proper methods are called with proper
parameters, needed data is retrieved from DB, but it is not displayed
in the FormView. Moreover I added button - after clicking on it all
data is shown (but no queries are fired).

Where is the problem? Is it somehow connected with events order? How to
fix it?

Thanks in advance,
Piotrek
 

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

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,904
Latest member
HealthyVisionsCBDPrice

Latest Threads

Top