kahlua001
Contributor
Hi,
I have a datagridview with a combobox column. the gridview is bound to a datatable as a datasource. The combobox display and value members are set to another datatable so it fills on render and is auto selected based on the row's value. The problem I am having is when I add a new row and select a value from the combobox and then click away from the cell, the value of jumps to a different value, I can't really see a pattern for which value it set to, its just different. Any clues what I'm doing wrong? The list is like 40 items. I have another combobox in the same grid with about 5 values and that works fine. THanks
exItem.DataSource = globals.dtInventoryItems 'This is teh comboxbox
exItem.DataPropertyName = "item_id"
exItem.DisplayMember = "description"
exItem.ValueMember = "item_id"
dgrdvRules.AutoGenerateColumns = False
dgrdvRules.DataSource = globals.dtEventInventoryRules 'This is the datagridview
Its pretty simple, not sure what I'm doing wrong.
I have a datagridview with a combobox column. the gridview is bound to a datatable as a datasource. The combobox display and value members are set to another datatable so it fills on render and is auto selected based on the row's value. The problem I am having is when I add a new row and select a value from the combobox and then click away from the cell, the value of jumps to a different value, I can't really see a pattern for which value it set to, its just different. Any clues what I'm doing wrong? The list is like 40 items. I have another combobox in the same grid with about 5 values and that works fine. THanks
exItem.DataSource = globals.dtInventoryItems 'This is teh comboxbox
exItem.DataPropertyName = "item_id"
exItem.DisplayMember = "description"
exItem.ValueMember = "item_id"
dgrdvRules.AutoGenerateColumns = False
dgrdvRules.DataSource = globals.dtEventInventoryRules 'This is the datagridview
Its pretty simple, not sure what I'm doing wrong.