I've created a search routine that uses a search string and some drop-down options to create a SQL query. I then assign this query to grdBrowse.SelectCommand = "query" on the search button click. This works fine and pulls the searched data correctly. The problem is when I click on the auto-generated Edit linkbutton. The gridview forgets my query string. That is, when I click the Edit linkbutton, the grid fills with nothing and hides itself. Doesn't the SelectCommand action assign a select command until it's changed? I'm really confused by that fact that it runs fine when searching, but editing breaks it. Has anyone had this problem or know of a solution? I'll keep looking around, but I'm hoping somebody knows what's up. Thanks!