DataBind and Postback
        Posted  
        
            by Michael La Voie
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Michael La Voie
        
        
        
        Published on 2009-05-06T19:09:33Z
        Indexed on 
            2010/06/10
            14:53 UTC
        
        
        Read the original article
        Hit count: 317
        
This is a general how does DataBind work questions...
I have a simple page with a GridView that is bound (in the aspx code) to an ObjectDataSource.
I can look in the Select() function called by the ObjectDataSource to see that it is called on the initial load and on every post back. I have some logic that happens on post backs that will affect the GridView's data, and I want to call GridView.DataBind() later on in the post back, after I've made some changes.
Is there a way to prevent the automatic rebinding that happens on each post back? Does this mean I can't use an ObjectDataSource for this control?
© Stack Overflow or respective owner