Editable data grid for C# WinForms - c#

I need to present the user with a matrix of which one column is editable. What is the most appropriate control to use?
I can't use a ListView because you can only edit the first column (the label) and that's no good to me.
Is the DataGridView the way to go, or are there third party alternative components that do a better job?

DataGridView is the best choice as it is free and comes with .NET WinForms 2.0. You can define editable columns or read-only. Plus you can customize the appearance if required.

DataGridView is good.
If you prefer a prettier interface, Telerik controls are better.

If DataGridView will handle your needs, it's the right answer. Another option (although it seems to be unpopular around these parts!) is Infragistics NetAdvantage. The downsides to Infragistics are primarily a high cost and somewhat steep learning curve; the upsides are that these are some of the most powerful controls you'll ever find -- so if you need their flexibility, go for it.
I don't have experience with Telerik (which has been mentioned by others here), but they do seem quite good. Being that my company has invested fairly heavily in Infragistics, we're not liable to switch any time soon ...

Related

How can I create my own ListView UserControl?

Ok so I have a table cell that I would like to use in this custom ListView UserControl, so I was wondering how exactly do you set one of these up and how do you call the cells to be my custom ones? Any help would be greatly appreciated :)
The ListView control is a b**ch, so if you are really planning to get your hands dirty with it, be prepared for a great big mess.
If you would prefer a ready-made solution, I will point you to this one: CodeProject - ObjectListView
We at ComponentOwl made custom ListView control called Better ListView. (Or maybe you can be interested in the freeware edition Better ListView Express).
You can also try the suggested ObjectListView.
The ListView control is -very- complex and contains myriads of little features all we had to implement. So I recommend you to look for a finished 3rd party control, since coding this is challenging (the BetterListView hit 40K lines of code only to meet requirements of ListView, now having about 80K+ lines of code!)

What are things/points to keep in mind while developing a reusable custom control?

Windows Form (in C#) - I need to create a custom listbox control for the following requirement:
There is a listbox with a long list of items. I want the user to be able to click in the list, and then start typing and have it automatically take them to the matching item (I call this "type ahead"). It needs to be able to do this for as many characters as they type that have a match.
This control should be really reusable without much changes.
What are things/points I should keep in mind while developing a reusable custom control? (if you provide a good pattern as a sample... will be more helpful)
In Real World scenario the first decision should be buy vs build. if your application is a serious one and not just for hobby and there is budget for it I would check some of those great controls collections like DevExpress or Telerik for WinForms. You would need a grid as well at some point, eventually, and surely your custom or framework one cannot compete theirs.
I refer to those libraries because i believe they already have a listbox with autocomplete as you described in your requirements. check the online demos on their websites...

Increase Performance of DevEx WPF Grid

I'm using the DevEx DXGrid (WPF) to show about 2,000 rows of data. I'm using a DataRow Template to get Master-Detail behavior (a new detail grid for each row).
My application responds extremely slow to almost all use input (to the grid). for example:
scrolling
expand/collapse group rows
resize app window
I've contacted DevEx support about this - but they say the solution is non trivial and they are waiting until next major version to 'fix' this.
Have you found any solutions to these problems? I'm hoping there is a way to structure xaml or code to avoid some of the performance problems. I'd be very interested to hear what performance problems you've encountered with the DXGrid and how you solved (or not) them.
thanks.
Indeed, we have changed the way the DXGrid works and it should operate faster. However, this improvement will be only visible in 10.2 and it relates the expanding / collapsing group rows.
If you have problems with scrolling, please post a sample project in the support center showing your performance issues. We will try to improve the control based on your particular situation.
As a general rule of thumb, simply put: the less controls, the faster it will be.
When using the GridControl, you may want to look into using the CellDisplayTemplate and use a very lightweight control to display the content of the cell, and then use the CellEditTemplate for your heavier edit control, as the CellEditTemplate is not is not loaded until the user enters the cell. This becomes very powerful the bigger your GridControl is.
See 3 or 4 for more info on GridControl optimization.

DataGridView Control with Grouping Capabilities

I've seem some other posts regarding datagrids that allows grouping. I've downloaded the DevExpress DataGrid for Windows Forms but it really looks complicated. I actually need a Datagrid that derives from DataGridView as a lot of my data binding is code driven and uses the DatagridView classes.
I've managed to find this OutLookgrid on CodeProject, I was wondering if anyone used this before?
http://www.codeproject.com/KB/grid/OutlookGrid.aspx
I've downloaded the DevExpress
DataGrid for Windows Forms but it
really looks complicated.
Looking really complicated and being really complicated are not the same thing. I use the DX XtraGrid everyday and I can assure you its as complicated as:
gridControl1.DataSource = myDataTable;
.. if you want just a standard grid out of the box.

Silverlight Toolkit TreeView control and expandability

Is it possible to configure the TreeView control in the Silverlight tookit such that some or all of the hierarchy levels will be automatically expanded and ideally something that can't be collapsed at that level.
I'm using this control in large part due to the ease of handling hierarchical data and the ease with which I CAN expand/collapse levels. I'm being asked to do this selectively (i.e. only at the first level should I allow expand/collapse). I'm examining a Hierarchical Data Template to try and make this happen, but am having little luck and will certainly consider other options including a different control entirely if need be. My boss DOES want me to avoid having to purchase a control if at all possible.
Thanks in advance.
Cheers,
Steve
Just an FYI for the community. I was provided and answer to this question here. The upshot is that this can be accomplished with a combination of data templates and styles.

Categories