Open cuppm opened 7 months ago
Hey @cuppm
I had the same problem. My workaround: I changed the column in the KryptonDataGridView
to DataGridViewComboBoxColumn
and did NOT use the KryptonDataGridViewComboBoxColumn
. For the design I used the FlatStyle
-property by setting it to "Flat".
Merry X-Mas from Germany
@DarthVader85PA Vielen Dank! That'll do as a work around for now. FlatStyle = Flat
makes it much cleaner, can't say I've ever messed with that property before.
Describe the bug The KryptonDataGridViewComboBoxColumn appears to ignore the property you specify in the DataSource object to use as the ValueMember. When parsing the value to send to the data bound property it sends the value of the DisplayMember. If you change the DisplayMember to be the ValueMember, it displays the wrong item in the dropdown control but will successfully save the selected item's value to the DataGridView's row item.
Here is a simple example that shows the behavior. Program.cs.txt
To Reproduce Steps to reproduce the behavior:
Expected behavior If you run the simple app and select the "No" button at startup to run the WinForms version, it will correctly bind to the ValueMember of the combobox DataSource.
Correctly displaying the Guid.Empty display value of "Blank":![image](https://github.com/Krypton-Suite/Standard-Toolkit/assets/1964795/501ac572-8983-4177-9cc6-55cc6730682b)
Successful parsing of Option 2:![image](https://github.com/Krypton-Suite/Standard-Toolkit/assets/1964795/aa74f82b-0fb1-4c56-8e5b-a26a6b08a130)
Screenshots inlined above
Desktop (please complete the following information):
Additional context