Quantcast
Channel: Windows Forms Data Controls and Databinding forum
Viewing all articles
Browse latest Browse all 2535

DataGridViewComboBoxColumn items get padded to database column size on insert

$
0
0

I have a DataGridView with a ComboBoxColumn and three items. "MONTHLY", "WEEKLY" and "DAILY".

The Database column for that field is NVARCHAR(20)

I run the program and choose a value and then do a TableAdapter.Update().

Data is added but the ComboBoxColumn data in the database (SQL 2008) is 20 characters.

So when I try and "refill" the DataGridView the column data does not match the ComboBoxColumn items and it throws an exception.

Change/Update works fine.


Viewing all articles
Browse latest Browse all 2535

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>