ag-grid in a Material Tab - angular-material

I have an app that has two ag-grids in two tabs using Angular Material tabs. When the user switches between tabs the items in one of the columns get rendered outside of the grid (but inside the tab body). The difference in the column is that it uses a custom cell renderer. It only effects the grid in the first tab because that is the grid that uses the cell renderer. So you have to switch to the second tab then back to the first tab to see it.
Stackblitz example here
It's hard to see because the column elements get rendered at the bottom of the tab window, you can barely see them poking out at the bottom of the grid. Also, if you page to the next page of the grid they are rendered properly, even on the first page when you page back.
I've tried executing gridApi.refreshCells() after the tab has switched but it doesn't do anything.

The fix turned out to be simple and I hope this is the best method for doing so. I simply execute the grid API's redrawRows method.

Related

Displaying different forms in kendo window on click of different buttons

I have 3 buttons and, on click of every button, totally different content has to be loaded in kendo window. I am doing this in MVC. How to do this?
Your best solution is to create 3 different windows and, in Javascript, when you click on a button, you open the window and close others.
Or, you can also create only one window and load it's content dynamically when a button is clicked. But you have to deal with Kendo Window API.
If you want to reload the content of a window, see this link.

Calling rowToggle on Page Load using Prime Faces?

I am using primefaces 3.5, the latest release for our development work! In our homepage, we display the rows of data. When we click a row onRowSelect (SelectEvent) event we navigate to the next page with the Navigation Handler. On this landing page, I have a dataTable with expandable rows which has data in it. When I click the rowToggle icon the data is displayed in row expansion section (as it should normally).
What I need is to show the data automatically when page is loaded, with the rowToggler displaying down.
How can I achieve this?
This can be achieved using a bit of JavaScript (jQuery). All you have to do, is as your page loads call the click action of the RowExpander.
Something like this would work :
jQuery('.ui-row-toggler').click()
You can place this in your body onLoad attribute.
Source
http://forum.primefaces.org/viewtopic.php?f=3&t=8537

Kendo grid inside splitter next page

Here's my layout. I'm using a Kendo splitter control. The left pane contains a menu and the right is the main content. Some of the content pages contain kendo grids that can contain several pages of data. My problem is that when the user clicks on the next page of the grid, it performs a post back and the whole page refreshes taking the user back to the home page. The left menu loads the right panel using javascript. Does anyone know how to get around this?
In another words, I need the grid to load the next page and target the right side of the splitter control. How do I "Ajaxify" the next page of the grid control?
It sounds like your Grid is configured for Server Binding - if so you need to change it to Ajax binding and there is not other way to put it inside a Splitter which content is loaded with Ajax.

Jquery UI Tabs with Jquery UI Widgets in tabs acting strange

I have three tabs in a Jquery UI tabs widget. Inside of the tabs I am creating a Wijmo Grid. One on each tab. The Grid is based on Jquery UI as well. The grid on the first tab seems fine.
The grid on the second and third tabs (the hidden ones) have strange sizing issues. The Grid on one appears roughly 10 pixels wide and the full height. The one on the third tab appears about 50 by 50 pixels.
I know the code on those tabs is fine because if I make one of those the primary tab then it works fine and the other two are broken. So I think it is some sort of interaction between the Jquery UI Tabs widget and the contents of the tabs (a Wijmo Grid). Does anyone know what causes this strange interaction and what I can do to make it work predictably?
The Grid does size calculation when initializing. It needs to be displayed somehow when doing so.
You can add class="ui-helper-hidden-accessible" to make it off screen when rendering.
Make sure you initialize the grids then the widgets. Or you can call $("#grid").wijgrid("doRefresh"); when the tab is activated that it is contained in.

Using jQuery UI effects when dropping items between tabs

I have a jQuery UI tab control. It contains blocks that can be sorted. They can also be dropped on other tabs. When a block is dropped on another tab, I want to use the slide effect to hide the block from the current tab before displaying it on the new tab.
Here is a demonstration of the problem on jsfiddle (Follow the directions on the jsFiddle link to duplicate the problem)
The jsFiddle demo initially shows a working state for the problem. It uses the standard .hide() method to hide a block. But when using the "slide" effect with hide(), unexpected results occur. The block is not animated. Instead, after the animation interval of 1000ms the block just disappears from the tab and then is placed in an unexpected position on the new tab.
The expected behavior is that the block will slide to the left and be moved from the "Full" tab to the "Empty" tab.

Resources