I've a DataGrid and its bound to a SqlDataSource with a SelectCommand. Now I have to populate this grid with data based on search criteria specified by user.
By default it loads all records because that is what the SelectCommand in the SqlDatasource does. But when the user makes a search criteria and cicks on Search, I change the SelectCommand and call DataBind on the Grid. But once I click on Page 2, it takes the default SelectCommand of the SqlDataSource and shows all records, which is default state.
Is there a work around, or am I doing something wrong with these controls?
“The thing for you is a burial permit. You have only to speak and I will see that you get it.”