Getting Control Properties by Function VB.NET -


I am trying to create a function that will create some properties for control (in this case, a blankbox). However, the received control is not getting value properties from the function.

Here is the function that makes the property.

  public function getComboboxProperties (ByVal dt ComboBox try dim ctrlCombobox as as DataTable) As New ComboBox ctrlCombobox.BindingContext = new BindingContext ctrlCombobox .DataSource = DT ctrlCombobox.ValueMember = " ID "ctrlCombobox.DisplayMember =" Description "getComboboxProperties = ctrlCombobox catch no exception return as former MessageBox.Show (ex.ToString," ", MessageBoxButtons.OK, MessageBoxIcon.Error) end Try end function  < / Pre> 

New value has passed:

  cmbCompanyStatus = clsCommon.getComboboxProperties (dtStatus)   

h I open does not take form, Comboboks CMB Companstats Datasrs and does not show anything.

Any help would be greatly appreciated. Thanks !.

Given this, you remember the following:

  'Egipt ctrlCombobox.DataSource = ctrlCombobox.ValueMember = "id" ctrlCombobox.DisplayMember = "Details" ctrlCombobox.DataBind () DT' & lt; -------------------- This line joins combobox properties = ctrlCombobox    

Comments

Popular posts from this blog

java - ImportError: No module named py4j.java_gateway -

python - Receiving "KeyError" after decoding json result from url -

C++ Array Type Not Assignable in Copy Constructor -