George
George

Reputation: 3

asp.net gridview editing

I have a gridview (Edit and Delete enabled) that shows a table. A Text Box and A Button. When I type something in the textbox and click the button, the button runs the datasource.filterexpression and filters out the rows.

The question whenever I click on the edit button after the filter has been applied The grid auto resets back to the original table? How can I solve this?

Upvotes: 0

Views: 280

Answers (1)

Daniel Dyson
Daniel Dyson

Reputation: 13230

After saving the edited record in the GridView RowUpdating event, re-apply the filter and call DataBind()

Upvotes: 0

Related Questions