2 Replies - 322 Views - Last Post: 04 March 2013 - 03:52 AM Rate Topic: -----

#1 king_009  Icon User is offline

  • New D.I.C Head
  • member icon

Reputation: 5
  • View blog
  • Posts: 37
  • Joined: 20-August 09

Error while using multiple combobox

Posted 03 March 2013 - 03:21 AM

Hi friends,

I am facing a weird issue in my application

I m making app to store the employee details with many comboboxes taking values from database at runtime.

Whenever I select any value from any of the combobox, all other combobox value collections vanishes away.

Please help...

I am using the following code:
//Get Station Names:
            dsStation = new DataSet();
            dsStation = objAddEmp.getStations();


            cbStation.DataSource = dsStation.Tables[0].DefaultView;
            cbStation.DisplayMember = "DName";



Same code with different control name and corresponding functions use the same type of code.

Please help.

Is This A Good Question/Topic? 0
  • +

Replies To: Error while using multiple combobox

#2 Skydiver  Icon User is offline

  • Code herder
  • member icon

Reputation: 3168
  • View blog
  • Posts: 9,578
  • Joined: 05-May 12

Re: Error while using multiple combobox

Posted 03 March 2013 - 07:49 AM

Are you sharing the same DataSet across all the comboboxes, or are you creating a new one for each?
Was This Post Helpful? 0
  • +
  • -

#3 king_009  Icon User is offline

  • New D.I.C Head
  • member icon

Reputation: 5
  • View blog
  • Posts: 37
  • Joined: 20-August 09

Re: Error while using multiple combobox

Posted 04 March 2013 - 03:52 AM

I have different datasets for each combobox. that too declared globally within the class... so that they may not get destroyed after using the function and remain till the instance is running...

This post has been edited by king_009: 04 March 2013 - 08:07 AM

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1