Hi all,
I wanted to use the ProductGroupsLookup on my custom program. When I dragged it to the form, I get this error. How do I fix this?
thank you
is your form inheriting a sage base form?
No, its a regular Windows Form
if i recall to use sage control and all their functionality they need to be used in a form that inherits a sage form. i tend to use Inherits Sage.MMS.FinancialsDataForm
I have extend inherits the Sage.MMS.FinancialsDataForm such as below. But still get the same error.
namespace CustomStock { partial class Form1test : Sage.MMS.FinancialsDataForm { private System.ComponentModel.IContainer components = null; #region Windows Form Designer generated code private void InitializeComponent() { } #endregion } }
Or any other way to inherit it?
are you also connected to a sage company? - forget that your not running it at the moment
Its a new project, so it is not compile to sdbx and not installed to Sage 200 yet.
have you referenced all the sage 200 dll from the SDK?
Yes, these are my references. other lookup such as StockLookup is working fine. the productGroupsLookup and few others have the same problem.
i always add all the dll's and my list is way bigger than yours
No idea what happen. but I reboot Visual Studio and it works now
I only add the Sage dll's I need, and the Sage controls work fine on plain Windows forms. I have used them (particularly the Common.Controls.List and Grid) for forms that have nothing to do with Sage!
I notice that the ProductGroupsLookup control doesn't check for Application.IsConnected in it's initialisation code, which is unusual and probably related.
To add Sage controls, I don't usually use the Tookbox as I work on multiple versions of Sage. Instead I add a plain Windows control (eg. Label) to the form, the edit the .Designer file. Works for me!
*Community Hub is the new name for Sage City