I have a datagrid which is showing around 20 products.
Now i want to divide this grid in to 2 parts such that part one will contain products that are currently available with header "Availabe products" and part two will contain sold out products with header "Sold out products". Both Grid will have to be shown by a common scrollbar.
I can acheive this with 2 different datagrids but i am looking for a solution in which i don't have to divide my products in to two lists.
I'd suggest you use a Group with ObservableCollection.
Related
I’m using a RDLC for generating reports and I need to print a tablix with product details, the problem is each detail has different fields according to the product type and a basic layout; this is a simplified example of the database tables and printed tables:
Tables
I’ve tried to use rectangles as containers in a list and show/hide according to the type of product but they don’t allow resizing to the content.
Is it subreport a solution? Should I create one subreport per product type?
After trying to make it work for a while, I've discovered that using a textbox at the bottom of the rectangle allowed the rectangle to resize automatically.
I have about a dozen ObservableCollections that hold objects which have dates, singles and integers. All collections are of the same length and have data added and removed at the same time. One of the ObservableCollections is the main one and is needed when referring to the others.
Is there a way to use CollectionViews to bring 2 of these ObservableCollections together in such a way that they look like one ObservableCollection having the total of all of the original columns when data bound to a datagrid and/or chart? If so does anyone have an example?
Everything I have found shows the data from both sources being brought together by adding one on top of the other in what I would call a stack of data .
Thanks
Not pretty but I have a similar application.
Have a class with 5 base properties then a variable number of fields.
The fields I put in a List.
Can bind rows to a collection but not columns.
So I use a ListView Gridview where I build up the columns in code behind.
Bind the columns to Field[0], Field[1], ...
In you case you could have base class Bclass with the base Properties and a Property List
In your List<Fields> you just iterate the properties of the List<ExtensionClass>
Clearly the List<Bclass> needs to all have List<Extension> class with the same length in every item of the binding breaks.
I have the next 2 grids and the same header structure:
grids structure
The most importent thing from this structure is to implement the double line functionality on the header and also on the grids.
I need to have the sorting functionality on the first line and also on the second, and to have the default header style on bought lines( because if I add 2 textblocks in one header they will not have this functionality).
Is this possible?
This might be part of you answer
<TextBlock>LineOne<LineBreak/>LineTwo</TextBlock>
I'm working on a new project where the design calls for dynamic rows and columns displayed in some form of grid. I think I can accomplish this very hackishly using the plain ol' Grid, but it seems like it should be possible using a "real" grid.
In my mockup, I circled the tricky bit in red. Under column 1, I have effectively 2 columns of data. The problem is the fact that my data in column 1 can span multiple rows. And the fact that column one is really two pseudo columns and each one can span a different number of rows independently. Note: the data is fake and inconsequential. I'm open to ideas for a good implementation. I can fall back to the Grid and do this all in code behind, I'm open to purchasing a datagrid that may have more power than the DataGrid and my absolute last resort/preference is to restructure this format to something a little more doable.
Thank you for any ideas you can provide.
Most commercial WPF DataGrid implementations handle hierarchical data like this. For example, Telerik's DataGrid (part of RadControls for WPF) supports hierarchical data in multiple formats.
Typically, the default styling is a bit different than yours above, but can be adapted to that format via styling.
I am building a Silverlight application where one of the tasks will involve the user selecting one item from a list of approximately 1300 items. What would be some of the best ways to present this list to the user? I think 1300 items in a ComboBox is too many. Is it? What are the best practices for this kind of situation? The items are inventory locations that have a pattern such as:
Row 1 - Aisle 1 - Level 1
Row 1 - Aisle 1 - Level 2
...
Row 1 - Aisle 2 - Level 1
...
Row 2 - Aisle 1 - Level 1
and so on.
There will also be some other locations such as: Shipping Dock, Staging Area etc...
I would like to possibly have a TextBox and ListBox where the ListBox would start be populated with matches to what the user enters into the TextBox. The data could be from a web service or stored in Isolated Storage?
Yes, 1300 is too many for a combo box. Using a combo box to select my country on a website always seems borderline to me, and 1300 is more than that.
With your data structure I highly recommend choosing row, then aisle, then level as three separate things. Update the next box each time. Within each selection, list boxes are faster to use than combo boxes, but take up more screen space.
Use a list (or table if there's more info) with an edit box above that filters the list based on the text as the user types.
This is different from what's suggested in the question as by default it shows all the data and then filters it down.
It sounds like your items are highly grouped. This means you can either use a tree-view to present the items, or you can even display an image (floorplan?) of the areas which can be selected.
Having a textbox with autocomplete (and a list of -say- 20 best guesses update in realtime next to the textbox) would be the old-skool way of solving this.
I agree with both #tom and #davidrutten. Either a treeview or autocomplete type controls sound the best. Look at the TreeView and AutoCompleteBox controls in the Silverlight toolkit