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

Custom ComboBox in datagridview

$
0
0
Hi.
 
Using datagridview control to list and collect information to/from user, i was trying to create a custom datagridview column like datagridviewtextboxcolumn which turn to a combobox when enters in edit mode, which could display items for user to choose and use other combobox functions as autocomplete,etc.
After searching for identical information, i wrote a class ComboTextColumn inheriting from datagridviewcolumn, a class ComboTextCell inheriting from datagridviewtextboxcell and a class ComboTextEditingControl inheriting from combobox.
Now, it already shows the combobox when enters edit mode but i can't get items to fill the combobox item's list. I tried to inherit the combotextcolumn form datagridviewcomboboxcolumn but then i can't show cells as datagridviewtextboxcell, also tried, inheriting from datagridviewcolumn, create a property called Items where i could store items but i can't pass those items to items of the combobox that appears when enters in edit mode.
 I tried put code in here but question became to large and i had to remove it
 
if someone could help me,... i'd appreciate a lot.
Thanks for your time, and patience

Viewing all articles
Browse latest Browse all 2535

Trending Articles



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