Is there a suitable grid control in Xamarin Android, table-like, for a business app that supports databindind with collections that help altering various columns/cells?
As far as I find out, there are alternatives only by inheriting an existing control like ListView and creating a custom control.
If a control as one I am searching for does not exist, what could be the best option left?
Many thanks in advance!!
Is there a suitable grid control in Xamarin Android, table-like, for a business app that supports databindind with collections that help altering various columns/cells?
You can refer to GridView, it displays items in a two-dimensional, scrollable grid.
And this tutorial will show how to create a Grid View.
Related
I need some help in creating a grouped ListView for an Universal Windows App.
I found an example to do that but it was for windows 8 phone, and it was using CollectionViewSource class and bind the ListView ItemsSource to it. But this is not available anymore, at least for Universal Windows App template.
Please Help.
Thanks in advance.
There is no default XAML control for UWP that represents Expandable Listview.
However you can create your own or use custom one. Below you can find two possible solutions:
First one - I have created "Expandable ListView" like on the picture below.
You can find whole source code on my GitHub:
https://github.com/Daniel-Krzyczkowski/Windows10/tree/master/ExpandableListView
Second solution is to use "WinRTXAMLToolkit" which contains TreeView control:
https://github.com/xyzzer/WinRTXamlToolkit
Here you can find the post how to customize the control:
WinRT XAML Toolkit TreeView expanded display
Hope that I helped.
I am working on a Win8 app destined for the Windows Store. Hurdles I am trying to overcome is how to deal with the different ways an app can be displayed.
Currently, my main pages is a LayoutAwarePage so it has logic to handle different visual states. However, my question is more how to make my page render differently depending on its state.
I thought, initially, that you basically created a layout for each state that the application supports. But it seems like the VisualStateManager portion of the XAML is just an area where you make piecemeal modifications to the design (hide an element, change an alignment).
I am working with a grid that has many columns and rows to organize my controls and it looks great in fullscreen. However, this doesn't work at all in the snapped state, as most of my controls become hidden off screen. I could certainly add a ScrollViewer control, but this is basically a hack and a usability nightmare for a user.
Thanks for any insight!
It might be that your app doesn't lend itself to snapped view. You are allowed to simply display a message / image that states this. Alternatively, consider just showing the columns that are most important.
The standard MS way seems to be to replace horizontal oriented controls with vertical ones - maybe a listview or something would look better. You'll probably find your code easier to read if you have one control for snapped and another for full screen.
Not exactly related to your question, but Blend works very well with XAML to allow you to manipulate the grid or show the relevant control.
Here is a very good guide from Jerry Nixon.
http://blog.jerrynixon.com/2012/12/walkthrough-implementing-snapview-in.html
I'm looking for a way to create a DataGridView that has rows that when clicked expand to reveal another datagridview right below them. Is this possible to accomplish without creating a brand new datagridview-like control or am I better off displaying the nested datagridviews elsewhere?
(Here's an article that explains how to do it in ASP.NET. however, it's not clear whether it can be done with Windows Forms:
http://msdn.microsoft.com/en-us/magazine/cc164077.aspx)
You will allways need a custom control (free or paid) to achive this.
Tree View with Columns(free under CPOL)
DevExpress XtraGrid (paid)
Janus GridEx (paid)
im currently working on a project that involves listing contacts with a photo and email address, kind of like messengers contact lists.
The problem is ListView just dont cut it!
I need something that's like the MSN Live Messenger contact lists, Witch consist of a large padded area with photo(32px), And text to the right of the photo but also have the expandable headers.
Anybody give me some advice on any references i can use or if its possible to do with Tree-view can someone show me an example.
Kind Regards.
I would recommend making a WPF user control and hosting it in in an ElementHost control in your Windows Forms project. I've used WPF inside WinForms in the past and it works great.
Assuming you add an element host control onto your WinForms called elementHost1:
elementHost1.Child = new MyWPFControl();
Are you using WPF? You could use a ListView after all with an Expander for the ItemTemplate. Blacklight also has a great AnimatedExpander: see Blacklight releases.
Hope that helps!
Can anybody help me with embedding controls in the listview. I need to add button controls as subitem of listview. thanks
Well, you could be talking about the Windows Forms ListView, in which case you're pretty much SOL (sh*t outta luck.) You can custom draw on the ListView but even that has limitations in Windows Forms.
Or you could be talking about the Windows Presentation Foundation ListView. In this case it's really quite simple. You can create a DataTemplate that you associate with the ListView's columnn. Here's an example.
Or finally you could be talking about the ASP.NET ListView control which also has data templating support but the implementation is a bit different from WPF. Here's an example of that.
Use ObjectListView control which is opensource. It is excellent and is derived from ListView in Window.Forms.
Try Better ListView Express. It is free and allows custom embedded controls:
Better ListView has been created to fix known issues of the regular .NET ListView and solve common issues such as this one out of the box.
If you can use another control instead of a listview, try the DataGridView - you can add any type of control to a cell (subitem).
http://msdn.microsoft.com/en-us/library/e0ywh3cz.aspx