Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Hi All,

 

I was using the code as below to populate comb box

 

DataTable=getdata("Customer") 'getdata retreives the customer 'from table

combobox.datasource=datatable

combobox.displaymember="Customer"

combobox.refresh()

 

The project was deployed on test machine the combobox values were not populated. Then i changed the coding to

 

DataTable=getdata("Customer") 'getdata retreives the customer 'from table

dataview=new system.data.dataview(datatable)

combobox.datasource=dataview

combobox.displaymember="Customer"

combobox.refresh()

 

dataview.dispose()

 

I had three combobox Customer, State, City the values were populated but cleared as soon as the dataview is disposed. I changed the coding again

 

dataview=nothing

 

Now the customer and state combobox got populated but not city

 

Please Help Me urgent

Posted

Try this,

 

set the datasource, displaymember and valuemember properties of your combo box then do something like this;

 


      Me.DataSetWhatever.Clear()
            
      Me.OleDbAdapterWhatever.Fill(Me.DataSetWhatever)

My website
Posted

Re

 

Thanks

 

But the datatable is being returned by another function

 

i think i need something to do to destroy the dataview and datatable. I tried using dispose method and dataview=nothing it did'nt work

 

help me

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...