Telerik Forums
Kendo UI for Angular Forum
4 answers
2.1K+ views

Hi,

I have problem with kendo-intl package, whenever I try to use IntlService or to load locale other than default one my application hangs on start-up without any error in console.

I have also tried to use cldr-data (instead of kendo-intl) but same problem occurred.

Btw, I am using system.js for my project.

Any ideas?

Svet
Telerik team
 answered on 04 Jun 2018
6 answers
592 views

We would like to be able to use the Upload Control with Typescript.  But we have a requirement to not do an automatic upload, but to wait until associated form elements are completed.

Our scenario is someone fills out a form, associates the attachments using the control, then the user clicks 'Submit'.  This submits the form first.  Upon success, it gets the Id for the form record and then assigns that value to the File(s).  Then it automatically calls the uploadFiles.

However, we cannot determine how in TypeScript to call the uploadFiles method.  Do you have an example we can look at?

Dimiter Madjarov
Telerik team
 answered on 04 Jun 2018
1 answer
10.9K+ views

Two questions.

1. How to reload/refresh the kendo-grid after update? 

2. How to maintain the state (filter/page number, etc...) after the reload/refresh?

Svet
Telerik team
 answered on 01 Jun 2018
1 answer
347 views
Setting kendo combo and kendo datepicker inside a fieldset that it is disabled keep the controls enabled

https://plnkr.co/edit/aZhSdAtF8eMXav7vDtbp?p=preview
how can I solve this ?
Svet
Telerik team
 answered on 31 May 2018
4 answers
518 views
I need to navigate between different components on click of each treeview node in Angular 5. Kindly provide a way to do this
Svet
Telerik team
 answered on 31 May 2018
2 answers
705 views

Hi all!

I found a bug in a splitter component - you can open a plunker https://plnkr.co/edit/XJRTfXEIswV3fbwURc5X?p=preview and repeat next steps:

1. Change a position of a second splitter.
2. Then change a position of a first splitter – the bug is here – you can see that the second splitter is moved too.

How can I fix this behavior? 

Best regards,

 Sergey

Sergey
Top achievements
Rank 1
 answered on 30 May 2018
10 answers
119 views

Hi 
I'm have implemented scheduler in my application and I was able to fill the scheduler with data.
The way I'm filling data is calling the API on load with one parameter as today's date and another as 10 days from today and i'm able to get it but the issue is when I change the date range.On calling the API again the I'm getting the response but scheduler is not getting filled for those dates, the current format is

$scope.schedulerOption={
     dataSource: {
    data:myService.getData(),
        schema: {
          model: {
            id: "taskId",
            fields: {
              taskId: { from: "TaskID", type: "number" },
              title: { from: "Title", defaultValue: "No title"},
              start: { type: "date", from: "Start" },
              end: { type: "date", from: "End" },
              description: { from: "Description" },
              RoomID:{ from: "RoomID" },
              isAllDay: { type: "boolean", from: "IsAllDay" }
            }
          }
        }
       }
}

The way I call dataSource

I did try read(),data() and fetch() the give errors while running.

Plamen
Telerik team
 answered on 30 May 2018
12 answers
1.0K+ views
Do you have any examples on using the kendo ui grid for angular with a CRUD rest web service?
Ron
Top achievements
Rank 1
Iron
Iron
Iron
 answered on 29 May 2018
4 answers
489 views
Where do you show the versions of Angular that the components are using? Seems they're rarely compatible with the latest Angular.
Dimiter Topalov
Telerik team
 answered on 29 May 2018
6 answers
1.0K+ views

Being a newbie to Angular 4 and typescript, I am not sure how to receive a memory stream sent back by the API controller and popup a file dialog to save it on the client.

This is what I currently have:

1) in my API controller, I am sending back an HttpResponseMessage such as:

    public HttpResponseMessage Post(ReportsManagementUI workobj)
        {

                    var zipfilename = workobj.CreateZipReport(session, sessionuser);
                    using (MemoryStream ms = new MemoryStream())
                    {
                        using (FileStream file = new FileStream(zipfilename, FileMode.Open, FileAccess.Read))
                        {
                            byte[] bytes = new byte[file.Length];
                            file.Read(bytes, 0, (int)file.Length);
                            ms.Write(bytes, 0, (int)file.Length);

                            HttpResponseMessage httpResponseMessage = new HttpResponseMessage();
                            httpResponseMessage.Content = new ByteArrayContent(bytes.ToArray());
                            httpResponseMessage.Content.Headers.Add("x-filename", zipfilename);
                            httpResponseMessage.Content.Headers.ContentType = new MediaTypeHeaderValue("application/octet-stream");
                            httpResponseMessage.Content.Headers.ContentDisposition = new ContentDispositionHeaderValue("attachment");
                            httpResponseMessage.Content.Headers.ContentDisposition.FileName = zipfilename;
                            httpResponseMessage.StatusCode = HttpStatusCode.OK;
                            return httpResponseMessage;
                        }
                    }

     }

 

2) in my provider.ts, I have a function createReportsManagement which posts to the API controller code above:

public createReportsManagement(updatetype: string, reportsManagementObj: any) {
        reportsManagementObj.actiontype = updatetype;
        var headers = new Headers();
        headers.append('Content-Type', 'application/json');
        var objectToSend = JSON.stringify(reportsManagementObj);
        let apiURL = this.framework_virtual_path + "api/ReportsManagement";
        return this.http_request.post(apiURL, objectToSend, { headers: headers })
            .map(response => response.text())
            .catch(this.handleError);

}

3) On my html page, I have a component which calls  the provider to create the report zip file.

  This is where I am trying to use the KendoUI file-saver method saveAs() to popup the File Save dialog:

import { saveAs, encodeBase64 } from '@progress/kendo-file-saver';
...

 

private btnExcelClick() {
        this.reportsLoading = true;
        var responseType = 'arraybuffer';

        this.myProvider.createReportsManagement("createReport", this.reportsMgmtObj)
            .subscribe(
            (response: any) => {

                //question !!! is "data:text/plain" OK for zip file content?
                const dataURI = "data:text/plain;base64," + encodeBase64(response);
                saveAs(dataURI, "test.zip");

                //this test code works and downloads the file test.txt
                //const dataURI = "data:text/plain;base64," + encodeBase64("HELLO TEST");
                //saveAs(dataURI, "test.txt");

            } );

}

Thanks for any pointer!

 

Manuel
Top achievements
Rank 1
 answered on 28 May 2018
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?