Automatically resize grid columns based on values in grid values in extjs6


hacker

I want to automatically resize grid columns to max content size. What should I do. I only see the autoSize function on grid columns, not sure how to use it. Says that the column header width is larger than the column data width that should be used.

I used the auto resize function and it worked, but I have few problems, I have to define the align property, i.e. the text field will be on the left, the number field will be on the right, and then the title text will be cut. I have locked columns in all reports and the locked section gives some blanks.

https://fiddle.sencha.com/#fiddle/1cr6

  1. See the column Sales Codes. It's not showing the full:Right property because of the align. If removed, it will work. 2. There is blank space after the DOW column.
  2. Without the minWidth property, the columns will not scale properly.
Robert Klein Kromhof

Take a look at this documentation: Ext.grid.column.Column - set size . I don't think you can make the column scale to the content. However, you can set a fixed size or set it to .flex

I hope this helps.

Related


WPF grid resize automatically

Rohawk In my XAML I have a certain horizontal space. In it, I need to put a text (of unknown length) followed by a button. The button should be placed directly after the text. I am using the following XAML: <Border Name="Boundaries" MaxWidth="500" MinWidth="50

Automatically resize columns with CSS Grid

reality I'm trying to figure out if a CSS grid will work like a table. So if I have a long list of "cell data" (column 2), and there is free space elsewhere in the table, I don't want it to wrap like the picture below: What I want to achieve is something like

How to subset a raster based on grid cell values

fab My following question is based on the solution proposed by @jbaums in this article: Global raster of geographic distances To reproduce the example, I have a raster dataset of distances to the nearest coastline: library(rasterVis); library(raster); library(

Resize Jpanel grid columns

Melindek I'm wondering if it's possible to resize Jpanels, I've searched for a while but haven't found what I'm looking for. Here is my code: JFrame frame = new JFrame("My Frame"); JPanel panel = new JPanel(new GridLayout(1,2)); // split the panel in 1

ExtJS Modern - Automatically resize grid columns

staccato I have a modern ExtJS 6.2.0 application. There is a grid with 9 columns. Is there a way to automatically resize the column to make it wide enough to display the full cell content? Or what is the best practice when it comes to mobile grids with many co

Kendo grid column template with columns of values

Nicola My kendo grid has a special column with values: "unpaid", "paid". Arriving from the backend 0 - means "unpaid", 1 - means "paid". My configuration for this column: { columnMenu: true encoded: true field: "Invoice__state" filterable: {cell: {…}} resizabl

Resize Jpanel grid columns

Melindek I'm wondering if it's possible to resize Jpanels, I've searched for a while but haven't found what I'm looking for. Here is my code: JFrame frame = new JFrame("My Frame"); JPanel panel = new JPanel(new GridLayout(1,2)); // split the panel in 1

How to subset a raster based on grid cell values

fab My following question is based on the solution proposed by @jbaums in this article: Global raster of geographic distances To reproduce the example, I have a raster dataset of distances to the nearest coastline: library(rasterVis); library(raster); library(

WPF grid resize automatically

Rohawk In my XAML I have a certain horizontal space. In it, I need to put a text (of unknown length) followed by a button. The button should be placed directly after the text. I am using the following XAML: <Border Name="Boundaries" MaxWidth="500" MinWidth="50

WPF grid resize automatically

Rohawk In my XAML I have a certain horizontal space. In it, I need to put a text (of unknown length) followed by a button. The button should be placed directly after the text. I am using the following XAML: <Border Name="Boundaries" MaxWidth="500" MinWidth="50

WPF grid resize automatically

Rohawk In my XAML I have a certain horizontal space. In it, I need to put a text (of unknown length) followed by a button. The button should be placed directly after the text. I am using the following XAML: <Border Name="Boundaries" MaxWidth="500" MinWidth="50

Automatically resize columns with CSS Grid

reality I'm trying to figure out if a CSS grid will work like a table. So if I have a long list of "cell data" (column 2) and there is free space elsewhere in the table, I don't want it to wrap like the picture below: What I want to achieve is something like t

ExtJS Modern - Automatically resize grid columns

staccato I have a modern ExtJS 6.2.0 application. There is a grid with 9 columns. Is there a way to automatically resize the column to make it wide enough to display the full cell content? Or what is the best practice when it comes to mobile grids with many co

How to subset a raster based on grid cell values

fab My following question is based on the solution proposed by @jbaums in this article: Global raster of geographic distances To reproduce the example, I have a raster dataset of distances to the nearest coastline: library(rasterVis); library(raster); library(

Resize jqGrid based on number of columns in grid

Macandiuru I have jqGrid (free jqGrid) with 7 columns. And I applied shrinkToFit: falseproperties to enable scrolling of grid columns (to fit mobile devices). When I apply the same properties to a grid with only one column of grids, as shown in the image below

Color map grid based on values in pandas dataframe

Jeremy I want to fill a grid map with colors based on the values of interest. Sample data is here: import pandas as pd df = pd.DataFrame() df['lon'] = [100,105,110,115,120,125,130] df['lat'] = [38,40,42,44,46,48,50] df['value'] = [1,2,3,4,5,6,7] Specifically

WPF grid resize automatically

Rohawk In my XAML I have a certain horizontal space. In it, I need to put a text (of unknown length) followed by a button. The button should be placed directly after the text. I am using the following XAML: <Border Name="Boundaries" MaxWidth="500" MinWidth="50

Automatically resize columns with CSS Grid

reality I'm trying to figure out if a CSS grid will work like a table. So if I have a long list of "cell data" (column 2), and there is free space elsewhere in the table, I don't want it to wrap like the picture below: What I want to achieve is something like

WPF grid resize automatically

Rohawk In my XAML I have a certain horizontal space. In it, I need to put a text (of unknown length) followed by a button. The button should be placed directly after the text. I am using the following XAML: <Border Name="Boundaries" MaxWidth="500" MinWidth="50

How to subset a raster based on grid cell values

fab My following question is based on the solution proposed by @jbaums in this article: Global raster of geographic distances To reproduce the example, I have a raster dataset of distances to the nearest coastline: library(rasterVis); library(raster); library(

Resize jqGrid based on number of columns in grid

Macandiuru I have jqGrid (free jqGrid) with 7 columns. And I applied shrinkToFit: falseproperties to enable scrolling of grid columns (to fit mobile devices). When I apply the same properties to a grid with only one column of grids, as shown in the image below

Resize jqGrid based on number of columns in grid

Macandiuru I have jqGrid (free jqGrid) with 7 columns. And I applied shrinkToFit: falseproperties to enable scrolling of grid columns (to fit mobile devices). When I apply the same properties to a grid with only one column of grids, as shown in the image below