On my WebForm I have 3 GridViews. The First displays a summary of data from a database table. The Second, displays the detail record from the record chosen in the First. Within the Second GridView there is a column with a Select CommandField that allows the user to view comments related to the record displayed in the Second GridView. When clicked the Third GridView shows all comments (like a bulletin board).
The problem I am having is that when a user selects a new record to view both Summary and Detail information from, the Comments DataGrid does not reset itself to blank. It retains the the last viewed selected comments from the previous record.
In my code for the Summary Gridview I have a method:
What I am attempting to do is to place a function in the code behind that will refresh the Comments Gridview to blank:
public void Select_New(object sender, EventArgs e)
if (SqlDataSource3 != null)
I know the clear method is invalid in 2.0.
Can someone tell me how I can get the comments table to postback or refresh to its original display (blank) when a new record is selected? I want this datagrid to be blank unless the user chooses to view the comments.
Hope this makes sense.