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

ComboBox is not Refreshed

$
0
0

Hello,

I have a combobox in my one form like City name, And I have Master form for that so I defined fill city combo public so i can call it on form close event of that master...

but combobox is not refreshed with new add or delete value...

Here is my code..

string qry = "Select * from City";
        dtcity = cc.GetDataSection(qry, connection);
        cmbCity.DataSource = null;
        cmbCity.DisplayMember = "CityName";
        cmbCity.ValueMember = "CityId";
        cmbCity.DataSource = dtcity ;

I am getting perfect data in datatable but not in combo box....

Any help would be appreciate..

Thank u...


Viewing all articles
Browse latest Browse all 2535

Trending Articles



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