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.
Is anyone can help me ?
Hi,
I ran you sample and realized that you need to determine if the activecell is part of a GroupByRow and decide what to do if it is.
I added some code to your AllerSuivant event to give you the idea.
Please let me know if you have any questions.
Thanks for the explanations. I found a way to do what i want with the ParentRow and RowType properties but now i have an issue when few groups are apply with a lot of data.
I tested with 5 groups and 20000 elements
When i'm positioning on the first element and i click on the button to go the last element i have to wait around 5 minutes to be positioned on the element. I found that's it's the affectation of the ActiveItem causes this latency.
With no groups the positioning is immediate.
Is there a way to improve that ?
In the solution there is a component that regroup the four buttons for the navigation with a dependency property of type XamGrid. In that way the navigation can be apply on any XamGrid.
First of all I wish you an happy new year.
I would know if someone find a solution to my issue ?
Thanks and happy new year to you as well.
Could you provide me with your code for repositioning / navigating with the buttons? I understand conceptually what you are doing but without the details it’s hard for me to say what is causing the delay.
If you can attach your code to the thread that would be very helpful to me.
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.
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.
Hi Fabian,
Thanks for posting your solution. I’m sure it will be interesting to others.
Please let me know if you have further questions.
I tried you suggestion bu it didn't work, i already had a binding on the ActiveItem and affect it or the element produce the same issue.
But i found a solution by using the following properties :
- ScrollCellIntoView : it shows the good element,
- IsSelected : on the row to highlight it,
- IsActive : on the first cell of the row to get the data of the row.
I attach the solution if anyone else is interest.
Regards ans thanks for the help.
Fabien.
HI,
I didn't see your response. Please take the time you need to review.
I was wondering if you had further questions.
Sorry I didn't try what you suggested yet. I'll write you in few days.