Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: VB.NET
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 21-Feb-13 2:20am
vidkaat528
Comments
joshrduncan2012 at 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 at 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

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

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.
  Permalink  
Comments
vidkaat at 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)

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 470
1 mhegazy94 460
2 Ravi Bhavnani 190
3 Kornfeld Eliyahu Peter 185
4 Shemeemsha RA 160
0 Sergey Alexandrovich Kryukov 7,135
1 OriginalGriff 6,801
2 CPallini 5,350
3 George Jonsson 3,619
4 Gihan Liyanage 2,797


Advertise | Privacy | Mobile
Web01 | 2.8.140922.1 | Last Updated 21 Feb 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100