Syntax for specifying transport url as a function

2 posts, 0 answers
  1. Jane
    Jane avatar
    15 posts
    Member since:
    Oct 2016

    Posted 28 Apr Link to this post

    The documentation says that the transport.read.url can be specified as a function.  Could you please tell me the syntax for doing this using UI for JSP?  

    <kendo:dropDownList name="module" dataTextField="domainValue" dataValueField="domainId" optionLabel="Please Select..." id="module">
        <kendo:dataSource>
            <kendo:dataSource-transport>
                <kendo:dataSource-transport-read url=getTestModuleUrl() contentType="application/json"/>
            </kendo:dataSource-transport>
        </kendo:dataSource>
    </kendo:dropDownList>

    A string is expected for the url but if I do that, then the string is taken literally, and not as a function.  Could you please tell me the correct syntax?

    Thank you.

  2. Veselin Tsvetanov
    Admin
    Veselin Tsvetanov avatar
    563 posts

    Posted 02 May Link to this post

    Hello Jane,

    The correct Read action function syntax is shown in the following Documentation article. Note that you will need to nest a <script> tag defining the function within the <kendo:dataSource-transport-read-url> tag.

    Regards,
    Veselin Tsvetanov
    Telerik by Progress
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top