Basic Usage

2 posts, 0 answers
    SANJAY avatar
    61 posts
    Member since:
    Jun 2012

    Posted 22 Jun 2014 Link to this post

    I have a webapi running on

    When I run the api in webbrowser I get desired result
    I have checked the api in Fiddler and I get json data

    When I execute your example page
          <telerik:RadImageGallery runat="server" ID="RadImageGallery1" Height="600px" Width="800px"
            DataImageField="ImageUrl" DataThumbnailField="ThumbUrl" DataTitleField="Title">
                    <NextImagesAnimation Type="VerticalSlide" />
                    <PrevImagesAnimation Type="VerticalSlide" />

        <telerik:RadClientDataSource runat="server" ID="RadClientDataSource1"  >
                <WebServiceDataSourceSettings BaseUrl ="" >
                    <Select Url=""  RequestType="Get"  DataType="JSON"   />
            <Schema DataName="D" >
                    <telerik:ClientDataSourceModelField FieldName="ImageUrl" DataType="String" />
                    <telerik:ClientDataSourceModelField FieldName="ThumbUrl" DataType="String" />
                    <telerik:ClientDataSourceModelField FieldName="Title" DataType="String" />
                     <telerik:ClientDataSourceModelField FieldName="Description" DataType="String" />
            <ClientEvents  OnRequestFailed="tst"  OnRequestStart="b" OnDataParse="c" />

    <script type="text/javascript">
        function tst(){
        function b() {
        function c() {

    I get a RequestFailed.

  2. Hristo Valyavicharski
    Hristo Valyavicharski avatar
    975 posts

    Posted 25 Jun 2014 Link to this post

    Hi Sanjay,

    Your settings are incorrect:
    <telerik:RadClientDataSource runat="server" ID="RadClientDataSource1">
                  <WebServiceDataSourceSettings BaseUrl="">
                      <Select Url="aa" RequestType="Get" DataType="JSON" />

    But at the moment your web api controller blocks cross domain requests.
    I'm getting the following error when I call it:

    Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at This can be fixed by moving the resource to the same domain or enabling CORS.

    Hristo Valyavicharski

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

  3. DevCraft R3 2016 release webinar banner
Back to Top