set editable listpage by code
Pizzamaka
Member Posts: 11
Hi all.
I have a Problem with a listpage that I would like to set editable from code. In short: It does not work.
When I leave the Editable Property on the default value (yes) I can set Editable to false from code and everything is fine. I would like to do it the other way though: I have a page which is set to editable=false and want to open it from a codeunit where it should be set to editable. This does not work.
The code is this:
Can anybody help me there?
I have a Problem with a listpage that I would like to set editable from code. In short: It does not work.
When I leave the Editable Property on the default value (yes) I can set Editable to false from code and everything is fine. I would like to do it the other way though: I have a page which is set to editable=false and want to open it from a codeunit where it should be set to editable. This does not work.
The code is this:
pageVar.editable := true; pageVar.run;
Can anybody help me there?
0
Comments
-
I think what you need to do, is to set Editable on the page to a boolean variable like: pageEditable.
Remember to add the variable to the dataset (shift F4 on the variable).
In your sample you should be able to set pageEditable before running the page.Freddy Kristiansen
Group Program Manager, Client
Microsoft Dynamics NAV
http://blogs.msdn.com/freddyk
The information in this post is provided "AS IS" with no warranties, and confers no rights. This post does not represent the thoughts, intentions, plans or strategies of my employer. It is solely my opinion.0 -
Hi freddy.
Thanks for the reply. Sadly I could not get it to work. This is my setup now:
Page: editale = no
page has a global bool var "edit" (included in Dataset)
page has a function setEdit(bool e)
a Codeunit with
in the function I set edit := epageVar.setEdit( TRUE );
pageVar.Run;
in the onopen-Trigger I set EDITABLE := edit
And still no luck...0
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
- 322 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