I am trying to figure out how to make a flip view that would have a table in it. Basically I want to have a table with information for that day. Then you can flip to the next day or previous day and a new table would load up.
I am not sure how to do this though in Xaml. I will eventually have a data source that will connect to this table and pull the right information up but first I need to figure out how to write the xaml to make the table inside a flip view.
I am not sure if I should be using "Grid" or "Grid Layout".
Edit
I tried both these controls but was not really sure how to get it to have a column format nor how to get it so the flip view thought that there was more than one table(so it would give the controls to get to the next table).
Edit2
This is what I am trying to achieve (more styled up later and x number of rows per section and no border lines)
The documentation for the Grid class shows how to add rows, columns etc. You can use Grid to do a layout with other elements placed in a few rows/columns. To use more than a few or to bind a collection - various ItemsControl classes are better - ListView & GridView are probably most common on Windows 8.
Related
I first would like to say that I am fairly new to UWP, and my experience with Android is probably leading some some assumptions on my end. There may be a better way about this, but so far I have been trying to use the Grid class, but it doesn't seem to work in a way that I would expect.
Basic Idea
I am trying to create a UWP application with the ability of organizing elements in a matrix, where each row and column represents some category, and whatever element that is within both row and column categories is placed in that cell. One or more elements can be listed in each matrix coordinate. An image for reference is below:
To give a more clearer/specific example, let's say the Elements were Employees, rows were Teams, and columns were disciplines (Testing, Dev, Management)
Comparing different category-types can be useful for displaying information, but this will have greater importance beyond just names, so this is only a simplified example. Also, as shown in the example, the number of rows and columns is determined by the number of categories there are for each respectively (e.g. # rows = # teams and # columns = # disciplines).
I don't have any code to show, simply because this isn't so much an error problem as it is a conceptual problem.
My Questions
How would I be able to filter what elements are bound to a cell by their Row/Column? Is this even possible?
i.e. populating the cells of the matrix with elements that occupy both the corresponding row's and column's category.
How do I bind columns and rows to their respective list of categories?
e.g. whenever I add another Column Category, a new empty column will be generated.
I appreciate your help and time!
For your scenario, the better way is using DataGrid to replace.
i.e. populating the cells of the matrix with elements that occupy both the corresponding row's and column's category.
You could use binding way to specific current element in which column and row, but you need to calculate before preparing data source for Grid panel.
whenever I add another Column Category, a new empty column will be generated.
If you use DataGrid, it will generate Column base on your item's new filed. Here is code sample that your could refer.
Below is my 46 asp.net control including textboxes and dropdownlist to insert data in single button
Below is my asp.net control id as above image given image
ddl_tag1 txt_date1 ddl_type1 txt_narration1 txt_amount1 txt_bill1 txt_fromloc1 txt_tolocation1
ddl_tag2 txt_date2 ddl_type2 txt_narration2 txt_amount2 txt_bill2 txt_fromloc2 txt_tolocation2
ddl_tag3 txt_date3 ddl_type3 txt_narration3 txt_amount3 txt_bill3 txt_fromloc3 txt_tolocation3
ddl_tag4 txt_date4 ddl_type4 txt_narration4 txt_amount4 txt_bill4 txt_fromloc4 txt_tolocation4
ddl_tag5 txt_date5 ddl_type5 txt_narration5 txt_amount5 txt_bill5 txt_fromloc5 txt_tolocation5
ddl_tag6 txt_date6 ddl_type6 txt_narration6 txt_amount6 txt_bill6 txt_fromloc6 txt_tolocation6
below is my table structure the above six row data insert one by one into below format
Sno TAQ DATE TYPE NARRATION AMOUNT BILL FROM LOCATIOM TO LOCATION
What is the best way to insert data using add button, i have to use for each loop for insertion for above text boxes and drop-down to insertion one row then another row insertion.
If you are manually putting a bunch of controls onto a page, and not databinding them to anything, creating six manual insert statements is pretty much the only option as far as I know.
As one commenter said above, a gridview might be easier, but honestly if the point is solely just to add and not to also display/update (which is what gridviews are best at) I'm not sure how much that would gain you. If the requirement is specifically and only to add six new rows at a time, you're probably doing the easiest thing.
If you ultimately want more functionality than just add records, you may want to take a look at gridview though.
I need to display the percentage of each cell, of a pivot grid, column against its column total.
So far, I have been checking possible ways to get the columns totals being displayed by the PivotGrid (as I already know how to insert a computed column using expressions) but so far I haven't found a place where these values are available.
I have also considered to handle the CustomSummary or CustomUnboundFieldData events of the PivotGrid but I don't see clearly how can I get the column total from there.
Another approach I have think of is to try to use the PivotCellBaseEventArgs.CreateDrillDownDataSource to get the underlying records of the cell, but then I will not be able to get the column total, as the records returned by that method are only for a specific cell, not for the whole column.
I'll appreciate if you can point out what would be the best approach for dealing with the cell percentage against column total requirement, including any of the previous or maybe another approach I haven't think of.
Also I will be glad if you show me a way of getting the column total from the pivot grid control, if there's any way.
I finally find the way to do this so I am posting it in case anyone else need it...
There is a property on a PivotGridField that allows you to control the way the data is "summarized" (i.e. aggregated). Usually this is set to "as is" or Default but you can change this to support what is called Percentage Modes.
So I just change the PivotSummaryDisplayType, of the field that I wanted to display as percentage, to PivotSummaryDisplayType.PercentOfColumnGrandTotal and that's it.
i need to display the list one by one in the same line.
It mean instead of binding the value in the row i need bind it in new column first row value. Is that any control available to view the item horizontally .
i have my data in data table.
I'm not sure if I understand your question correctly but I think what you want to use is a repeater. This way you can use whatever markup you want in the itemtemplate to determine what the layout of your data is when it is displayed to the user. You could do something as simple as <%#Eval("WhatEver")%> and you would get horizontally repeating values of the WhatEver column.
Before anyone suggests scrapping the table tags altogether, I'm just modifying this part of a very large system, so it really wouldn't be wise for me to revise the table structure (the app is filled with similar tables).
This is a webapp in C# .NET - data comes in from a webservice and is displayed onscreen in a table. The table's rows are generated with asp:Repeaters, so that the rows alternate colers nicely. The table previously held one item of data per row. Now, essentially, the table has sub-headers... The first row is the date, the second row shows a line of data, and all the next rows are data rows until data of a new date comes in, in which case there will be another sub-header row.
At first I thought I could cheat a little and do this pretty easily to keep the current repeater structure- I just need to feed some cells the empty string so that no data appears in them. Now, however, we're considering one of those +/- collapsers next to each date, so that they can collapse all the data. My mind immediately went to hiding rows when a button is pressed... but I don't know how to hide rows from the code behind unless the row has a unique id, and I'm not sure if you can do that with repeaters.
I hope I've expressed the problem well. I'm sure I'll find a way TBH but I just saw this site on slashdot and thought I'd give it a whirl :)
When you build the row in the databinding event, you can add in a unique identifier using say the id of the data field or something else that you use to make it unique.
Then you could use a client side method to expand collapse if you want to fill it with data in the beginning, toggling the style.display setting in Javascript for the table row element.
just wrap the contents of the item template in an asp:Panel, then you have you have a unique id. Then throw in some jquery for some spice ;)
edit: just noticed that you are using a table. put the id on the row. then toggle it.