How to add a row to the datatable from the code?

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for PostgreSQL
Post Reply
Darth Pincho
Posts: 4
Joined: Mon 02 Jun 2008 22:41
Location: Caracas - Venezuela

How to add a row to the datatable from the code?

Post by Darth Pincho » Sat 07 Jun 2008 19:51

Hi. I had a really big progess this week using your software, is great. Im almost sure i will buy it once trial period expired. I need to do some more tests.

Now im trying to add the word "Select..." to a combobox that is filled from a PgSqldatatable. Actually the ComboBox shows all my database values, great. But i need to have a neutral value in the combo, like "Select..." in order to determine if the user select something. Obviously this value doenst come from the database, i have to imput it manually from the code.


I need to input this value in order to do something like this:

Code: Select all

 If Me.ComboBoxTipos.SelectedItem  "Select..." Then 'This means the user selected something
            Me.DoSomeActions()
        End If
How can i manipulate the datatable or the combo, i dont know, to add this new value?

Alexey.mdr
Posts: 729
Joined: Thu 13 Dec 2007 10:24

Post by Alexey.mdr » Mon 09 Jun 2008 07:11

Hello,

You can use something like the following:

Code: Select all

Me.ComboBoxTipos.Items.Add("Select...")
Me.ComboBoxTipos.SelectesIndex = 0
Regards,
Alexey.

Post Reply