September 29th, 2013, 04:48 PM
Dictionary as a Combobox Datasource...
Hi, I'm new on VC++ and I'm trying to do a basic Combobox populate.
What I need is that Combobox shows a description with an integer value behind.
So my first try was using a Dictionary but I wasn't able to bind it to the Combobox
This is my code:
In C# to acomplish this I must use a BindingSource to adapt the Dictionary, but in VC++ I don't know how to use it.
Dictionary<long, String^> time = gcnew Dictionary<long, String^>();
cbTime->DisplayMember = "Value";
cbTime->ValueMember = "Key";
cbTime->DataSource = time;
Well hope you can help me.
Thank you in advance!
Click Here to Expand Forum to Full Width
This a Codeguru.com survey!