Several Questions (RTC-AddIns)
andyR
Member Posts: 27
Hi together,
i have some questions to RTC AddIns:
1.) I want to integrate a whole form (not a Classic Form), which is created in C# into the RTC. It this possible? By open the Page in which the Form is integrated, following error occures:
I don't know if it helps, but here is my code snippet:
2.) Is it possible to transfer Data from other parts of Page to the embedded form? If yes, how?
Thank you very much!!!
Andy
i have some questions to RTC AddIns:
1.) I want to integrate a whole form (not a Classic Form), which is created in C# into the RTC. It this possible? By open the Page in which the Form is integrated, following error occures:
Type: System.ArgumentException
Message: Das Steuerelement der obersten Ebene kann nicht zu einem Steuerelement hinzugefügt werden.
StackTrace:
bei System.Windows.Forms.Control.ControlCollection.Add(Control value)
bei Microsoft.Dynamics.Framework.UI.WinForms.ControlAddInPlaceholder.Initialize(Control c)
bei Microsoft.Dynamics.Framework.UI.WinForms.ControlAddInAdapter.InitializeNativeControl(Object control)
bei Microsoft.Dynamics.Framework.UI.Windows.LogicalControlAdapter.get_NativeControl()
bei Microsoft.Dynamics.Framework.UI.Windows.LogicalControlAdapter.Build(Boolean childrenOnly)
bei Microsoft.Dynamics.Framework.UI.Windows.LogicalControlAdapter.Build(Boolean childrenOnly)
bei Microsoft.Dynamics.Framework.UI.Windows.LogicalControlAdapter.Build(Boolean childrenOnly)
bei Microsoft.Dynamics.Framework.UI.Windows.LogicalControlAdapter.Build()
bei Microsoft.Dynamics.Framework.UI.WinForms.FormHostControlAdapter.HandleFormHost()
bei Microsoft.Dynamics.Framework.UI.WinForms.FormHostControlAdapter.OnPropertySwitch(PropertyChangedEventArgs& propertyChangedArgs, CancelEventArgs& cancelArgs)
bei Microsoft.Dynamics.Framework.UI.WinForms.FormHostControlAdapter.OnPropertyChanged(Object sender, PropertyChangedEventArgs propertyChangedArgs, CancelEventArgs cancelArgs)
bei Microsoft.Dynamics.Framework.UI.Windows.LogicalControlAdapter.PropertyChanged(Object sender, PropertyChangedEventArgs propertyChangedArgs)
bei System.ComponentModel.PropertyChangedEventHandler.Invoke(Object sender, PropertyChangedEventArgs e)
bei Microsoft.Dynamics.Framework.UI.LogicalControl.OnPropertyChanged(PropertyChangedEventArgs e)
bei Microsoft.Dynamics.Framework.UI.FormHostControl.OnPropertyChanged(PropertyChangedEventArgs e)
bei Microsoft.Dynamics.Framework.UI.FormHostControl.set_HostedForm(LogicalForm value)
bei Microsoft.Dynamics.Framework.UI.UX2006.NavigationService.OpenEmbeddedForm(String formName)
bei Microsoft.Dynamics.Framework.UI.UX2006.NavigationService.OpenEmbeddedForm(String formName, NavigationNode node)
bei Microsoft.Dynamics.Framework.UI.UX2006.NavigateToFormAction.InvokeCore(Boolean async, LogicalControl logicalControl, Object state, UISession uiSession)
bei Microsoft.Dynamics.Nav.Client.Actions.NavNavigateToFormAction.InvokeCore(Boolean async, LogicalControl logicalControl, Object state, UISession uiSession)
bei Microsoft.Dynamics.Framework.UI.Action.InvokeCoreWithErrorHandling(Boolean async, LogicalControl logicalControl, Object state, UISession uiSession)
bei Microsoft.Dynamics.Framework.UI.Action.DoInvoke(LogicalControl logicalControl, UISession uiSession)
bei Microsoft.Dynamics.Framework.UI.Action.Invoke(LogicalControl logicalControl)
bei Microsoft.Dynamics.Framework.UI.UX2006.NavigationService.NavigateToNode(LogicalControl logicalControl, NavigationNode node)
bei Microsoft.Dynamics.Framework.UI.UX2006.NavigationPaneLogicalControl.OnNavigate(NavigationEventArgs e)
bei Microsoft.Dynamics.Framework.UI.NavigationControlBase.Navigate(Object node)
bei Microsoft.Dynamics.Framework.UI.WinForms.NavigationPaneControlAdapter.navigationPaneBarNavigate(Object sender, NavigationPaneNavigateEventArgs e)
bei Microsoft.Dynamics.Framework.UI.WinForms.Controls.NavigationPaneTreeTab.OnNavigate(NavigationPaneNavigateEventArgs e)
bei Microsoft.Dynamics.Framework.UI.WinForms.Controls.NavigationPaneTreeTab.treeView_Navigate(Object sender, NavigationNodeEventArgs e)
bei Microsoft.Dynamics.Framework.UI.WinForms.Controls.NavigationPaneTreeView.OnNodeSelected(NavigationNodeEventArgs e)
bei Microsoft.Dynamics.Framework.UI.WinForms.Controls.NavigationPaneTreeView.navTreeNode_Selected(Object sender, EventArgs e)
bei Microsoft.Dynamics.Framework.UI.WinForms.Controls.NavigationPaneTreeView.NavTreeNode.OnSelected(EventArgs e)
bei Microsoft.Dynamics.Framework.UI.WinForms.Controls.NavigationPaneTreeView.NavTreeNode.Select()
bei Microsoft.Dynamics.Framework.UI.WinForms.Controls.NavigationPaneTreeView.NavTreeNode.OnClicked(MouseLocationEventArgs e)
bei Microsoft.Dynamics.Framework.UI.WinForms.Controls.NavigationPaneTreeView.OnMouseUp(MouseEventArgs e)
bei System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
bei System.Windows.Forms.Control.WndProc(Message& m)
bei Microsoft.Dynamics.Framework.UI.WinForms.Controls.NavigationPaneTreeView.WndProc(Message& m)
bei System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
bei System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
bei System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
Source: System.Windows.Forms
I don't know if it helps, but here is my code snippet:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Drawing;
using Microsoft.Dynamics.Framework.UI.Extensibility;
using Microsoft.Dynamics.Framework.UI.Extensibility.WinForms;
namespace my_Form
{
[ControlAddInExport("FORM")]
public class Class1 : WinFormsControlAddInBase
{
protected override Control CreateControl()
{
Form1 my_form = new Form1();
my_form.Size = new Size(600, 400);
return my_form;
}
}
}
2.) Is it possible to transfer Data from other parts of Page to the embedded form? If yes, how?
Thank you very much!!!
Andy
0
Answers
-
You cannot use form, you need to use some control which could be embeded in existing form.
You have only two ways how to pass data between NAV and Addin - the field value (NAV to Addin and back) and the Addin Event (Addin to NAV). If the field is BLOB, you can pass what you want inside it like XML etc.0 -
OK thank you very much for the information0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.7K Microsoft Dynamics NAV
- 18.8K 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
- 328 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
