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

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;

Related

SubRow After Expanding a Parent Row in extjs41

Requirement is simple with showing a row(child Row) when user clicks on the Parent Row.
Attached image for more info
Take a look at the grid grouping feature: http://docs.sencha.com/extjs/4.1.0/#!/api/Ext.grid.feature.Grouping
I guess simple tree panel with multiple columns can fit your requirements perfectly.
Check this fiddle.

Grid cells with bullet points

I am trying to implement a ExtJS based grid where users would change column data or enter empty columns. Is there a way to show/enter contents as bullet points on ExtJS grid cell like we usually do in Excel?
Thanks in advance
Check this fiddle - https://fiddle.sencha.com/#fiddle/mpl
The Idea is to use htmleditor as the column editor in your grid. However, there'll be quite a lot of work involved in positioning and styling when the html editor opens up for editing.
The fiddle that I created contains just the editor with no styling so it doesn't open good. And when you try, try editing the first column in third row data.

How to retrive the selected grid rows inside a panel in controller in extjs

how can i retrive the selected rows from grid inside the panel in controller i tried using itemId but i am getting the null array. I attaching the screenshot of grid. Also i pasting the constoller selection method
Ext.widget('adminRoleView').down('#adminRoleView').getSelectionModel().getSelection();
"adminRoleView" is the alias of the panel and "adminRoleView" is the itemId of the grid which is inside the panel. Also i am new to technology so i dont know whether this wrong or right.
you can use this :
var rows = Ext.getCmp('YOUR_GRID_ID').getSelectionModel().getSelections();
its return all the selected rows.
i got the solution by giving
this.up("panel").down("itemID").getSelectionModel().getSelection();
i think Ext.ComponentMgr is good than above method... :)
Ext.getCmp('adminRoleView').getStore().getSelectionModel().getSelection();

How to get ng-grid to hide certain rows

I have an array of objects that I want to show in ng-grid. Each row has a boolean property isVisible. In the ng-grid I want to show only the rows where isVisible is true. The other rows should be completely hidden.
I have tried using a rowTemplate and databinding a ng-show to isVisible. That hides the content of the row, but leaves the actual row in place, showing an empty row.
I have tried using filterOptions, but can't figure out the correct syntax to do such a filtering. I couldn't find any good documentation on how to set it.
I have even tried modifying the gridTemplate in the ng-grid source, by trying to add a filter on ng-repeat=\"row in renderedRows\", but I haven't gotten that to work either.
I guess I could modify the array itself, by temporarily removing rows, but I would prefer not to do it that way, since I have to be able to show the rows again (It is actually an expander that I'm doing, that should hide/show sub-rows)
Try also conditionally setting the height of the row in the template to '0' based on isVisible or use a CSS class with ng-class. Play with the CSS of it until you get the desired effect and then you can use that in your template.
This sounds like the type of thing that would benefit from using height and CSS animations actually so it opens and closes with an animated style. If you have a jsFiddle sample I'd be happy to try and help.
Edit: After looking at how the grid actually lays out it's rows (absolutely positioned) you only really have two options I can think of:
1) Filter the data you are binding to the grid through a function like dataVisible() but keep the full data list internally in the controller so you can show/hide easily
2) Submit a patch to the ng-grid project (or fork it) with the filtering capability you are looking for. Out of the box it doesn't appear to support this scenario.

How can I add slickgrid checkboxes to specific rows depending on if a value is true or false, without adding it as a formatter?

Does anyone know how I can add checkboxes only to specific rows in slickgrid without using the formatter approach?
Currently I've just done a columns.push(checkboxSelector.getColumnDefinition()); but that adds checkboxes to all the rows.
When I tried to use the formatter approach like this https://groups.google.com/forum/?fromgroups=#!topic/slickgrid/uKq2aVU5luo I found that when I scrolled through the grid, it would not hold the 'check' that were already selected in the checkboxes of the rows?
Grateful for any help on this.

Resources