ASP.Net Grideview - Editing wrong row, after a where clause has been applied
Posted on 2011-09-07
I have a standard gridview that is bound to a linq datasource. Editing/Updating worked fine till I started to filter the datasource.
When the user clicks the search button the datasource correctly filters the grid but when I select 'Update' on one of the rows
- The where clause is no longer used and I see all of the row again
- The wrong row is showing the edit controls in the grid.
Below is the code behind the 'Search' button.
User_LinqDataSource.Where = "User_FirstName.Contains(@First)"
I am very new to databound controls so I hope this is an easy one for somebody.
Visual Studion 2010