Clarity Datagrid dynamic data row coun5 based on available space? - datagrid

Does the Datagrid support the notion of varying the number of data rows according to the available vertical space?
Hence, as the browser changes size the table header and footer areas remain fixed in size and the data area space varies to show whatever number of rows that will fit in the available vertical space.
This is to avoid a situation where scrolling is required.

Clarity does not have this feature, but you could manually set the height of the Datagrid in the application based on the number of rows you have displayed. The goal currently is to minimize vertical jumpiness, so we keep the same height.

Related

How to wrap and stack items in QML, into rows and columns

I have a series of buttons that I want to appear in columns at the bottom of my QML page. The number of columns across should depend on the width of the window, as the window width increases I want more columns to be added. (And fewer rows as a result as components are pulled up to the previous line)
This is sort of like a Flow component, but I want the items to appear in columns, evenly spaced across the page, in rows and columns (columns centered vertically, at the bottom of the page). Sort of like GridLayout.
I can't figure out what QML component(s) to use to achieve this.
I think what you're looking for is a GridView. See the layout documentation.
I'm not positive, but based on your description I think you would just need to set the flow property to GridView.FlowTopToBottom.

How to handle Orientation (Landscape or Portrait ) in ListView using Xamarin Forms

I am using ItemTemplate ( that is ViewCell ). I got know about the Orientation article in Xamarin documentation but there is no point about handling ListView orientation.
Hope to get the answer
Screen shots
http://i.stack.imgur.com/lkMvC.png
http://i.stack.imgur.com/5PrJj.png
As you can see from your screenshots, this is not an orientation problem, your listview IS the full width in both cases, what is quite possibly wrong are your layout options.
Can you show us your item template definition?
You are using a grid inside the ViewCell?
In that case, first make sure the grid's horizontal options are set to FillAndExpand, then check the grid column size definition.
Can you also show us the grid's column size definitions?
If they all have fixed sizes assigned, then they will always be that size, no matter how much unsued space there is.
There are 2 ways to make them use more space.
If possible, you should use the "star" sizes. This is where you give your columns sizes as portions of the available space.
If you give your first column the size 1*
and the second column size 1*
they will both take exactly half of the available width.
You can use any other numbers to select portions, such as three columns with sizes 5* 3* 1*
Which would make your first column 5 times as big as the third, and the second column would be 3 times as big as the third.
Again, in total, they will take the entire available width.
The second column sizing option is to use "Auto" sized columns, which will size the columns according to the elements inside them. Whatever size the largest element inside that column (in any of the rows) takes, that is the size that column will have.
To take the whole screen width in this case, at least one of the columns content should have "AndExpand" on it's horizontal options.
This is somewhat easier as it will automatically size the columns and you just take care of populating them properly with content, but be wary as this approach is significantly slower.
Finally, if you experience performance issues, consider implementing the ViewCell with an AbsoluteLayout. It can be a bit more pain to set up, but should work faster than grid if you have a bunch of rows inside the list view and a bunch of data in each row.

Shortening the height of a data grid to fit rows of variable height

Context for this question
We have a web page that has two scrolling grids, not paginated grids. When the first grid is nearly empty, occasional users do not realize they can scroll down to see the second grid. Other layouts (tabs, etc. are not a desirable solution).
Aside. The entire page layout is due for an overhaul, but on the Development schedule it's still 2 years away. Today, we cannot remove the grids, and we cannot change the general layout of this page.
When the first grid contains very little content, it would be good to auto-shorten the first grid so that the second grid peeks up above the fold. But when the first grid has lots of content, it's better if the first grid remains at its default height, because this grid is where the main interaction takes place, and we don't want excessive scrolling.
The challenge is that, in the grids, each row varies in height to fit its content. Sometimes a row is 2 lines of text, sometimes 12 lines of text. This causes a hard-coded height based on the number or rows inappropriate.
The question
What methods are there to assess the height of the row content in the first grid so that, if the total is less than the default grid height, we can shorten the grid? Or is there another way to look at this problem?

Sizing a Flex DataGrid to fit the data, then scrolling

I have a UI that is a master/details UI design pattern. There is a DataGrid that holds 1-n records in the top part section of a VDividedBox, then a details pane in the bottom part that shows details of the record selected in the DataGrid, responding to the selection.
The DataGrid usually only contains a small number of items, and so I'd like in most cases for the DataGrid to size to the number of rows and for the details pane to be shown just below the table with no empty space or empty rows. I've got that working OK by setting rowCount="{tableData.length}", where tableData is the data provider. So far, so good.
However, occasionally the table contains a larger number of items, and in these cases I'd like the table to grow to fill the available space, then scroll when there are too many items to show, without the details pane scrolling off. That is, behave like the rowCount is not set to the dataprovider length, and the height set to 100%.
My problem is, determining when to make this switch. What is the best way to switch the behavior from the rowCount-based height, to the percentage based height? Or am I missing some trick that would make the rowCount-based height table scroll when it runs out of space?
Thanks,
Paddy
What if you set the rowCount via:
rowCount="{tableData.length > 30 ? 30 : tableData.length }"
where 30 is the max height you want to scale to?
That way if there are more than 30 (or some #) of rows it will scroll.

Flex: Auto-resize contents of a group to fit a printed page

I have a large Group which contains two rulers and labels for distances, and a varied amount of smaller groups consisting of images and labels. Now my task is to print the large group on a page with a header and a footer. The large group extends outside the edge of the page and pushes the footer off the page. If I was printing just the Group, I could use
printJob.addObject(myView, FlexPrintJobScaleType.SHOW_ALL);
to fit it all on one page, but that would scale the header and footer as well, which I don't want - I'll be printing more pages and want the header and footer sizes to stay the same.
Is there a way to scale only the group and its contents automatically before printing?
arkward... you'd probably have to scale the group before adding it to your print job, which means you are doing to have to do lots of calculations about resolutions, DPIs, etc
The property to change is http://help.adobe.com/en_US/FlashPlatform//reference/actionscript/3/mx/core/UIComponent.html#scaleY
but working out what to scale by is a much harder job.

Resources