This will probably be a simple question to answer.
Collection of X where X has a property that's another collection. For example each object represents a day which has a collection property that represents entries for that day. So I want it to iterate through each day, and for each day I want it to iterate through each of the day's entries. So you would have the following on screen:
Tuesday 15th January
Entry 1
Entry 1's Description
Horizontal Image gallery scroll (one row)
Entry 2
Entry 2's Description
Horizontal Image gallery scroll (one row)
Wednesday 16th January
Entry 1
Entry 1's Description
Horizontal Image gallery scroll (one row)
Entry 2
Entry 2's Description
Horizontal Image gallery scroll (one row)
Entry 3
Entry 3's Description
Horizontal Image gallery scroll (one row)
Straight forward... I've managed to get the above (minus the image gallery) using a ListView (Grouped), however I don't want each Day / Day Entry to be clickable. Only thing that should be clickable are the images to display they full screen.
I've used the RepeaterView in Labs, however it doesn't seem to allow Grouping nor nested collections...
Any pointers would be much appreciated. I know what I want to do, I know how I would do it in other platforms (non mobile), but don't know how to do it in this new Xamarin Forms world...
You might want yo use ListView. It allows to grouping data. You can also customize the cells.
This is a listview for the main view. And use a stack layout for the cells.
Set the Orientation to Vertical.
return new ViewCell
{
View = new StackLayout
{
Orientation = StackOrientation.Vertical,
Related
I need to create a paged GridView where each page contains some elements from a list, like launcher applications do to show the installed apps.The GridView only contains the elements that have enough space on the screen to be shown and the remaining apps are added in the GridView of the next Fragment.
I've found many examples that explain how to implement this, for example http://shrikantsonarblogs.blogspot.com/2013/07/gridview-with-viewpager-like-android.html or Display images in grid view of View pager, but in all of these examples the number of rows and columns are fixed values.
Is there a way to make these values "dynamic" by dividing the dimensions of the ViewPager by the dimensions of a child View (supposed they are all the same size, but I have to measure the first one)?
If what I want to achieve is not clear, an example can be the app drawer of the CyanogenMod Trebuchet launcher, with the only difference that I don't need it to display installed apps.
I built a form and embedded a preview pane in it. The preview pane displays the grid populated with the data from the data source. The problem is that the row height is abnormal. It is appearing 3 times the normal height of the grid rows. I am using Dynamics Ax 2012
Are you displaying an address, street name or similar?
Grids with a string field of an extended data type with a DisplayHeight property of 2 or more make the row height larger to accommodate the field. You can change the property on the FormStringControl as well.
The solution might be to change the DisplayHeight back to 1 on the control.
I created a Advanced Data Grid and implemented a grouping using GroupingCollection2 on it.
I implemented a custom Item Renderer and when I start to scroll horizontally, the cells belong to the previous item is also displayed on the group row.
Please take a look at the screenshot.
How can I tell from my item renderer that this cell is belong to a group and should not be displayed?
i want to change the number of items returned by a view. I changed the code as
$view->set_items_per_page(2);
in hook_views_query_alter();
But it is not showing the required result. But there is color difference after 2 records. Is it required any other settings I put my pager as off in view.
ie Use Pager:off . I want to use this on draggable view table. Is it possible?
Pls help me
if you are only altering the query programmatically and view exist then
1] Go to your view basic settings and click on item to display
bottom of your view you will get the 2 text boxes.
2] In first text box put the number you want, in your case put 2 and leave second text box 0. and hit the update default display button and save your view.
how to divide QGridLayout into rows and columns at Design Time in QT ?
I want to design one form where i want to have 2 columns and 7 rows .
I am designing using QTCreator but i am not getting any option of giving rows/columns.
It shows only these properties
See Using Layouts in Qt Designer. For you the most important paragraph is this:
The simplest way to manage objects is
to apply a layout to a group of
existing objects. This is achieved by
selecting the objects that you need to
manage and applying one of the
standard layouts using the main
toolbar, the Form menu, or the form's
context menu.
place your widgets on the form
arrange them into 2 columns and 7 rows
select all of them
right click on the selected widgets
select Lay Out in a Grid on the context menu.
You can often drag a new UI element to a position between two existing columns to create a new column - the GUI indicates that it's ready to create a new column by showing a blue vertical line to the user (same thing for creation of a new row with a horizontal blue line).
If instead it is showing a red line or outline, that's indicating that it will fit the element currently being dragged into the existing row/column grid at the indicated position, without creating a new row or column.
It can sometimes be quite difficult to get the GUI to play nice - I've have a number of occasions where I can follow this process to create a new column - but not if I try to place the UI element on the row I actually want it on - so instead I end up dropping it on another row to create the column, dropping another of the same UI element where I actually want it, and deleting the first (superfluous) UI element.
Alternatively, it can quite often be easier to simply right click the element with the layout set, select "break layout" from the layout menu, move things about manually and then go back and select "layout in grid" (or whichever other option) from that layout menu - hoping that it will correctly guess where you want things to go in terms of rows and columns. It's usually pretty good at that.
But yes, it probably would be nice to be able to force create a new column/row in a grid layout (perhaps with some default UI element - a label, maybe - inserted as a placeholder to keep the new row/column open) at a predefined position within the grid for those times when the GUI just does not want to play nice.
QLayout structure is created dynamically as you add widgets to it, there's no way to predefine how many rows/cols a layout have.
Maybe you are using the wrong approach to achieve your goal.