MS Expression Blend: Sketchflow - Populating a sub datagrid with data upon selecting a specific row of a master datagrid? - expression-blend

I've recently started using Expression Sketchflow to prototype some user interface designs. I currently have a master datagrid at the top of the page, which I would like to allow the user when selecting a particular grid row to see a sub-datagrid below be populated with specific data relevant to that specific row of master data.
Could anyone shed some light on the subject!?
Help greatly appreciated.

I figured out how to do this by reading this article:
Expression Blend 3 – secrets of working with data.
Here's the basic steps (you already did a couple it sounds like)
Create your sample data set
Under the Data tab select the List Mode and drag your collection onto the screen, a list view of your data will be created (Master datagrid)
Now, select the Details Mode and drag and drop your collection onto the screen where you want the details to be displayed. (sub datagrid)
Tweak the fields displayed by dragging properties into the respective containers or modifying the XAML / Bindings list
If you have a child collection in your data, you may have to jump through a few more hoops.

Related

PowerApps for MS Teams - Duplicate record added to combobox when setting DefaultSelectedItems

I am developing a Power App using the Teams version. We have two tables in Dataverse acting as the main data sources. There is an inheritance relationship between these two tables, where one holds parent objects and the other child. I have an overview screen which displays a single record and it is important that a user can select both parent and child records from a single combobox and have the data associated to the selected record displayed.
In order to achieve this I have a collection which holds the ID and Parent/Child type of each record to form a full list of records from both tables. Collection is built as follows:
ClearCollect(Collection_RecordSelect,AddColumns(ShowColumns(record_parents,"recordID","recordID_numeric"),"type","parent")); Collect(Collection_RecordSelect, AddColumns(ShowColumns(record_children,"recordID","recordID_numeric"),"type","child"));
When a user selects a record from the combobox, the ID value from the collection is looked up against the respective data source to get the rest of the data for the record.
The issue I have now is, when a user makes a change to a record in another screen, the app returns to this overview screen to show the record they have just changed. To achieve this I used the DefaultSelectedItems property of the combobox which looks at a selectedRecord variable containing the record ID as a string, set after a user changes the record in another screen. As the combobox requires a record, the combobox uses the selectedRecord variable to Lookup into the collection I referenced earlier to get the full record, unless it's blank in which case it default to the first record. Shown below:
If(IsBlank(selectedRecordID),First(Collection_RecordSelect),Lookup(Collection_RecordSelect, recordID = selectedRecordID))
This results in the combobox displaying two instances of the selected record and showing the old version of the record before the user made changes on the overview screen. If you select another record, the duplicate disappears. If you select the other duplicate record in the combobox, the user's changes are then shown on the overview screen.
Screenshot of duplicate record in combobox.
I have tried creating a single collection, containing all records from both tables, however as they are slightly different due to the inheritance field in the child table they don't merge properly and data is missed. Unfortunately, I need the inheritance field on the overview screen so I can't use ShowColumns and remove it.
I have recently re-built the app in Teams as opposed to standard Power Apps. This solution worked fine in the standard Power Apps environment, so I have a suspicion it may be a bug with the Power Apps for Teams combobox? Unless I am making a mistake, I think this is probably true as I've just tested and the "Classic Control" combobox doesn't have the same behavior, shame because it looks rubbish compared to the Teams one!
I have turned off multi-select on the combobox and search and the problem still exists.
Any help would be hugely appreciated!

How to cross update of view between nattable and Jface view

Eclipse RCP View Communication ,where one view contains nattable and another views contains jface controls like button, dropdown.
Currently for example there is 3 view/Editor as shown below
View1 - contains employee details which is a Nattable and
it's cell contains data like String, Long, boolean, date value.
each row represent one data,and other views are corresponding data of
selected row
View2 - shows Address which is corresponding to the selected row in the View 1,
User can modify data of view2.
View3 - shows department details of employe, which can also be modified
So all 3 views present data of one model say Employee
Employee
|_Name
|_EmpId
|_Married
|_DOJ
|_Address
|_Type
|_City Name
|_State
|_PinCode
|_Department Details
|_Department
|_Project
|_Manager
Problem:
I want to know what is best way of communcation between views1 and other view such that
On selection of row in view1 then other two view should be update correspondingly;
If any data changes in view2/view3 then view 1 should get notification for data change in other view
when condition 2 occurs then I want to show dirty row in view1.
The typical approach for inter view communication in an E4 application related to your described scenario is to use the ESelectionService to trigger handling of a selection for opening another view, and to communicate back via the Eclipse 4 event system.
For scenario one to open a view based on the selection in a NatTable you could use the E4SelectionListener in the NatTable Eclipse 4 Extension Feature. It is a ILayerListener that forwards the selection to the ESelectionService. An example can be found in the NatTable examples.
To inform view 1 about changes in another view, I would suggest to use the IEventBroker to send an event from view2/view3 and react on the event in view1. This way the views are decoupled as much as possible. Eclipse 4 event system is a good starting point for learning about the event system.

Store App Dashboard: GridView and Multiple Charts

I'm working on a Store app that consists of several charts. I've already developed the charts and have them rendering using the chart control in the various forms.
I have been asked to bring these together in an app that allows the user to scroll left and right through each of the charts.
Every example I have found for using a GridView data binds the content of the GridView to item templates.
What I'm trying to get my head round is how I could please these chart controls directly in to a GridView.
Any help would be greatly appreciated.
Cheers,
Roy
As per my understanding of the question you need to have charts as items in a grid view.
If this is what you want, I have dome this before using charts from 3rd party toolkit.
You need ( may be variable sized) templates with each item having a different template of its own.
You need a items list with data for all the charts.
Then upon runtime you need to assign the template to each item.

UserControl in a DataGridView in Windows form

Looking for an example of a usercontrol in a datagridview row using Windows forms.
The Usercontrol would have multipe controls based on the business logic which depends on the the index of the row.
Thanks
You cannot insert a user control directly into a row in the way you would like. Your only possiblity is to add a new column type. Your custom column implementation would act like the other columns in that when it enters Edit mode it can create a control (in your case an appropriate one for the index number) and then have it work inside the cell until the Edit mode is exited. The issue would be drawing the cell when not in Edit mode.
You can see the source code of the builtin columns by using the .NET Reflector tool or search the web for custom DataGridView columns as there are many implementations that give sample code you could use as a starting point.

Populating a subform with different displays as a GUI in Access 2007

This is my first time building a UI in Access (using Access 2007), and I'm wondering what is the Right Way (TM) of going about this.
Essentially, I have several different queries that I'd like to display as pivot charts, pivot tables, tables, and reports. Eventually I'm also going to have to build forms to manipulate the data as well, but the application's primary function is to display data.
I'm thinking of having a button for each different display down the left side of the main window, and having the rest of the window display each button's corresponding contents (e.g. a pivot chart).
I have an idea that this can be accomplished using a single subform in the main form, and setting the subform's Source Object property within a function such as this one:
Public Function SetSubformSourceObject(newSourceObject) As Variant
subform.SourceObject = newSourceObject
End Function
Then, for each button I'd set its OnClick property to call this function with the name of the query I'd like to run.
Now, I have no idea if this is the best way of going about things, and would really appreciate some input :)
The principle seems fair to me. You have to give it a try. You do not even need a form-subform structure. You can set your sourceObject at the form level, and have your buttons in a commandBar instead of having them as controls on the form, so you do not have any 'form specific' code (like "onCLick") and controls. action/command controls on a form are space, code and maintenance consuming, while commandbars are more generic and are THE object that can hold all your action controls.

Resources