Click here to Skip to main content
15,888,351 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
In particular grid cell i display CellComboBox with DisplayMember and DisplayValue. The problem is that when i select Cell ComboBox item after this in Grid cell show Value of select item not show selected Item.
Posted
Comments
TweakBird 20-May-11 11:04am    
Can you show your code ?. i will try to help you.
raviprajapat 20-May-11 11:54am    
cmbTCTackName = New DataGridViewComboBoxCell
dt2 = dataHandler.Filldatatable("select id, TrackSubName from MasterTrackSubItem WHERE (IsDelete=0 or IsDelete IS NULL) AND TrackName='" & grvPermitsRequiredInspection.Item("cmbTrack", roIndex).Value.ToString.Trim & "'")
cmbTCTackName.DataSource = dt2
cmbTCTackName.DisplayMember = dt2.Columns("TrackSubName").ToString
cmbTCTackName.ValueMember = dt2.Columns("Id").ToString
grvPermitsRequiredInspection(5, roIndex) = cmbTCTackName
TweakBird 20-May-11 12:57pm    
Try this, cmbTCTackName.DataSource = dt2.DefaultView . Rest of same.

1 solution

Have look on this CP Article How to Host a Color Picker Combobox in Windows Forms DataGridView Cells[^]. Try the sample.

Some useful links

Link 1[^]
Link 2[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900