Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Yes, it is possible to conceal the value column within a listbox using vb.net. One way to achieve this is by setting the DisplayMember property of the listbox to the property of the object that you want to display (e.g. the name of an object) and the ValueMember property to the property of the object that you want to retrieve (e.g. the ID of an object). Then, you can retrieve the value of the selected item by accessing the SelectedValue property of the listbox, which will return the value of the ValueMember property of the selected item. This way, the user will see the display member property (e.g. the name of an object) while the value member property (e.g. the ID of an object) will be hidden from view.