Jump to content
Xtreme .Net Talk

How To add new column to datatable from combobox item


Recommended Posts

Guest Majed Abbas
Posted

Hello

i want to add new column to datatable from combobox all items

my code is

 

Dim newColumn As New Data.DataColumn("Mån", GetType(System.String))

 

newColumn.DefaultValue = ComboBox1.Items.ToString

dt.Columns.Add(newColumn)

 

DataGridView3.DataSource = dt

 

 

but is not working

 

column is add but all items are System.Windows.Forms.ComboBox + ObjectCollection

any help thanks

 

Continue reading...

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...