Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

4
  • Are you sure you're not using cmbEMPType.SelectedItem? This would normally get the selected object (EmpType), while cmbEMPType.SelectedValue would get the property specified in 'ValueMember'. Commented Feb 14, 2011 at 12:59
  • Yes,i am sure. I checked it thrice. but unfortunately there is SelectedValue. in fact you can also check its return type . it showing 'object'. Commented Feb 14, 2011 at 13:15
  • it will always return object because the value can be of any type so you need to cast it anyway. Please post more code as I asked in my other comment and we'll see what's going on. Commented Feb 14, 2011 at 13:21
  • what do you mean by "asking of create the EMPType object"? Do you get error? If so post here the full error message.. Commented Feb 14, 2011 at 14:02