Still struggling with understanding the vast power of llblgen, i ran into something, which seems odd to me and gives me a headache
Situation:
GridView, LLBLGenDataSource (livepersistance=true) to an entitycollection named TUserCollection
on the page also a Filterbutton and a textbox.
The filterbutton_click action simply creates a new PredicateExpression based on the text entered in the textbox. And the gridview is automatically refreshed to the filtered data.
So far so good.
Now when i click the row's Edit button, which will bring the gridviewrow into editmode, the filter seems to be discarded, the full dataset again is shown in the grid, and the ROWINDEX of the row i clicked the edit button on, is put into edit mode, which can be a total different row, when the filter is gone.
e.g.:
Unfiltered grid:
- normal user 1 (edit)
- normal user 2 (edit)
- test user 1 (edit)
- test user 2 (edit)
Filter on the word test:
Code is something like:
DataSource.FilterToUse=new PredicateExpression(FieldCompareLike(UserNameField, "%test%"));
which shows filtered grid:
- test user 1 (edit)
- test user 2 (edit)
Now i click edit on test user 1. The result is, the full grid is shown again en the row of normal user1 is into edit mode.
What to do!?