mibuso.com

Microsoft Business Solutions online community
It is currently Thu Jun 20, 2013 12:51 am

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 8 posts ] 
Author Message
 Post subject: [Solved] Editable := True/False, Runtime 'bug' ?
PostPosted: Sun Mar 30, 2008 2:15 am 
Offline

Joined: Mon Mar 24, 2008 3:57 pm
Posts: 277
Location: Virginia
So my company uses NAV 4.0 (SP1 & SP3), I have not tried this in SP3 yet but here goes my problem...

At runtime I have a form that acts as both a List & Card for a table. I want the card only modifiable when the user clicks a button. So therefore I have several fields set to Editable := TRUE or FALSE frequently. My dilemma is after a control has been set to Editable := FALSE and back to TRUE the background color still shows grayed out, and so far the only way to remedy this is to hide the form and show it again (visible := false -> true) which looks rather glitchy and unpleasant.

Anyone have any ideas? or a better suggestion to complete the task at hand?


Last edited by Xypher on Mon Mar 31, 2008 4:17 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject:
PostPosted: Sun Mar 30, 2008 2:48 am 
Offline
MVP Microsoft Dynamics NAV
NAV TechDays 2013 attendee

Joined: Tue Aug 14, 2001 7:01 am
Posts: 5317
Location: Prague
Country: Czech Republic (cz)
Just set the whole form to editable / non editable. Thats how I normally do it.

_________________
David Singleton
Dynamics NAV Freelancer
Dynamics Book
Go-Live International


Top
 Profile E-mail WWW  
 
 Post subject:
PostPosted: Sun Mar 30, 2008 3:00 am 
Offline

Joined: Mon Mar 24, 2008 3:57 pm
Posts: 277
Location: Virginia
So they will still be able to scroll through the list and click the 'Modify' button if the form is set to Editable := FALSE ?


Top
 Profile  
 
 Post subject:
PostPosted: Sun Mar 30, 2008 11:22 am 
Offline
MVP Microsoft Dynamics NAV
NAV TechDays 2013 attendee

Joined: Thu Oct 16, 2003 8:50 am
Posts: 12266
Location: Brno
Country: Czech Republic (cz)
You can try to call CurrForm.Update and UpdateControls. To which value is the Editable set on the form? If it is false by default, the control will have wrong backgroun. If you set it (or leave it true by default) to true in design time and disable it in OnOpen, it will look correctly...

_________________
Kamil Sacek
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.


Top
 Profile E-mail WWW  
 
 Post subject:
PostPosted: Sun Mar 30, 2008 4:58 pm 
Offline

Joined: Mon Mar 24, 2008 3:57 pm
Posts: 277
Location: Virginia
The pre-runtime Editable condition of the fields is what overall determines what the background color is going to be.

Try it... Set a field to Editable := FALSE, with it initially being set to TRUE, and you'll notice the background is still white.

This does appear to be a Redraw bug in NAV.

I have tried various different other methods to alleviate this problem, such as Update & UpdateControls, with no results.

As far as 'OnOpen' setting the fields' Editable condition it may adjust the background effectively but only during that procedure. How about the many other times I set the fields to FALSE/TRUE Editable during the course of the form's "life"?


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 31, 2008 4:19 pm 
Offline

Joined: Mon Mar 24, 2008 3:57 pm
Posts: 277
Location: Virginia
Thank you so much Kamil!

This issue has been bugging me for so long.

It works properly if you initially set the Form/Control to Editable := FALSE in the OnOpen procedure.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 31, 2008 5:41 pm 
Offline
MVP Microsoft Dynamics NAV
NAV TechDays 2013 attendee

Joined: Thu Oct 16, 2003 8:50 am
Posts: 12266
Location: Brno
Country: Czech Republic (cz)
You are welcome! 8)

_________________
Kamil Sacek
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.


Top
 Profile E-mail WWW  
 
 Post subject: Re: Editable := True/False, Runtime 'bug' ?
PostPosted: Thu Mar 29, 2012 1:50 pm 
Offline

Joined: Wed Feb 03, 2010 10:33 pm
Posts: 65
Country: Sweden (se)
:thumbsup:

_________________
Hello IT, have you tried to turn it off and on?
Have you checked the cables?
Have you released the filters?


Top
 Profile E-mail  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: Google [Bot] and 7 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum


Search for:
Jump to: