ExtJs: Programly select rows of a GridPanel in an inactive tab not working? - extjs

Basicly, I have a window contains two tabs, the second tab is a GridPanel and is initially inactive.
I want to programly select two rows of this GridPanel(via CheckboxSelectionModel) by clicking a "show window" button , but found it not working. There will be a javascript error thrown and no rows selected. After I manually clicked the second tab to make the grid visible, everything works well.
what's the most possible mistake I made?
I'll paste the code soon if it's not a common mistake for extjs beginner.

This is because your tabpanel will not render any components that are not visible (i.e., any components in your second tab in this case).
If you add the following config option to your Ext.TabPanel it should fix your problem:
deferredRender: false

Related

ExtJS - RadioGroup shows two selected items except one

Dears,
I have implemented a pop-up window to be shown by clicking a trigger-button of a textbox, and it has a radioGroup in it. in some cases I have to check the radio based on user input.
The problem is that if I try to invoke radioGroup.setValue() before opening the popup once, I face with two selected items in radioGroup. The issue doesn't occur if open-close the popup before trying to set the checked radio.
Is it a rendering issue or something like that?!

ui-grid highlight row while enableRowSelection is false

I'm working with angularjs but i have a problem with my ng-grid.
First, the client didn't want the user to select a row just by clicking it.
They wanted a single checkbox at the beginning of the row.
To do that i had to disable the row selection by doing this :
"enableFullRowSelection: false". This prevented the row to be selected.
But now they want me to allow the highlight of the row by clicking it.
I tried to put a css focus but the event never triggered (i tried hover and mouseenter and the css worked).
How can i disable the row but still let the focus event enable ?
If someone can help me it will unstuck me !

Angular UI-grid options

Currently I have a grid that has a option to click and show the grid options on the far right side. The issue I'm having and I am wondering if there is a setting I can add for the grid options dropdown to automatically close when a user clicks off anywhere else or opens one of the column drop down options. Any ideas?
There does not appear to be a setting for this in the API. I assume you are using CellNav, which is the cause of this. The reason clicking on the grid cells or header cells doesn't close the grid menu is that cellnav is eating the click event.
If you are using CellNav, you may notice that the column menus do not close when clicking within cells, either.
You need to add a different event listener (let's go with mouseup) and programmatically close the menus.
Here is an example of how to achieve this using the gridApi and onRegisterApi grid option.

EXTJS 4.0 grid in an inactive tab shows nothing

I create a tab panel with two tabs, first one is active and second isn't.
Then I create two grids and render them to first tab content and second tab content.
The first tab shows fine, and the inactive one shows nothing but only the gird layout appears.
I tried to put two grids into the active tab, and it works.
But I want each tab to contain one grid, how can I achieve this?

EXT.js Grid CheckboxSelectionModel: Header Check box not updating

I have an EXT js grid that uses the CheckboxSelectionModel. The grid is paged. The first column is check-boxes and this columns header is a check box as well. When the column header box is clicked, it selects/delesects all rows on the page, and only that page. The problem is that if on one page you select all, and then go to another, the column header box is still checked. the records are not selected which is correct, it's just the top one that is not updated. I found the code that fires when switching pages. I already have a selModel var set up. I found a condition to check whether or not the column header should be checked, I just don't know how to updated it. can anyone give me an idea how to do this?
Have you tried adding a listener to your grid's data store:
listeners : {
'load' : function() {
grid.getSelectionModel().clearSelections();
}
}
Hopefully the clearSelections() method will also uncheck the header checkbox.

Resources