Hello,
I have an application that uses the XamGrid and i would like to navigate throught it by buttons.
When the XamGrid is in a "normal" state as that :
The navigation i implemented works fine (even with filters).
The problem concern the group, when i want to pass to the next element as that :
I got an exception because the next element taken is the value inside the cell (here a string).
Is there a way to solve it ?
I join a .sln to show you how i implemented the navigation.
Regards.
Hi,
I was wondering if you had any further questions.
There is a dependency property ActiveItem that you can bind to a property in your VM to get the currently active cell or row.
thanks for the reply, effectively it solve the performance issue but in my case in need to have the data rely on activecell.
Is there another way to rely the ActiveItem to the data ?
It looks as if you are relying on activeCell and activeRow throughout your sample, which is going to cause you performance issues when you try to re-position using your buttons.
You should use scrollcellintoview. I commented out your code in the chercher_dernier_item and chercher_premier_item functions which resolves the issue to the first or last row.
//NOTE : this row take too much time the first time
//grid.ActiveItem = row.Data;
grid.ScrollCellIntoView(row.Cells[0]);
row.IsSelected = true;
But you will need to work thru the logic issues that are caused by your not now having an active row for your other code.
the code is in the solution i attached is the precedent post, i marked the line with a note in the file "NavigationGrilleInfragistics.xaml.cs" in the function chercher_premier_item at line 361.