Different elements in grid column - extjs

Is it possible to have different elements in a Ext JS grid column? If yes, how can I do this? If no, is there another appropriate solution? Maybe with an example.
Thanks for your help!
Kind regards, shub

What do you mean by different elements exactly?
You could use a TemplateColumn, and put in any markup and record values that you want
You could use the .renderer() method to return any markup that you want
You could use the .getRowClass() method to return a different css class depending on content
If you want to put an actual ExtJS component in a grid column, you should use Skirtle's ComponentColumn

Related

How to adjust multiSortLimit in grid

I have a grid with the multiColumnSort property to be able to order the data depending on the columns which were clicked. The problem is that I can only have 3 columns selected. In the ExtJS docs is a hint which indicates to use the 'Ext.util.Collection' to adjust the multiSortLimit property. However, I do not know how to use the 'Ext.util.Collection' for the grid.
The Link to the docs: https://docs.sencha.com/extjs/6.5.3/classic/Ext.util.Collection.html#cfg-multiSortLimit
You need to reference to Ext.util.Collection in Store.
You can do it by : store.getData() and next use setMultiSortLimit on it to change multiSortLimit.
store.getData().setMultiSortLimit(5);

Get all visible columns

I'm struggling with angular ui grid.
Digging into their API I'm trying to find a way is it possible to get visible columns ( only visible ).
$scope.gridOptions.columnDefs
returns all columns that are defined with all options. One solution will be that I iterate trough that array and filter out columns which have property "visible" : true, but I want to avoid that if it is possible.
Thanks in advance
To get all visible columns:
options.columnApi.getAllDisplayedColumns()
ag grid columnApi Reference
This should do it (depending on what you are ultimately trying to achieve):
uiGridExporterService.getColumnHeaders($scope.gridApi.grid, uiGridExporterConstants.VISIBLE);
If you can share a little more I might be able to help further.
Let me know if you have any other questions.

How to hide the entire Ext.selection.CheckboxModel in ExtJS grid

I need to hide the entire column of the check box (Ext.selection.CheckboxModel). I found out to get the columns of the grid to hide, but the columns does not give the checkbox column.
grid.headerCt.items.getAt(0).hide()
This worked for me in 4.2.2. I used a combination of the other answer by Saki and a little traversing through the DOM because the "getAt0).hide()" solution did not work for me either:
grid.headerCt.items.items[0].hidden = true;

Wrapping text in grid column

I want the text in a column of a grid to wrap. The grid is created with a model. I have found the format_wrap-method, but it does not seem to do anything:
$grid->format_wrap('description');
What do I do wrong?
Thanks,
Jeppe
Don't use such a methods directly.
This is only correct way to use formatters:
$grid->addFormatter('description','wrap');
https://github.com/atk4/atk4/blob/master/lib/Grid/Basic.php#L237

ExtJS Combobox with Checkbox

I want to design combo with checkboxes(display checkboxes along with dispalyfield)
i tried lovcomb, but not getting
is there any alternative for this or how to use lovcombo for multiple section
Thanks in advance
Alternative method (with out checkboxes):
http://technomedia.co.uk/SuperBoxSelect/examples3.html

Resources