First, it's not clear to me how the samples are supose to work. Here's an example:
http://ko.infragistics.com/products/aspnet/sample/data-menu/data-binding
The code example listed above has references to stuff in ~SampleCommon, such as the DataSourceControl.ascx. Where am I suppose to find this?
Second, the download sample applications don't have examples of all the controls. For instance, I cannot find an example of how the WebDataMenu is used. All I can do is try and search the forums for vague and incomplete examples from the problems others have posted. Am I not aware of some other place on the website that provides more comprehensive examples and documentation?
Lastly, I can't seem to find any complete documentation on how to use the Javascript OM API. I see links like this:
http://help.infragistics.com/NetAdvantage/ASPNET/2012.1/CLR4.0/
but the documentation are lax and minimalistic in how to actually use the API. For instance, the parameter descriptions are usually self-descriptive and example usage are usually useless one-linerer. Example:
var resultVar = instanceOfWebDataMenu.find(String);
Is this just the way things are or am I missing something?
Hello Anthony,
I’m just following up to see if you have any questions or concerns or if you need further assistance please let me know.
Best Regards,
Maya Kirova
Developer Support Engineer
Infragistics, Inc.
http://ko.infragistics.com/support
The online samples use the same code like the ones you download locally. Basically in all cases the data for the grid comes from the same place . The GetMenuData() method reads the xml file MenuData.xml and create an IList<MenuItem>.
So if the selection from the user controls is ICollection or IEnumerable that’s the data that’s returned . So it’s basically bound the menu to a IList<MenuItem>.
If it’s IBindingList a new BindingList is created from the result returned from the GeMenuData method:
target.DataSource = new BindingList<MenuItem>(this.GetMenuData());
And in the last case- Xml it just sets the DataSourceID of the menu to ” MenuDataSource” which is actually the id of the XmlDataSource control which on the sample’s page.
So the type of the data source does change. It’s just not obvious since those additional resources are not added in samples source files in the code view section. Due to this I would recommend that you browse the local samples where you have all those resource.
Let me know if you have any questions.
Developer Support Engineer II
Thank you. I think that clarifies the confusion. I was looking at the showcase applications, not the samples. I didn't know they were two different downloads.
I still think there is a bug on your site with the WebDataMenu example. When you change the data source type, it does not change the code being displayed to show how the new data source is being used.
If you open the source code for the samples locally you should see something like in the attached image. You should have all the local resources like user controls and additional classes and methods.
As you can see in the image the user control that was used is under the SamplesCommon/aspnet/Common/UserControls/DataSourceControl folder.
Generally you can download the source from our website by following these steps:
1) Go to http://ko.infragistics.com/ and log in with your account.
2) Select “Account”. This will open the “My keys and downloads” page.
3) Select your product .
4) From the tabs under the product select “Documentation and samples”
5) Select the NetAdvantage for Asp.net samples
6) Once that downloads install it and you should be able to open the samples locally now.
Let me know if you have any questions or concerns.
Are we talking about the same samples? I already mentioned I searched the 3 Infra showcase applications and couldn't find an example of the WebDataMenu. Perhaps I don't have the "complete" source code for some reason or searching for "WebDataMenu" is the wrong search term?
As for the second part, I think there was a misunderstanding of what the problem is: the problem isn't that I need to see the code you're using to switch data sources, the problem is that I was under the impression that -- on the sample page -- changing the data source in the drop down was suppose to refresh the source code with example code for using that data source type. The problem is that the same source code is displayed no matter what data source is chosen (it's always the XML data source). But at any rate, even in the code you showed me, it's incomplete. For instance, where is "GetMenuData()"? Why can't we see the entire DataSourceContorl.ascx file???
Lastly, I think everyone would be excited to see more comprehensive documentation for both the server and client APIs. Thanks for all your help!