Grid columns collapse without explicit width

0 Answers 117 Views
Grid
Chad
Top achievements
Rank 1
Chad asked on 09 Aug 2021, 03:47 PM | edited on 09 Aug 2021, 03:55 PM

I'm making a grid wrapper for Grid and at some point the columns in the data I've been using have rendered with widths of 0 pixels. If I explicitly set them to any width in the object like so:

gridData: [
    { field: 'ProductName', title: 'Product Name', width: '500' },
    { field: 'UnitPrice', title: 'Price', filter: 'numeric', width: '500' },
    { field: 'UnitsInStock', title: 'Units in Stock' },
    { field: 'Discontinued', filter: 'boolean' }
]

Then those first two objects show up in my grid. The latter two objects do not. When I first setup a very basic grid example all columns render, but at this point I have filtering, column ordering, sorting, and pagination setup. Is there a config object I need to set somewhere? The docs can be a little byzantine so I admit I might have missed something.

 

When I inspect the HTML, I see that the `<table>` element has a width of 0. If I use the inspector to set it to 100%, the table autosizes the columns for me. If I try to override that in the `<style>` section of the wrapper file, it doesn't seem to overwrite whatever else is setting the width to 0.

Plamen
Telerik team
commented on 10 Aug 2021, 06:01 AM

I have tried to replicated the issue with one of our most complicated case - with filtering, sorting, paging and columnReordering but could not observe the issue-  https://stackblitz.com/edit/pkqkoc?file=src/main.vue

It may be something else so would please share a sample stackblitz example or a runnable dummy project so we could inspect it and be more helpful.

 

No answers yet. Maybe you can help?

Tags
Grid
Asked by
Chad
Top achievements
Rank 1
Share this question
or