How I can get the value of the column postal when I select a row?
Hello Alejandro,
Assuming that you are using UltraComboEditor and a DataTable as a DataSource you would be able to get the desired information using a code that is similar to the following one:
((System.Data.DataRowView)(ultraComboEditor1.SelectedItem.ListObject)).Row.ItemArray[2]
Where the "SelectedItem" is the current selected row in the UltraComboEditor, "ListObject" will return the object that is represented, and getting the ItemArray[2] will be the desired value that corresponds to the "Postal" value in the selected row, since it is the last column of your data source. ItemArray contains actually contains the columns in that case.
If you have any other questions please do not hesitate to ask me.
The environment of work is a visual basic 2010 and the control is Ultracombo , It is not a control ultracomboeditor It does not admit the property .SelectedItem.ListObject
I do not understand the instruction :
It seems to me that you have changed the initial post. If you are using an UltraCombo control and you would like to get the value of the "postal" column when the DisplayValue is set to be "nombre" and ValueMembe is "id", than you could use the SelectedRow property and get it like:
ultraCombo1.SelectedRow.Cells["postal"].Value;
If that is not what you are looking for, please let me know what exactly information you need from the UltraCombo control, in order to be able to assist you further with that matter.