Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Editable data grid for C# WinForms

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?

like image 775
Andrew Avatar asked Sep 22 '08 12:09

Andrew


People also ask

How do you make a DataGrid editable?

The DataGrid control supports cell and row editing functionality. By default, you can edit items directly in the DataGrid. The user can enter edit mode in a cell by pressing F2 key or double tapping on a cell. Alternatively, you can set the DataGridColumn.

How to make DataGridView cell editable in c#?

You could modify each cell within the column as read only where the cell value is not equal to null or String. Empty. This will allow the user to edit those cells that are blank and protect your data. Show activity on this post.

How to edit DataGridView?

By default, users can edit the contents of the current DataGridView text box cell by typing in it or pressing F2. This puts the cell in edit mode if all of the following conditions are met: The underlying data source supports editing.

How do you make an editable Mui table?

Making a column editable This lets the user edit any cell from the specified column. By default, only one cell at a time can have its editMode prop set to "edit" . To let your users edit all cells in a given row simultaneously, set the editMode prop to "row" . For more information, see the section on row editing.


1 Answers

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.

like image 168
Phil Wright Avatar answered Sep 22 '22 06:09

Phil Wright