The Kendo Grid is refusing to show up within the popup window

  • I am new to using Angular 2 and Kendo UI.
  • Currently, I am attempting to include a grid inside my pop-up window.
  • While I have successfully displayed the pop-up, adding the grid has proven challenging.
  • The grid is not appearing as expected in the pop-up window.
  • Could anyone offer guidance on how to resolve this issue?
  • Upon checking the console, I did not come across any error messages.
  • I am working on implementing the pop-up display using Kendo UI. You can view an example at this link.
  • To see a sample code that works, visit this JSFiddle link

  • Below, I have provided related code snippets. Due to space constraints, you can find the complete code in this JSFiddle: here

    <div class="waterPaperDocInfo">                 
            <span class="fa fa-file-text-o"></span>
            <span class="cat" (click)="cloud();">&nbsp;{{hat.paper}} paper</span> | Last Modified: {{hat.finger}} &nbsp;&nbsp;<span class="fa fa-clock-o">9:00 am</span>
    </div>

    <div id="win1" style="display:none">
        <p>First Window</p>
        <button type="button" id="open2">Open second Window</button>
            <input type="file" name="batchFile" id="batchFile" title="Select file" />
        <div id="grid"></div>

    </div>


$("#grid").kendoGrid({
        selectable: "multiple cell",
        allowCopy: true,
        columns: [
            { field: "productName" },
            { field: "category" }
        ],
        dataSource: [
            { productName: "Tea", category: "Beverages" },
            { productName: "Coffee", category: "Beverages" },
            { productName: "Ham", category: "Food" },
            { productName: "Bread", category: "Food" }
        ]
    });

}

Answer №1

  1. For those incorporating Kendo UI with Angular2, refer to the Kendo UI for Angular 2 web guide for component instructions here
  2. To add a component in Angular 2, ensure dependencies are checked in system.config.js. If not available, download it using npm first. Then, add the module in app/ng.module.ts and utilize it in app.component.ts
  3. If you prefer an mvvm approach (Angular2), see this. The one currently used is more jquery-ish. It's unclear if Kendo prefers this method since it's not mentioned in the documentation.

  4. Personal opinion: avoid posting excessive code as it may deter readers like myself who are lazy to go through lengthy scripts

Make sure to check the line on ng.module.ts where grid, button, and dialog are imported and added to @NgModule

import { GridModule } from '@progress/kendo-angular-grid';
import { DialogModule } from '@progress/kendo-angular-dialog'
import { ButtonsModule } from '@progress/kendo-angular-buttons';

@NgModule({
  imports:      [ BrowserModule, BrowserAnimationsModule, GridModule, DialogModule, ButtonsModule ],
  declarations: [ AppComponent ],
  bootstrap:    [ AppComponent ]
})

You can then use it like so:

<kendo-dialog title="Kendo Dialog">
     <kendo-grid [data]="gridData">
         //your code goes here
     </kendo-grid>
</kendo-dialog>

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Exploring MaterialUI withStyles to customize disabled switches with a CSS override

As I work on my project using React and MaterialUI, I've encountered a problem with customizing inputs. Despite trying various selectors, I can't seem to change the black color of this particular input. It would be helpful to have a clearer way o ...

What steps should I take to modify this recursive function so that it can verify the property name of an object?

