Databinding and hierarchical controls

B

boomhauer

I cant seem to find info online about this so thought id ask..

I have an asp.net 2.0 page that has:

1. an infragistics calendar control
2. a DDL that has an ODS with a param pulled from the calendar
3. a gridview with ODS that binds a param from the DDL key

the problem im having is, on chanigng the infragistics calendar, the
page seems to databind the gridview first, and then the DDL... but
obviously this leads to problems since the grid is depending on the DDL
for an input param.

I can make it work by calling a DataBind() on the controls in quest,
but this seems to cause multiple binds to be performed... works, but
definately not efficient.

Is there a way i can force this to perform automatic binding in the
correct sequence?

Thanks
 
S

S. Justin Gengo

Boomhauer,

While I think that the automatic databinding features of .NET are pretty
neat and I use them on occasion, when you get down to needing logic like you
are utilizing I think it's better to do the databinding yourself in the code
behind.

I would suggest that the most efficient way for you to do this will be to
specifically databind each control based on events fired by the previous
controls. This way you'll be certain to have the most efficient code
possible.

Or, in other words, no, I don't know of a way to use the auto-binding and
set which control is bound first... :)


Regards,

--
S. Justin Gengo
Web Developer / Programmer

Free code library:
http://www.aboutfortunate.com

"Out of chaos comes order."
Nietzsche
 

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

Forum statistics

Threads
473,755
Messages
2,569,535
Members
45,007
Latest member
obedient dusk

Latest Threads

Top