Possible to make conditional tab-order?

pdj
Member Posts: 643
I have a tabular form (a journal) with 30+ fields and a specific tab-order that jumps through 5 fields before jumping to a new line. This works fine. Now I need to add a column in the tab-order, but only if the user has made the column visible. First I simple added the column in the tab-order, but when the user doesn't show the colum it doesn't work. I have also tried setting the right control active in the OnDeactivate trigger, but that gives me a stack overflow error.
Simple example:
Type,No.(nextcontrol=Quantity),Description,Quantity(nextcontrol=No.)
Now I need to add a column between Description and Quantity, which (when visible) should be in the tab-order.
Any ideas on how to solve this, without making two forms?
Simple example:
Type,No.(nextcontrol=Quantity),Description,Quantity(nextcontrol=No.)
Now I need to add a column between Description and Quantity, which (when visible) should be in the tab-order.
Any ideas on how to solve this, without making two forms?
Regards
Peter
Peter
0
Comments
-
You can't change the NextControl property in code.
What happens when you set the NextControl property and then tab when the next control is not visible? I've actually never tried. Does the cursor just disappear into the invisible column until you TAB again?0 -
Nothing happens. It simply stays at the No. column ](*,)Regards
Peter0 -
How about this.
So you have column1 and when you tab off column1 it goes to next field...just standard.
Add an identical column, column1_2. Same field, same everything except the control number and the NextControl property.
In the OnActivate/Deactivate triggers for these columns and the one you show/hide you can make sure that the correct ones are visible. The only drawback I see is that for a moment you could have coumn1 and column1_2 both visible at the same time (until you activate and deactivate one of the fields).0 -
pdj wrote:I have a tabular form (a journal) with 30+ fields and a specific tab-order that jumps through 5 fields before jumping to a new line. This works fine. Now I need to add a column in the tab-order, but only if the user has made the column visible. First I simple added the column in the tab-order, but when the user doesn't show the colum it doesn't work. I have also tried setting the right control active in the OnDeactivate trigger, but that gives me a stack overflow error.
Simple example:
Type,No.(nextcontrol=Quantity),Description,Quantity(nextcontrol=No.)
Now I need to add a column between Description and Quantity, which (when visible) should be in the tab-order.
Any ideas on how to solve this, without making two forms?
You can put code on the form in the onafterdecativate trigger to then activate the next field you want. Sorry I can't remember exactly now. I uploaded a sample form for this some years back, but can't find it right now.David Singleton0 -
David Singleton wrote:You can put code on the form in the onafterdecativate trigger to then activate the next field you want. Sorry I can't remember exactly now. I uploaded a sample form for this some years back, but can't find it right now.matttrax wrote:In the OnActivate/Deactivate triggers for these columns and the one you show/hide you can make sure that the correct ones are visible.Regards
Peter0 -
pdj wrote:matttrax wrote:In the OnActivate/Deactivate triggers for these columns and the one you show/hide you can make sure that the correct ones are visible.
It turns out that Currform.<control>.VISIBLE doesn't change, just because a user hides a column. :^o
The user will have to close an re-open the form, to get it updated, but then it works like a charm. Thanks for your great suggestion =D>Regards
Peter0 -
Not a good solution if they have to close and reopen the form. If they can remember to do that they can remember to hit TAB one more time0
-
I agree :? It also ends up with atleast 9 speciale columns. Wouldn't like to be the next developer merging this object...
I have informed the customer, that it IS possible, but will require a rather messy solution, and might cause issues for future feature requests and objects merging.Regards
Peter0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions