https://github.com/karenpayneoregon/datagridview-combobox
Provides a code sample and instructions for using a DataGridViewComboBoxColumn for Windows Forms for .NET Core
https://github.com/karenpayneoregon/datagridview-combobox
chsarp-core datagridview windows-forms
Last synced: 2 months ago
JSON representation
Provides a code sample and instructions for using a DataGridViewComboBoxColumn for Windows Forms for .NET Core
- Host: GitHub
- URL: https://github.com/karenpayneoregon/datagridview-combobox
- Owner: karenpayneoregon
- Created: 2023-08-08T09:51:48.000Z (almost 2 years ago)
- Default Branch: master
- Last Pushed: 2024-04-02T23:48:39.000Z (about 1 year ago)
- Last Synced: 2025-01-29T00:28:49.668Z (4 months ago)
- Topics: chsarp-core, datagridview, windows-forms
- Language: C#
- Homepage:
- Size: 279 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# About
Provides a basic code sample for working with a DataGridView ComboBox were the only time the DataGridView is touched is for setting the DataGridView up, otherwise all access to data is using two BindingSource components.
Since the BindingNavigator is not in Visual Studio toolbox one is included.
Screenshot of finished form.
- Uses Microsoft Visual Studio 2022, will work on later versions
- .NET Core 7
- SQL-Server database
- Uses BindingSource and DataTable, sure we could uses classes which is mentioned in the project's readme file and high level how to do this including how to implement sorting with a BindingList.## Motivation
It is 2023 and no matter that developers are using ASP.NET Core, Razor Pages, WPF and MAUI there are still developers asking how to use a ComboBox in a DataGridView in forums like Stackoverflow.
## Instructions
- See readme.md in the code sample project
- Follow the instructions to setup the database
- Run the project
- Inspect the code, learn...
- Adapt to a project## Related
[GitHub repository](https://github.com/karenpayneoregon/WindowsFormsMoveItemsUpDown): Windows Forms move items up/down which has projects in .NET Framework and .NET Core 7 Framework.

## Article
[Learn to use a databound DataGridView ComboBox in Windows Forms](https://dev.to/karenpayneoregon/learn-to-use-a-databound-datagridview-combobox-in-windows-forms-1coa)