I have a data grid that is bound to a generic collection. In the Page_Load event, I check for !this.IsPostback and call DataBind on the grid accordingly.
Then if I try to implement sorting by specifying the uniquename and sortexpression, it expects me to call DataBind even if the page is a postback.
How is this situation normally tackled? Calling unconditional DataBind in Page_Load does not seem like a good idea.
Call your databind code at the SortCommand Event: