I have mx DataGrids with custom item renderers on one column based on HBox. I tried to optimize them using the spark MXDataGridItemRenderer class, but using it results in the first row of the column being 2px shorter than the rest, as if the first row got hidden under the grid header. From the second row onwards the height is ok, but the first row problem results in every row being shifted up 2px. When selected, it looks just bad.
Any ideas would be much appreciated.
I have seen this issue before as well. I am not sure what the RIGHT answer is but to solve it for my app I stopped using the spark crap. I see the benefits of spark but for me, its frustration level outweighs its usefulness. So the way I see it, you have 2 options:
1: Create MXDataGridItemRenderer for each grid column so that they are all uniform.
2: Don't try to optimize them and just stick with the HBox solution (thats what I did).
Related
Anyone know if there is a way to make the ng zorro select (multi) to stick to one line instead of wrapping the selected items. In some scenarios its fine but when you have certain layouts you cant have the height doubling on each selection.
There is a codebox demo here: https://codesandbox.io/s/2lp2n (reduce the size of the view panel to see what i mean).
I have tried pretty much all i can think of (adding css to the select and select top classes to try and force it to stay on one line but it doesnt seem to work). I wanted to ask here first to see if anyone has any ideas since their git would normally close a question and ask me to come here first.
Thanks
In the end i just had to add:
flex-wrap: nowrap !important;
to nz-select-top-control
For a printable layout I want to display a dynamic list (coming from an array) that should 'flow' through 4 columns of different heights, to look like this:
The blue elements are the four columns with the list (ul) inside.
The heights of the blue columns are fixed.
How can I achieve this with CSS? I looked at multicolumns in css but there the columns have to be the same height so that's not working I guess.
What's the best way to do this? It's fine if it only works in current web browsers.
I checked out 'flexbox' as well as 'css-grid' and even though it may be achievable I resign from doing it.
Instead I took another way and changed the initial array in the way I can comfortably place it in the different (now not connected) DIVs.
I've run into a problem of how I should code some columns of content.
Problem
This is what is being output for the state of large-4; three columns with different sized boxes inside.
But what happens when I have medium-6 and the responsive mode kicks in? I get this:
You might understand my dilemma here. I want the content to evenly distribute between the, now, two columns, and not ending up with a "row" and then having the green column under the purple, but rather the teal one under the purple and somehow evenly put its boxes, if possible, over two columns.
Since the boxes inside the columns are sorted by date, the order has to be as they are in the large-4 picture (i.e. first date at the top left, going down, moving to the next column to the right, starting from the top, and so on).
My tries to solve this
I thought that Foundation 6 with the flex grid could possibly help me out, but I have yet to find anything.
I also gave the thought and try of using CSS3 column, but the break my boxes in half and make it really hard to manipulate.
If my request isn't clear enough, please let me know and I'll try to be more specific.
Thanks in advance!
I have an issue on the AdvancedDataGrid that the verticalLines are not always drawn correctly when the Grid is scrolled
Screenshot:
As you can see it afflicts the entire row up to first groupedColumn.
This happens only when it's upscrolling.
First I thought that it's probably an issue with my itemRenderer
but that is not the case because I found that it's only happing when I set the lockedColumnCount property.
In my case it is set to 10, just to scroll only the groupedColumns.
Without lockedColumnCount there is no such an issue with the lines.
It has nothing to do neither with the footer row, I had the same issue already before I added it.
Anyone has the same problem and found a workaround?
After some painful investigations I found the reason or at least the origin of this behaviour.
It happens only when:
*using grouped columns
*set lockedColumnCount for the ADG
*using a subclass of MXAdvancedDataGridItemRenderer for your itemRenderers
this will produce the bug you can see above when the adg is scrolled up
(it newer happens when it's scrolled down)
it disappears when the grid is redrawn
(after sort or column drag etc.)
and comes back most time (but not every time) when it is rescrolled...
Conclusion:
Don't use the MXAdvancedDataGridItemRenderer when you have groupedColumns and a lockedColumnCount
Create a class which implements:
IDataRenderer, IDropInListItemRenderer, ILayoutManagerClient, IListItemRenderer, IStyleClient
(subclass something like "Group" so you don't have to implement everything,
get inspired from the default renderer AdvancedDataGridItemRenderer for the rest of the implementation)
and use that class for your renderer
and no scrolling drawVerticalLine bug should appear...
I am using Telerik's Radgrid for a website. Often the grid columns exceed the available width, and extend outside the main content area (fixed width).
So what are my options for presenting very wide grids. horizontal scroll bars just look ugly on my site
Your choices are a combination of the following:
Smaller fonts
Consolidate some cells to have more than one row (e.g. if you have a "start date" and "end date" put the start date on top and the end date on the bottom.
Widen the window
Make some cells appear conditionally (based on user-defined filters). Maybe the most frequently used cells appear normally and a checkbox unhides the less frequently used cells or groups of cells.
Allow horizontal scrolling
Make the window a fluid width
Popup data in a floating <div> via javascript instead of putting it in a column
Am I missing anything?
i am using telerik controls too, one thing i have learned after a lot of work with them is their CSS is usually good, but i also face your problem, and here is my advise.
what Keltex said.
always add a custom class to your Rad Grid where you do fix those nasty stuff.
don't use fixed width for Grid, instead use it on columns and make the grid Fluid, so does the page.
hope this helps.
I agree with devmania and making the grid fluid, I had a similar problem recently. So I made a few of my columns nowrap and left the rest to wrap. It doesn't look great on smaller screens but it's still usable because I've stopped things like date+time columns wrapping. However, once you start using it on a wider screen it looks great.
It all depends on how much of a scrollbar you have. Is it possible to strip out some of the columns and have that information in a popup/flyout somewhere?
Another option is to make which columns are shown user configurable, but you're not really addressing the problem, just making it the responsibility of the user to make it look nice.
If you can't get rid of the horizontal scrollbar you should at least try to put the more important columns first so that your users don't have to scroll to the right very often.