When I set IsTabStop to false in the style for a CellControl, it does not work. TabNavigation still goes to that cell.
Is there any other way to prevent tab focus on the cell control?
Ok, so here is more detailed explanation to my problem:
As per requirement in my application, I have added checkbox column in my Extended XamGrid. Now, I want to allow only those cells to participate in the tab navigation which are either editable or are in add new row mode currently. I have tried setting IsTabStop property to False for this purpose in the style for CellControl and HeaderCellControl. It does work but in limited way. The keyboard focus is no more going to these cells. But say if I have 3 columns one out of which is checkbox, then below is the order of focus:
1. Tab -> Checkbox in first row focused2. Tab -> Checkbox in first row focused3. Tab -> Checkbox in first row focused4. Tab -> Checkbox in second row focused5. Tab -> Checkbox in second row focused6. Tab -> Checkbox in second row focused
Focus stays on checkbox only for as many number of times as the number of columns. Is this an issue in Infragistics grid or am I missing something here? Please help me fix this.
Hi,
I am also facing the same issue in xamgrid. Please let me know if you find any work around.
Thanks,
Hemant
Hello both,
Thank you for your post I have been looking into it and I created a sample project for you with the functionality you want. Basically I inherit the XamGrid in order to override the KeyDown event. In the KeyDown event handler I check which is the ActiveCell and if I don’t want I to get focus I move the focus till it reaches a Cell that I want to have focus . Please let me know if this helps you or you need further assistance on this matter.
Looking forward for your reply.
Thank you for your reply Stefan.
I had a look into the solution provided by you. It works fine with theexample provided by you. But it seems to be very specific to the model binded to the grid.
The inherited control which I am using in my application is used in almost 70 pages and forms. So I need to fix this in the control itself in a generic way. So I can not check against the Key property of the ActiveItem.
But if you are saying that this is the only possible way to achieve the fix to the problem mentioned, I think I will have to look into the cell properties like -> IsReadOnly/IsInAddModel/IsEditable and also check if there is any EditRowSettings/AddRowSettings available for the grid.
Apart from that, I will also have to handle Shift Tab. So following are the points to be taken care of:
Please correct me if I am wrong. Seems like a lot of handling and that too in the KeyDown override :(
I wish this was handled already in the XamGrid.
Hello,
Currently this approach seems to be the best one for achieving the result you want. If you want I can log a product idea, so this could become built in functionality.
Yes, please go ahead and add this point to your product idea list. Because otherwise, every developer who is consuming this control will have to write this functionality on her own, which I am thinking is common. Additionally, we can have a boolean property say AllowTabNavigationOnReadOnlyCells which would decide that read only cells would be part of tab navigation or not.
Also, if we add a pager to the XamGrid (Using PagerSettings), the tab focus always go to Pager first and then the cells, irrespective of whether it is kept at the top or bottom. TabNavigation should also consider position of the pager control.
Thanks for your efforts and help on this.
I have sent your Product Idea (Skip RaedOnly Cells) directly to our product management team. Our product team chooses new Product Ideas for development based on popular feedback from our customer base. Infragistics continues to monitor application development for all of our products, so as trends appear in requested ideas, we can plan accordingly.
We value your input, and our philosophy is to enhance our toolset based on customer feedback. If your idea is chosen for development, you will be notified at that time. Your reference number for this Product Idea is PI13030127
If you would like to follow up on your Product Idea at a later point, you may contact Developer Support management via email. Please include the reference number of your Product Idea in the subject and body of your email message. You can reach Developer Support management through the following email address: dsmanager@infragistics.com