I stumbled upon the code snippet below online, which effectively and recursively eliminates properties from an object if their values are null, undefined, or 0 const removeEmpty = (obj) => { Object.keys(obj).forEach(key => (obj[key] & ...

How can I retrieve the path to a specific subnode using Javascript/JSON?

What is the best way to obtain a JSON path that leads to a specific child node within an object? For example: var data = { key1: { children: { key2:'value', key3:'value', key4: { ... } ...

Develop a JavaScript library for use in the npm ecosystem

I have developed a minimalist JavaScript library that includes common functions: !!window.JsUtils || (window.JsUtils = {}); JsUtils = (function () { "use strict"; return { randomHex: function (len) { var maxlen = 8; ...

The intersection of CSS and IE7's Z-Index feature

Hey there, I could really use some help! If anyone has any ideas for fixing a z-index issue in Internet Explorer 7 with CSS/JavaScript on this page while keeping the DOM structure intact (it's currently optimized for easy tab navigation), I would gre ...

Utilizing Laravel 5.5 and Angular on a Subdomain

Currently, I am facing a challenge in setting up a small project that involves Laravel and Angular. My goal is to have the Laravel 5.5 backend running on domain.com while the Angular frontend is hosted on app.domain.com. I attempted to install Angular wi ...

Issue with page scrolling while utilizing the Wow.js jQuery plugin

While using the Wow.js plugin for scroll animations, I encountered an issue on mobile phones. When reaching the Pricings section, scrolling becomes impossible for some reason. I am utilizing Bootstrap 3 in this project. Despite attempting to modify the an ...

CSS disappears after selecting menu in JSF application with PrimeFaces

Whenever I click on a p:menuitem and update the content of a layoutunit, the CSS style of the layoutunit disappears. Strangely, when I refresh the page, the style magically reappears. Can anyone explain why this happens? <p:layout id="plantillaPrincipa ...

Can you please explain the significance of classes <T> and <U> in Angular 2?

After diving into the Angular 2 TypeScript documentation, I have come across these two classes frequently. Can someone provide a detailed explanation of what they are? One example code snippet from the QueryList API documentation showcases: class QueryLi ...

Slide your cursor over to reveal a picture

I'm looking to create an interactive image gallery where the user can hover over an image to reveal text below it. I've been trying to achieve this by setting up my images in a specific way: echo "<div class=textimage style=background-image:u ...

Express application failed to deploy due to boot timeout error R10

After researching extensively on Stack Overflow and various other websites, I have been unable to solve a problem with my small Express app using ES6 syntax. Upon deploying it to Heroku, I encountered the following error: LOGS : 2021-04-09T12:14:14.688546 ...

Unable to access the property '__reactAutoBindMap' as it is undefined

I've been struggling with setting up server side rendering with React for the past week. It's a new project using an express server and I'm trying to render a simple hello world react app that utilizes react-router-component. To get some he ...

Angular is detecting an incorrect value in the mask

Recently, I came across the library found at and decided to create a directive utilizing it. My TypeScript code snippet: initForm() { this.form = this.fb.group({ item_number: [this.service.lpu.item_number, Validators.required], ...

Why isn't my Promise fulfilling its purpose?

Having trouble with promises, I believe I grasp the concept but it's not functioning as expected in my project. Here is a snippet of my code : (I am working with TypeScript using Angular 2 and Ionic 2) ngOnInit() { Promise.resolve(this.loadStatut ...

What is the method for nesting data within a component's child>child>child structure?

In the structure I am working with, there is a hierarchy: Root component buttons (menu search component) - an input field for searching Widgets (widget component ) (Cats widget) - displays what is input in the menu search here. My challen ...

Passing the output of ComponentA as the input for ComponentB in Angular

I have just started learning Angular and one strategy I find helpful is to work on small projects. Currently, I am focusing on 3 components, but for now, only two are relevant: TANavBarComponent TAPageContainerComponent Within my TANavBarComponent, I aim ...

"Gone in a Scroll: Div vanishes as page moves

Fiddle: http://jsfiddle.net/ud6hejm6/ I was tasked with creating a website for a video game tournament. By opening the fiddle link provided, you can preview the page layout. A central div is featured in the design: <div class="middle teko" id="mezzo"& ...

Creating a Copy to Clipboard feature in React can be achieved by transferring data from an h1 tag to an input field

I'm trying to extract data from an API into an h1 tag in my app. Is there a way for me to easily copy this data and paste it into an input field? Any help would be greatly appreciated. Thanks! ...

Is it possible to customize the color of the modal backdrop in layer v4 of the Material-UI library

I am struggling to modify the background color of an MUI V4 modal. Instead of getting a clean color, I am seeing a gray layer on top of the backdrop. Though this seems to be the default behavior, I want to remove it and target the shaded div directly rathe ...

Using TypeScript to automatically determine the argument type of a function by analyzing the return type of a different function

I am working on an interface with the following structure: interface Res<R = any> { first?(): Promise<R>; second(arg: { response: R }): void; } However, I noticed that when creating a plain object based on this interface, the response ...