SlickGrid column headers not synched when in Full Screen mode - slickgrid

We have a serious problem with SlickGrid in an application.
The problem doesn't seem to have anything to do with the way we implement/built the Grid since the behavior is reproducable on every SlickGrid I've seen.
Here's the problem:
If the User is viewing a grid on less than FullScreen mode and scolls the grid horizontally, then snaps the browser to fullScreen, the column headers are out of sync with the column contents. This wouldn't be a problem if the Horz scrollbar was retained (scrolling even 1px resynch's columns/contents) but if the grid fits inside the window, there is no Horz scrollbar and no way to resynch the columns with the content.
What we need is a method to repaint the column Headers without repainting the entire grid or a patch from someone who has already solved this.
These have no effect:
Options:
syncColumnCellResize:true
Method:
grid.resizeCanvas();
Thanks...

Try the fix submitted in https://github.com/mleibman/SlickGrid/commit/c5324a130ae2ef496f2c007f736f805cc7caa3f0 (get the latest code at https://github.com/mleibman/SlickGrid/zipball/v2.0).

Related

Issues with tabbing between Filter Fields with Horizontal scrolling - scrolling out of sync

We have a wide grid with horizontal scrolling, with 2 frozen columns. It is very wide (over 20 columns), so the horizontal scrolling is always needed.
We are using the Filter Row option to allow the user to filter. Works well, but if the user tabs between the filter fields, an issue arises. If the user tabs to a hidden field (hidden as in having to scroll to see it), then the header will scroll to accomodate, but the body will not. Likewise, if the user is scrolled all the way to the right and tabs out of the last frozen column, the scrolling again gets out of sync.
See the following Dojo example to experience the issue yourself.​
http://dojo.telerik.com/iNONA/2
If anyone has any clue as to how to fix this issue, I'd appreciate it very much!
Thanks!
I had a simular problem, just without angluar implementation. For me the jQuery scrollLeft() method solved the problem, see (Grid data isn't align with Grid header when tabbing through header columns).
$("#example .k-grid-content").scrollLeft($("#example .k-grid-header-wrap").scrollLeft())
With that line of code I got it working in the developer console of your Dojo example to adjust the grid content to the position of the header. But the scroll event, as I implemented it on my problem, didn't work on your example. Maybe this helps you and you can adjust it with the scroll event in angular.

Grid inside Table or MainTable

I have one WWSD or one SDPanel with some attributes but between these attributes that are fixed inside a Table or directly in the MainTable I want put and Grid, the problem is that the Grid is not showed and when I put the grid its no more possible scroll in the WWSD or SDPanel, is like the Grid stuck the SDPanel more than the grid is not showed.
Anyone can help me to put the Grid and keep with all normally ?
Thx.
I assume you're targeting Android.
The issue is that Android does not natively support nested scrolling. Therefore, a GeneXus layout that contains a grid will disable the form's own scrolling (so that the grid can itself scroll).
There are two ways of resolving this issue:
Redesign the panel so that the form does not vertically exceed the size of the screen (thus, form scrolling is not necessary).
Set autogrow=true for the grid, which will resize to fit all items (and "push down" any other controls located below it). Since the grid will no longer need to scroll, the form's scroll will be enabled.

Kendo UI Grid virtual scroll hiding some records

We're using lots and lots of Kendo grids, many of which have virtual scrolling set up with a server-side data source.
Sometimes, one of them will hide records beyond the "reach" of the virtual scrollbar. We can see what's going on by using Developer Tools to make the internal scrollbar visible:
It's hard to put a finger on when this happens exactly - the bug keeps popping up in seemingly random places.
Any ideas how to narrow this down / deal with it?
Try resetting the virtual scroller in the grid onDataBound event.
onDataBound: function(evt) {
//Repaint the virtual scroll bar to make sure all rows are visible to user
var grid = evt.sender.wrapper.data("kendoGrid");
grid._rowHeight = undefined;
grid.virtualScrollable.refresh();
},
You need to do this on detail row expand and shrinks as well.
I tried virtualScrollable.refresh(), does not fully shown the hidden content, but using resize(true) works
$("#yourGridId").data("kendoGrid").virtualScrollable.refresh(); //does not fully show hidden content
$("#yourGridId").data("kendoGrid").resize(true); //works
just need to call this from all the related events (still working on identifying them)
As Telerik (more or less) points out in the docs, changes to the rowheight in a grid with virtual scrolling won't work when the grid has display: none.
We had an event handler that would hide the grid and fire an async call. On success of the async call, we were changing a value that resulted in a different rowheight (removed bold from one row).
That was enough to throw off the scrolling as pictured.

KendoUI TabStrip on click

I have a little problem with using KendoUI TabStrip. It doesn't matter if I'm at the top of the screen, but when I click a tab, the screen moves to the tabs to the center of the screen and the I have to scroll to view the content, this is not a big problem, but it is annoying, so I would like to know if there's a way to avoid this.
Thank you.
Yes, according to Telerik:
The problem is caused by the fact that during the time that the tabs
are changed, the page get smaller, so the scroll position goes up. The
solution is to set height or min-height style to the TabStrip content
s, so that the overall TabStrip height remains constant.
They also list other potential solutions in the following thread:
http://www.kendoui.com/forums/kendo-ui-web/tabstrip/browser-scroll-position-is-changed-when-tab-is-changed.aspx
I had a similar issue with tabs jumping around when i was removing and adding tabstrips dynamically.
My root cause was due to using jquery and trying to do a $("#tabstrip").remove() instead of clearing out the container holding the tabstrip. My fix was $("#tabstripcontainer").empty() to clear out any remnants that the tabstrip left behind.

Firefox TextArea does not scroll without scrollbars

I am using TextArea tags in my web project, that shall never show scrollbars.
This can easily be accomplished using
TEXTAREA { overflow: hidden }
All browsers that I need (IE, FF, Chrome) hide the scrollbars, as intended.
However Internet Explorer and Chrome will scroll to the current cursor position anyway, while Firefox does not scroll anymore at all. You can move the cursor into the invisible area and type, but you will not see, what you are doing.
Can this be solved?
Regards,
Steffen
EDIT: Because I have not found the source of the problem and I would really like to solve this, I leave this question open. However I found a really bad workaround: We now use overflow: scroll on that TEXTAREA, put it into a DIV, measure the width and height of the horizonal and vertical scrollbars, increase the size of the TEXTAREA by that values and set overflow:hidden to the DIV effectivly clipping away the scrollbars. They get invisible to the user but Firefox still scrolls. Not nice but working.
As far as I can tell, Firefox is behaving as I'd expect given the semantics behind overflow:hidden.
That said, and having read your comments above, you can quite easily mimick the behaviour you want with a small bit of jQuery.
Here's the code I've written:
$('textarea').bind("focus keyup", function(){
var $current = $(this);
$current.scrollTop(
$current[0].scrollHeight - $current.height()
);
});
This will basically scroll the textarea to the bottom when you focus on it and as you type. It may need tweaking to account for edits being done further up in the content.
Here's a Working Demo

Resources