GridView- binding to groups of different ViewModels? (Combining Images and Text articles) - windows-runtime

I'm tying to figure out how to use the GridView with different classes for groups. In the GridApp template everything inherits from SampleDataCommon, do you always have to inherit from a common class in the GridView? The documentation seems.. lacking on this mater.
UPDATE:
Specifically the problem I'm trying to solve is to have a GridView with both image tiles and text news articles.

You can bind to any class type. I would suggest that they implement a common interface or class. If they cannot, then grouping them just does not make sense. You can display the items within the group by using a DataTemplateSelector. Here is a very simple example and a more complex sample

Related

Using same angular directive with horizontal and vertical layout

I have 2 different form engines that share a common over-driven "Question" directive with different input types (select, calendar, multi-line, etc) based on a question type and then I want to display it in one engine like:
QuestionName InputField
and another
QuestionName
InputField
The goal is to share code with minimum duplication. Is there a good way to setup the html so it can switch back and forth or do I just move the InputField into it's own directive that can be placed twice in the question directive and show/hide as appropriate.
Thanks,
Scott
I decided on just creating an inner directive for the field portion displayed twice on the question directive using ng-if based on if it should be vertical or horizontal set at the form level.
<tr><td>questionname <span ng-if="direction==='vertical'><br /><field-directive /></span></td>

benefits of "class" vs "id" tags for a single use html element

I'm doing a code academy course and they ask me to use left and right column classes as opposed to id's. I'm not sure why...
It seems to me that I'm only going to have one Div that is left column, and one Div that is right column... so why would I use a class instead of an ID for this?
They probably want you to refer to the element in order to move it somehow to left. It is better to use a class because it is possible that at some point you'll want to move another element to left. If you use id instead of class there may be need to repeat the same CSS rule for two different elements (different IDs). Code repetition is considered a bad practice and should be avoided, if possible at design level (no need to rewrite anything later), hence the suggestion to use class instead of id.
IDs always perform well because they are unique per page, but somehow Code Academy could have the same ID. They might also want to avoid using IDs because of the dynamic application and structure, so we cannot predict how their skeleton is. I think it is as per their application logic.

How can i set a form with multi occurence from an another table in Access

lets assusme that in Access i have two table :
Parent(id,first_name,last_name)
Child(id,first_name,last_name,parent_id)
How, step by step, to make a form based on the Parent table, so that whil adding a parent, i can also adding his children?
Any advise or any link will be great.
The easiest way is to use a feature called “Sub Forms”. This is designed to show this kind of parent/child relationship for example the line items on an invoice. To say me explaining how here is a link to a tutorial on the subject
http://www.google.co.uk/url?q=http://fisher.osu.edu/~muhanna_1/837/MSAccess/tutorials/subforms.pdf&sa=U&ei=Fkw1TfncHYuFhQf1sujdCw&ved=0CBcQFjAD&usg=AFQjCNHFGtzi9bew8Wowx9HiCQ6sccK5BA

Show itemRenderer in specific DataGrid rows... others empty

I have a DataGrid populated via an Array. The last column in the DataGrid uses an ItemRenderer (Button). I want to show the Button in certain rows but not in others (leave those empty). I've looked everywhere for an example or even a clue how to do this (tried labelFunction on DG, etc.) but can't find anything about it. Any help would be appreciated. Thanks!
Okay... with (lots of) help, figured it out.
First off, I'm not sure why the itemRenderer requires a container but it does. The array must also be checked from the itemRenderer and not from the main application... again, I don't know why since the debugger shows it going through the exact same loop/events, etc.).
If interested here's the relevant parts of the code:
Main App:---
{col1:'', col2:'', col3:'', col4:'', col5:'', col6:'', col7: '', col8:'', col9:'', col10:'', col11:'yo'}];
public function initData():void
{ xferSchedule.dataProvider = schedArray; }
]]>
an item renderer does not have to be a container, it has to implement IDataRenderer (a Button does not). One could extend Button and implement this interface to get a simple button renderer. If you want it to display conditionally, you will accomplish this by handling those conditions within the renderer based on the data.
Now this might get slightly complex. I would recommend you to define you an XML instead of Array of Objects. If the node has the type property button, then it would create button at that cell whose value type is button.
How to create a button dynamically inside a grid which is yet again dynamic?
This might end into the whole component being dynamic.

Displaying a Django query result in HTML - table, list, css divs?

I am working on an django application that will return what historically was a table of information:
ISSUE DESCRIPTION INITIATOR INITIATEDDATE ASSIGNEE FORECASTDATE STATUS REMARKS
That will be the entrance point for users to sort / filter, etc the list of issues.
The columns like ISSUE, DATES, NAMES are of relatively fixed width, but others can be a paragraph or more.
What is the best way to render this in HTML? As HTML Tables, lists or with a lot of CSS spans/divs?
I eventually hope to make the issues list sortable or filterable with javascript as well.
The whole argument made by the CSS purists is that you need to keep your code semantically relevant to the information it contains. What you need to show is tabular data and you use the <table> tag to do that. The only "problem" with tables is when they are used to control the layout, like making your two column layout two <td>s as opposed to two <div>s. In this case, however, tables would be adequate.
If the information you're trying to display is tabular (as it appears to be), then go with tables.
Also, see these questions for even more debate!
Tables instead of DIVs
Why not use tables for layout in HTML?
As both answers say, tabular data should be displayed using a <table> tag.
To put it into perspective, when tables are used to do layout, that is an abuse of the table tag. When div tags are used to do tabular layout, that's abuse in the opposite direction. Don't use one to do the other's job.