Damn right! Lots of people in tech like science topics
as much as I find AI articles long and repetitive and sometimes making it seem super weird…
I would still prefer to have stories and studies in for here…
I'm good, thanks Microsoft. I trust you adding onboard intelligence to my machine about as much as I trust my kid alone in the kitchen with an open bag of cookies. Just please don't.
Question
$phinX
This is the code:
cmbBalSheetCat.Items.Clear(); cmbBalSheetCat.DataSource = dtResults; cmbBalSheetCat.ValueMember = "BalanceSheetCategoryID"; cmbBalSheetCat.DisplayMember = "BalanceSheetCategoryName"; cmbBalSheetCat.SelectedIndex = -1;
It errors on setting the .ValueMember saying the 'Specified cast is not valid'.
dtResults is populated like so:
I dont understand why im getting this error. I have similar code for a combo on a different form that works fine!!
Do i need to specify column types or something? If so, how comes it works fine without it on other forms and not this one?
Any ideas?
Link to comment
https://www.neowin.net/forum/topic/416380-c-combobox-specified-cast-not-valid/Share on other sites
4 answers to this question
Recommended Posts