How can I use MaskedTextBox in Edit template of a grid?

3 posts, 0 answers
  1. Michael
    Michael avatar
    6 posts
    Member since:
    Jun 2013

    Posted 09 Jul 2019 Link to this post

    I want to use the MaskedTextBox instead of a standard textbox in an Edit template of a grid, but I cannot find an axample how to do that.

    What I have is:
    <kendo-grid>
        <kendo-grid-column field="description"  title="Description">
            <ng-template kendoGridEditTemplate let-dataItem="dataItem">
                <input [(ngModel)]="dataItem.description" kendoGridFocusable name="Description" class="k-textbox"/>
            </ng-template>
        </kendo-grid-column>
    </kendo-grid>


    When I try
    <ng-template kendoGridEditTemplate let-dataItem="dataItem">
         <kendo-maskedtextbox …></kendo-maskedtextbox>
    </ng-template>

    then Angular logs in the console “kendo-maskedtextbox' is not a known element”, although I imported
    import { InputsModule, MaskedTextBoxComponent } from '@progress/kendo-angular-inputs';


    So what’s the correct syntax for the MaskedTextBox?
  2. Michael
    Michael avatar
    6 posts
    Member since:
    Jun 2013

    Posted 10 Jul 2019 in reply to Michael Link to this post

    I found the solution myself. My syntax was correct, I only put the import in the wrong file. It had to be in app.module.ts. 

  3. Martin
    Admin
    Martin avatar
    252 posts

    Posted 11 Jul 2019 Link to this post

    Hi Michael,

    I am glad to hear that you have found the cause of the issue. Let me know if any further assistance is required for Kendo UI for Angular.

    Regards,
    Martin
    Progress Telerik
    Get quickly onboarded and successful with your Telerik and Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Back to Top