Private Sub cmbID_SelectedIndexChanged(sender As System.Object, e As System.EventArgs) Handles cmbCDMID.SelectedIndexChanged
if cmbID.text <> "" then
LoadDetail(cmbID.SelectedValue)
end if
End Sub
อาจจะต้องใช้ try เพื่อ ตัด error
Date :
2017-03-25 15:35:19
By :
lamaka.tor
No. 2
Guest
Code (VB.NET)
With Me.cmbID
RemoveHandler .SelectedValueChanged, AddressOf cmbID_SelectedIndexChanged
.DisplayMember = "ID"
.ValueMember = "ID"
.DataSource = dt
.SelectedIndex = -1
AddHandler .SelectedValueChanged, AddressOf cmbID_SelectedIndexChanged
End With