Unbinding Dropdown after Bind?

Discussion in 'ASP .Net Datagrid Control' started by Mark, Jan 6, 2004.

  1. Mark

    Mark Guest

    I have a datagrid , which contains user controls. I dynamically create
    DIFFERENT user controls on the itemcreated event and insert them into the
    datagrid on load.
    The user controls have dropdown lists in them. When the user control loads,
    it binds these dropdowns. The initial load works great.
    When the user pages I need to cache what they changed on the current page to
    an object in session. So when I go back to the that page, their data is
    still there. I also need to validate the data when they change pages. So I
    need to rebind the grid to get the control values, becuase unless you
    rebind, the user controls aren't there and you can't get what data the user
    put in them.
    So I do that and then I look at the data and have to highlight "offending"
    fields in red. That means I need to REBIND again to reload the controls and
    show the proper display. When I rebind the second time, my dropdowns dont'
    show the selected item correctly. So what I somehow figured out was that
    after I rebinded the dropdowns on the second load, I set the
    ..datasource=nothing and the selected item came up fine. THIS IS REALLY
    WEIRD. Why would I need to set my datasource=nothing RIGHT AFTER binding it
    in order for the selected item to show up correctly?

    It works, so I'm fine, but some explanation would be cool.

    thx
     
    Mark, Jan 6, 2004
    #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. vishnu
    Replies:
    1
    Views:
    1,214
    Patrick.O.Ige
    Mar 25, 2006
  2. Sin

    Re: UNbinding a socket

    Sin, Jun 23, 2003, in forum: C++
    Replies:
    2
    Views:
    13,774
  3. Michael Furman

    Re: (OT) UNbinding a socket

    Michael Furman, Jun 23, 2003, in forum: C++
    Replies:
    0
    Views:
    1,399
    Michael Furman
    Jun 23, 2003
  4. Richard Spooner

    Unbinding sockets in threads..

    Richard Spooner, Aug 3, 2004, in forum: Python
    Replies:
    0
    Views:
    334
    Richard Spooner
    Aug 3, 2004
  5. Johnny Lin

    Unbinding multiple variables

    Johnny Lin, Jan 21, 2005, in forum: Python
    Replies:
    11
    Views:
    618
    Johnny Lin
    Jan 24, 2005
Loading...

Share This Page