Quantcast
Channel: Windows Forms Data Controls and Databinding forum
Viewing all articles
Browse latest Browse all 2535

Programmetically How to set datarow value to combobox selected value?

$
0
0

Hi,

    I am trying to set datarow property in to combobox selected value but i am unable to set.

my code is

  cbSubject.SelectedValue = dr["Subject"] != null ? Convert.ToInt16(dr["Subject"]) : (Int16)(-1);

dr["Subject"] is nothing but combobox value

below link i tried but i am unable to set ,please any one having relevant information just share it.

http://stackoverflow.com/questions/18119624/selectedvalue-for-combobox-not-getting-set

Thanks Regards

Shankar


Viewing all articles
Browse latest Browse all 2535

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>