Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
340
Call PCL methods from jquery
posted

hi all,

I am working on the HTML5 tree control, how can i access the methods(C sharp) from the PCL for fetching the data. After fetching the data i need to bind to the tree control. 

Please help me on this..

Thanks in advance.. 

Parents
  • 3595
    Suggested Answer
    posted

    Hello Madhukar,

    Thank you for posting in our community!

    The approach used for fetching and binding data to igTree might vary accordingly to the type of project you are implementing. For instance, in MVC projects data could be passed by the model:

    <%= Html.

        Infragistics().

        Tree().

        ID("tree").

        DataSource(this.Model).

        SingleBranchExpand(true).

        Bindings( bindings => {

            bindings.

            TextKey("Label").     

            ChildDataProperty("Products").

            Bindings( bindings2 => {

                bindings2.

                TextKey("Name");

            });

        }).

        DataBind().

        Render()      

    %>

     

    Data could be also accessed by referring URL in the dataSource field:

                $("#tree").igTree({

                    dataSource: “Root/Url”

                    bindings: {

                        textKey: "RegionName",

                        valueKey: "ID",

                        childDataProperty: "Countries",

                        bindings: {

                            textKey: "CountryName",

                            valueKey: "ID"

                        }

                    }

                });

    In order to research this further could you provide me more details on your scenario? Any code snippets or a sample would be appreciated.

    You might be interested in reading the following resources:

     

    Look forward to hearing from you.

Reply Children
No Data