C
C#10mo ago
Livid

✅ winform databinding

how to i add a integer to a textbox.text
10 Replies
Bailey
Bailey10mo ago
Hi, the only way is to convert it to a string.
SG97
SG9710mo ago
is databinding actually what you want here
Livid
Livid10mo ago
yes that was a example i have a textbox but i want to add a databind to a instance of a custom class
SG97
SG9710mo ago
look into BindingSource
Livid
Livid10mo ago
why does datasource no require a object to be a string while databinds in this case does
SG97
SG9710mo ago
I've no idea what you mean, can you post your current code
Bailey
Bailey10mo ago
Data binding overview - WPF .NET
Learn about the different data sources you can add to your project in Windows Presentation Foundation for .NET. Data sources can be bound to XAML elements to create dynamic apps.
Livid
Livid10mo ago
Cannot bind to property 'Items' because it is read-only. comboBoxSomething.DataBindings.Add(...);
SG97
SG9710mo ago
try setting the DataSource?
Livid
Livid10mo ago
yes does it automatically set the var as the selected item or do i manually have to do myVar = comboBox1.SelectedItem
Want results from more Discord servers?
Add your server
More Posts