Kendo UI + TypeScript

16 posts, 0 answers
  1. Vikentiy
    Vikentiy avatar
    1 posts
    Member since:
    Apr 2011

    Posted 03 Oct 2012 Link to this post

    Hi.
    Are you planning to release a set of interfaces for working with Kendo UI with TypeScript?

    If you are planning, then when?
  2. Filips
    Filips avatar
    3 posts
    Member since:
    Jan 2011

    Posted 04 Oct 2012 Link to this post

    +1 

    Would love to see that

  3. UI for ASP.NET AJAX banner
  4. Dimo
    Admin
    Dimo avatar
    8333 posts

    Posted 04 Oct 2012 Link to this post

    Hello,

    TypeScript is something very new and we still have no specific intentions with regard to it. Surely this language will need to prove its value and popularity (or at least its prospects and business value) before we decide to adopt it in any way.

    Regards,
    Dimo
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  5. Daní
    Daní avatar
    303 posts
    Member since:
    Feb 2008

    Posted 04 Oct 2012 Link to this post

    +1
  6. mvbaffa
    mvbaffa avatar
    102 posts
    Member since:
    Dec 2006

    Posted 05 Oct 2012 Link to this post

    Hi,

    I am starting with TypeScript and I could very easily show a kendo Window without having to define a declaration file. Here is the code:
    module SiteMaster {
     
        // Class
        export class Config {
     
            // Instance member
            run() {
                var logOnParams = {
                    draggable: false, resizable: false, width: "300px", height: "180px",
                    title: "LogOn", modal: true, visible: false,
                    scrollable: false, actions: []
                };
     
                var logonDlg = $("#logonDialog");
                if(!logonDlg.data("kendoWindow")) {
                    (<any>logonDlg).kendoWindow(logOnParams);
                    var kendoWindow = logonDlg.data("kendoWindow");
                    kendoWindow.center();
                    kendoWindow.open();
                 }
            }
        }
    }

    As you can see you have to cast to any to call the kendoWindow so that Visual Studio does not emit an error. Because a jQuery object, logonDlg does not have a method "kendoWindow".

    It works Ok. But off course it would be better if Telerik generates for us a declaration file.
  7. Dustin
    Dustin avatar
    79 posts
    Member since:
    Oct 2012

    Posted 05 Oct 2012 Link to this post

    Here is a basic kendo.web.d.ts that I created to support what I need for this small site I have been working on...
    interface IKendoTemplate {
    }
     
    interface IKendo {
        ui: any;
        bind(jqueryObject: any, vm: any);
        observable(obj: any): any;
        data: any;
        //data(widget: string): any;
        template(template: string): IKendoTemplate;
        render(template: IKendoTemplate, data: any): string;
    }
     
    interface JQuery {
        kendoValidator(opts?: any): IKendo;
        kendoMenu(opts?: any): IKendo;
        kendoDropDownList(opts?: any): IKendo;
    }
     
    declare var kendo: IKendo;

  8. Mike
    Mike avatar
    8 posts
    Member since:
    Jun 2012

    Posted 07 Oct 2012 Link to this post

    +1 for Kendo UI + TypeScript
    Looks very promising to me... 
  9. mvbaffa
    mvbaffa avatar
    102 posts
    Member since:
    Dec 2006

    Posted 08 Oct 2012 Link to this post

    Very good. I hope Telerik provides, as soon as they can a d.ts for kendo.
  10. Atanas Korchev
    Admin
    Atanas Korchev avatar
    8462 posts

    Posted 08 Oct 2012 Link to this post

    Hi,

     Please create a new user voice item in our feedback portal.

    Regards,
    Atanas Korchev
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  11. Sebastian
    Admin
    Sebastian avatar
    9934 posts

    Posted 01 Nov 2012 Link to this post

    Hi guys,

    You can file your vote for TypeScript support in this User Voice item, to affect its priority. There is also a sample solution posted by Jaap Mosselman in the comments which you may ponder in the meantime.

    Kind regards,
    Sebastian
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  12. Tim
    Tim avatar
    39 posts
    Member since:
    Sep 2002

    Posted 17 Nov 2012 Link to this post

    +1 Would be nice to code with kendoui components using typescript in vs2012 - and code the data backend using web API. Coming from c# I've always been hesitant to do anything but light scripting in pure JS.
  13. David Thielen
    David Thielen avatar
    21 posts
    Member since:
    Apr 2007

    Posted 10 Sep 2013 Link to this post

    It says this was implemented & delivered in the latest release. Can you tell me where it is? I just downloaed the demo and can't find it. And how to get it set up would be good too.

    thanks - dave
  14. leniency
    leniency avatar
    10 posts
    Member since:
    Jan 2012

    Posted 10 Sep 2013 Link to this post

    David, should be a folder in the base of the zip file named 'typescript'.  Then again, haven't checked the demo download. It might not have it. The full version does though.  The open source kendo.web download has typescript for at least web, not all.
  15. David Thielen
    David Thielen avatar
    21 posts
    Member since:
    Apr 2007

    Posted 10 Sep 2013 Link to this post

    Hi;

    I found typescript\kenod.all.d.ts in the zip, I assume that is it. Do you guys have any instructions, caveats, etc. about using this? If so, can you provide a link to them?

    thanks - dave
  16. leniency
    leniency avatar
    10 posts
    Member since:
    Jan 2012

    Posted 10 Sep 2013 Link to this post

    Yup, that's it. It's just a definition file, same as the ones you can find on Nuget for jQuery, etc. Same as those, in Visual Studio you can just drag it into another typescript source file to create a reference and have intellisense available. Works same as JavaScript files in VS - creates this commend at the top with relative path to the definition file (*.d.ts are all TypeScript definitions)

    /// <reference path="../typings/jquery/jquery.d.ts" />
    /// <reference path="../typings/kendo.all.d.ts" />

     

    Hopefully, parts are still buggy I've found. Each TypeScript version seems to break something, but fix something else. The Kendo definitions are pretty complete - think there's only been one or two points where I had to change their supplied definition file (forget where, but something declared as a {}, switched to 'any' so TypeScript would allow me to could extend it).

Back to Top
UI for ASP.NET AJAX banner