PC Review


Reply
Thread Tools Rate Thread

combobox SelectedIndexChanged

 
 
Mario Krsnic
Guest
Posts: n/a
 
      19th Aug 2010
Hello everybody,
I have on the form combobox populated with names of patients. If the user
changes the selectedindex, the respective patient data appear.

Private Sub frmNursing_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
dtPatients = GetDataTable(OpenConnection, SQLString)
Me.cmbPatients.SelectedIndex = 0
end sub
Private Sub cmbPatients_SelectedIndexChanged(ByVal sender As Object, ByVal
e As System.EventArgs) Handles cmbPatients.SelectedIndexChanged

dtnursing = GetDataTable(OpenConnection, "select * from nursing where
PatientID = " &
CInt(dtPatients.Rows(Me.cmbPatients.SelectedIndex).Item("PatientID").ToString()))
bs.DataSource = dtnursing

End Sub

Now some customers told me that sometimes happens after setting the
selectedindex to the first name (selectedindex 0) that instead of data of
patient 1 some other or recent added data of other patients appear. After
closing and starting the form the correct data appear.
I could not reproduce this behavior but maybe there is a problem in my code
that I am not able to see.
Can you help me?
Thanks
Mario

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ComboBox and SelectedIndexChanged Hilton Microsoft Dot NET Compact Framework 0 16th Nov 2006 07:15 PM
Combobox SelectedIndexChanged =?Utf-8?B?TmlnZ3k=?= Microsoft Dot NET Framework Forms 2 15th Aug 2005 10:49 PM
ComboBox.SelectedIndexChanged =?Utf-8?B?Q2VjaQ==?= Microsoft Dot NET 3 29th Mar 2005 05:05 PM
selectedIndexChanged of combobox Romain TAILLANDIER Microsoft Dot NET Compact Framework 4 12th Jan 2004 02:33 PM
ComboBox SelectedIndexChanged Lezza Microsoft Dot NET Framework Forms 2 25th Nov 2003 02:05 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:50 AM.