Click here to Skip to main content
16,012,116 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi All,

I have a DataTable m_dtDelayedDeliveryDays in my.vb application.With this Data table i loaded my combo box .

The Data table has values like this:
ID DelayDays
6 0
8 3
9 7
10 15
11 20
12 30


Now the selected value's id is loaded back into the data table. When i retrieve the form i would get the ID ...So now i want the value of the ID and display it in the combo box again...Please help.
Posted
Comments
joshrduncan2012 21-Feb-13 9:16am    
This question looks familiar from earlier. Please do not repeat your question.

What have you done to accomplish this so far?
vidkaat 21-Feb-13 9:27am    
No it is not. I have done this:
m_dtDelayedDeliveryDays = GetDelayedDeliveryDays()

Dim int As Integer = m_objUIMgr.DeliveryDelayDaysID
If int > 0 Then

Dim dr As DataRow = m_dtDelayedDeliveryDays.Rows(int - 1)
Dim str As String = dr("DeliveryDelayDays").ToString()
cmbDelayedDeliveryDays.SelectedText = str


Else

cmbDelayedDeliveryDays.SelectedIndex = -1
For Each dr As DataRow In m_dtDelayedDeliveryDays.Rows
Me.cmbDelayedDeliveryDays.Items.Add(dr("DeliveryDelayDays"))
Next
End If

I want to display the value of str in my combo box...How do i do that.

Thanks for ur help.

1 solution

You already posted the same around an hour back with more details : Combo box Reloading logic[^]

Please don't repost. Have patience and someone will help.
 
Share this answer
 
Comments
vidkaat 21-Feb-13 9:26am    
Thanks for ur solution. This is a different question.

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