I need to build a blotter using csharp and WPF. Basically, like an excel sheet but would have the capability of customizing backgrounds of each cell or setting the value of each cell. But not sure where to start.
If anybody build blotters in csharp or WPF, a few pointers on where to get started would be great. If you can suggest some good open source blotters that I can copy and enhance, that would also be great.
I cannot use standard data grids as they lack many of the capabilities I am looking for.
I know windows forms and applications related to that which have standard controls but to create cells that are editable/customizable like excel, not sure where to start....
Take a look at the Adaptable Blotter (www.adaptableblotter.com).
It includes all the functionality that you seek and works with a number of different WPF grid controls, both vendor and open source. There is a single set of screens giving you advanced search, flashing cells, bulk editing etc but with individual implementations for each underlying grid.
You can use a UniformGrid to create the Grid. You can put Textboxes or even more advanced UserControls into the cells.
Related
I need to create an application where the main activity has to contain numerical data like in a DataGridView in windows form.
I have to display a number of rows that can change over time depending on some calculation (but it will never be less than 8 rows) and 5 columns.
Each cell of this table will contain a value.
When using windows form I was using DataGridView for the purpose of displaying the data and I was able to programmatically add a new row if needed by using the command:
myGridView.Rows.Add()
and to read the information in myGridView:
foreach (DataGridViewRow row in myGridView.Rows)
{
if (row.Cells[1].Value != null)
// do something
}
What is the best way to achieve this in Xamarin? I cannot see the exact same equivalent as DataGridView. Thanks for the help.
No, unfortunately there's not such thing in Xamarin.Forms (neither Xamarin.IOS or Xamarin.Android) and the main reason is that the native platforms (iOS and Android) do not have it as a native control.
In Xamarin.Forms there is a Grid control but its use is mainly for layouts and cannot be Databinded like the DataGridView.
The good thing is that you have everything you need to make one for your own. Subclass the Grid, add some binding properties and create custom renderer for each platform you want to support, you might have to do a little more than this but at least this could be a good start.
Note: I did a quick search for an open source project and this one looks very interesting. Take a look it might probably do the job you need.
I recently built my own data grid control for Xamarin Forms since I couldn't find one that met my needs. If you're still looking for a data grid control, I've published mine on Nuget and it is on Github. It's completely free to use. Let me know if it helps you out!
It is called the NoFrillsDataGrid.
Github: https://github.com/davepruitt/NoFrillsDataGrid
Nuget: https://www.nuget.org/packages/NoFrills.Xamarin.Forms/
What WPF control should I used to build a high performance grid?
I want to be able to have cell level control so I can update a cell and have the grid only redraw that cell.
The DataGrid doesn't seem to give cell level control.
I need to support 10000 rows with lots of cell updates (say 200 per second).
Thanks
If you dont want to try 3rd party data grids then did u atleast give WPF Datagrid a try? It does support virtualization at row and column level. Plus cell level control is available thru CellStyle for DataGridCell type. You can even attach any behavior to DataGridCell and then gain exclusive access over it and drill into its visual tree and perform any kind of performance improvements you want locally to its contents.
I have been using WPF datagrid for various requirements (hierarchical data display without row definitions and group styles, frequent data updates, large number of columns, frequent editable and validation based scenarios, adorning virtulaized cells and deferred scrolling with guesswork for scroll heuristics etc..)
You can play around with it to the fullest. Codeplex website has source code of last toolkit based WPF data grid available.
Let me know if this helps.
IF you need performance, your best option is to measure, measure, measure.
Build a quick prototype using each of the DataGrid classes you're looking at, using "realistic" sample data.
See which ones perform well, and which ones don't.
The Telerik RadGrid for WPF supports both Row- and Column-Virtualization and might be what you are looking for.
I'd not refuse a-priori a winform-approach since the huge amount of data and the relatively high speed of the updates. In a similar scenario, you may manage even much more data without affecting the performance significantly.
I'm a big fan of WPF, but not always it solve all the problems.
There is a functionality I was dreaming of implementing one day, and that day is today.
I have a datagrid with hundreds of lines and my client doesn't even want to hear about paging (special use case). So I would like to be able to resize all rows AND content (text) with a "magnifying glass +/- " tool that affects the height of all rows in my DGV and also the Font of the text in it.
There are many ways to perform this and I wanted to ask what was a convenient and advisable way to do this (As I am more of a server-side than GUI oriented developer)
Thanks in advance
I guess you need to use WPF ..
Refer to the following link:
http://blogs.msdn.com/b/ivo_manolov/archive/2007/10/05/ui-scaling-ui-zooming-with-wpf.aspx
You can use host WPF controls in windows-based applications.
Refer to the following links ..
http://msdn.microsoft.com/en-us/library/ms742215.aspx
WPF control in windows forms?
http://www.programmerfish.com/how-to-add-wpf-controls-in-simple-windows-forms/
http://blogs.infragistics.com/wpf/articles/hosting-a-wpf-control-in-a-windows-forms-application.aspx
Does anyone know of a good listview component other than the one included with Visual Studio (as it looks kinda boring)?
Devexpress are good too. http://devexpress.com
(Quick edit missed the Winforms bit). For Winforms controls, I'd recommend Telerik.
If you want to modify the look of your form and controls try DotNetSkin. You can modify controls from existing windows themes or your own controls by modifying it.
If you want a free ListView, you should try ObjectListView, it has a LOT of features.
You better be careful about the license if you want to use it in a commercial product though. See these answers for more information about the license: here and there.
You may try Better ListView.
It has native look and feel. It also supports many nice features, like hierarchical items, multi-column sorting, data binding, three-state check boxes... the list goes on :-)
It is not a ListView wrapper, but self-contained control so it fixes all inherent flaws of .NET ListView (these are enumerated on ComponentOwl's website).
Take into account the 10Tec iGrid control:
Its main features are:
Multi-column sorting with indication in column headers.
Grouping and autofilter are also available.
"Subitems" (cells) can be edited.
Rows can have different heights.
Rows/cells can be formatted dynamically easily.
Built-in incremental search.
TreeListView mode.
No flickering and fast work with 100'000+ rows.
To find out more, start from reading this article:
Editable ListView Replacement
See also other cross-referenced articles on the site.
Somewhere on net on one Blog I read a sentence that is "DataGridView something like Boeing 777, but what is goal when I do not know how to fly.
Before I goo deep in creating my projects I wanna know is there alternative for DataGridView in C#.
Something like jQuery in WEB api.
The favors things which I am looking for is that is simple for using, if its posibile to be freeware and looks smoth and modern.
Best regards
Admir
If you want to fly one person across town you can learn to fly a Piper Cub. If you want to fly hundreds across an ocean you need to learn to fly a 777.
There are many ways of displaying data in WinForms applications; which one is best for you depends on what you're trying to do. If you want to show a fixed, non-editable, non-scrollable list of data you can use a DataList; simple and limited. If you want to add scrolling you can output the data to a scrolling textbox.
If you want to handle a scrolling grid of multiple rows with multiple, resizable, editable columns you will need to move to a DataGrid or DataGridView.
There are many alternatives to DataGridViews; simpler controls provide fewer features and more functional controls are more complex.
I have implemented the datagridview extensively as an unbound control in a windows forms project using Visual Studio 2008. Looking back, implementing this control has consumed a large amount of time, mostly because it is loaded with bugs and peculiar behavior that should have been fixed rather than just 'documented'. A good data grid control is essential to any application of substance. I would recommend looking for a third party alternative from a company that is more interested in getting it right rather than just getting something out there.
The DataGridView is perfectly easy to use without going too deep. If all you want to do is display data in a grid, create a DataGridView and turn off features like adding and editing rows. The fact that it's got all of these incredibly complex features is really only an issue when you start needing to use them - and in that case, you'll be glad you're using it.
DevExpress has a really good gridview.