Databinding and hierarchical controls

Discussion in 'ASP .Net' started by boomhauer@gmail.com, Sep 12, 2006.

  1. Guest

    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
     
    , Sep 12, 2006
    #1
    1. Advertising

  2. 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


    <> wrote in message
    news:...
    >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. Justin Gengo, Sep 12, 2006
    #2
    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. John Saunders
    Replies:
    0
    Views:
    375
    John Saunders
    Jul 15, 2004
  2. jobs
    Replies:
    0
    Views:
    1,631
  3. Replies:
    2
    Views:
    943
    Joseph Kesselman
    Nov 5, 2007
  4. Earl Teigrob
    Replies:
    1
    Views:
    406
    Shravan
    Mar 1, 2004
  5. bclegg

    Template controls and hierarchical data

    bclegg, Feb 5, 2004, in forum: ASP .Net Datagrid Control
    Replies:
    2
    Views:
    134
    Steven Cheng[MSFT]
    Feb 7, 2004
Loading...

Share This Page