Hi. I am trying to define some navigators in a CLASS.cs file, not in the main FORMCODE.cs file, and I am having some problems with this. This is how I define them:
XPathNavigator objMain = this.MainDataSource.CreateNavigator();
XPathNavigator objSec = this.MainDataSource.CreateNavigator();
The error is:
'tmplReportConnections.ListsTablesMessagesFunctions' does not contain a definition for 'MainDataSource'
If i define them in the FORMCODE.cs, which is the main file of the program, all is ok. The same with the variable bellow.
string myNameSpace = "";
myNameSpace = NamespaceManager.LookupNamespace("my");
I have also tried like this, to connect it to the mainform somehow:
FormCode objFormCode = new FormCode();
//create navigators
XPathNavigator objMain = objFormCode.MainDataSource.CreateNavigator();
XPathNavigator objSec = objFormCode.MainDataSource.CreateNavigator();
string myNameSpace = "";
myNameSpace = objFormCode.NamespaceManager.LookupNamespace("my");
In this case the error is:
No overload for method 'FormCode' takes '0' arguments
How should i define them in a CLASS.cs file? Thank you!